*** THE DEPLOY IS UNDER CONSTRUCTION - CHECK BACK SOON ***
Deploy a "hello-world" docker image to Microsoft Azure Kubernetes Service (aks).
Other Services
- PaaS
- CaaS
- IaaS
Table of Contents
- OVERVIEW
- PREREQUISITES
- SOFTWARE STACK
- RUN
- STEP 1 - TEST
- STEP 2 - BUILD (DOCKER IMAGE VIA DOCKERFILE)
- STEP 3 - PUSH (TO DOCKERHUB)
- STEP 4 - DEPLOY (TO AKS)
- CONTINUOUS INTEGRATION & DEPLOYMENT
Documentation and Reference
- The hello-go-deploy-aks docker image on DockerHub
- This repos github webpage built with concourse
Every 2 seconds this App will print,
INFO[0000] Let's Start this!
Hello everyone, count is: 1
Hello everyone, count is: 2
Hello everyone, count is: 3
etc...
You will need the following go packages,
go get -u -v github.com/sirupsen/logrus
go get -u -v github.com/cweill/gotests/...
- DEVELOPMENT
- OPERATIONS
- concourse/fly (optional)
- docker
- SERVICES
- dockerhub
- azure kubernetes service (aks)
To run.sh,
cd hello-go-deploy-aks-code
go run main.go
To create-binary.sh,
cd hello-go-deploy-aks-code/bin
go build -o hello-go ../main.go
./hello-go
This binary will not be used during a docker build since it creates it's own.
To create unit _test
files,
cd hello-go-deploy-aks-code
gotests -w -all main.go
To run unit-tests.sh,
go test -cover ./... | tee test/test_coverage.txt
cat test/test_coverage.txt
This docker image is built in two stages.
In stage 1, rather than copy a binary into a docker image (because
that can cause issues), the Dockerfile will build the binary in the
docker image.
In stage 2, the Dockerfile will copy this binary
and place it into a smaller docker image based
on alpine
, which is around 13MB.
To build.sh with a Dockerfile,
cd hello-go-deploy-aks-code/build
docker build -f Dockerfile -t jeffdecola/hello-go-deploy-aks .
You can check and test this docker image,
docker images jeffdecola/hello-go-deploy-aks
docker run --name hello-go-deploy-aks -dit jeffdecola/hello-go-deploy-aks
docker exec -i -t hello-go-deploy-aks /bin/bash
docker logs hello-go-deploy-aks
docker rm -f hello-go-deploy-aks
You must be logged in to DockerHub,
docker login
To push.sh,
docker push jeffdecola/hello-go-deploy-aks
Check the hello-go-deploy-aks docker image at DockerHub.
Coming soon.
Refer to ci-README.md on how I automated the above steps using concourse.