forked from RiotGamesCookbooks/dirsrv-cookbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nothing working yet, stopping for dinner with wife
- Loading branch information
Alan Willis
committed
May 5, 2013
1 parent
881b34e
commit be42ff5
Showing
8 changed files
with
193 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,5 @@ | ||
*.gem | ||
*.rbc | ||
.bundle | ||
.config | ||
coverage | ||
InstalledFiles | ||
lib/bundler/man | ||
pkg | ||
rdoc | ||
spec/reports | ||
test/tmp | ||
test/version_tmp | ||
tmp | ||
|
||
# YARD artifacts | ||
.yardoc | ||
_yardoc | ||
doc/ | ||
.vagrant | ||
*.swp | ||
VERSION | ||
Berksfile.lock | ||
Gemfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
site :opscode | ||
chef_api :config | ||
|
||
metadata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# CHANGELOG for 389ds | ||
|
||
This file is used to list changes made in each version of 389ds. | ||
|
||
## 0.1.0: | ||
|
||
* Initial release of 389ds | ||
|
||
- - - | ||
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown. | ||
|
||
The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant.configure("2") do |config| | ||
config.vm.hostname = "389ds" | ||
|
||
config.vm.box = "CentOS-6.4-x86_64-v20130309.box" | ||
config.vm.box_url = "http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130309.box" | ||
config.vm.network :private_network, ip: "29.29.29.10" | ||
config.berkshelf.enabled = true | ||
|
||
config.vm.provider :virtualbox do |vb| | ||
vb.customize [ | ||
"modifyvm", :id, | ||
"--memory", "2048", | ||
"--cpus", "2", | ||
"--chipset", "ich9", | ||
"--vram", "10" | ||
] | ||
end | ||
|
||
config.ssh.max_tries = 40 | ||
config.ssh.timeout = 120 | ||
|
||
config.vm.provision :chef_solo do |chef| | ||
chef.json = { | ||
} | ||
|
||
chef.run_list = [ | ||
"recipe[389ds::server]" | ||
] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# | ||
# Cookbook Name:: 389ds | ||
# Attributes:: default | ||
# | ||
# Copyright 2013, Alan Willis | ||
# | ||
# All rights reserved - Do Not Redistribute | ||
# | ||
|
||
include_attribute 'sysctl' | ||
default['sysctl']['params']['net']['ipv4']['tcp_keepalive_time'] = 30 | ||
|
||
default['389ds']['packages'] = %w{389-ds} | ||
default['389ds']['conf_dir'] '/etc/dirsrv' | ||
default['389ds']['base_dir'] '/var/lib/dirsrv' | ||
default['389ds']['instances'] = Array.new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
define :directory_instance, | ||
{ | ||
:is_admin => nil, | ||
:admin_domain => nil, | ||
:admin_user => nil, | ||
:admin_pass => nil, | ||
:admin_port => 9830, | ||
:rootdn => nil, | ||
:rootdn_pass => nil, | ||
:instance => nil, | ||
:port => 389, | ||
:ssl_port => 636, | ||
:bind_address => nil, | ||
:org_entries => false, | ||
:sample_entries => false, | ||
} do | ||
|
||
instance = params[:instance] ? params[:instance] : params[:name] | ||
tmpl = File.join node['389ds']['conf_dir'], instance + '.inf' | ||
setup = params[:is_admin] ? 'setup-ds-admin.pl' : 'setup-ds.pl' | ||
|
||
template tmpl do | ||
source "setup.inf.erb" | ||
mode "0600" | ||
owner "root" | ||
group "root" | ||
variables({ | ||
:general => params, | ||
:admin => params, | ||
:slapd => params, | ||
:conf_dir => node['389ds']['conf_dir'], | ||
:base_dir => node['389ds']['base_dir'] | ||
}) | ||
end | ||
|
||
instdir = File.join node['389ds']['conf_dir'], "slapd-#{instance}" | ||
|
||
execute setup do | ||
command "#{setup} --file #{tmpl}" | ||
creates File.join instdir, 'dse.ldif' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# | ||
# Cookbook Name:: 389ds | ||
# Recipe:: default | ||
# | ||
# Copyright 2013, Alan Willis <[email protected]> | ||
# | ||
# All rights reserved - Do Not Redistribute | ||
# | ||
|
||
include_recipe "yum::epel" | ||
|
||
node['389ds']['packages'].each do |pkg| | ||
package pkg | ||
end | ||
|
||
user 'dirsrv' do | ||
system true | ||
home node['389ds']['base_dir'] | ||
shell "/sbin/nologin" | ||
end | ||
|
||
node['389ds']['instances'].each do |inst| | ||
directory_instance inst['name'] do | ||
notifies :start, "service[dirsrv]" | ||
end | ||
end | ||
|
||
service "dirsrv" do | ||
supports :status => true, :restart => true | ||
action :enable | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
[General] | ||
FullMachineName = <%= node['fqdn'] %> | ||
SuiteSpotGroup = dirsrv | ||
SuiteSpotUserID = dirsrv | ||
<% if node['389ds']['has_admin'] or node['389ds']['is_admin'] -%> | ||
AdminDomain = amekoshi | ||
ConfigDirectoryAdminID = admin | ||
ConfigDirectoryAdminPwd = directorymgr | ||
ConfigDirectoryLdapURL = ldap://389ds:389/o=NetscapeRoot | ||
<% end -%> | ||
<% if node['389ds']['is_admin'] -%> | ||
[admin] | ||
Port = 9830 | ||
ServerAdminID = admin | ||
ServerAdminPwd = directorymgr | ||
ServerIpAddress = 0.0.0.0 | ||
SysUser = dirsrv | ||
<% end -%> | ||
|
||
[slapd] | ||
AddOrgEntries = No | ||
AddSampleEntries = No | ||
HashedRootDNPwd = {SSHA}IvEaF+ch/9RiO1R7lOQR9HtANv9/lNDPhUtK+A== | ||
InstallLdifFile = none | ||
RootDN = cn=Directory Manager | ||
RootDNPwd = rootpass | ||
ServerIdentifier = 389ds | ||
ServerPort = 389 | ||
Suffix = o=amekoshi | ||
bak_dir = /var/lib/dirsrv/slapd-389ds/bak | ||
bindir = /usr/bin | ||
cert_dir = /etc/dirsrv/slapd-389ds | ||
config_dir = /etc/dirsrv/slapd-389ds | ||
datadir = /usr/share | ||
db_dir = /var/lib/dirsrv/slapd-389ds/db | ||
ds_bename = userRoot | ||
inst_dir = /usr/lib64/dirsrv/slapd-389ds | ||
ldif_dir = /var/lib/dirsrv/slapd-389ds/ldif | ||
localstatedir = /var | ||
lock_dir = /var/lock/dirsrv/slapd-389ds | ||
log_dir = /var/log/dirsrv/slapd-389ds | ||
run_dir = /var/run/dirsrv | ||
sbindir = /usr/sbin | ||
schema_dir = /etc/dirsrv/slapd-389ds/schema | ||
sysconfdir = /etc | ||
tmp_dir = /tmp | ||
|
||
[slapd] | ||
SlapdConfigForMC = yes | ||
UseExistingMC = 0 |