How Jenkins is helping in automation?

Before starting the discussion on How Jenkins is helping IT professionals in automation let’s discuss the little bit on Jenkins. Jenkins is a Java-based open source tool. It is a Continuous Integration server. Jenkins helps to automate the non-human part of the software development/Software testing process, with continuous integration and facilitating technical aspects of continuous delivery. It is a server-based system that runs in servlet containers such as JBoss. It supports version control tools, including AccuRev, CVS, Subversion, Git, Mercurial, Perforce, ClearCase and RTC, and can execute Apache Ant, Apache Maven etc based projects as well as arbitrary shell scripts and Windows batch commands.

Now the question is how Jenkins is helping in Automation??

If we enlighten on automation, automation is taking lead in every process whether it is the process of software development or establishing the IT infrastructure on Cloud platforms or in DevOps field. If we talk about the testing phase of software development cycle, we can execute the maven based project of Selenium web driver which we write in Eclipse IDE or Maven projects which are shared with development team through shared repository like Git based or SVN based. What we need to do for this:

  1. First, we need to create item/job in Jenkins which will be Maven based project.
  2. We need to provide some more info like the description of Job, Discard old builds etc
  3. Now we need to source code management that can be a local repository or it can be a remote shared repository
  4. There will more options like Build Triggers, Build Environments, Pre-steps etc, You can set up these things based on your requirements
  5. Now in Build section on the item, we need to provide POM.xml file location and actions what we need to do like clean, test or install etc. Location can be a local location or it can be a remote repository.
  6. We need to set up more options like Post-steps, Post-build actions as per your requirements.

These above steps will help to create maven-based item/job and you can start execution by simply click on Build Now to perform actions what we defined in item/job at the time of configuration.

After configuring the item/job settings, the Continuous server will download the code or project from Git repository if we provide git location. Then it will check the libraries in Maven home or download if not present. Then it will start the execution of item/job and perform the maven actions.

Let’s talk about how we can use Jenkins for orchestration of cloud platform. If we talk about AWS’s(amazon web services) cloud formation, AWS CloudFormation is a service that helps us to model and set up Amazon Web Services resources so that we can spend less time managing those resources and we can spend more time on focusing on your applications that run in AWS. Here are some resources what we can launch with help of cloud formation like

  1. EC2 Instances
  2. Security groups
  3. Authentication keys
  4. Database servers(RDS)
  5. Autoscaling
  6. Load Balancer
  7. Choose AMIs
  8. Custom VPC etc.

So we launch resources through cloud formation, we need to provide templates in JSON or YAML format and perform 2 to 3 steps to automate this thing. But we can automate the same thing through Jenkins by providing

  1. Location of template
  2. Parameter as per the template
  3. CLI IAM credentials to use resources

But make sure the credentials of IAM user, you are providing that user should have permission to access resources otherwise item/job will fail. After providing the above points, Continuous integration server will take care of everything  

We can also use Jenkins to automate the orchestration in  OCI(Oracle cloud infrastructure). Oracle Orchestration is a SaaS solution that lets us schedule and track workflows by executing scripts on hosts or calls Web service endpoints, all from a single location. We can schedule recurring maintenance tasks across on-premises and cloud infrastructure environments. By Oracle orchestration, we can launch the instance of classic compute by providing

  1. Network information like security groups and inbound, outbound ports
  2. Storage information like bootable/root volume & external volumes
  3. Machine image like Oracle Linux image
  4. CPUs / RAM etc.

Orchestration enables automation of tasks executed at hyper-scale by calling REST endpoints, scripts, or 3rd party automation framework.

Here are some DevOps stages in which we can use Jenkins with other tools:

  1. Continuous testing with Selenium web driver
  2. Build with Maven
  3. Continuous Management with Puppet
  4. Version control system with Git
  5. Continuous Monitoring with Nagios
  6. Continuous Deployment with Ansible

Leave a Reply

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