Created
August 24, 2018 20:10
-
-
Save amorphid/d1d90139e0dda579336f74d628f157c1 to your computer and use it in GitHub Desktop.
create-cluster.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Determine which environment you'd like to copy | |
- Fork that environment's repo on Gitlab | |
- Clone that environment's repo to deploy server | |
$ deploy_server_ssh () | |
{ | |
ssh -A <your username>@sig-swippoc02.internal.synopsys.com | |
} | |
$ deploy_server_ssh | |
$ cd /deploy/repos | |
$ git clone [email protected]:jobproc-env/swip-k8s.git swip-k8s-<some name>-env | |
- Copy that environment's deploy script on deploy server | |
$ sudo cp /usr/local/bin/targetenv_deploy.sh /usr/local/bin/sourceenv_deploy.sh | |
- Customize deploy script for new env (details TBD) | |
$ sudo nano /usr/local/bin/somename_deploy.sh | |
- Copy environment's config/env.sh from target env to source env | |
$ cp /deploy/repos/swip-k8s-sourceenv-env/config/env.sh /deploy/repos/swip-k8s-targetenv-env/config/env.sh | |
- (if needed) Set AWS & Gcloud keys in deploy script | |
- Log in to gcloud on deploy server | |
$ gcloud auth login | |
- Set project to staging | |
$ gcloud config set project snps-swip-staging | |
- Set default zone to | |
$ gcloud config set compute/zone us-central1-a | |
- Run bootstrap script on deploy server | |
$ ./bootstrap | |
- connect to cluster config context | |
$ gcloud container clusters get-credentials swip-<env> | |
- copy cluster config context to config/kubeconfig | |
$ cp ~/.kube/config config/kubeconfig | |
- copy license.dat | |
$ cp /deploy/repos/swip-k8s-sourceenv-env/config/license.dat /deploy/repos/swip-k8s-targetenv-env/config/license.dat | |
- Initialize helm | |
$ ./helm-init.sh | |
- fix RBAC | |
$ kubectl create clusterrolebinding swip-deploy-staging-cluster-admin-binding --clusterrole=cluster-admin --user=swip-deploy-staging@snps-swip-staging.iam.gserviceaccount.com --user=system:serviceaccount:ingress-controller:ingress-controller | |
- Run provision script on deploy server | |
$ ./provision.sh | |
- Initialize TLS | |
$ (cd ./charts/vault && ./init-tls.sh <env>.sig-clops.synopsys.com) | |
- Install vault chart | |
$ helm install -n swip-config-vault charts/vault | |
- Initialize vault | |
# you have to wait for vault to come up | |
$ (cd ./charts/vault && ./init-vault.sh <env>.sig-clops.synopsys.com) | |
- Run configure script | |
$ ./configure.sh | |
- Setup Cloud SQL | |
# create db, | |
# grab password, put in config/env.sh | |
# upload password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment