This Control Panel Migration Guide describes the migration procedure both for clouds with Static Hypervisors and for clouds with CloudBoot Hypervisors.
According to recommendations from MariaDB, migration from MySQL database to MariaDB database should be carried out through mysql_upgrade in order to eliminate the following problems:
- You will get warnings in the error log every time you access a table with an invalid (old) file name
- When searching on key values you may not find all rows
- You will get an error "ERROR 1459 (HY000): Table upgrade required" when accessing the table.
- You may get crashes
In this case, you can migrate the CentOS6 server's database to MariaDB using the specific script and then restore MariaDB backup on a new server.
Ensure that the failover is disabled on the source CP server before starting cloud data migration. You can enable failover on the new CP server after all migration tasks are finished, and CR is manageable by the new CP.
Take the following steps to perform migration:
Install OnApp packages on the new CP server. Package versions of both CPs must be the same. It should be done according to Install Control Panel Server. The only difference is in step 5, where MariaDB must be installed with this command:
Stop OnApp and httpd daemons on the old CP:
Ensure OnApp and httpd daemons are stopped
Make dump of OnApp database; /etc/ folder; .ssh/ folder (for root and OnApp users); /onapp/interface/ :
Versions 3.3.0 and later require backing up of Redis database.
Be aware, that redis.sock can be located in tmp/ directory.
Disable OnApp and httpd daemons in autorun:
Ensure those daemons were really disabled:
Copy all dumped data to new CP server (create /root/BACKUP_DIR on remote host):
Drop the new database on the new Control Panel server:
Apply database from the old CP to the new one:
Apply Redis database if CP's version is 3.3.0 or later
Make sure the Redis database file is the
/var/lib/redis/onapp.rdbfile as it is assumed that the
dir var/lib/redisdirectives are set in
Apply SSH files for root and onapp users:
Check the owner of ssh keys in /onapp/interface/config/keys (in layout owner and group must be onapp):
Apply exports file to new CP:
Perform the following steps 16-20 only if your Cloud uses CloudBootHypervisors. For the cloud with StaticHypervisors - proceed to step 21
Copy TFTPBoot folder from the old CP to the new one:
Copy /onapp/configuration/dhcp/dhcpd.conf from the old CP to the new one:
For OnApp versions previous to 4.0 file location is /home/onapp/dhcpd.conf
Stop dhcpd daemon on the old CP and disable it in the autorun:
Apply copied dhcp files and TFTPBoot folder to the new CP:
For OnApp versions previous to 4.0 apply the following:
Check server_args directive in TFTP configuration. It should be server_args = -v -v -s /tftpboot:
- Make interchange of IP-addresses between old and new CP servers
- On the new CP - try to obtain access to HVs via SSH under the OnApp user
Add onapp and httpd daemons on CP to autorun:
Run the following command to apply SNMP Trap IP_address of management network and RabbitMQ the new CP:
Perform this step if you are running OnApp 3.3.0 and above.
For a successful migration, you need to specify the RabbitMQ credentials. You can view your RabbitMQ credentials by running the following command:
/onapp/onapp-rabbitmq/credentials.ymlfrom the RabbitMQ server standalone box, into Control Panel's
/onapp/configuration/rabbit_mq/vcloud/credentials.yml. For more information, refer to RabbitMQ Server Installation.
- --rbtlogin RBT_LOGIN - RabbitMQ manager login. The default value is 'rbtmgr'.
- --rbtpasswd RBT_PASSWD - RabbitMQ manager password. A random password is generated if this parameter isn't specified.
Make sure that the rbtlogin and rbtpasswd values are the same as at the Settings > Configuration page.
Go to Settings > Configuration in the OnApp UI and click Save to complete the process.
If Acceleration is enabled:
Specify user name and password for rabbitmq-server:
Set permissions for this user:
Restart OnApp service:
Compute Resources and Control Panel must use the same rabbitmq-server.
Make sure RabbitMQ credentials are up to date for all HVs. To do this, perform the steps, marked as "Perform the following steps if you plan to deploy Accelerator. Otherwise skip." described in the Install Compute Resources section.
Run DB dump to be sure that all DB dumps are copied directly to the backup server:
After interchanging IP-addresses between the CP servers, stop all VSs running on CloudBoot hypervisors and reboot these HVs.