Rest of the Suite vRealize Automation

Automating Infrastructure with vRealize Code Stream and Artifactory

vRealize Code Stream Feature Image

Purpose:

The purpose of this post is to show how to automate infrastructure in virtualized dataceter  through vRealize Code Stream and using other tools like Artifactory. Target audience for this post are System Admins, Cloud Admins etc. who are not full fledged developers but has some experience in scripting and automation or building blueprints in vRA. Also in the process this post clarifies on how to use vRealize Code Stream for any other automation purpose that you want.

Introduction:

One point of clarification before I go ahead and start discussing about this topic. vRealize Code Stream (vRCS) is an amazing tool which gives probably the best Continuous Integration/Continuous Delivery (CI/CD) experience for DevOps environment. But in this topic I am using the same set of tools and using it to automate my infrastructure. There are other traditional ways you can achieve the same result and perhaps you have been doing it for long in that way. But I want to showcase how easily you can do the same tasks with vRCS and more elegantly. Interested enough???? Read On…..

vRealize Code Stream-What is it?

In VMware words “VMware vRealize Code Stream provides release automation and continuous delivery to enable frequent, reliable software releases while reducing operational risks”. So, vRealize Code Stream is an automation tool which helps you to get the following:

  • Application Delivery Automation
  • Pipeline Modeling
  • Artefact Management
  • Release Dashboard and Reports

Among many other points. The strength of the solution is simplicity and integration capability. You typically integrate the solution with tools like Artifactory (for artefact management) and Jenkins (build automation), vRealize Automation (infrastructure deployment) to automate your entire product development, build, test and deployment life cycle.

Example Setup:

A typical example of the setup is provided below:

  • Have a Artifactory server deployed in your environment. Say Java is the development tool for your Organization. Integrate Maven with Artifactory. Artifactory will provide the artefacts management capability.
  • Next deploy a Jenkins server. Integrate Jenkins with Git repository for source control management. Also integrate Artifactory with Jenkins. Configure Maven for Jenkins as well.
  • For testing purpose for example, use Selenium and integrate it again with Jenkins.
  • Integrate vRealize Code Stream with vRealize Automation. Where you have deployed and configured vRealize Automation.
  • You can build a pipeline in vRCS where the for example two stages are defined, Dev and Prod. Both stages start with deploying a VM in respective area in vRA and then deploy packages from Artifactory and then runs some tests in Selenium, runs few jobs from Jenkins.

Sample Use Case:

In above setup, whenever a developer submits a code in Git, it fires a job in Jenkins so it builds the respective code and pushes it to Artifactory Server. You can then start the pre-defined pipeline in vRCS which will do the following for you:

  • Deploys a VM in vRealize Automation in Dev environment
  • Deploys the application from Artifactory server to the newly deployed VM
  • Runs few pre-defined tests
  • Runs few Jenkins jobs

Depending on the output of the above tests (you can apply Gating Rules) next stage i.e, Prod is executed which runs similar pre-defined tasks.

All these are done automatically without any manual intervention. So essentially from the point where developer submits the code to the production deployment no manual tasks is needed. Thus with vRCS will can essentially build a no-touch environment.

You may be thinking, this sounds so developer-ish, so complex. It is actually not. It is a simple drag-drop-select environment which you can see in the video.

What is covered?

As mentioned above, in this post I am not going to cover a DevOps life cycle. I am actually covering something completely different. For all the System Admins and Cloud Admins out there, we know we have a lot of scripts running in our environment to automate the entire infrastructure (at least the areas we can cover). For example consider the following:

  • Today NSX has automated the network and security areas completely. But in most datacenters, after a VM running some server is deployed and all the patches, security measures are implemented then it goes to security team for their audit. Once it passes that audit then it goes to production. What if I can automate that audit itself?
  • In most cases the servers are not connected directly to internet and you have some kind of repository for patch management (yum repository, RHEL Satelite Server, WSUS server etc.). All these provide patch management in your environment. What if I write my own RPM’s and want to merge it into the repository? I write my own python scripts which I want to run in all the servers (new or old)? I have a bunch of Shell, PowerShell and PowerCLI scripts and want to manage and run them from a central repository. How do I do that?

Demonstrated use case:

This is exactly what I am trying to showcase. In the given video I am demonstrating an environment where the VM deployment is done through vRealize Automation. I have an Artifactory server working as a central repository for RPM packages, Python packages and my Shell Script and other documents. I want to achieve the following simple use case:

Want to configure a pipeline which once executed will do the following:

  • Deploy a VM in Dev area through vRA
  • Modify environment in deployed VM so that Artifactory server will be used as a central YUM Repository and Python Package repository
  • Download and install rpm packages and python packages from Artifactory.
  • Install and setup a WebServer inside the VM

I could easily do some testing and based on the testing result I could set a gating rule (I can set an approval policy as well) and run the same things in production environment.

But since through this post I wanted to showcase other use cases of vRCS so by this time you have a general understanding of the product (how to use it) and further utilize it as per your requirement.

Interested enough? Watch this video of 28 minutes.

Suggested Reads:

Greg Kullberg has amazing series of session on vRealize Code Stream. I strongly suggest you to watch them. Specially the following ones:

Also, as I always say, your best friend is VMware documentation for vRCS.

Conclusion:

The idea behind this post was to showcase a slightly different use case of vRealize Code Stream. In the process explain what it is. Though implementation of the use case you should be able to get a clear idea of how you can utilize vRealize Code Stream for not only DevOps environment but also for automating your daily life.

I hope this post helps you in reducing few of your daily challenges faced in any datacenter.

As always do give me your feedback. It is through your feedback I get to know whether I am writing useful topics or not. So happy reading and watching till the next post.

 

Leave a Reply

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