Skip to content

Instantly share code, notes, and snippets.

@tecoholic
Last active October 24, 2016 19:00
Show Gist options
  • Save tecoholic/1bc0e4ef9e8cc507fe4c6e0dee55c00e to your computer and use it in GitHub Desktop.
Save tecoholic/1bc0e4ef9e8cc507fe4c6e0dee55c00e to your computer and use it in GitHub Desktop.
A temporary procedure to setup and test openldap in alpha versions of Gluu Server 3.0.0

Pre-requisites

  • Ubuntu 14.04
  • OpenLDAP Binary as a deb package - Preferably Symas Openldap Gold

Procedure for migrating an existing Gluu Server 2.4.4

  1. Export the ldap data using the export_opendj script
service gluu-server-2.4.4 login
wget https://raw.githubusercontent.com/GluuFederation/community-edition-setup/master/static/scripts/export_opendj.py
python export_opendj.py
exit

This creates a folder called backup_24 that will contain all the LDAP data in the ldif file format. 2. Install the Gluu Server 3.0.0 alpha version.

echo "deb https://repo.gluu.org/ubuntu/ trusty-devel main" > /etc/apt/sources.list.d/gluu-repo.list
curl https://repo.gluu.org/ubuntu/gluu-apt.key | apt-key add -
apt-get update
apt-get install gluu-server-3.0.0
  1. Stop the old server and copy the files to the new one. Assuming you have openldap.deb in the /root directory
service gluu-server-2.4.4 stop
cp -r /opt/gluu-server-2.4.4/root/backup_24/ /opt/gluu-server-3.0.0/root/
cp openldap.deb /opt/gluu-server-3.0.0/root/
  1. Start the new server and login and do some bootstrapping.
service gluu-server-3.0.0 start
service gluu-server-3.0.0 login
dpkg -i openldap.deb
cd /install
rm -rf community-edition-setup
git clone https://github.com/GluuFederation/community-edition-setup.git
cd community-edition-setup
cp /root/backup_24/setup.properties /install/community-edition-setup/
sed -i 's/ldap_type\ \=\ \"opendj\"/ldap_type\ \=\ \"openldap\"/' setup.py
./setup.py
  1. Input the values and wait for the installation to finish.
  2. Import the old OpenDJ data into OpenLDAP
wget -c https://raw.githubusercontent.com/GluuFederation/community-edition-setup/master/static/scripts/import_openldap.py
wget -c https://raw.githubusercontent.com/GluuFederation/community-edition-setup/master/ldif.py
apt-get update
apt-get install python-pip
pip install jsonmerge
python import_openldap.py backup_24
  1. Start the Openldap server
service solserver start
  1. Verify connection using username cn=directory manager,o=gluu and your ldap password from the old installation on the port 1636.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment