Lets discuss some use-case :
Tom has started the startup ,to optimize the travelling experience of the bike riders,integrating various essence of the technologies .
Tom has team of 6 people.Overnight , his startup gain higher insights and got overwhelming responses .But now as the user increases, feature innovations, building platforms, adding them to mainstream project , working on customer feed backs and many more things are now arising questions!
Tom has decided that only core members of the project would be working on the project .But then the challenge is , how gonna 6 people will manage this?
whereas more chances of delay in deliveries of features for new user experience and alluring more passionate to this app.
One of the consultant , proposed about Continuous Integration/Continuous Deployment concept.
“Devs are from Venus, Ops are from Mars” — Steven Haines.
What is a CI/CD pipeline?
A CI/CD pipeline automates the process of software delivery. It builds code, runs tests, and helps you to safely deploy a new version of the software. CI/CD pipeline reduces manual errors, provides feedback to developers, and allows fast product iterations.
CI/CD pipeline introduces automation and continuous monitoring throughout the life-cycle of a software product. It involves from the integration and testing phase to delivery and deployment. These connected practices are referred as CI/CD pipeline.
What is Continuous Integration, Continuous Delivery, and Continuous Deployment?
- Continuous integration is a DevOps software development practice where developers regularly merge their code changes into a central repository, after which automated builds and tests are run.
- Continuous delivery is a software engineering method in which a team develops software products in a short cycle. It ensures that software can be easily released at any time.
- Continuous deployment means that every change that you make, goes through the pipeline, and if it passes all the tests, it automatically gets deployed into production. So, with this approach, the quality of the software release completely depends on the quality of the test suite as everything is automated.
Advantages of CI/CD strategies :
1. Increased speed of innovernce and ability to compete in the marketplace
Consider identical companies : one with automation, one with traditional approach. Ofcourse, one with automation approach going to survive.
2.Code enhanced and implemented in production gains revenue ,rather than waiting in deployment queue:
Organizations with CI/CD making revenue releasing their feature overnight, meanwhile,human interventions are made less , and automated testing and delivering is integrated and faster as compare to traditional approach.
3. Higher quality code and operations due to specialization
Dev can focus on dev. Ops can focus on ops. Bad code rarely makes it to production because continuous testing is automated. Developers can focus on the code rather than the production environment, and operations doesn’t have to feel like a gatekeeper or a barrier. Both teams can work to their strengths, and automated hand-offs make for seamless processes. This kind of cooperation makes DevOps possible.
CI/CD Tool : Jenkins :
Jenkins offers a simple way to set up a continuous integration or continuous delivery (CI/CD) environment for almost any combination of languages and source code repositories using pipelines, as well as automating other routine development tasks. While Jenkins doesn’t eliminate the need to create scripts for individual steps, it does give you a faster and more robust way to integrate your entire chain of build, test, and deployment tools than you can easily build yourself.
Jenkins is the most widely adopted solution for continuous delivery, thanks to its extensibility and a vibrant, active community. The Jenkins community offers more than 1,700 plugins that enable Jenkins to integrate with virtually any tool, including all of the best-of-breed solutions used throughout the continuous delivery process. Jenkins continues to grow as the dominant solution for software process automation, continuous integration and continuous delivery and, as of February 2018, there are more than 165,000 active installations and an estimated 1.65 million users around the world.
Advantages of using Jenkins:
- It helps in automating a lot of software development processes and hence helps in decreasing downtime of software.
- It is open-source
- It’s free! , Unlike most other CI tools Jenkins is completely free.
- It has an amazing and massive community.
- It easily fits well with the agile & Dev-Ops mindset.
- It has crazy amounts of plugins that it can support.
- It can be used irrelevant of the platform it is launched on.
Managing Minecraft with Jenkins :
Cutting costs by providing the kids with a way to play Minecraft in the cloud without getting a huge cloud bill from Google. All thanks to Jenkins.
Building the kids a self-serve Minecraft setup using Jenkins.
User wanted to provide his kids a way to play Minecraft in the cloud but not cost a fortune. Jenkins allows his kids to turn on Minecraft with a simple webhook and pipelines, and allows user to keep his pocketbook closed to the Google Cloud gods.
Goal: The ultimate goal was to maintain pipelines that his family could easily kick off to spin up their personal Minecraft server running on GCP. The Minecraft instance is preemptive so it shuts off when not in use.
“I have yet to find a tool that can do what Jenkins can do!”
Richard Staehler III, Sr. Mgr, DevSecOps, Zoro.com
Solution & Results: User wanted to automate the working model and also wanted to set the compute to be preemptive so he don’t have a run-away bill but he also didn’t want to log into GCP each time to start it.
That being said, (User) Richard leveraged Jenkins to turn on the instance (if offline), mount the drive, and start the service. Furthermore, additional pipelines included to stop the instance (if desired), pull the status of the compute, and even upgrade Minecraft if it’s out of date.
After setting all this automation up, User realized that kids would have to log into Jenkins, so he set up web-hooks with Discord and Slack and even created a little batch file so they can easily start it wherever they are at.
To meet these challenges, Richard created a handful of pipelines to do the job: one to start the instance, one to stop the instance, one to obtain the status of the server, and one to upgrade Minecraft. These pipelines use shared methods and libraries and are primarily driven by gcloud commands.
All of the Jenkins Groovy code is stored in GitHub. There is obviously an option to store the code inside the pipeline itself.
Here are the key capabilities used in working model:
- Jenkins (latest version)
- Discord Notifier
- Email Extension Plugin
- GitHub Plugin
- Various GCP Plugins
- Green Balls
- Pipeline Utility Steps
- Role-based Authorization Strategy
- Simple Theme Plugin
- Slack Notification Plugin
User’s Insight over Jenkins
Jenkins is an amazing tool. I use it day-to-day where I work and also used it at previous jobs. I know its potential and ease of use especially when it comes to either building standalone jobs or multi-branch pipelines utilizing Groovy. I have yet to find a tool that can do what Jenkins can do! And the results speak for themselves:
- cloud compute can stay offline when not in use
- end-users can turn on without having to log into GCP or Jenkins
- checks are in place for all the different scenarios
Final Note :
👉Jenkins automate error reporting and customization ,as a consequence time is save with each release.
👉Provides ability to focus on important things as almost all boring stuffs can be automated now by almost 99%.
👉Maintainability of job improved through infrastructure-as-code
👉Increased upgrades from ‘never’ to ‘within minutes’
👉Increased number of builds for each project and more automated builds
👉Ability to measure general project improvements through metrics
👉Shortened on boarding for deployment & build release cycles from one week to a single day
“Currently, DevOps is more like a philosophical movement, not yet a precise collection of practices, descriptive or prescriptive.” — Gene Kim
🤗Happy Learning ………..