forked from nmallya/circlecidemo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
96 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
echo ${GOOGLE_AUTH} | base64 -d > ${HOME}/gcp-key.json | ||
gcloud auth activate-service-account --key-file ${HOME}/gcp-key.json | ||
gcloud config set project circle-agent | ||
gcloud container clusters get-credentials circlecistagingcluster --zone us-central1-a --project circle-agent | ||
|
||
|
||
echo 'Updating web deployment image' | ||
echo "Pushing image: web=gcr.io/circle-agent/helloworldapp:$CIRCLE_SHA1" | ||
kubectl set image deployment web web=gcr.io/circle-agent/helloworldapp:$CIRCLE_SHA1 --record | ||
kubectl rollout status deployment web | ||
echo 'Web deployment image updated' | ||
|
||
|
||
# echo 'kubectl proxy ' | ||
# kubectl proxy --address 0.0.0.0 --accept-hosts '.*' & | ||
# sleep 6 | ||
# | ||
# echo 'curling now...' | ||
# curl http://localhost:8001/api/v1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<h1>Welcome</h1> | ||
<p>This tutorial helps with doing circleci builds and deployments via Google Home </p> | ||
<h2>This tutorial shows how we can use Google Home to deploy applications to Google Container Engine with CircleCI</h2> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# web-controller.yml | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
name: web | ||
name: web | ||
spec: | ||
replicas: 2 | ||
selector: | ||
matchLabels: | ||
name: web | ||
strategy: | ||
type: RollingUpdate | ||
rollingUpdate: | ||
maxSurge: 1 | ||
maxUnavailable: 1 | ||
minReadySeconds: 5 | ||
template: | ||
metadata: | ||
labels: | ||
name: web | ||
spec: | ||
nodeSelector: | ||
cloud.google.com/gke-nodepool: default-pool | ||
containers: | ||
- image: gcr.io/circle-agent/helloworldapp:ac6aca8b52da77315fa80b6ca35626b0a5938c16 | ||
name: web | ||
ports: | ||
- containerPort: 3000 | ||
name: http-server | ||
livenessProbe: | ||
httpGet: | ||
path: /_health | ||
port: 3000 | ||
initialDelaySeconds: 30 | ||
timeoutSeconds: 1 | ||
readinessProbe: | ||
httpGet: | ||
path: /_health | ||
port: 3000 | ||
initialDelaySeconds: 30 | ||
timeoutSeconds: 1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: webserver | ||
spec: | ||
type: LoadBalancer | ||
ports: | ||
- port: 3000 | ||
targetPort: 3000 | ||
protocol: TCP | ||
selector: | ||
name: web |