The stable release of CentOS 7 has reached its end of life. Therefore it was needed to move GreenLight to a new Operating System.
Because of this, AlmaLinux distribution has been chosen. AlmaLinux OS is an open-source, community-driven Linux operating system that fills the gap left by the discontinuation of the CentOS Linux stable release.
|
This article explains all the necessary steps
On New Appliance, please make sure that the following is checked and prepared:
|
On Old Appliance, please make sure that the following items checked
|
The new appliance should most likely use much of the same fundamental container config as the old one.
# Old Appliance: check for custom config (e.g. CORS settings, ...) cat /opt/panagenda/appdata/gl/config |
This file may not exist, please create it on the new appliance if necessary. Attention on host name change!
# New Appliance: update custom config based on entries from the old appliance vim /opt/panagenda/appdata/gl/config |
You might stumble across a mistake here that we previously had in our config. Docker ignored it in the past, but now flags it and our app won’t start. Please check for this and correct!
1) These network config parameters are optional and will not be there in most customer installations. Our default subnets are 192.168.237.0 and 192.168.238.0 and they will come out of the config.default file. Should this subnet config exist in customer environments thought, we need to correct the subnet format and bring the two parameters along (DOCKER_BRIDGE + NETWORK_SUBNET)
2) There might also be a parameter PANAGENDA_DOCKER_STORAGE_DRIVER present. DO NOT copy this over. Just leave the whole line out. The new appliance has a much newer docker version with a new storage driver for performance and OS compatibility.
# New Appliance: bring config changes into effect gl start |
Check if everything comes up properly and the containers run normally (docker ps). If it looks good, you can check the postgres container if the subnet settings have been applied successfully.
# New Appliance: check postgres container docker inspect gl_postgres |
Near the end of the output you should see something like the following: "IPv4Address": "172.18.0.2"
Here the subnet config and the hosts individual IP come together.
# Stop all containers, except postgres docker stop gl_nginx gl_tomcat gl_data_miner gl_metabase gl_cron -t 120 |
Please execute the following commands on the console of the old appliance
# define the name of the postgres container PGCONTAINER=gl_postgres # create database user for the migration docker exec -u postgres $PGCONTAINER psql postgres -c "CREATE ROLE migrator WITH SUPERUSER LOGIN REPLICATION PASSWORD 'panagenda'" # check if listening properly netstat -tlpn |
The last command should show 0 0.0.0.0:5432 in state LISTEN
Now, lets stop all containers (except the database) on the old appliance
# Stop all containers, except postgres docker stop gl_nginx gl_tomcat gl_data_miner gl_metabase gl_cron -t 120 |
On Old appliance: create the backup
# go to volumes folder cd /opt/panagenda/appdata/volumes/ # pack an archive with everything and store it in /root/ tar -czvf /root/appdata.tar.gz gl nginx ./notes/names.nsf ./notes/user.id* |
On New appliance: restore the backup
# go to volumes folder cd /opt/panagenda/appdata/volumes/ # rename default names.nsf mv ./notes/names.nsf ./notes/names.orig_nsf # copy the file over (replace OLDHOST with hostname/ip of the old appliance) scp OLDHOST:/root/appdata.tar.gz /root/ # extract files (will be placed in correct folders automatically) tar -xvzf /root/appdata.tar.gz # clean-up (optional) rm -f /root/appdata.tar.gz |
On New appliance
Execute the statements in this chapter from a command line via VNC if possible! (SSH sessions - putty - might be interrupted)
# execute the DB Migration Script /opt/panagenda/appdata/system/db-migration.sh |
Whenever done, the new Appliance is up and running and you can make use of it.
The Old Appliance can be switched off
In case you have chosen that GreenLight should not start after the migration is complete (last item in the previoud chapter) you need to manually start it.
# restart all GL containers: gl start |