vRA 7.1 brings us a nice OOTB UI for REST API calls

vRA 7.1 comes with a very nice out of the box user interface which brings us unattended installation features and more. All of this is provided via “guided commands” in the form of REST API calls. This new cool feature is accessible via the config page of the vRA virtual appliance VAMI interface.

This blog article describes how to use this new cool functionality.

In my example I am going to prepare my first vRA IaaS server from scratch, create my vRA IaaS SQL database on a remote SQL server and do the vRA IaaS web server installation. This all happens on a guided approach and will be fully automated and unattended.

[Prerequisites]

  • Deploy and configure a vRA 7.1 virtual appliance.
  • Deploy and configure a fresh new Windows 2012 R2 server.
  • Apply the latest MS Hotfixes on this new Windows server.
  • Install the vRA Management Agent with the credentials of your vRA IaaS service account on this new Windows server.
  • Give your vRA IaaS Service account local administrator rights on this new Windows server.
  • Make sure there is a remote SQL server available where your vRA IaaS Service account has been granted the sysadmin role and where MSDTC has been configured properly.
  1. Open the config page from the vRA virtual appliance VAMI interface. eg. https://pb0vrava07.flexlab.local:5480/configblog-vra-vami-configThe red marked commands will be used in this example.
  2. First we need to know the NodeId of the management agent running on the new deployed Windows server. To gather that information we are going to execute the GET /node/list command.blog-get-node-listClick on the Try it out! button and provide the root credentials of the vRA virtual appliance.blog-authentication-requiredIf everything went OK, you see a Response Code of 200 and you can read the NodeId in the Response Body as shown below.blog-get-node-list-response
  3. Now we have the NodeId of the vRA IaaS server, we can prepare this Windows server for the installation of vRA IaaS components. To achieve this we are going to execute the PUT /execute/command/run-prereq/node/{nodeId} command.blog-prereq-checkerBefore we are going to execute this command we need to provide the nodeId in here as also the correct parameters. When providing the parameters, make sure that the property ValidationMode is set to True. On this way we can validate the command upfront! If the Response code returns a 200 you are fine. This is also the signal that you can change the property ValidationMode to False and really execute the command. The [nodeid] and [parameters] I used for this command are:

    Now it’s time to click on the Try it out! button and check the Response Body and Response Code. blog-prereq-checker-responseAs you can see the Response Code returns a 200. Now change ValidationMode to False in the parameters section and click again on the Try it out! button. When the Response Body returns a Status: COMPLETED, the prerequisite command has been finished.
  4. Reboot the vRA IaaS Server and proceed to the following command. We are now going to execute the PUT /execute/command/install-db/node/{nodeId} command. This time, the [nodeid] and [parameters] I used are:

    Again, if the Response Code returns a 200, change ValidationMode to False and click again on the Try it out! button. When the Response Body returns a Status: COMPLETED, the vRA IaaS Database Component Installation command has been finished.
  5. Lastly we are going to execute the PUTĀ /execute/command/install-web/node/{nodeId} command. This time, the [nodeid] and [parameters] I used are:

    Again, if the Response Code returns a 200, change ValidationMode to False and click again on the Try it out! button. When the Response Body returns a Status: COMPLETED, the vRA IaaS Web Component Installation command has been finished.
  6. Enjoy Automating vRA

Leave a Reply

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