Skip to content

Commit

Permalink
[COOK-3543] Do not setup OpenLDAP server as a slave
Browse files Browse the repository at this point in the history
Signed-off-by: Seth Vargo <[email protected]>
  • Loading branch information
mattjalexander authored and sethvargo committed Sep 30, 2013
1 parent 727d657 commit 25d1882
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
21 changes: 21 additions & 0 deletions TESTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
This cookbook includes support for running tests via Test Kitchen (1.0). This has some requirements.

1. You must be using the Git repository, rather than the downloaded cookbook from the Chef Community Site.
2. You must have Vagrant 1.1 installed.
3. You must have a "sane" Ruby 1.9.3 environment.

Once the above requirements are met, install the additional requirements:

gem install bundle
bundle install

vagrant plugin install vagrant-berkshelf

You'll need to add some SSL certificates. For testing purposes, create dummy self-signed certs by running:
mkdir files/default/ssl
FQDN=ldap.example.com rake ssl_cert

Once the above are installed, you should be able to run Test Kitchen:

kitchen list
kitchen test
3 changes: 2 additions & 1 deletion templates/default/slapd.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ index uidNumber,gidNumber pres,eq
overlay syncprov
syncprov-checkpoint 100 10
syncprov-sessionlog 100
<% else -%>
<% end -%>
<% if node['openldap']['slapd_type'] == "slave" -%>
syncrepl rid=<%= node['openldap']['slapd_rid'] %>
provider=ldap://<%= node['openldap']['slapd_master'] %>:389
type=refreshAndPersist
Expand Down

0 comments on commit 25d1882

Please sign in to comment.