Upgrade#
Upgrade from 4.x to 4.2#
Follow these steps to upgrade from 4.x to 4.2.
Important
Upgrades should always be thoroughly scoped and tested on a development environment first.
-
Take a backup of your
Kong
andKonga
database. Use the following command to export a Database. Make sure yourpostgresql
service is started.pg_dump --dbname=postgresql://<user>:<password>@localhost:5432/konga > konga.sql pg_dump --dbname=postgresql://<user>:<password>@localhost:5432/kong > kong.sql
If you get
Ident authentication failed for user ...
problem then you need to update the file/var/lib/pgsql/10/data/pg_hba.conf
. Sethost .. .. .. ident
tohost .. .. .. md5
. After this change you need to restart theservice postgresql restart
service. -
Take a backup of
/opt/gluu-gateway/konga/config/local.js
,/etc/kong/kong.conf
and/opt/oxd-server/dadatata/oxd_db.mv.db
. Run the following command.cp /opt/gluu-gateway-ui/config/local.js ./ cp /opt/oxd-server/data/oxd_db.mv.db ./ cp /etc/kong/kong.conf ./
-
Stop the Gluu Gateway service
service gluu-gateway stop service kong stop service konga stop service oxd-server stop
-
Uninstall GG 4.x, nodejs, oxd-server and Kong.
For Ubuntu 18
apt-get purge gluu-gateway kong nodejs oxd-server
For CentOS 7 and RHEL 7
yum remove gluu-gateway kong nodejs oxd-server
-
We remove oxd from GG 4.2. You need to use OXD which is now at your Gluu CE. Put
oxd_db.mv.db
at/opt/oxd-server/data
in Gluu CE. -
Install GG 4.2 by following details here. Don't run the setup script. Follow the next step for upgrade.
-
Move
konga.sql
andkong.sql
file to/opt/gluu-gateway-setup/templates
mv konga.sql kong.sql /opt/gluu-gateway-setup/templates
-
Download upgrade script from here and start installation with the following command.
- When asked to
generate client
, selectn
and it will prompt to ask oxd_id. - Open a new terminal, open
local.js
which you have take backup in step-2. Open it and copy past the oxd_id, client_id and client_secret.
cd /opt/gluu-gateway-setup/ python3 gg-upgrade-4-1-to-4-2-1.py
- When asked to
-
The upgrade is done here. If there are any configuration missing from the config files, update manually. Please check all the services running using command
netstat -ntlp
.