Simple LDAP server with Vagrant and Puppet as proof-of-concept of these technologies.
- Install VirtualBox and Vagrant.
- Clone this repository recursively with
git clone --recursive <URL>
. - If you use Windows, fix your line endings now (see below).
- Start the virtual machine with
vagrant up
from within the repository folder. - READ SECTION BELOW
- Visit phpLDAPadmin at http://localhost:8888/phpldapadmin in a browser.
- If you want to use ApacheDirectoryStudio, use server at localhost:4444.
- Maybe you will have to create the folders oms-events, oms-cron and oms-token-master in /ignore
If you use Windows as host (i.e., as development platform), you have to be cautious about a few things:
- Be careful about too long filenames. Either clone at a high point of your folder structure (for example at
C:\aegee
), or usegit config --system core.longpaths true
(with Git 1.9.0 and above). See here for details. - You MUST use LF line endings in git. This is true for all submodules as well! See this article for details. These commands should do the trick:
git config core.autocrlf false
git config core.eol lf
git submodule foreach --recursive "git config core.autocrlf false"
git submodule foreach --recursive "git config core.eol lf"
rm -rf * # Careful: you know what this does!
git checkout -- .
git submodule update --recursive
- You also have to fix symlinks after cloning! See this article for more info.
I tried to make the Vagrantfile as readable as possible but it's worth repeating it here in case you are not familiar with Vagrant.
Host (your computer) | Service | Used by | Guest (the VM) |
---|---|---|---|
8888 | HTTP | apache2 | 80 |
4444 | LDAP | slapd | 389 |
2222 | SSH | sshd | 22 |
--- | --- | --- | --- |
8800 | API | oms-core | 8080 |
8801 | consumer | oms-profiles-module | 8081 |
--- | API | oms-events | 8082 |
8803 | consumer | oms-events | 8083 |
|Your local folder|synced seamless in your VM at| |---|---|---|---| |ignore/oms-core|/srv/oms-core| |ignore/oms-profiles-module|/srv/oms-profiles-module| |ignore/oms-events|/srv/oms-events|
- Ports: Vagrantfile
- Synced folders: Vagrantfile
- Installation and provisioning of the VM: puppet/manifests/site.pp --> in this file, there are two "classes" used that are defined as per below:
- Stuff about installation of LDAP: puppet/modules/aegee_ldap/manifests/init.pp
- Stuff about installation of OMS: puppet/modules/aegee_oms_modules/manifests/init.pp
As defined in the manifest, the versions are:
- node 4.1.2
- npm 2.14.4
(that version of npm is not defined, it is the one shipped with node 4.1.2)
As defined in scripts/upgrade_puppet.sh, the release is puppetlabs-release-trusty.deb which is fixed at
- 3.8.6
The alias for phpldapadmin is not working because of conflicting
virtualhosts. Use apachedirectorystudio if ever needing ldap (doubt so).
If you want, you can change configuration in puppet/modules/{aegee_ldap or aegee_postgre}