-
-
Notifications
You must be signed in to change notification settings - Fork 137
1. Getting Started
Table of Contents
In order to run this project you need to have Docker > 1.17.05 for building the production image and Kubernetes cluster > 1.11 for running pods installed.
git clone [email protected]:vardius/go-api-boilerplate.git
Build the module. This will automatically add missing or unconverted dependencies as needed to satisfy imports for this particular build invocation
go build ./...
For more read: https://github.com/golang/go/wiki/Modules
Helm charts are used to automate the application deployment in a Kubernetes cluster. Once the application is deployed and working, it also explores how to modify the source code for publishing a new application release and how to perform rolling updates in Kubernetes using the Helm CLI.
To deploy application on Kubernetes using Helm you will typically follow these steps:
- Add application to cmd directory
- Build the Docker image
- Publish the Docker image
- Create the Helm Chart (extend microservice chart)
- Deploy the application in Kubernetes
- Update the source code and the Helm chart
Install And Configure Helm And Tiller
The Dashboard UI is accessible at https://go-api-boilerplate.local/dashboard thanks to kubernetes-dashboard helm chart.
To see available tokens for login run:
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}')
make helm-dependencies
make helm-install
make helm-delete
Remember to change all imports from github.com/vardius/go-api-boilerplate/*
to your-repository/*
Edit /etc/hosts
to add localhost alias
➜ go-api-boilerplate git:(master) cat /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost go-api-boilerplate.local