Migrating from vCD 8.20 on Oracle DB to VCD 9.7.0.5
I didn’t expect this to show on my doorsteps, however, it did and I am glad it did as I learned new things :).
Before going through the migration flow and phases, you should know that this output was not produced before validating interoperability matrices, supported upgrade paths, and product interdependencies, and as such, this is purely tied to Cloud Director and presumes that you have taken care of the holistic upgrade planning in terms of the infrastructure and solutions consuming/supporting VCD.
The Migration Workflow
Phase [1] – Upgrade to 9.1.0.4
- Prerequisites:
- Backup the VCD cells, NFS VM and DB VM.
- Snapshot the VCD cells, NFS VM and DB VM.
- Take a database dump.
- Download VMware vCloud Director 9.1.0.4 binary [vmware-vcloud-director-distribution-9.1.0-16217122.bin].
- Upgrade Process:
- Shutdown the VCD services:
- /opt/vmware/vcloud-director/bin/cell-management-tool -u <SYSTEM ADMINISTRATOR> cell –quiesce true
- /opt/vmware/vcloud-director/bin/cell-management-tool -u <SYSTEM ADMINISTRATOR> cell –shutdown
- Upload the new binary to the cells and chmod it to 777.
- Install the new VCD version on all cells:
- ./vmware-vcloud-director-distribution-9.1.0-16217122.bin
- Do not start the VCD services.
- Upgrade the database schema (one of the cells only):
- /opt/vmware/vcloud-director/bin/upgrade
- Once the database schema is upgraded start the VCD services:
- On all cells -> service vmware-vcd start
- systemctl daemon-reload
- Login to the VCD portal and verify.
- Shutdown the VCD services:
- Problem accessing /cloud/saml/login/alias/vcd. Reason: Server Error:
- Add to the VCD URL /cloud/login.jsp -> Administration -> Federation -> Untick Use SAML Identity Provider and Apply.
Phase [2] – Transit Database Migration to PostgreSQL
- Prerequisites:
- Backup the VCD cells, NFS VM and DB VM.
- Snapshot the VCD cells, NFS VM and DB VM.
- Take a database dump.
- 1 x temporary IP in the same range of the database server and reachable from the VCD cells (communication matrix may need to be revised and a change might be required).
- Migration Process:
- Create a Transit PostgreSQL Database VM:
- Provision a CentOS 8 VM and perform initial configuration.
- Install PostgreSQL:
- dnf module list postgresql -> make sure 10 is the default.
- dnf install postgresql-server
- postgresql-setup –initdb
- systemctl enable postgresql
- systemctl start postgresql
- Configure PostgreSQL:
- su – postgres
- psql
- \password <- Set password to access PSQL (optional if you’re doing this in one shot, otherwise its better to set it).
- vi /var/lib/pgsql/10/data/pg_hba.conf
- Modify -> local all all peer to local all all md5
- Add -> host all all 0.0.0.0/0 md5
- vi /var/lib/pgsql/10/data/ postgresql.conf
- Modify listen_addresses -> remove # and change localhost to *
- Create Cloud Director Transit DB:
- su – postgres
- create user vcloud with password ‘PASSWORD’;
- create database vcloud owner vcloud;
- alter role vcloud with login.
- Migrate VCD 9.1 database to external PostgreSQL:
- service vmware-vcd stop
- service vmware-vcd start
- Double check on all cells that reponse.properties is now pointing to the external PostgreSQL DB server.
- Shutdown the Oracle Database Server.
Phase [3] – Upgrade from VCD 9.1.0.4 to VCD 9.7.0.5
- Prerequisites:
- Backup the VCD cells, NFS VM and DB VM.
- Snapshot the VCD cells, NFS VM and DB VM.
- Download VMware Cloud Director 9.7.0.5 Binaries [vmware-vcloud-director-distribution-9.7.0-16082348.bin].
- Attain VCD 9.7 licenses.
- Upgrade Process:
- Shutdown the VCD services:
- /opt/vmware/vcloud-director/bin/cell-management-tool -u <SYSTEM ADMINISTRATOR> cell –quiesce true
- /opt/vmware/vcloud-director/bin/cell-management-tool -u <SYSTEM ADMINISTRATOR> cell –shutdown
- Upload the new binary to the cells and chmod it to 777.
- Install the new VCD version on all cells:
- ./vmware-vcloud-director-distribution-9.7.0-16082348.bin
- Do not start the VCD services.
- Upgrade the database schema (one of the cells only):
- /opt/vmware/vcloud-director/bin/upgrade
- Once the database schema is upgraded start the VCD services:
- On all cells -> service vmware-vcd start
- systemctl daemon-reload
- Shutdown the VCD services:
- Login to the VCD portal and verify.
Phase [4] – Migrate to VCD 9.7.0.5 Appliance
- Prerequisites:
- Backup the VCD cells, NFS VM and DB VM.
- Snapshot the VCD cells, NFS VM and DB VM.
- A new VXLAN to be used for VCD backend.
- Download VMware Cloud Director 9.7.0.5 Virtual Appliance [VMware_vCloud_Director-9.7.0.4862-16082348_OVF10.ova].
- Create a new NFS export and add permissions to all IPs (including the temporary one) to both old and new NFS shares.
- Create a PostreSQL database dump:
- SSH to the transit database server.
- mkdir /db-backup && chmod 777 /db-backup
- su – postgres
- /usr/bin/pg_dump -Fc vcloud -W > /db-backup/vcloud_db_dump
- Configuration Files Backup (Old Primary):
- Backup the global.properties, responses.properties, certificates, proxycertificates and truststore from -> /opt/vmware/vcloud-director/etc/
- Copy the old Java keystore to the new appliance.
- Shutdown all current VCD cell VMs.
- Deploy a VCD 9.7.0.6 Appliance:
- Deploy a VCD 9.7.0.6 appliance via OVA and use the primary IP of the first cell for the eth0 and an IP from the new VXLAN for eth1 (backend).
- Once the 9.7 is up, SSH to it and stop the VCD service -> service vmware-vcd stop.
- Upload the database dump and configuration backup files to the new appliance.
- Migrating the database:
- Copy the database dump to /tmp
- chmod 777 /tmp/database_dump
- Drop the default vcloud database -> sudo -i -u postgres /opt/vmware/vpostgres/current/bin/psql -c ‘DROP DATABASE vcloud;’
- Restore the database from the dump -> sudo -u postgres /opt/vmware/vpostgres/current/bin/pg_restore -C -d postgres /tmp/database_dump
- Configuration Files Backup (New Primary):
- Backup the global.properties, responses.properties, certificates, proxycertificates and truststore from -> /opt/vmware/vcloud-director/etc/
- Copy the default Java KeyStore (/opt/vmware/vcloud-director/certificates.ks).
- Restore the configuration files that were captured from the old primary appliance to the new primary appliance (without the certificate KeyStore as this will replaced later for all cells) -> /opt/vmware/vcloud-director/etc/
- Reconfigure the new primary:
- /opt/vmware/vcloud-director/bin/configure –unattended-installation –database-type postgres –database-user vcloud –database-password db_password_new_primary –database-host eth1_ip_new_primary –database-port 5432 –database-name vcloud –database-ssl true –uuid –keystore /opt/vmware/vcloud-director/certificates.ks –keystore-password root_password_new_primary –primary-ip appliance_eth0_ip –console-proxy-ip appliance_eth0_ip –console-proxy-port-https 8443
- The –keystore-password value matches the initial root password of this appliance.
- The –database-password value matches the database password that you set during the appliance deployment.
- The –database-host value matches the eth1 network IP address of the primary appliance.
- The –primary-ip value matches the eth0 network IP address of the appliance.
- The –console-proxy-ip value matches the eth0 network IP address of the appliance.
- The –console-proxy-port value matches the appliance console proxy port 8443.
- /opt/vmware/vcloud-director/bin/configure –unattended-installation –database-type postgres –database-user vcloud –database-password db_password_new_primary –database-host eth1_ip_new_primary –database-port 5432 –database-name vcloud –database-ssl true –uuid –keystore /opt/vmware/vcloud-director/certificates.ks –keystore-password root_password_new_primary –primary-ip appliance_eth0_ip –console-proxy-ip appliance_eth0_ip –console-proxy-port-https 8443
- Start the VCD services -> service vmware-vcd start
- Connect to the VCD portal, wait for a period of 10 minutes or less and then delete all of the disconnected cells.
Phase [5] Expand the VCD Cluster
- Deploy two new appliances using the old IPs of the other cells.
- Make sure that all of database status is healthy and up and running.
- Replace the Java KeyStore on all cells with the old one -> /opt/vmware/vcloud-director/bin/cell-management-tool certificates -j -p –keystore /opt/vmware/vcloud-director/data/transfer/certificates.ks –keystore-password PASSWORD
- Make sure to modify the ConsoleProxy address to the eth0 FQDN in Public Addresses.
References:
- https://docs.vmware.com/en/VMware-Cloud-Director/9.1/com.vmware.vcloud.admin.doc/GUID-30090914-3BB8-4743-BD8B-C29FA863C034.html
- https://docs.vmware.com/en/VMware-Cloud-Director/9.7/com.vmware.vcloud.install.doc/GUID-D8D2BB80-E9C0-44A8-9531-5F36FAE1F0C1.html
- https://www.postgresql.org/download/linux/redhat/
2495 Total Views 1 Views Today