Working on Scale: Automating release process.

Welcome to the fourth article in the series working on scale. It has been long after the last article. In this article we will be focussing on he why and automating release process.

When you are working with scale there are many thing that will bother you. One them is very frequent releases. If you don’t automate your release process you will end up doing only releases and not focussing on better things.

What all your release process will need? 

1. A place to keep your code repos. 

Suggested Books for Code Repository


2. A runner to run the test cases and pass it for further process.

3. A builder like Jenkins to build the code and inject basic configs. In case of containers build images. 

Suggested Books for Jenkins


4. A place to save your build artifacts like jars images. You can save them in many places one of them in artifactory

5. A compute cluster to deploy your code. It can be any container scheduler like Kubernetes or Mesos

Suggested Books for Kubernetes


6. You may need some of your secrets to be injected in the containers when they are launched. Kubernetes can do that for you. Else you can have a custom service for that. 

 

Now lets interface them together.

Release process

Lets see what is shown in the diagram. Once a developer pushes the code it goes to code repository. After that a hook is triggered which runs the test cases for these code commits in jenkins, travis, circle ci or any such runners. If the test is passed you can move ahead with the building jar and deployment process.

After the test is passed runners again comes into picture and this time they build the image, pip package, jars or more such artifacts. Once these artifacts are build these runners can push the artifact to a store. This store can be artifactory, docker hub, AWS ECR so any such things based on your requirements.

After this, developer can trigger the deployment on compute cluster. Now what else is needed. You may need some secrets to be hidden and push them while containers start running. You can do that by using kubernetes secrets.

Now the scheduler will take care of all the things required to deploy the containers restart them on crash and schedule it to proper place.

So this was very basic of what release process can be there may be many modifications that maybe needed to make is perfect for your environment. This basic setup will work for your environment to work. You can go ahead with this setup for now. If you want to quick start things. Reach out to me if you need any help. I will be more than happy to learn with you.

Stay tuned for more articles on this working on scale series.


Gaurav Yadav

Gaurav is cloud infrastructure engineer and a full stack web developer and blogger. Sportsperson by heart and loves football. Scale is something he loves to work for and always keen to learn new tech. Experienced with CI/CD, distributed cloud infrastructure, build systems and lot of SRE Stuff.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.