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. - Visit phpLDAPadmin at http://localhost:8888/phpldapadmin in a browser.
- If you want to use ApacheDirectoryStudio, use server at localhost:4444.
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 |
|Your local folder|synced seamless in your VM at| |---|---|---|---| |ignore/oms-core|/srv/oms-core| |ignore/oms-profiles-module|/srv/oms-profiles-module|
- 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 scripts/upgrade_node-npm.sh, the versions are:
- node 4.1.2
- npm 2.14.4