...
Prepare yum repositories on all servers
Prepare yum repositories on all servers for v5.2
...
Upgrade distributed API and DB servers
This section describes the upgrade for a standard API and DB server.
These steps are for a Distributed API Server with the database on the API server.
Abiquo will upgrade to new versions of RabbitMQ and MySQL that require a manual upgrade path of dependencies.
Note |
---|
These steps are for a server that contains RabbitMQ AND MySQL |
Remove the Erlang and Galera packages.
Code Block |
---|
yum remove erlang* galera
yum clean all && yum makecache |
...
Install new RabbitMQ and MariaDB server
Code Block |
---|
yum install rabbitmq-server MariaDB-server |
Before you confirm, check that the packages will be installed from the abiquo-base repository
rabbitmq-server: 3.8.2.1
MariaDB-server: 10.4.10.1
...
Upgrade Abiquo to 5.2.x
Code Block |
---|
yum update |
Before you confirm, check the following packages will be installed from the abiquo-base repository:
jdk: 11.0.6u10
redis: 5.0.7.1
After the update, check versions.
Check that the symbolic link to the latest version of Java points to Java 11 on Monolithic Server or Datanode
Code Block |
---|
# cd /usr/java
# ll
latest -> /usr/java/jdk-11.0.6+10 |
Check that the correct Tomcat version will be used on the Monolithic Server
...
Check that you have the repository URL and credentials
To upgrade to a version with a patch number of zero, for example, version 5.2.0
Expand | ||||
---|---|---|---|---|
| ||||
|
OR To upgrade to a version with patch number that is not zero, for example, version 5.2.1, enable both repositories:
Code Block yum-config-manager --enable abiquo-base yum-config-manager --enable abiquo-updates
Optionally add your username and password to the Abiquo repos
Code Block yum-config-manager --save --setopt=abiquo-*.username=MYUSERNAME yum-config-manager --save --setopt=abiquo-*.password=MYPASSWORD
Don't forget to use a backslash to escape any shell special characters. For more details, see https://www.oreilly.com/library/view/learning-the-bash/1565923472/ch01s09.html
Clean yum and make cache
Code Block |
---|
yum clean all && yum makecache |
If you did not make snapshots of all servers already, then do this now
Warning |
---|
Major upgradeThe upgrade to Abiquo 5.2.x is a major upgrade with upgrades of third-party software packages that are critical platform dependencies You must make snapshots of ALL servers before you start the upgrade |
...
Upgrade distributed API and DB servers
This section describes the upgrade for a standard API and DB server.
These steps are for a Distributed API Server with the database on the API server.
Abiquo will upgrade to new versions of RabbitMQ and MySQL that require a manual upgrade path of dependencies.
Note |
---|
These steps are for a server that contains RabbitMQ AND MySQL |
Remove the Erlang and Galera packages.
Code Block yum remove erlang* galera yum clean all && yum makecache
Install new RabbitMQ and MariaDB server
Code Block yum install rabbitmq-server MariaDB-server
Before you confirm, check that the packages will be installed from the abiquo-base repository
rabbitmq-server: 3.8.2.1
MariaDB-server: 10.4.10.1
Upgrade Abiquo to 5.2.x
Code Block yum update
Before you confirm, check the following packages will be installed from the abiquo-base repository:
jdk: 11.0.6u10
redis: 5.0.7.1
After the update, check versions.
Check that the symbolic link to the latest version of Java points to Java 11 on Monolithic Server or Datanode
Code Block # cd /usr/java # ll latest -> /usr/java/jdk-11.0.6+10
Check that the correct Tomcat version will be used on the Monolithic Server
Code Block # cd /opt/abiquo/tomcat/bin # sh version.sh Using CATALINA_BASE: /opt/abiquo/tomcat Using CATALINA_HOME: /opt/abiquo/tomcat Using CATALINA_TMPDIR: /opt/abiquo/tomcat/temp Using JRE_HOME: /usr Using CLASSPATH: /opt/abiquo/tomcat/bin/bootstrap.jar:/opt/abiquo/tomcat/bin/tomcat-juli.jar NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED Server version: Apache Tomcat/9.0.33 Server built: Mar 11 2020 09:31:38 UTC Server number: 9.0.33.0 OS Name: Linux OS Version: 3.10.0-1160.15.2.el7.x86_64 Architecture: amd64 JVM Version: 11.0.6+10 JVM Vendor: AdoptOpenJDK
On the Monolithic Server in the JDK folder, check certificate migration for AM download. The API Server certificate should be listed for Java 11 with its FQDN. You may need to enter the storepass option to supply the password and you can use the alias option to search for the hostname or FQDN of your server
Code Block # cd /usr/java/jdk-11.0.6+10/lib/security # keytool -list -keystore cacerts -alias (hostname or fqdn)
For example
Code Block sudo keytool -list -keystore cacerts -alias abiquo.example.com
Enable and start the new services
Code Block systemctl enable mariadb systemctl enable rabbitmq-server systemctl start mariadb systemctl start rabbitmq-server
Upgrade MySQL
Code Block mysql_upgrade
The mysql_upgrade step may detect errors that trigger messages such as the following:
Code Block kinton_accounting.ACCOUNT_PERIOD_USAGE_VW Error : Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 100129, now running 100410. Please use mysql_upgrade to fix this error
These messages are expected and this same mysql_upgrade process will automatically fix these errors in its next stages.
Check that the mysql_upgrade process completes correctly.
Check that your hostname is in your DNS or in your /etc/hosts file
Upgrade the Abiquo API databases
Code Block abiquo-db [-h DB hostname] [-P DB port] [-u user] [-p password] update
If the liquibase update fails with a message similar to the following:
Code Block Liquibase update Failed: Validation Failed: 1 change sets check sum src/X.X.X-XX/kinton-X.X.X.xml::ABICLOUDPREMIUM-XXXX-XxxxxxxxXXxXxxxxxxXxxxxx::XXXXXXXXX is now: 7:ee2fa6e058ec76c7abf801567898917d For more information, use the --logLevel flag
Do the following steps
Clear the database checksums
Code Block abiquo-db clearCheckSums
Retry the above abiquo-db update command.
Change file owners to tomcat user
Code Block chown -R tomcat /opt/abiquo
...
To continue using Java 8 (for Cassandra), remove the JDK through the package manager. If you use yum, it will be delete all the dependencies and you will have to reinstall them
Code Block rpm -e --nodeps jdk
Check the jdk to install is version 8
Code Block rpm -qa | grep jdk
Check that Java is correctly installed:
If you execute this command and get that error, please execute the command from the next bullet:
Code Block $ java -bash: java: command not found
Fix it by executing this command, then selecting the option "java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.x86_64/jre/bin/java)":
Code Block $ sudo alternatives --config java There are 3 programs which provide 'java'. Selection Command ----------------------------------------------- 1 /usr/java/jdk1.8.0_144/bin/java + 2 /usr/java/jdk-11.0.6+10/bin/java * 3 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java/jdk1-1.8.0-openjdk-1.8.0_144.292.b10-1.el7_9.x86_64/jre/bin/java) +Enter 2to keep the current selection[+], or type selection /usr/java/jdk-11.0.6+10/bin/java * 3 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.x86_64/jre/bin/java) Enter to keep the current selection[+], or type selection number: 3
As for the Abiquo DB steps, remove Galera, which will also remove MariaDB
Code Block yum remove galera
Clean yum and make cache
Code Block yum clean all && yum makecache
Install MariaDB
Code Block yum install MariaDB-server
Update Abiquo
Code Block yum update
Check that the Java package is now "javajdk" to use Java 1.8.0u144 with Cassandra:
Code Block # rpm -qa 'javajdk*' javajdk-1.8.0u144-6691.el7.x86_64
If you have a HA datanode that runs the watchtower database, skip directly to Step 10 to update watchtower database
Enable and start the services that were reinstalled
Code Block systemctl enable mariadb systemctl start mariadb
Upgrade MySQL
Code Block mysql_upgrade
The mysql_upgrade step may detect errors that trigger messages such as the following message (note: this example is from the Abiquo database server).
Code Block kinton_accounting.ACCOUNT_PERIOD_USAGE_VW Error : Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 100129, now running 100410. Please use mysql_upgrade to fix this error
These messages are expected and this same mysql_upgrade process will automatically fix these errors in its next stages.
Check that the mysql_upgrade process completes correctly.
Update the Abiquo Watchtower database
watchtower-db [-h DB hostname] [-P DB port] [-u user] [-p password] updateCode Block number: 3
As for the Abiquo DB steps, remove Galera, which will also remove MariaDB
Code Block yum remove galera
Clean yum and make cache
Code Block yum clean all && yum makecache
Install MariaDB
Code Block yum install MariaDB-server
Update Abiquo
Code Block yum update
Check that the Java package is now "javajdk" to use Java 1.8.0u144 with Cassandra:
Code Block # rpm -qa 'javajdk*' javajdk-1.8.0u144-6691.el7.x86_64
If you have a HA datanode that runs the watchtower database, skip directly to Step 10 to update watchtower database
Enable and start the services that were reinstalled
Code Block systemctl enable mariadb systemctl start mariadb
Upgrade MySQL
Code Block mysql_upgrade
The mysql_upgrade step may detect errors that trigger messages such as the following message (note: this example is from the Abiquo database server).
Code Block kinton_accounting.ACCOUNT_PERIOD_USAGE_VW Error : Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 100129, now running 100410. Please use mysql_upgrade to fix this error
These messages are expected and this same mysql_upgrade process will automatically fix these errors in its next stages.
Check that the mysql_upgrade process completes correctly.
Update the Abiquo Watchtower database
Code Block watchtower-db [-h DB hostname] [-P DB port] [-u user] [-p password] update
Edit the file
/opt/kairosdb/conf/kairosdb.properties
to update the name of the following variable and to remove the port from it:Remove the line
kairosdb.datastore.cassandra.host_list=192.168.888.999:9160
.
And add this linekairosdb.datastore.cassandra.cql_host_list=192.168.888.999
.
Please note the newcql_
prefix forhost_list
Add
kairosdb.datastore.cassandra.datapoint_ttl = 15768000
(ref: Internal JIRA SUP-333):
Edit the file
/etc/cassandra/conf/cassandra.yml
OR/etc/cassandra/default.conf/cassandra.yaml
(whichever exists) to remove a variable:Remove the line starting with
kairosdb.datastore.cassandra.datapoint_ttl
and save and close the file.
...
Upgrade steps from 4.7.x to 5.0.x
...