Quick background story cause I think you all have been there… You get this great automation that works flawless on day 1 then you find yourself running to fix it as new releases start to come out. So here’s my example!

December 2015, vRA 7.0 is released and I immediately see ways to automate the agents and give you an even quicker time to value for vRA.

I start by creating the automated agent for deploying the windows vRA agents. Then I say I can improve that with the Event Broker and create the Dynamic install which calls the previous script. Finally I build out the logic for either linux or windows with the AAA. Feeling accomplished I say that was some good work now on to the next challenge

NOT SO FAST! Shortly after the vRA 7.0.1 releases and I don’t think much of it till I do a simple request and find that some agent versions had changed. So I diligently update the scripts but still want to leave the old versions for those of you who didn’t jump right away. I update the posts with links to both scripts and call it done.

Now here we are with 7.1 coming out in the next couple weeks and I’ve been saying since the 7.0.1 scripts that I needed to combine things, I need to clean up and make it usable across versions. Well since 7.1 is causing me to do some more script altering now is the time!

As a refresher why have I spent the time working on these scripts and workflow? Well I was always frustrated that we have an easy to use prepare_vra_template.sh file for linux and felt we could do it justice for Windows as well. If you’d rather work through the manual process consider these “8” steps

In this post I’m setting the stage for the automated deployments during BuildSuccess Event but for now here’s the intro to the prepare_vra_template.ps1 which will automate the agent deployment for you on Windows 2008R2 and 2012R2 (only 64 bit versions). It has been updated to include ask you for your vRA version and will download the proper bits for your version!

Go here to download the latest and greatest script.

Next set-executionpolicy unrestricted so you can run my untrusted code 😉

Execute the prepare_vra_template.ps1 and it will enable .NET if needed. Then will detect if you set the inputs through manual user config or perhaps the command line option.

If the variables aren’t set it will prompt you for the 4 inputs.

Virtual appliance fqdn IaaS (windows host) fqdn Password for the darwin service user (this is needed to have root access for deploying the software) Version number (needed to determine file locations)

Optionally you have the ability to predetermine those 4 values by editing the prepare_vra_template.ps1 and uncommenting the lines 41-44 with your environment details

And no process is complete if I don’t give you the 3rd option which is you can pass the inputs during the command line execution prepare_vra_template.ps1 appliancefqdn iaasfqdn password version in that order

The script will deploy the gugent, bootstrap, and the java SE needed for your window software components.

There will be an agentinstall.log in C:\opt for your review!

Power down, snapshot for linked clones or convert to template and you’re golden.

Like this: Like Loading...