Opendj - A LDAP Server for dummies

40
OpenDJ A LDAP Server for dummies Claudio Borges aka but3k4 [email protected]

description

My presentation at H2HC 2014

Transcript of Opendj - A LDAP Server for dummies

Page 1: Opendj - A LDAP Server for dummies

OpenDJA LDAP Server for dummies

Claudio Borges aka [email protected]

Page 2: Opendj - A LDAP Server for dummies

About me+13 years experience with Linux/Unix

Systems Administrator Specialist

Technical Leader at Locaweb

PPP Programmer (Python/Perl/PHP)

Fresh Father

USF4 player

Page 3: Opendj - A LDAP Server for dummies

What is OpenDJ?A powerful and secure LDAP Server

Written in java

It began as a fork of the OpenDS code base

Initial release in december 21 2010

100% opensource (CDDL License)

Reliable and Scalable

Page 4: Opendj - A LDAP Server for dummies

Classic Scenario

Page 5: Opendj - A LDAP Server for dummies

FeaturesEasy installation, configuration and

administration

Rich Command Line Interface (CLI)

Control Panel (Admin GUI)

Automatic backups with task scheduler

High Availability

Rest API

Flexible, and easy to use plug in mechanism

Page 6: Opendj - A LDAP Server for dummies

OpenDJ in ActionInstall OpenDJ

The Command Line Interface (CLI)

Control Panel (Admin GUI)

Replication

Tuning

Backup

Page 7: Opendj - A LDAP Server for dummies

Install OpenDJ Download OpenDJ from ForgeRock website:

https://backstage.forgerock.com/#!/downloads/OpenDJ

Create a local user:

Ex: opendj

Install JAVA 6 or later

If you download the file OpenDJ-2.6.0.zip, unzip the file:

Ex: unzip -v OpenDJ-2.6.0.zip -d /opt/

Run the setup utility

Create the init script and start OpenDJ

Page 8: Opendj - A LDAP Server for dummies

Install OpenDJ

Page 9: Opendj - A LDAP Server for dummies

Install OpenDJ

Page 10: Opendj - A LDAP Server for dummies

Install OpenDJ

Page 11: Opendj - A LDAP Server for dummies

Command Line InterfaceThe dsconfig command is the primary command

line tool for viewing and editing OpenDJ configuration.

You can run it with or without arguments.

Page 12: Opendj - A LDAP Server for dummies

Command Line Interface

Page 13: Opendj - A LDAP Server for dummies

Command Line Interface

Page 14: Opendj - A LDAP Server for dummies

Control PanelOpenDJ Control Panel offers a graphical user

interface for managing both local and remote servers.

Page 15: Opendj - A LDAP Server for dummies

Control Panel

Page 16: Opendj - A LDAP Server for dummies

Control Panel

Page 17: Opendj - A LDAP Server for dummies

Control Panel

Page 18: Opendj - A LDAP Server for dummies

Control Panel

Page 19: Opendj - A LDAP Server for dummies

ReplicationYou can set up replication automatically using

the QuickSetup GUI when you first install the directory server. If you set up your directory servers by using the setup command, you can use the dsreplication command to configure replication between the servers.

Page 20: Opendj - A LDAP Server for dummies

Replication

Page 21: Opendj - A LDAP Server for dummies

ReplicationFirst, you need to create an admin user. you will

use the dsframework command. This utility can be used to perform operations in the directory server administration framework.

Page 22: Opendj - A LDAP Server for dummies

ReplicationCreating the admin user:

Page 23: Opendj - A LDAP Server for dummies

ReplicationConfiguring the replication:

Page 24: Opendj - A LDAP Server for dummies

Replication

Page 25: Opendj - A LDAP Server for dummies

Replication

Page 26: Opendj - A LDAP Server for dummies

ReplicationInitialize Replication between servers:

Page 27: Opendj - A LDAP Server for dummies

Replication

Page 28: Opendj - A LDAP Server for dummies

ReplicationMonitoring the replication:

Page 29: Opendj - A LDAP Server for dummies

Replication

Page 30: Opendj - A LDAP Server for dummies

TuningIf you have a heavy traffic, you need to change

the values below using the dsconfig command:

idle-time-limit = 20

lookthrough-limit = 10000

size-limit = 5000

time-limit = 20

Page 31: Opendj - A LDAP Server for dummies

Tuning

Page 32: Opendj - A LDAP Server for dummies

Tuning For a server with 24gb of RAM, use these options:

- -d64

- -XX:+UseCompressedOops

- -Xms8g

- -Xmx12g

- -Xmn4g

- -XX:MaxTenuringThreshold=1

To apply JVM settings for your server, edit config/java.properties, and apply the changes with the dsjavaproperties command.

Page 33: Opendj - A LDAP Server for dummies

Tuning

Page 34: Opendj - A LDAP Server for dummies

TuningYou need to configure the maximum number of

Open File Descriptors for the OpenDJ User, so, create the file /etc/security/limits.d/opendj.conf, with these values:

opendj soft nofile 65535

opendj hard nofile 131072

Restart the OpenDJ with the command:

stop-ds --restart --quiet

Page 35: Opendj - A LDAP Server for dummies

Tuning

Page 36: Opendj - A LDAP Server for dummies

BackupOpenDJ has a internal backup tool. This tool can

be used to back up one or more directory server backends.

Page 37: Opendj - A LDAP Server for dummies

Backup

Page 38: Opendj - A LDAP Server for dummies

Locaweb CaseThe Locaweb OpenDJ environment is composed

of:

- Two F5 BiG-IP Load Balancers (layer 4)

- 4 servers, 16 procs and 24gb RAM each

This configuration reached 60k maximum concurrent connections per server in production environment.

Page 40: Opendj - A LDAP Server for dummies

Thanks for your Attention!

Any questions?

Claudio Borgeswww.claudioborges.org

[email protected]@but3k4