Upgrading Protocol:
The official documentation for upgrading AEN states: "CAUTION: These instructions are for upgrading AEN to the current version from the previous version ONLY. Each version must be upgraded iteratively from the previous version. Do not skip versions."
But there are cases where users will want to upgrade to the newest version of AEN from relatively old versions (like version 4.0.0) which would require 5+ iterative upgrades. This is not practical for some users and in these cases it may be beneficial to upgrade through the back-up and restore process.
Preparation for the Upgrade:
1. The first step is to stop all of the services.
sudo service wakari-server stop sudo service wakari-gateway stop sudo service wakari-compute stop
After you have confirmed that all services are stopped, search for and kill any processes that users would have started. Make sure you run the "ps -ef"
command first to ensure that you return the correct processes. Any extraneous processes still running will be from applications (terminal, notebook, etc) from wakari-compute
so make sure to include 'grep wakari-compute'
in your search string.
sudo kill $(ps -ef | grep wakari-compute| awk '{print $2}')
Confirm that no wakari-*
processes are running before moving onto the next step.
2. You will also want to backup mongodb. The following command will create a folder aen_main with the old log file inside:
mongodump -db wakari -o aen_main >> mongo_backup.log
3. Move the existing installation from /opt/wakari
to a new folder called /opt/wakari-x.x.x
where x.x.x
is AEN version. This way your old installation is preserved and the config files are saved. After we complete the upgrade we an go back and delete this folder.
mv /opt/wakari /opt/wakari-x.x.x
4. If installation was customized, use the "Preparing for Installation" documentation to set any custom environment variables. For example, a custom name for AEN functional ID ("wakari"
is default) or a custom value for AEN_SUDO_CMD
. Docs can be found here.
New Installation:
Now it is time to install your desired version of AEN. It will be very similar to a new installation but will a few crucial differences.
Grab the installers from the current AEN Docs here or from the docs related to your desired AEN version.
AEN Server
Make sure that the necessary variables are defined and run the wakari-server installer. When you are done, copy the old config files from:
OLD_WAKARI_ISNTALL/wakari-server/etc/wakari/*
to /opt/wakari/wakari-server/etc/wakari:
cp OLD_WAKARI_ISNTALL/wakari-server/etc/wakari/*
/opt/wakari/wakari-server/etc/wakari
This will copy over all your configs and also your license file.
Note: Keep in mind that if your AEN installation is sufficiently old you may need a new license as AEN 4.0.0 has a different format in its license file.
The password for AEN_SRVC_ACCT
will be updated in this process. We can keep the updated password or restore the old password by restoring mongodb according to your needs.
However, if you set the uniqueEmail key to false in your server config you may encounter an exception when the installer tries to fix/update the password for the AEN_SRVC_ACCT
user.
AEN Gateway
Next run the wakari-gateway installer. Do not register the gateway according to the official documentation.
Instead, copy the old config files from OLD_WAKARI_INSTALL/wakari-gateway/etc/wakari/*
to /opt/wakari/wakari-gateway/etc/wakari
.
cp OLD_WAKARI_INSTALL/wakari-gateway/etc/wakari/*
/opt/wakari/wakari-gateway/etc/wakari
After this you can set the correct permissions for the config files and then start the wakari-gateway service:
sudo chown $AEN_SRVC_ACCT /opt/wakari/wakari-gateway/etc/wakari/wk-gateway-config.json
sudo service wakari-gateway start
The Gateway should now be visible to the AEN Sever and you should be able to see it in the UI under Data Centers.
AEN Compute
Now run the AEN Compute installer. After you're done you can copy the old config files from OLD_WAKARI_INSTALL/wakari-compute/etc/wakari/*
to /opt/wakari/wakari-compute/etc/wakari
as well as OLD_WAKARI_INSTALL/anaconda/.condarc
to /opt/wakari/anaconda/
. Make sure to start the wakari-compute service
sudo service wakari-compute start
Add the Compute node to your resources in the Admin UI.
Clean Up and Rolling Back
You will want to restart the services and confirm that everything is running normally:
sudo service wakari-server restart sudo service wakari-gateway restart sudo service wakari-compute restart
If everything is working normally you can remove the old wakari installation at /opt/wakari-x.x.x
.
rm -rf /opt/wakari-x.x.x
However, you do run into issues you can move the new installation (currently /opt/wakari
) to a new location i.e. /opt/wakari-4.2.2
and create a symlink to the old (and still working) version so that users can use AEN without interruption.
In order to do this, stop all services as you did before and:
mv /opt/wakari /opt/wakari-4.2.2
ln -s /opt/wakari-old /opt/wakari