Upgrading from version 4.2.1.2 to version 4.2.1.3
In the 4.2.1.3 version of OpenIAM there were some changes made that require upgrading. This document will guide the users on how to upgrade to version 4.2.1.3 from older ones.
To upgrade, first stop the current version.
openiam-cli stop
Make sure to backup any necessary data from OpenIAM 4.2.1.2 version.
mkdir backup_4.2.1.2mv services/bin/* backup_4.2.1.2/mv ui/webapps/*.war backup_4.2.1.2/
- Afterwards, cleanup working directories.
cd /usr/local/openiam/ui/webapps/rm -rf *
- Download new files
cd /tmp/wget https://download.openiam.com/release/enterprise/4.2.1.3/binaries/backend.tar.gzwget https://download.openiam.com/release/enterprise/4.2.1.3/binaries/frontend.tar.gzwget https://download.openiam.com/release/enterprise/4.2.1.3/db/4.2.1.3_mysql.zip
- Update services
cp /tmp/backend.tar.gz /usr/local/openiam/services/bin/cd /usr/local/openiam/services/bin/tar -xvf backend.tar.gzrm backend.tar.gzchown openiam:openiam *
- Update UI
cd /usr/local/openiam/ui/webapps/cp /tmp/frontend.tar.gz .tar -xvf frontend.tar.gzrm frontend.tar.gzchown openiam:openiam *
- Proceed by updating DB files.
cd /usr/local/openiam/conf/schema/mysql/openiam/cp /tmp/4.2.1.3_mysql.zip .unzip 4.2.1.3_mysql.ziprm 4.2.1.3_mysql.zipchown -R openiam:openiam 4.2.1.3
- Then, add new host in rabbitmq.
rabbitmqctl add_vhost openiam_sasrabbitmqctl set_permissions -p openiam_sas openiam ".*" ".*" ".*"
- Update DataBase
[root@139-162-151-114 openiam]# nano utils/flyway/init.sh[root@139-162-151-114 openiam]# ./utils/flyway/init.sh% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed100 260 100 260 0 0 26000 0 --:--:-- --:--:-- --:--:-- 26000Database access information% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed100 577 100 562 100 15 46833 1250 --:--:-- --:--:-- --:--:-- 48083% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed100 183 100 183 0 0 16636 0 --:--:-- --:--:-- --:--:-- 18300% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed100 577 100 562 100 15 46833 1250 --:--:-- --:--:-- --:--:-- 48083% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed100 183 100 183 0 0 16636 0 --:--:-- --:--:-- --:--:-- 16636% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed100 577 100 562 100 15 46833 1250 --:--:-- --:--:-- --:--:-- 52454% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed100 184 100 184 0 0 16727 0 --:--:-- --:--:-- --:--:-- 16727% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed100 577 100 562 100 15 51090 1363 --:--:-- --:--:-- --:--:-- 52454% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed100 184 100 184 0 0 16727 0 --:--:-- --:--:-- --:--:-- 16727=============== CRITICAL SECTION ===============
After upgrading, you need to configure a database, as follows.
Use default value if this is new installation. If you are doing update, specify your current (before update) version here, like 4.2.1.2, default: 0.0.0.0
This is the name of the openiam core database. If using mariadb, this is most likely 'openiam', default: openiamThis is the name of the openiam Activiti database. If using mariadb, this is most likely 'activiti', default: activitiPossible values: mysql, postgres, mssql, oracle. Type of the database that you are going to use with OpenIAM. The RDBMS have to be already installed, default: mysqlDo you want to initialize OpenIAM Schema and Users? Select this if you are not created schema and users in RDBMS yet. Super user (root) password will required [y/n]:nskip database Initialization installationThis is the hostname of where the openiam core database is., default: localhost194.233.175.51This is the port of where the openiam core database is. If using mariadb, this is most likely '3306', default: 3306This is the hostname of where the openiam activiti database is., default: localhost194.233.175.51This is the port of where the openiam activiti database is. If using mariadb, this is most likely '3306', default: 3306Please validate information below---------------------------------FLYWAY_BASELINE_VERSION=2.3.0.0FLYWAY_OPENIAM_DATABASE_NAME=openiamFLYWAY_ACTIVITI_DATABASE_NAME=activitiFLYWAY_OPENIAM_HOST=194.233.175.51FLYWAY_OPENIAM_PORT=3306FLYWAY_ACTIVITI_HOST=194.233.175.51FLYWAY_ACTIVITI_PORT=3306FLYWAY_DATABASE_TYPE=mysqlDatabase will be initialized=N---------------------------------Please validate your input above, if your are OK with that enter 'y'. To repeat an information collecting procedure enter 'n' :y/usr/local/openiam/conf/schema/mysql/openiam/Flyway Community Edition 6.5.4 by RedgateDatabase: jdbc:mysql://194.233.175.51:3306/openiam (MySQL 5.5)Schema history table `openiam`.`flyway_schema_history` already initialized with (2.3.0.0,<< Flyway Baseline >>). Skipping.Successfully validated 1097 migrations (execution time 00:00.401s)Current version of schema `openiam`: 4.2.1.2.999Migrating schema `openiam` to version 4.2.1.3.001 - OE-1350Migrating schema `openiam` to version 4.2.1.3.002 - OE-1328Migrating schema `openiam` to version 4.2.1.3.003 - OE-1234Migrating schema `openiam` to version 4.2.1.3.004 - OE-1321Migrating schema `openiam` to version 4.2.1.3.005 - OE-1329Migrating schema `openiam` to version 4.2.1.3.006 - OE-1440Migrating schema `openiam` to version 4.2.1.3.007 - OE-1321Migrating schema `openiam` to version 4.2.1.3.008 - fix policy mapMigrating schema `openiam` to version 4.2.1.3.009 - fix ms auth policyMigrating schema `openiam` to version 4.2.1.3.010 - OE-1479Migrating schema `openiam` to version 4.2.1.3.011 - OE-1479Migrating schema `openiam` to version 4.2.1.3.012 - Test H2 db connectorMigrating schema `openiam` to version 4.2.1.3.013 - OE-1508Migrating schema `openiam` to version 4.2.1.3.014 - OE-1503Migrating schema `openiam` to version 4.2.1.3.015 - OE-1524Migrating schema `openiam` to version 4.2.1.3.016 - OE-1601Migrating schema `openiam` to version 4.2.1.3.017 - OE-1081Migrating schema `openiam` to version 4.2.1.3.018 - OE-1575Migrating schema `openiam` to version 4.2.1.3.019 - OE-1221Migrating schema `openiam` to version 4.2.1.3.999 - versionSuccessfully applied 20 migrations to schema `openiam` (execution time 00:01.030s)Flyway Community Edition 6.5.4 by RedgateDatabase: jdbc:mysql://194.233.175.51:3306/activiti (MySQL 5.5)Schema history table `activiti`.`flyway_schema_history` already initialized with (2.3.0.0,<< Flyway Baseline >>). Skipping.Successfully validated 7 migrations (execution time 00:00.017s)Current version of schema `activiti`: 4.2.1.0.999Schema `activiti` is up to date. No migration necessary.
Done.
Then, change:
wget https://download.openiam.com/release/enterprise/4.2.1.3/binaries/4.2.1.3_mysql.zip
to
wget https://download.openiam.com/release/enterprise/4.2.1.3/db/4.2.1.3_mysql.zip
For other db types:
wget https://download.openiam.com/release/enterprise/4.2.1.3/db/4.2.1.3_mssql.zip
wget https://download.openiam.com/release/enterprise/4.2.1.3/db/4.2.1.3_oracle.zip
wget https://download.openiam.com/release/enterprise/4.2.1.3/db/4.2.1.3_postgres.zip
Finally, create directory in utils called curator
mkdir utils/curator
And create init.sh file there https://bitbucket.org/openiam/rpm-utils/src/RELEASE-4.2.1.3/prepared/openiam/utils/curator/init.sh
The provisionrequest elasticsearch document can grow to be many GB in size, and, thus, we must add the possibility to curate it.
Before deploying and upgrading, you will need to run:
curl -XDELETE "http://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}/provisionrequest"curl -XDELETE "http://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}/connectorreply"curl -XDELETE "http://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}/provisionconnectorrequest"
After, run init.sh from utils/curator and then start openiam.
openiam-cli start