-
Notifications
You must be signed in to change notification settings - Fork 1
Jenkins
A separate instance of Ubuntu on the jetstream was built for the purpose of using Jenkins. All the steps of building the instance were the same as for generating the cluster instances and generating its floating IP. It wasn't supposed to be added to the cluster so some lesser steps.
Java and its dependencies were installed required by Jenkins. After going through all the steps of hosting Jenkins on an instance it was accessible on the following address. Kindly download the id_rsa and id_rsa.pub file from keys branches in the repository and add it to your .ssh default folder in your local machine. This step is absolutely necessary for you to be able to ssh into the instance.
ssh ubuntu@149.165.171.128
Credentials: Username: admin Password: admin
This helps you enter the instance and gives you complete authority to access the file. Now you can build and Jenkins instance and see that it works completely fine. Separate jobs were built for each of the microservices which were hooked to the particular branch for that microservice of the repository on Github.
Earlier we used the AutoBuild feature of docker hub to build images on each git push. And to notify Kubernetes we used Cloudbees Plugin, hence on each git push, a new image was built on docker hub and on each successful build Jenkins was notified via a webhook and ssh to Kubernetes and deploy a new build.
Afterward, we removed it because the docker hub was taking a long time to build images and switched to perform the build steps also on Jenkins.
The Jenkins job was built which erased all the extra memory is used on the instance whenever it ran and made sure that repetitive model calling didn't use too much space of the finite-sized instance. The job deletes the respective pod of the service it wants to rerun and then reruns its YAML in the cluster and finishes. It makes sure of the key validation available in each of the dockerized branches and uses that to ssh into the instance and run all the necessary commands.
All the steps mentioned above are in the execute shell of each of the jobs running on the Jenkins instance for each microservice and that's why there was no need to update the Jenkinsfile in the GitHub for all respective branches. It is easier to implement and you can easily the set of commands you want to run while building it and thus simplifies the testing and seeing changes.
Then we clone the Kubernetes configuration repository and remove the already existing service and rerun it through its YAML file.