Skip to content

chulao/vagrant-ldap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vagrant OpenLDAP VM

Create a simple VM with OpenLDAP to helper development and tests.

It will install the phpldapadmin

Installation

Install Vagrant.

It will need some plugins too:

  • landrush

To install run the following command: sudo vagrant plugin install landrush

Clonning this repository: git clone https://github.com/chulao/vagrant-ldap.git

This project is using these modules:

Before create vm, please, check if landrush can running without error:

vagrant landrush start

ps -ef | grep `cat ~/.vagrant.d/data/landrush/run/landrush.pid`

Then, create the machine vagrant up

To test if ldap is ready execute ldapsearch -x -LLL -v -h ldap.vagrant.dev -D cn=admin,dc=vagrant,dc=dev -w admin -b dc=vagrant,dc=dev. The return should be similar as:

ldap_initialize( ldap://ldap.vagrant.dev )
filter: (objectclass=*)
requesting: All userApplication attributes
dn: dc=vagrant,dc=dev
dc: vagrant
objectClass: top
objectClass: domain
description: Tree root

dn: cn=admin,dc=vagrant,dc=dev
cn: admin
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
uid: admin
sn: admin
userPassword:: e1NIQX0wRFBpS3VOSXJyVm1EOElVQ3V3MWhReE5xWmM9

After the machine is running you can access it by:

To change the ldap information, please see puppet/data/common.yaml

To log in, using : Username: cn=admin,dc=vagrant,dc=dev Password: admin

Troubleshoot

Run in debug mode

vagrant up --debug &> vagrant.log

Discovery guest machine ip

vagrant ssh -c "ip addr show eth1 | grep 'inet' | grep 'eth1' | sed -e 's/^.*inet //' -e 's/\/.*$//'"

Hostname is listed in DNS (landrush), but will not resolve

If the landrush is show the correct ip through vagrant landrush ls, but with other commands, like ping, it is not resolving on OSX, please, restart mDNSResponder: sudo killall -HUP mDNSResponder

Failed to mount folders in Linux guest. This is usually because the "vboxsf" file system is not available.

Step by step:

If you not have vbguest plugin, install it: vagrant plugin install vagrant-vbguest

Run Vagrant: vagrant up

Login on VM: vagrant ssh

In the guest: sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions

Back on the host, reload Vagrant: vagrant reload

Referencies:

About

Vagrant with OpenLDAP and phpldapadmin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published