forked from mschmidt712/kubernetes-ci-cd
-
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.
Changes to the steps for part 3 and updated scripts
- Loading branch information
1 parent
b186a76
commit 4fab2b6
Showing
4 changed files
with
75 additions
and
25 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,13 +1,19 @@ | ||
docker build -t 127.0.0.1:30400/kr8sswordz:latest -f old/part2/pages/Dockerfile old/part2/pages | ||
#!/bin/bash | ||
|
||
#Retrieve the latest git commit hash | ||
TAG = `git rev-parse --short HEAD` | ||
|
||
#Build the docker image | ||
docker build -t 127.0.0.1:30400/kr8sswordz:$TAG -f old/part2/pages/Dockerfile old/part2/pages | ||
|
||
#Setup the proxy for the registry | ||
docker stop socat-registry; docker rm socat-registry; docker run -d -e "REGIP=`minikube ip`" --name socat-registry -p 30400:5000 chadmoon/socat:latest bash -c "socat TCP4-LISTEN:5000,fork,reuseaddr TCP4:`minikube ip`:30400" | ||
|
||
#Push the images | ||
docker push 127.0.0.1:30400/kr8sswordz:latest | ||
docker push 127.0.0.1:30400/kr8sswordz:$TAG | ||
|
||
#Stop the registry proxy | ||
docker stop socat-registry | ||
|
||
# Create the deployment and service foddr the crossword server aka services | ||
kubectl apply -f old/part2/pages/k8s/deployment.yaml; kubectl rollout status deployment/kr8sswordz | ||
# Create the deployment and service for the front end aka kr8sswordz | ||
sed 's#127.0.0.1:30400/kr8sswordz:latest#127.0.0.1:30400/kr8sswordz:'$TAG'#' old/part2/pages/k8s/deployment.yaml | kubectl apply -f - |
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,19 @@ | ||
#!/bin/bash | ||
|
||
#Retrieve the latest git commit hash | ||
TAG = `git rev-parse --short HEAD` | ||
|
||
#Build the docker image | ||
docker build -t 127.0.0.1:30400/services:$TAG -f applications/crossword/Dockerfile applications/crossword | ||
|
||
#Setup the proxy for the registry | ||
docker stop socat-registry; docker rm socat-registry; docker run -d -e "REGIP=`minikube ip`" --name socat-registry -p 30400:5000 chadmoon/socat:latest bash -c "socat TCP4-LISTEN:5000,fork,reuseaddr TCP4:`minikube ip`:30400" | ||
|
||
#Push the images | ||
docker push 127.0.0.1:30400/services:$TAG | ||
|
||
#Stop the registry proxy | ||
docker stop socat-registry | ||
|
||
# Create the deployment and service for the crossword server aka services | ||
sed 's#127.0.0.1:30400/services:latest#127.0.0.1:30400/services:'$TAG'#' applications/crossword/k8s/deployment.yaml | kubectl apply -f - |
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