Recover Control Panel
This guide presumes the availability of off-server/site backups of the following directories so that the files of those directories could be copied back to the server being recovered:
- /onapp/interface/config/
- /root/
- /onapp/backups/db/dump
- /etc/my.cnf
- /home/onapp
If you have any SSL certificates on the server, take a copy of the necessary files.
Recover Control Panel
To prepare for Control Panel recovery:
Install a clean installation of CentOS 64bit
Configure networking to match the previous configuration
Ensure you can ping compute resources and backup servers over the management network
Ensure that you can access MySQL without a password before continuing if it is already installed- Remove any client MySQL configuration in /root/.my.cnf
Update CentOS components to the latest yum update.
Download and install the OnApp YUM repository file:
rpm -Uvh http://rpm.repo.onapp.com/repo/onapp-repo.noarch.rpm
CODEInstall OnApp Control Panel installer package. Please, reboot if requested by the installer due to SELINUX, and then continue:
bash#> yum install -y onapp-cp-install
CODERun the Control Panel installer to install the latest OnApp release:
/onapp/onapp-cp-install/onapp-cp-install.sh
CODEIf required, indicate the build number of the release version you want to install:
/onapp/onapp-cp-install/onapp-cp-install.sh -v <ONAPP_VERSION>
CODE
To avoid any issues, make sure you reinstall the same release which was previously installed on the CP server.Import the OnApp config from backup:
/onapp/interface/config/on_app.yml
CODETo ensure the SSH keys are correct, import the following from the backup:
/home/onapp/.ssh/id_rsa /onapp/interface/config/keys/private /home/onapp/.ssh/id_rsa.pub /onapp/interface/config/keys/public /root/.ssh/authorized_keys /home/onapp/.ssh/known_hosts /root/.ssh/known_hosts
CODEMake sure you can access each compute resource and backup server from the OnApp user. To verify the keys are working correctly run the following commands:
su onapp ssh root@<HV_IP_ADDRESS>
CODEInstall OnApp Storage packages
yum -y install onapp-store-install /onapp/onapp-store-install/onapp-store-install.sh
CODELocate and restore the latest MySQL dump.
Copy from backup the latest gzipped dump into the/root directory on CP. I.e.:scp 1397788801.localhost.onapp.sql.gz <CP_IP_ADDRESS>:/root/ gunzip /root/1397788801.localhost.onapp.sql.gz mysql -p onapp < /root/1397788801.localhost.onapp.sql
CODERestore MySQL optimizations from backup (if changed from defaults):
/etc/my.cnf
CODEIf required, run the OnApp installer to update the DB scheme.
This may be required if you have reinstalled a newer version of OnApp than was installed previously, or you are not sure what version was installed previously.
/onapp/onapp-cp-install/onapp-cp-install.sh
CODERegenerate Cloudboot information
Option 1su onapp cd /onapp/interface/ && rails c Hypervisor.all.map { |hv| OnApp::CloudBoot::Config::Hypervisor.new(hv).update if hv.mac.present? }
CODEIn OnApp Web UI, go to Settings > Configuration and click Save at the bottom of the page.
Option 2
If you have an up to date backup of /tftpboot you can restore the whole directory to replace the default /tftpboot files
Regenerate new dhcpd.conf by adding and removing a placeholder IP:
Go to Settings > Hypervisors > Cloudboot IPs
Add a single placeholder IP; e.g:
IP Address - 10.10.10.2
Netmask - 255.255.255.0
Gateway - 10.10.10.1
After adding the above IP, please delete it using the Trash icon.
Restart services for changes to take effect:
service httpd stop service onapp stop service mysqld stop service mysqld start service onapp start service httpd start
CODE
You may need to wait around 15 minutes for the license to become active, once it has become active this process should be complete.
Post Actions
If you have an empty Cloudboot server, it is recommended to reboot it at this stage in order to ensure the DHCP/TFTP services are working as expected.
Provision a test virtual server, smart server, and baremetal server where the capacity allows to ensure the end-to-end process for each provisioning process is working normally.