New in vRealize Automation 7 is the ability to create software installation components as part of the new converged blueprint design canvas. If you have been following VMware for some time this is actually a lot of the same code that once was Application Director and then Application services. In this guide I will walk you through the feature as well as explain how the functionality works. At the end you will have a working Hello World Blueprin. With these skills you should be able to build more complex blueprints from there.
- How to create a vRealize Automation 7 Linux Template Part 1
- How to create a vRealize Automation 7 Linux Template Part 2
- A quite place where you will not be interrupted
At this point you should have already completed Part 1 and 2 of my guides above.
Login to the vRA portal as an admin that has the infrastructure Architect and Software Architect roles!
Once logged in go to the design tab and software components and let’s edit that HelloWorld script we created earlier
Now let’s create a new property, only this time we are going to use a binding property that is populated when the VM get’s provisioned in vRA, go to the properties screen and click new and create the new property my_ip
Pro-Tip: The binding properties must use an underscore in the name for example my_ip will work but my-ip will not.
Now click next and let’s add to our script to include this new property, click the blue text next to the install Lifecycle stage to open the editor
After my IP address is add a space then use the drop down to select and enter the new property we just created
Normally that is all we would need to do but since we used a binding property we will now need to make some changes in our Blueprint. Open the blueprint we crated in Part II of the guide and click on the HelloWorld Blueprint then the Properties Tab
Now type a ~ after resources and you should see the list of resources and select CentOS_6 (The machine resource)
Now type ~ again and you should see all the properties available from the Machine once it provisions to vSphere. Select ip_address
Fire off a new request, and remember to enter text for the user input we created in Part II of my guide
Ok smarty pants, easy enough but what if I want to pass properties between two VM’s in the same blueprint? Let’s do that then. Go back and edit the Hello World Software Component and add a new property web_ip
Now go to the blueprint and drag and drop another CentOS VM onto the canvas and name it Web.
Make sure you setup the build information the same as you did for the CentOS_6 machine we already created
Now click the HelloWorld_1 component and then go to the properties tab and bind the web_ip to the Web servers ip address as shown
Why are we doing this? When building blueprints with multiple machines that you want to install and configure applications on there may be properties you need from one machine to complete the installation on another. For example if I am building a Web server I may need the IP address or host name of the Database Server so that I can install the application and instantiate the database tables.
Click finish and fire off another request like before. Then SSH in and cat the contents of /tmp/myscript.log again
Last tip is to stagger the build process. This is done with dependency mapping. Dragging arrows from a software component to a machine tells vRA to wait until that machine is built before starting the next machine.
For example, you may want the database server to be built and installed before you start to build the Web Server.
So there you have it! Remember if you create a great blueprint pay it forward and share it in VMware Sample Exchange!