In vCloud Director 8.0 many enhancements were made to enable unattended installation. This is useful to eliminate manual steps to speed up installation process as well as ensure identical configuration among multiple vCloud Director instances.
Let’s say the provider needs to deploy multiple vCloud Director instances each consisting of multiple cells. Here is the process in high level steps.
Preparation of base template
- Create Linux VM with supported RHEL/CentOS distribution.
- Upload vCloud Director binaries to the VM (e.g. vmware-vcloud-director-8.0.0-3017494.bin)
- Execute the installation file without running the configure script
Prerequisites for each vCloud Director Instance
The following must be prepared for each vCloud Director instance <N>:
- Create database:
- DB name: vcloudN
- DB user: vcloudN
- DB password: VMware1!
- Prepare NFS transfer share
- Create DNS entries, load balancer and corresponding signed certificates for http and consoleproxy and save them to a keystore file certificates.ks. In my example I am using keystore password passwd.
Unattended Installation of the First Cell
- Deploy base template and assign 2 front-end IP addresses. These must match load balancer configuration. e.g. 10.0.2.98, 10.0.2.99
- Mount NFS transfer share to /opt/vmware/vcloud-director/data/transfer
- Upload certificates to /opt/vmware/vcloud-director/etc/certificates.ks
- Run configure script – notice the piping of “Yes” answer to start VCD service after the configuration:
echo "Y" | /opt/vmware/vcloud-director/bin/configure -cons 10.0.2.98 -ip 10.0.2.99 -dbhost 10.0.4.195 -dbport 1433 -dbtype sqlserver -dbinstance MSSQLSERVER -dbname vcloudN -dbuser vcloudN -dbpassword 'VMware1!' -k /opt/vmware/vcloud-director/etc/certificates.ks -w passwd -loghost 10.0.4.211 -logport 514 -g -unattended
where 10.0.4.195 is IP address of my MS SQL DB server and 10.0.4.211 syslog server. - Store /opt/vmware/vcloud-director/etc/responses.properties file created by the initial configuration in a safe place.
- Run initial configuration to create instance ID and system administrator credentials:
/opt/vmware/vcloud-director/bin/cell-management-tool initial-config --email vcloudN@vmware.com --fullname Administrator --installationid N --password VMware1! --systemname vCloudN --unattended --user administrator
where N is the installation ID.
Unattended Installation of Additional Cells
vCloud cells are stateless, all necessary information is in vCloud database. All we need is responses.properties file from the first cell that contains necessary encrypted information how to connect to the database.
- Deploy base template and assign 2 front-end IP addresses. These must match load balancer configuration. e.g. 10.0.2.96, 10.0.2.97
- Mount NFS transfer share to /opt/vmware/vcloud-director/data/transfer
- Upload certificates to /opt/vmware/vcloud-director/etc/certificates.ks
- Upload responses.properties file to /opt/vmware/vcloud-director/etc/responses.properties
- Run configure script – notice the piping of “Yes” answer to start VCD service after the configuration:
echo "Y" | /opt/vmware/vcloud-director/bin/configure -r /opt/vmware/vcloud-director/etc/responses.properties -cons 10.0.2.96 -ip 10.0.2.97 -k /opt/vmware/vcloud-director/etc/certificates.ks -w passwd -unattended
Additional configurations from now on can be done via vCloud API.
Edit 7/31/2016: vCloud Director 8.10 brings additional improvements for unattended installation. See here and here.
Is there a hidden possibility to specify the password for the private ssh key used for the http certificate?
Always getting the following error when running the configure utility:
“Error: incorrect password for the private key associated with the http certificate”
According to the configure command line help, there is no possibility to specify this password (only the keystore password).
Thanks
Adrian