Task #3362
Updated by Jan Mach about 6 years ago
h2. Overall migration status (periodically updated) * *(DONE)* Install new base server *(DONE)* ** New server mentat-alt.cesnet.cz is ready and installed using Ansible * *(DONE)* Install Mentat system and Warden client on the server *(DONE)* ** Development version of Mentat system is installed on the server using Debian package system ** Warden client is installed on the server and connected to production instance of Warden server * *(IN PROGRESS)* Perform data and service migration to new server ** Prepare database migration scripts *(DONE)* ** Prepare filesystem migration scripts *(DONE)* ** Prepare utility Migrate The actual process of migration scripts ** Migrate will be done according to the Mentat service following checklist: * Verify functionality h2. General guidelines for migration process # Day before migration lower the TTL of relevant DNS records for mentat-hub.cesnet.cz and mentat-alt.cesnet.cz servers # Presynchronize filesystem data (rsync), so that the actual migration will be much quicker later. ## report attachments ## RRD databases and chart images ## cache files ## persistent state files ## runlog files? (maybe not necessary) ## log files? (maybe not necessary) # Shut down Warden client on mentat-hub.cesnet.cz and mentat-alt.cesnet.cz servers and let Mentat empty all queues. # Shut down Mentat systems on mentat-hub.cesnet.cz and mentat-alt.cesnet.cz servers # Perform database migration ## users ## groups ## filters ## networks ## reports ## event statistics # Perform filesystem migration - same data as above # Perform configuration migration ## synchronize content of @/etc/mentat@ configuration directory # Switch warden client certificates between mentat-hub.cesnet.cz and mentat-alt.cesnet.cz servers # Switch shibd configuration between mentat-hub.cesnet.cz and mentat-alt.cesnet.cz servers # Switch hostnames and IP addresses between mentat-hub.cesnet.cz and mentat-alt.cesnet.cz servers # Reboot both servers and pray to your favorite god, or as an atheist sit quietly with your hands in your lap ;-) # Login to new mentat-hub.cesnet.cz and launch everything ## Launch Mentat backend services (daemons and scripts) ## Launch Warden client and verify messages are being stored into database ## Verify that the web interface is accessible # Synchronize crontab for root Event migration might not be necessary. If the Mentat will be running on new server for some time and without any downtimes, we could skip slow migration of events from MongoDB to PostgreSQL. h2. Migration process checklist h3. Trial period before migration During this period the mentat-alt.cesnet.cz server works as independent and fully operational instance of Mentat system, which can be used for testing and development purposes. # *(DONE)* *mentat-alt.cesnet.cz*: Install base server. # *mentat-alt.cesnet.cz*: Configure server monitoring with Nagios. # *mentat-alt.cesnet.cz*: Configure server backup. # *(DONE)* *mentat-alt.cesnet.cz*: Install development version of Mentat system. Keep it running and updated during trial period. # *(DONE)* *mentat-hub.cesnet.cz*: Write script for periodical dump of MongoDB. ## Script is called @/root/mentatdb-dump-all.sh@. ## Verified, that script is working properly. # *(DONE)* *mentat-alt.cesnet.cz*: Write script for periodical import of MongoDB dumps from mentat-hub.cesnet.cz. ## Script is called @/root/mentat-sync-mongodb.sh@. ## Verified, that script is working properly. # *(DONE)* *mentat-hub.cesnet.cz*: Install cronjob for script @/root/mentat-sync-mongodb.sh@ to periodically test the import process. ## Installed with following root crontab record: @5 */4 * * * /root/mentat-sync-mongodb.sh@ ## The script will perform fresh dump using @/root/mentatdb-dump-all.sh@ on mentat-hub.cesnet.cz, fetch the result and import it to local MongoDB instance. ## Verified, that cronjob is working properly. h3. From day before migration onward After this period the mentat-alt.cesnet.cz is getting ready for migration process. All Mentat modules will be stopped and data will be synchronized to the local filesystem. Only web interface will be operational to some extend and can be used to verify, that migrated data will be accessible. # Lower the TTL of relevant DNS records for mentat-hub.cesnet.cz and mentat-alt.cesnet.cz servers.