Before procceding, make sure that you have the backup. In case any failure, you can revert back and restart these steps. Let's start:
Install postgresql server on your system (version should be at least 14.0) or any host that can be reachable from gluu host.
Let's install postgresql
with the following command:
sudo apt install postgresql postgresql-common
To crate database, user and adjust previleges, connect to postgresql server by command sudo su - postgres -c 'psql'
Execute the following sql commands one-by-one:
CREATE DATABASE gluudb;
CREATE USER gluu WITH PASSWORD 'YourPassword';
GRANT ALL PRIVILEGES ON DATABASE gluudb TO gluu;
ALTER DATABASE gluudb OWNER TO gluu;
Let's add the following line at the beginning of /etc/postgresql/14/main/pg_hba.conf
:
host gluudb gluu 0.0.0.0/0 md5
and restart postgresql:
systemctl restart postgresql.service
- Login into gluu server and install
python3-ldap
:
gluu-serverd login
apt install python3-ldap
- Download the migration script:
wget https://raw.githubusercontent.com/GluuFederation/community-edition-setup/refs/heads/master/tools/ldap_to_rdbm/ldap2rdbm.py -O /install/community-edition-setup/ldap2rdbm.py
- Download and extract the
community-edition-repo
:
wget https://github.com/GluuFederation/community-edition-setup/archive/refs/heads/master.zip -O community-edition-setup.zip && unzip community-edition-setup.zip
- Replace with updated files in
/install/community-edition-setup/
directory:
rsync -av community-edition-setup-master/ /install/community-edition-setup/
- Now let's run the migration:
cd /install/community-edition-setup/
python3 ldap2rdbm.py -rdbm-type="pgsql" -rdbm-user="gluu" -rdbm-password="YourPassword" -rdbm-db="gluudb" -rdbm-host="localhost" -rdbm-port="5432"
If everything goes well, you should see this line at the end after running the migration script:
Please disable opendj and restart container
Let's disable opendj:
/opt/opendj/bin/stop-ds
systemctl disable opendj.service
Finally, exit from gluu server and restart:
exit
gluu-serverd restart
After restart, you should be able to login into the server.