Simple containers for testing and demonstrating (rolling) updates. Based on UpCloudLtd / hello-container. Uses the same Material for MkDocs styling as cicd-tutorials.net.
To create a deployment and expose it from your Kubernetes cluster, run:
kubectl create deployment --image=ghcr.io/cicd-tutorials/animals:cow moo
kubectl expose deployment moo --port=80 --target-port=80 --type=LoadBalancer
kubectl get svc -wThis process might take a few minutes. After external IP for hello service is visible, use it to test that pod is reachabe from the internet.
In addition to the container images, the static content is available in .tar.gz archives.
To setup a httpd server on a RHEL compatible distribution to serve the static content from the latest release, run the setup_httpd_animals.yml playbook:
ansible-playbook httpd-animals.ymlUse --extra-vars/-e to select a different animal:
ansible-playbook httpd-animals.yml -e animal=lionThe playbook targets all hosts. Use --limit/-l to limit which hosts to target.
Build animals image with:
docker build . -t animals
# With version note
docker build . -t animals --build-arg "VERSION_NOTE=at $(git rev-parse HEAD)"
# With all build args
docker build . -t animals \
--build-arg "VERSION_NOTE=at $(git rev-parse HEAD)" \
--build-arg "EMOJI=🦁" \
--build-arg "HELLO=Moo" \
--build-arg "NAME=horse"Run animals with:
docker run -i -p 8080:80 --rm animals