A customer has an OPC 1.4.x HA installation in Production. They want to test an in-place upgrade from OPC 1.4.x all the way through to EC11.1.6 using their current OPC Production data and config. This gives us a good chance to make corrections if we find that their data is too broken for the migrations to handle, and gives the customer experience in managing the upgrade in Production.
The sequence of events will broadly be these:
- Install OPC 1.4.11 on target HA Test cluster
- Restore data from Production OPC 1.4.11 instance LVM snapshot backup produced by our drbd-backups script
- Test
- Upgrade to EC 11.1.6
- Test
- Assuming a clean target system, nothing in /etc/opscode, /opt/opscode or /var/opt/opscode, no processes running which match
ps -ef |grep opscode
- Create data backup from Production source system using the
/opt/opscode/bin/drbd-backups
tool (NOTE: this tool may need to be modified depending on the amount of available space in the LVM VG) - Mount the backup volume (ex:
/var/opt/opscode/drbd-backups
)
- Install OPC 1.4.11 on the backends and frontends as described in the documentation and validate the system is working correctly
- Shutdown secondary backend keepalived with
private-chef-ctl stop
- Ensure that all services are correctly running on the primary backend:
private-chef-ctl ha-status
- Shutdown Private Chef on the bootstrap Primary target system with:
private-chef-ctl stop
- Force the drbd device to be primary with:
drbdadm primary pc0
- Mount the DRBD volume:
mount -t ext4 /dev/drbd0 /var/opt/opscode/drbd/data
- Copy data into proper locations on the current bootstrap Primary target system:
rsync -avz -e ssh --exclude chef-server-running.json --exclude private-chef.rb root@prodbackend1:/etc/opscode/ /etc/opscode
rsync -avz -e ssh root@prodbackend1:/var/opt/opscode/drbd-backups/ /var/opt/opscode/drbd/data
- Start postgresql with:
private-chef-ctl postgresql start
- Drop opscode_chef and bifrost databases:
/opt/opscode/embedded/bin/psql -U opscode-pgsql -d postgres --command='DROP DATABASE opscode_chef' /opt/opscode/embedded/bin/psql -U opscode-pgsql -d postgres --command='DROP DATABASE bifrost'
- Uncompress the backup:
gzip -d /var/opt/opscode/drbd/data/pgsql-backup.out.gz
- Restore postgresql backup:
/opt/opscode/embedded/bin/psql -U "opscode-pgsql" -d postgres -f pgsql-backup.out
private-chef-ctl reconfigure
private-chef-ctl start
- Copy /etc/opscode to the frontends and secondary backend
- Reconfigure the frontends and TEST
Follow the instructions from this document: http://docs.opscode.com/upgrade_server_ha_notes.html
- On each system run
private-chef-ctl test
- Check DRBD status to be sure we are replicating with the secondary
- Test a selection of orgs and operations on those orgs: client lists, node lists, chef-client runs, group memberships, and any other important or desired tests.
http://docs.opscode.com/enterprise/install_server_be.html http://docs.opscode.com/enterprise/install_server_fe.html