vRealize Automation 8 Code Stream – Part 1 Create Endpoint for Jenkins CI/CD Job with Git.
In this 1st part of the blog series, I will cover how to integrate vRA 8 Code Stream with Jenkins, Create a Code Stream Endpoint to run Jenkins Job for CI/CD with Git as Source Code Management.
vRealize Automation Code Stream Introduction –
You will find more information about vRA Code Stream in VMware Docs.
However, a high level, vRealize Automation Code Stream models the tasks in your software release process and automates the development and test of developer code to release it to production.
It integrates your release process with developer tools to accomplish specific tasks and tracks all code artefacts and versions.
You can use the vRealize Automation Code Stream with other vRealize Automation components.
- Deploy a vRealize Automation Cloud Assembly blueprint, and use the parameter values that the blueprint exposes.
- Publish your pipeline to vRealize Automation Service Broker so that other members of your team can request and deploy it to their cloud regions.
I will be using vRA 8 Code Stream to create an endpoint and pipeline that runs specif actions like Build & Deploy my code which is available as part of Jenkins Job.
Prerequisites –
- Set up a Jenkins server that runs version 1.561 or later.
- Verify that you are a member of a project in vRealize Automation Code Stream.
- Verify that a job exists on the Jenkins server so that your pipeline task can run it.
My Lab Setup –
Following DevOps tools are used as part of this demo.
- Git – Source Code Management.
- Jenkins – To create CI/CD Pipeline.
- Ansible – As configuration management & deployment.
- Docker/Kubernetes – As a target environment to deploy the Artifacts.
Here is the flow that we will see –
I have a basic JSP webapp code, we will update this code in my Laptop or Unix Client and will push updated code into Git Repository.
Git is a source code management system here. Whenever the code is available in Git, Jenkins pull that code and do the build.
Once the build created, it generates artefacts. These Artifacts should be deployed into the target environment.
I have Docker/Kubernetes environment here as a target environment. You could use Containers, Kubernetes Clusters or VMs as a target environment.
We will need a tool to deploy the artefacts into the target environment and therefore I am using Ansible to deploy the artefacts on Docker/Kubernetes environment.
Let’s start with Endpoint configuration –
Log in into the vRealize Automation UI console and select vRealize Automation – Code Stream.
Now we will add and validate a Jenkins endpoint.
vRealize Automation Code Stream provides a Jenkins plug-in, which triggers Jenkins jobs that build and test your source code. The Jenkins plug-in runs test cases and can use custom scripts.
Select a project, and for the endpoint type select Jenkins. Then, enter a name and description.
Fill in the information such as Jenkins server URL, Credentials.
Also, provide ‘Folder Path’ information. This is the folder that groups your Jenkins Jobs.
Once the Endpoint is created & validated, the Endpoint is suitable to run the Jenkins Jobs.
In 2nd Part of this blog series, I will create vRealize Automation Code Stream Pipeline to Build & Deploy the Code.
Hope you enjoyed this post, I’d be very grateful if you’d help to share it on Social Media. Thank you!