Do you want to make your developers happy and win their trust and business? Or, are you a developer that works at a VMware shop and you just want command line REST API access to your infrastructure? Well, then you have come to the right place. In this guide I will show you infrastructure folks how to create a developer friendly blue print. For you developer folks I will show you how to consume one of these blueprints using the REST API in Curl. But wait…there’s more. If you act within the next 24 hours I am going to throw in the download link to this blueprint absolutely free! It’s an amazing offer you won’t want to miss.
Overview of the solution
This guide will show you how to build a blueprint that will allow the developer to request a new Linux VM, in the request they can input the URL for their HTTP web server, specify the file to get and the working directory to execute it in and have it run commands on the Linux VM at provisioning time. This can be used to build simple installations like Apache Web Server or more complex application installations and configurations.
Jad El-Zein @virtualjad for his help with the new vRA 7 API
Bruce George for help with the new vRA 7 Software Components
- Working installation of vRealize Automation 7 Enterprise
- Working vRealize Automation Agent Blueprint – See my guide here
- A Web server that that can serve files using wget and that is accessable from the VM’s provisioned from vRA – See instruction for Apache here http://book.seaside.st/book/advanced/deployment/deployment-apache/serving-files
First, Create your software component
If you have done the pre-req work we should already have a working Blueprint with the vRealize Automation Agent installed and tested. Now we will build onto that by creating a Software Component that will run commands in the guest VM at provisioning time so the developer can run whatever scripts they want as part of a REST API request. Login to vRA portal as a Cloud Admin. Then go to the Software Components Tab and click New.
Now create the three properties as shown and press next. We will later use these properties as variables in our scripts.
Enter the following and Click Ok
Notice that in the script I am using the variables we created earlier. This are so that these are replaced with what the developer enters in at request time.