Monday, July 29, 2013

vFabric Application Director - Configure Linux Agent Bootstrap

How to install the Application director bootstrap agent and communicate with the vCAC server for provisioning application blueprints.

For documentation purposes I will demonstrate how to configure CentOS 5.6 x64 VM to deploy AppD blueprints using vCAC to provision the VM.

VM Requirements:
-Make sure the operating system (in this case we are doing Linux) you are using either RHEL 6.1 or CentOS 5.6 32 or 64 bit.
-JRE 1.6.0 which can be downloaded from the Application Director Appliance - http://App-director-IP:8443/agent/jre-6u6u31-linux-amd64.rpm
-Linux agent bootstrap service for vcac can be downloaded from application director appliance - http://App-director-IP:8443/agent/vmware-appdirector-agent-service-vcac_5.2.0.0-0_x86_64.rpm
-Linux vCAC guest agent, which can be obtained from the vCAC 5.2 installation zip file.

To help simplify this process you can download CentOS 5.6 x64 from VMware vFabric Application Director download site -
Here you will find various supporting operating systems (with the exception of MS Windows) you can download and configure to use with vCAC and Application Director.

  1. If you haven't already convert the template back to a VM.
  2. Power on the VM
  3. You may have to configure the VM with an IP either static or DHCP, so we can get some install files on the server.  If that's the case use the Configure Network option to accomplish this.
  4. If needed update the VMware tools.
  5. Once you have an IP you can either login with the console or use another SSH tool to access the command line.  If you downloaded the OS from VMware use root/vmware to login.
  6. Copy the files needed to the VM to the /tmp folder.  We will need to copy the vCAC agent and the Application Director vCAC bootstrap agent.
  7. First make sure the existing bootstrap agent is not installed and running using "ps -ef | grep agent_bootstrap" If it doesn't exist go to step 11
  8. If so stop the process
  9. Run this command to remove the agent bootstrap service - "/opt/vmware-appdirector/agent-bootstrap/"
  10. Uninstall the agent bootstrap - rpm --erase vmware-appdirector-agent-service
  11. Install the vCAC guest agent from the tmp directory - rpm -i gugent-5.2.3-349.x86_64.rpm (version may vary make sure to verify the file name first).
  12. Configure the vCAC guest agent by changing directories to /usr/share/gugent - run "./ YOUR_VCAC_SERVER_FQDN:443 ssl"
  13. Next configure the certificate for the agent if you're using SSL in vCAC - "echo | openssl s_client –connect YOUR_VCAC_SERVER_FQDN:443 | sed –ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > cert.pem"
  14. Verify the cert.pem has a file size greater than 0.  If that's the case make sure this VM can connect to your vCAC server by pinging the FQDN of vCAC server.
  15. Now install the Application Director vCAC from the /tmp directory - "rpm -i vmware-appdirector-agent-service-vcac_5.2.0.0-0_x86_64.rpm"
  16. Register the Application Director vCAC guest agent with the vCAC server "/opt/vmware-appdirector/agent-bootstrap/ -r 443 -s vCAC-Server-IP
  17. Verify the vCAC vrm-agent and vmware_appdirector_agent are installed by running "chkconfig --list" to display the list of services installed.
  18. NOTE:  This may not apply to all environments, but for this in my case to get CentOS 5.6 to work with Customization Specifications to work with my VM template I had to delete this file in order to work - /etc/sysconfig/network-scripts/ifcfg-eth0.  Also changing the VM Guest OS to RHEL 5.  More info here -
  19. Last step is to reset the Application Director agent by running /opt/vmware-appdirector/agent-bootstrap/
  20. Shutdown the VM and convert back to a template.
  21. Now you're ready to create the vCAC blueprint and configure Application Director to use vCAC as a cloud provider to provision.  Look for another article on how to create a vCAC blueprint for Application Director and how to configure Application Director to use vCAC to provision VM's.


1 comment: