Skip to content

Setup script for initial environment generation

License

Notifications You must be signed in to change notification settings

rongjiewang/install

 
 

Repository files navigation

###These instuctions are DEPRECATED.

To install the Gluu Server, please follow the instructions in our docs

OX Install

This is a step by step instruction for installing the OX Server (oxAuth and oxTrust).

To access Gluu support, please register and open a ticket on Gluu Support

Table of contents

Prerequisites

This is a step by step instruction for installing the OX server (oxAuth and oxTrust).

Platform: CentOS 6.4

Requirements

  • OpenJDK 1.6 (Install openJDK1.6 using “yum”) or java7
  • OpenJDK 1.6 devel package needed to compile the code into wars.
  • OpenDJ 2.7 or 2.6
  • Maven 3.x
  • Python 2.7.*
  • Tomcat 7

Make sure your machine name is in hosts file, if not then edit /etc/hosts and add this line at the end of file.

127.0.0.1

Setup OpenDJ

  • Download from official openDJ site.
  • Extract it.

Now run this command:

$ opendj/setup --cli --baseDN o=gluu --ldapPort 1389 --adminConnectorPort 4444 --rootUserDN cn=Directory\ Manager --rootUserPassword passpass --no-prompt --noPropertiesFile

Now you need to stop the server. To do so, run this command:

$ opendj/bin/stop-ds

(note: example password: passpass but you must set your own password)

Setup Maven 3.x

If its not already present ($ which mvn) , then check your linux distribution for a package or download it from http://maven.apache.org/download.cgi

Make sure you export the ENV PATH to include /maven/installdir/bin

Setup Tomcat 7

  • Download Tomcat 7
  • Extract it.

Encrypted Password strings: (download the file gluu-encryptor.zip)

To get encrypted representation of your LDAP password you provided in the opendj setup phase, unzip the file and execute the command:

$ java -jar Gluu-Encryptor.jar passpass

Example: decrypted password: “passpass” → encrypted password: GENERATED_PASSWD

Configure oxAuth

Clone https://github.com/GluuFederation/oxAuth.git using this command:

$ git clone https://github.com/GluuFederation/oxAuth.git

Edit config-oxauth.properties:

Sample configuration:

config.oxauth.issuer=http://localhost:8080
config.oxauth.contextPath=http://localhost:8080
config.oxauth.appliance=@!1111!0002!0085
config.ldap.bindDN=cn=Directory Manager
config.ldap.bindPassword=GENERATED_PASSWD
config.ldap.servers=localhost:1389
config.ldap.maxConnections=3
config.ldap.useSSL=false
config.ldap.configurationEntryDN=ou=oxAuth,ou=configuration,o=@!1111,o=gluu
config.ldap.createLdapConfigurationEntryIfNotExist=true

Configure oxTrust

Clone https://github.com/GluuFederation/oxTrust.git using this command:

$ git clone https://github.com/GluuFederation/oxTrust.git

Edit config-oxtrust.properties using this command:

$ vim oxTrust/profiles/setup/config-oxtrust.properties

Sample configuration:

config.ldap.idp.bindPassword=GENERATED_PASSWD
config.ldap.idp.servers=localhost\:1389
config.ldap.central.bindPassword=GENERATED_PASSWD
config.ldap.central.servers=localhost\:1389
config.appliance.svn_base64_encoded_password=GENERATED_PASSWD
config.host.idp_name=localhost:8080
config.host.idp_mysql_base64_encoded_password=GENERATED_PASSWD
config.host.idp.ldap_base64_encoded_password=GENERATED_PASSWD
config.host.vds.ldap_base64_encoded_password=GENERATED_PASSWD
config.host.keystore_password=GENERATED_PASSWD

Configure Install Script

Clone https://github.com/GluuFederation/install.git using this command:

$ git clone https://github.com/GluuFederation/install.git

Edit install/setup.properties

Set these variables:

  • platform=unix
  • dsType=opendj
  • ldapPW=Password for cn=Directory Manager
  • dsHome=full path of opendj base install dir [default is /opt/opendj]
  • oxAuthHome=full path of oxAuth git clone
  • oxTrustHome=full path of oxTrust git clone
  • tomcatHome=full path of tomcat base install dir [default is /opt/tomcat]

Start openDj server:

$ opendj/bin/start-ds

Run setup:

$ cd install && python setup.py 2>&1 | tee /tmp/gluu_install.log

Test ox in web browser by loading this URL:
http://localhost:8080/oxTrust

Advanced Install Script Configuration

Install script performs a few step which are well described in setup.properties file:

  1. Generates ldap schema
  2. Generates ldap date
  3. Configures directory server (in this document we stick to OpenDJ)
  4. Build OX Products (oxAuth, oxTrust or any other product). This step can be configured (e.g. to build only oxAuth and skip oxTrust.)
  5. Deploy OX Products to Web Container (Tomcat).
  6. Start Web Container

Please check setup.properties for more details.

Build Project

Install script builds OX Products with “setup” Maven profile:

mvn clean install -Dmaven.test.skip=true -Dcfg=setup

setup.properties

Location: https://github.com/GluuFederation/install/blob/master/setup.properties


##############################
###### Control flow
# Script runs sequentially steps:
# 1. generates LDAP schema;
# 2. generates LDAP data required for correct running of OX products;
# 3. configures Directory Server (with LDAP schema and LDAP data generated in step 1 and 2).
# 4. Builds OX products (e.g. oxAuth, oxTrust)
# 5. Deploy OX products to Application Container(e.g. oxAuth, oxTrust to Tomcat)
# 6. Starts Application Container (Tomcat)
#
# ATTENTION: It's possible to switch on/off each step in setup script.
# However you need to be aware that there is dependencies between steps.
##############################

Generates LDAP schema for Directory server. Later it's used for Directory server configuration

generateSchema=true

Generates LDAP data as LDIF. Later is used to import into Directory server.

generateLdapDataLdif=true

Configures Directory server with LDAP schema and LDAP data generated in previous step.

configureDS=true

Builds OX products, e.g. oxAuth, oxTrust

buildOX=true

Deploy OX products

deployOX=true

Start application container (tomcat)

startContainer=true

##############################

Environment and Directory Server configuration

##############################

Platform, possible values: windows, unix

platform=windows

Directory server name, possible values: opendj, opends, openldap, apacheds

ATTENTION : currently ONLY opendj and opends is supported

dsType=opendj

Directory server home directory

dsHome=/opt/opendj ldapHost=localhost ldapPort=1389 ldapDN=cn=directory manager ldapPW=pw

##############################

Schema generation

############################## schemaFN=101-ox.ldif userSchemaFN=100-user.ldif userSchemaTemplateFN=100-user-template.ldif

##############################

LDAP Data generation

############################## dataTemplateFile=template.ldif dataGeneratedFile=generated-data.ldif orgInum=@!1111 orgPass=changeit orgInumNoDelimiters=1111 suffix=o=gluu orgName=YOUR ORGANIZATION NAME HERE orgShortName=yourname l=NOWHERE givenName=First sn=Last uid=you mail=you@yoursmtp.any password=changeit personInum=@!1111!0000 applianceInum=@!1111!0002 groupInum=@!1111!0003 attributeInum=@!1111!0005 applianceQuad=0085 groupQuad=20A0 personQuad=C975

manager group inum -> used to assign user to manager group, without it oxTrust will not represents complete UI for configuration

managerGroupInum=@!1111!0003!B2C6

ATTENTION : Client is restricted to localhost ONLY

oxTrustClientId=@!1111!0008!1234!1234

ATTENTION : Client is restricted to localhost ONLY

Encoded 12345678-1234-1234-1234-123456789012

oxTrustClientSecret=HdUJNbcCCEuZVGC3SjE6imo5fzDeQTV5HdUJNbcCCEs8n8r/51LyJA==

##############################

Build process

To successfully build OX make sure your Maven is properly configured.

If you don't have Maven installed, please install it and configure

##############################

Path to oxAuth directory with sources.

If you don't have sources please download them from here: https://svn.gluu.info/repository/openxdi/oxAuth/

oxAuthHome=/git/checkout/oxAuth

Path to oxTrust directory with sources.

If you don't have sources please download them from here: https://svn.gluu.info/repository/openxdi/oxTrust/

oxTrustHome=/git/checkout/oxTrust

##############################

Deploy process

To successfully deploy OX products make sure your Tomcat is properly configured.

If you don't have Tomcat installed, please install it and configure

##############################

Tomcat home directory

tomcatHome=/opt/tomcat

Java runtime options used when the "start", "stop", or "run" command is executed of Tomcat catalina.

tomcatJavaOpts=-Xms228M -Xmx1512M -XX:MaxPermSize=292M

About

Setup script for initial environment generation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%