File tree Expand file tree Collapse file tree 4 files changed +45
-3
lines changed Expand file tree Collapse file tree 4 files changed +45
-3
lines changed Original file line number Diff line number Diff line change 1
1
sudo : required
2
2
services :
3
3
- docker
4
+ env :
5
+ - global :
6
+ - SHA=$(git rev-parse HEAD)
7
+ - CLOUDSDK_CORE_DISABLE_PROMPTS=1
4
8
before_install :
5
- - openssl aes-256-cbc -K $encrypted_0c35eebf403c_key -iv $encrypted_0c35eebf403c_key
9
+ - openssl aes-256-cbc -K $encrypted_0c35eebf403c_key -iv $encrypted_0c35eebf403c_iv -in constant-crow-222204-2b2a815bdea2.json.enc -out constant-crow-222204-2b2a815bdea2.json -d
6
10
- curl https://sdk.cloud.google.com | bash > /dev/null;
7
11
- source $HOME/google-cloud-sdk/path.bash.inc
8
12
- gcloud components update kubectl
9
13
- gcloud auth activate-service-account --key-file service-accounts.json
10
14
- gcloud config set project skilful-berm-214882
11
- - gcloud container clusters get-credentials multi-cluster
12
- - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
15
+ - gcloud container clusters get-credentials standard-cluster-1
16
+ - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
17
+ - docker build -t aishwarydhare/hellonode .
18
+ - docker build -t aishwarydhare/helloredis -f Dockerfile.redis .
19
+
20
+ script :
21
+ - docker run aishwarydhare/hellonode echo 1
22
+ - docker run aishwarydhare/hellonode echo 2
23
+
24
+ deploy :
25
+ provider : script
26
+ script : bash ./deploy.sh
27
+ on :
28
+ branch : master
Original file line number Diff line number Diff line change
1
+ docker build -t aishwarydhare/hellonode:latest -t aishwarydhare/hellonode:$SHA .
2
+ docker build -t aishwarydhare/helloredis:latest -t aishwarydhare/helloredis:$SHA -f Dockerfile.redis .
3
+ docker push aishwarydhare/hellonode:latest
4
+ docker push aishwarydhare/helloredis:latest
5
+ docker push aishwarydhare/hellonode:$SHA
6
+ docker push aishwarydhare/helloredis:$SHA
7
+ kubectl apply -f k8s
8
+ kubectl set image deployments/node-server-deployment server=aishwarydhare/hellonode:$SHA
9
+ kubectl set image deployments/redis-server-deployment server=aishwarydhare/hellonode:$SHA
10
+
11
+ curl https://raw.githubusercontent.com/helm/helm/master/scripts/get > get_helm.sh
12
+ chmod 700 get_helm.sh
13
+ ./get_helm.sh
Original file line number Diff line number Diff line change
1
+ ### starting kubectl on google cloud
2
+ gcloud container clusters get-credentials standard-cluster-1 --zone asia-south1-a --project constant-crow-222204
3
+
4
+ ### installing helm
5
+ curl https://raw.githubusercontent.com/helm/helm/master/scripts/get > get_helm.sh
6
+ chmod 700 get_helm.sh
7
+ ./get_helm.sh
8
+
9
+
10
+ ### setting up helm-tiller service
11
+ kubectl create serviceaccount --namespace kube-system tiller
12
+ kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
13
+ helm init --service-account tiller --upgrade
You can’t perform that action at this time.
0 commit comments