Our current CI process is like this:
- dev checks-in code changes to branch “develop”
- bamboo triggers build process:
- code is checked out from git
- run build code (java)
- run unit+integration tests
- deploy artifact to artifactory
- build docker image with artifact
- tag docker image with artifact version
- push image to docker hub
This is the current workflow at the moment. Now I would like to use bamboos deployment functionality to deploy the docker image to our kubernetes clusters.
From a technical point it should be pretty easy:
- SSH to the master node
- start rolling update from the replication controller with the new image
My question is how do I get the name of the docker image that is created during the build within my deployment task. I already thought that I might create a properties file with the variables which I store as an artifact in the build process.
I could read-out this property file within my deployment process…
Somehow this feels more like a workaround..another idea would be to do the deployment directly within the build task and don’t use the deployment functionality at all…
Is there another option? Has anyone another option/better idea?
Thoughts/Help would be very nice 🙂
One Solution collect form web for “Bamboo+Docker+Kubernetes deployment”
I’m not familiar with Bamboo, but Kubernetes 1.2 will support the Deployment API, which will perform the rolling update on your behalf once you update the Deployment spec to the new image tag.
Alternatively, you could try Openshift 3, which is built on Kubernetes. It supports deployments triggered by image pushes: