DRaaS dreams come true! vCloud Availability for vCloud Director (vCAV) – For Service Provider
As introduced by the previous blog post, I’m going to brief the Service Provider side setup steps of vCloud Availability for vCloud Director (vCAV) here. The following summarise the components we would setup around the existing vCD Cells.
Service Provider Setup
From the service provider side, I’m assuming you have you vCloud Director deployed. In this blog, my vCloud Director is of 8.10 version, it’s a single cell deployment but leverage the one IP deployment method (sharing http and consoleproxy IP) which is a new feature in version 8.10. I’m following the official guide to:
- Prepare the environment
- Install the new vCAV components
- Configure the new vCAV components
As I’m just testing in the environment, some of the components I’m deploying for test and development purpose only, say I’m using Docker for my MQ and Cassandra. I’m deploying single instance of some components which you should actually consider NLB-ing multiple of them in your production environment. But anyway, just let see how simple stuffs work first. Again the steps I performed follows the official guideline which you can refer at HERE.
Preparing the environment
- Create vCloud Availability Installer Appliance – Trivial step, you would need to deploy the vCloud Availability Install Appliance from VMware.com. This component is the central control centre which you would use to install further the vCAV components. DO NOT delete this appliance even after your setup, as you would need this in case when you have to scale or reconfigure your DRaaS environment.
- Download vCloud Availability for vCloud Director Appliances – As mentioned, the installer Appliance in step one only help deploying the vCAV, but we still need to download the core vCAV appliances for the deployment. You can Download it from the VMware.com.We need to upload the downloaded vCAV Components binary into the vCAV Installer Appliance. Do this by using SFTP and take note that you would need to provide the path to these OVA/OVF files during the vCAV deployment.
- Configuring vCloud Director for Installation – You would have to prepare your vCloud Director with the following items: (If you are interested in the detail steps for doing any of the following, you can refer to the Appendix of this blog series HERE. Or it could be tooooooo lengthy)
- Use Wildcard certificate for the vCloud Director if you are not using it (I’m not…)
- Migrate your Single Cell vCloud Director to a Multiple Cell Configuration (as for deploying the Cloud Proxy for vCAV).
- Deploy and Configure MQ with SSL (This is not default for RabbitMQ).
- Join the vCloud Director to the lookup services
- Prepare the vCloud Availability Installer Appliance for vCloud Availability for vCloud Director Installation – While there are two ways of vCAV installation, the “Full Commands Installation” and the “Simple Command Installation”, I am using the “Simple Command Installation” in this blog. And this is why I have to create the registry file under the location ~/.vcav of your vCAV Installer Appliance. The registry file defines the vCenter and vCloud Director endpoint information which is be used for component deployment, e.g. the which Datastore and Host should the Components be deployed on. So for my case, my registry file looks like the following:
- Enable Static IP Addresses Deployment – Besides following the official guide to create the IP pool. Which you can do it thru’ vSphere Client UI if you are more familiar with it, but the command provided in the official guide also works great. Do also assign static IPs for components and configure the AAAA record in the DNS. You would need to have at least 7 IP Addresses for the following components on the service provider:
- vCAV Installer x 1 IP (Hostname: vcav-installer)
- vCloud Proxy x 1 IP (Hostname: vmlvcd02)
- vSphere Replication Cloud Service (vRCS) Host x 1 IP (Hostname: vmlhcs01)
- vSphere Replication Manager (vRMS) Host x 1 IP (Hostname: vmlhms01)
- vSphere Replication Server (vRS) x 1 IP (Hostname: vmlhbr01)
- vCAV UI Appliance x 1 IP (Hostname: vmlvui01)
- (Optional) Docker Host x 1 IP (Hostname: vcav-docker01)
- Create a Trusted Connection with the vCloud Availability Installer Appliance – Ensure the certificates using in the environment are being (force) trusted by all the components.
- Create Cloud Proxy – This is actually another vCloud Director Cell yet with most of the functions being disabled. Cloud Proxy is required for handling the DRaaS tasks. This is why I’ve mentioned we have to migrate from a single cell deployment to a Multiple cell one. And the following red circled line is the corresponding setting in the global.properties file on the Cloud Proxy Cell
- Creating Containers (Optional) – If you have a MQ and a Cassandra in your environment already, you can skip this step. And if you are preparing for a production environment, skip this step too. This step is just for test and development purpose. We can leverage Container technology to deploy the MQ and Cassandra DB for the vCAV easily. (This is why VMware Loves Container). I use the Docker in my environment, you can following the official guide session HERE. It instructs you how to create the docker host and further the docker image and configuration for both MQ with SSL and Cassandra.We can deploy the docker host for running the MQ and Cassandra with the following Command
vcav docker create –vsphere=vmlvcs01 –ntp=172.16.14.5 –root-password-file=~/.ssh/.root –vm-name=vcav-docker01 –vm-address 172.16.14.38
- Deploy the MQ and Cassandra Images – After deploying the Docker Host, we can deploy the images on top and you can do this by doing the following at the vCAV Installer:
systemctl start docker
docker pull cassandra:2.2
docker pull rabbitmq:3.4
vcav amqp create –docker-address=172.16.14.38 –container-name=vcav-amqp01 –amqp-port=5671 –amqp-user=vcd –amqp-password-file=~/.ssh/.amqp
vcav cassandra create –docker-address=172.16.14.38 –container-name=vcav-cass01 –cassandra-port=9042
vcav trust add –address=172.16.14.38 –port=5671 –accept-all
- Check vCloud Director Endpoints – After preparing the vCloud Director Environment, we definitely have to validate the preparation before we moving on to Install the Components. You could find my command a bit different from the one in the official document, perhaps you would need to add “-k” as mine too as my wildcard cert is not being secure enough. So in case you see the above message, you need to use a command like mine
Installing the new vCAV Component
Then we need to leverage the vCAC Installer Appliance to help deploying the vCAV Components actually here. And the step has to be preformed in CLI, so I would recommend you using SSH rather than the VM Console (you know you cannot copy and paste). So before running the actual installation commands, you have to prepare the password file which can be handy to ensure you didn’t type the password wrongly during deployments. Do this by running the following command at the vCAV Installer:
chmod 0700 ~/.ssh
echo ‘P@ssw0rd’ > ~/.ssh/.root
echo ‘P@ssw0rd’ > ~/.ssh/.amqp
echo ‘P@ssw0rd’ > ~/.ssh/.vsphere.sso
echo ‘P@ssw0rd’ > ~/.ssh/.truststore
find ~/.ssh -type f -name ‘.*’ -print0 | xargs -0 chmod 0600
And we need to follow the step below to setup all the vCAV components.
- Create vSphere Replication Manager (vRMS) Host – This may not be too unfamiliar for you, as we also need this component in vSphere Replication.The command to deploy vRMS from the vCAV Installer is as following, and you need to customise the IP, hostname and OVF URL for your deployment:
vcav hms create \–vsphere=vmlvcs01 –ntp=172.16.14.5 –root-password-file=~/.ssh/.root –vm-name=vmlhms01 –vm-address 172.16.14.35 –ovf-url=/vCAV/vCloud_Availability_4vCD_OVF10.ovf
- Create vSphere Replication Cloud Service (vRCS) Host – As the name of it, this is the engine for enabling the DRaaS or Cloud Replication.The command to deploy vRCS from the vCAV Installer is as following, and you need to customise the IP, hostname and OVF URL for your deployment:
vcav hcs create –vsphere=vmlvcs01 –ntp=172.16.14.5 –root-password-file=~/.ssh/.root –vm-name=vmlhcs01 –vm-address 172.16.14.34 –ovf-url=/vCAV/vCloud_Availability_4vCD_Cloud_Service_OVF10.ovf
- Create vSphere Replication Server (vRS) Host – The actual appliance for performing the replication tasks. If you are having a non-testing environment, you would probably need multiple instances of this to handling the actual traffic from customer site
vcav hbr create –vsphere=vmlvcs01 –ntp=172.16.14.5 –root-password-file=~/.ssh/.root –vm-name=vmlhrs01 –vm-address 172.16.14.5 –ovf-url=/vCAV/vCloud_Availability_4vCD_AddOn_OVF10.ovf
- vCAC UI Portal Appliance Deployment – This is the appliance for running the separate UI dedicated for the DRaaS for customer consumptionThe command to deploy the vCAV UI from the vCAV Installer is as following, and you need to customise the IP, hostname and OVF URL for your deployment:
vcav vcd-ui create –vsphere=vmlvcs01 –ntp=172.16.14.5 –root-password-file=~/.ssh/.root –vm-name=vmlvui01 –vm-address 172.16.14.36 –ovf-url=/vcloud-availability-for-vcd-ui-ova-1.0.1-b238-4945120.ova
- Validate Deployment – To ensure the initial deployment is good, we can validate the deployment with the following command. Again I’ve added “-k” for all the vCAV commands I used to connect to the vCloud Director
vcav vcd wait-for-api -k –vcd=vmlvcd01 –timeout=300
vcav vcd is-federation-enabled -k –vcd=vmlvcd01
Configuring the new vCAC Components
- Configure vSphere Replication Manager (vRMS) – Registering the vRMS to the vCenter Server which is managing the Cloud Resource.
- vcav hms configure -k —hms-address=172.16.14.35 –vsphere=vmlvcs01 –vcd=vmlvcd01
vcav hms wait-for-extension -k —hms-address=172.16.14.35 –vsphere=vmlvcs01 –vcd=vmlvcd01
- vcav hms configure -k —hms-address=172.16.14.35 –vsphere=vmlvcs01 –vcd=vmlvcd01
- Configure RabbitMQ Servers – Configure the vCloud Director Cells to use AMQP provided by the Rabbit MQ with SSL enabled. And you need to restart the VCD Services in your nodes after performing this, execute “service vmware-vcd restart” in your VCD nodes, NOT the vCAV Installer.
vcav vcd configure-amqp -k –vcd=vmlvcd01 –amqp-address=172.16.14.38 –amqp-port=5671 –amqp-user=vcd –amqp-password-file=~/.ssh/.amqp –amqp-vhost=/ –amqp-exchange=systemExchange
- Configure Cassandra Servers – Connect the vRCS to the Cassandra DB
vcav trust add –address=172.16.14.38 –port=9042 –accept-all
vcav cassandra register -k –hcs-address=172.16.14.34 –cassandra-address=172.16.14.38 –cassandra-port=9042 –vcd=vmlvcd01
vcav cassandra import-hcs-certificate –docker-address=172.16.14.38 –container-name=vcav-cass01 –hcs-address=172.16.14.34
- Configure vSphere Replication Cloud Service (vRCS) – Register the vRCS to the vCenter Server which is managing the Cloud Resource (same as step 1) and Update the vCloud Director Role to include the vRCS privileges. ***Check the firewall if you are hitting issue in the second command***
vcav hcs configure -k –hcs-address=172.16.14.34 –amqp-password-file=~/.ssh/.amqp –cassandra-replication-factor=1 –vsphere-registry-list=vmlvcs01 –vcd=vmlvcd01
vcav hcs wait-for-extension -k –hcs-address=172.16.14.34 –vsphere-registry-list=vc-01a –vcd=vmlvcd01
vcav hcs add-rights-to-role -k –vcd=vmlvcd01 “–role=Organization Administrator”
- Congiure vSphere Replication Server (vRS) – Setup the vSphere Replication Server to register to both vCenter and vCloud Director Resources.
vcav hbr configure -k –hbr-address=172.16.14.37 –vsphere=vmlvcs01 –vcd=vmlvcd01
- Configure vCloud Availability for vCloud Director Portal (vCAV UI) Host – Choose the deployment size and setup the UI appliance, using small will be good enough for a test and development purpose.
vcav vcd-ui configure –ui-address=172.16.14.36 –keep-self-signed-certificate –truststore-password-file=~/.ssh/.truststore –vcd=vmlvcd01
- Configure Service Provider vCloud Director Organisations – Finally, enable a tenant who is eligible to use the DRaaS. This is not by default enabled feature for all the organisations and all organization VDC. You have to enable it selectively:
vcav org-vdc enable-replication -k –vcd=vmlvcd01 –org=SE –vdc=se-ovdc-01
Great! The Service Provider part has been completed and we can proceed to the Tenant Setup. As a Service Provider, I strongly recommend you to have a look into this as this enable a lot of value added services you can provide to your customer on top of IaaS service. Do start the evaluation and i wish this is helpful for you!