Server for main template
Install the gcloud tool:
GCP
Enable Kubernetes Engine API for your GCP project.
GCP_USER=<your GCP username> GCP_PROJECT=<your GCP project> make gke-setup
Then run this command to create your cluster:
GCP_USER=<your GCP username> GCP_PROJECT=<your GCP project> make gke-create
If you want to specify GCP zone and region, you can provide them as environment variables too:
GCP_ZONE=<GCP zone> GCP_REGION=<GCP region> GCP_USER=<your GCP username> GCP_PROJECT=<your GCP project> make gke-setup
Now you can get github action variables for your cluster:
GCP_USER=<your GCP username> GCP_PROJECT=<your GCP project> make gke-vars
or if you have specified zone and region:
GCP_ZONE=<GCP zone> GCP_REGION=<GCP region> GCP_USER=<your GCP username> GCP_PROJECT=<your GCP project> make gke-vars
Add provided variables as secrets to your github project. Github action will use these variables to deploy your project on GKE cluster and your project will be available on GKE_IP.
Server for main template
http://34.89.133.90/#/
GCP
Set up secrets in your workspace: GKE_PROJECT with the name of the project, GKE_EMAIL with the service account email, GKE_KEY with the Base64 encoded JSON service account key (https://github.com/GoogleCloudPlatform/github-actions/tree/docs/service-account-key/setup-gcloud#inputs).
Afteer deployment use kubectl port-forward:
Minikube
Prequisites
- Clone and setup https://github.com/getcouragenow/bootstrap
- Choose your OS and configure it there (on OS folder)
- Run prequisites install script
make install-prequisites
- Log out / Reboot for Linux
- Run
make minikube-config
First time setup
- Edit provided
ENV
file
- Run
make source-env
to source environment variable from profile to shell.
- Log out, to make sure the profile is loaded.
- Run
make gen-app-secrets
, your secrets will be generated in maintemplate/server/keys directory.
- Go to local-ssl dir and run
make install-certs
to install locally signed certificates.
- Run
make minikube-start
to start minikube registry
- Run
eval $(minikube -p minikube docker-env)
or put that in your shell's config
- Finally run
make minikube-deploy
to deploy. Run kubectl get all
and your maintemplate and flutter app should be on minikube now.
- Run
kubectl get ingress
that's where your maintemplate is.
Redeploying
- Run
make minikube-clean-builds
- Redeploy using
make minikube-deploy
TODO
- Helm charts for minio and envoy's persistent volume claim.
- Kubectl patch (on runtime) for when issues like random helm error occurs.
- Adding generated secrets to environment variables.
- Docker rebuilds when inotify events occur.
- TODO: Per developer ENV