Set up LDAP/dirsrv replication #453
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "ldap-4",
|
||||
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmzFyZh5/J2BsKRunghis\nwUGbv4j/ynAF7QY+CYoOwDBcbLHk6odn1JyUqCgfhCIX0mh8F/fDKyU9Aw6+HHZ/\nX0DTt/enLTaWc2vxRfyJLRXP7/ymHOr4u6HYEINMdVJp4yQ9XLcWpuRHfA+fHrZ7\n9fI8sCMSEawvVpEKytYdVnm3VCjfIVrfCAkY0lP0mNG908edX2ZuJ4GS1UwADUZX\nLZuMhbGX9JqIQYWCyiMDakD7P7PlEDf/JVkvkao4HQatkqJGmGDhvfIPodIo8JC0\n6FsYxWtvrLJBArYjnVBKRuxIlBqq/7Yx0gj09kGf84aSXvkMDgio7AO4xSp9GJTJ\n4wIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||
}
|
|
@ -78,8 +78,9 @@
|
|||
}
|
||||
},
|
||||
"run_list": [
|
||||
"recipe[kosmos-base]",
|
||||
"role[base]",
|
||||
"role[kvm_guest]",
|
||||
"role[ldap_client]",
|
||||
"role[akkounts]"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,8 +59,9 @@
|
|||
}
|
||||
},
|
||||
"run_list": [
|
||||
"recipe[kosmos-base]",
|
||||
"role[base]",
|
||||
"role[kvm_guest]",
|
||||
"role[ldap_client]",
|
||||
"role[ejabberd]"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,8 +57,9 @@
|
|||
}
|
||||
},
|
||||
"run_list": [
|
||||
"recipe[kosmos-base]",
|
||||
"role[base]",
|
||||
"role[kvm_guest]",
|
||||
"role[ldap_client]",
|
||||
"role[ejabberd]"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
"run_list": [
|
||||
"role[base]",
|
||||
"role[kvm_guest]",
|
||||
"role[ldap_client]",
|
||||
"role[garage_gateway]",
|
||||
"role[gitea]"
|
||||
]
|
||||
|
|
|
@ -59,6 +59,6 @@
|
|||
"run_list": [
|
||||
"recipe[kosmos-base]",
|
||||
"role[kvm_guest]",
|
||||
"role[dirsrv_primary]"
|
||||
"role[dirsrv_supplier]"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"name": "ldap-4.kosmos.org",
|
||||
"normal": {
|
||||
"knife_zero": {
|
||||
"host": "10.1.1.106"
|
||||
}
|
||||
},
|
||||
"automatic": {
|
||||
"fqdn": "ldap-4.kosmos.org",
|
||||
"os": "linux",
|
||||
"os_version": "5.4.0-1079-kvm",
|
||||
"hostname": "ldap-4",
|
||||
"ipaddress": "192.168.122.73",
|
||||
"roles": [
|
||||
"base",
|
||||
"kvm_guest"
|
||||
],
|
||||
"recipes": [
|
||||
"kosmos-base",
|
||||
"kosmos-base::default",
|
||||
"kosmos_kvm::guest",
|
||||
"apt::default",
|
||||
"timezone_iii::default",
|
||||
"timezone_iii::debian",
|
||||
"ntp::default",
|
||||
"ntp::apparmor",
|
||||
"kosmos-base::systemd_emails",
|
||||
"apt::unattended-upgrades",
|
||||
"kosmos-base::firewall",
|
||||
"kosmos-postfix::default",
|
||||
"postfix::default",
|
||||
"postfix::_common",
|
||||
"postfix::_attributes",
|
||||
"postfix::sasl_auth",
|
||||
"hostname::default"
|
||||
],
|
||||
"platform": "ubuntu",
|
||||
"platform_version": "20.04",
|
||||
"cloud": null,
|
||||
"chef_packages": {
|
||||
"chef": {
|
||||
"version": "17.10.3",
|
||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.10.3/lib",
|
||||
"chef_effortless": null
|
||||
},
|
||||
"ohai": {
|
||||
"version": "17.9.0",
|
||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.0.0/gems/ohai-17.9.0/lib/ohai"
|
||||
}
|
||||
}
|
||||
},
|
||||
"run_list": [
|
||||
"role[base]",
|
||||
"role[kvm_guest]",
|
||||
"role[dirsrv_supplier]"
|
||||
]
|
||||
}
|
|
@ -74,8 +74,9 @@
|
|||
}
|
||||
},
|
||||
"run_list": [
|
||||
"recipe[kosmos-base]",
|
||||
"role[base]",
|
||||
"role[kvm_guest]",
|
||||
"role[ldap_client]",
|
||||
"recipe[kosmos-mediawiki]"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
name "dirsrv_primary"
|
||||
name "dirsrv_supplier"
|
||||
|
||||
run_list %w(
|
||||
recipe[kosmos-dirsrv]
|
|
@ -7,6 +7,6 @@ default_run_list = %w(
|
|||
|
||||
env_run_lists(
|
||||
'_default' => default_run_list,
|
||||
'development' => [],
|
||||
'development' => default_run_list,
|
||||
'production' => default_run_list
|
||||
)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
name "ldap_client"
|
||||
|
||||
run_list %w(
|
||||
kosmos-dirsrv::hostsfile
|
||||
)
|
|
@ -22,7 +22,6 @@ package "libpq-dev"
|
|||
|
||||
include_recipe 'kosmos-nodejs'
|
||||
include_recipe "kosmos-redis"
|
||||
include_recipe "kosmos-dirsrv::hostsfile"
|
||||
|
||||
npm_package "yarn" do
|
||||
version "1.22.4"
|
||||
|
|
|
@ -3,12 +3,15 @@
|
|||
# Recipe:: default
|
||||
#
|
||||
|
||||
include_recipe "kosmos-dirsrv::hostsfile"
|
||||
|
||||
credentials = data_bag_item("credentials", "dirsrv")
|
||||
local_hostname = "#{node["hostname"]}.kosmos.local"
|
||||
|
||||
hostsfile_entry "127.0.0.1" do
|
||||
hostname local_hostname
|
||||
end
|
||||
|
||||
dirsrv_instance "master" do
|
||||
hostname "ldap.kosmos.local"
|
||||
hostname local_hostname
|
||||
admin_password credentials['admin_password']
|
||||
suffix "dc=kosmos,dc=org"
|
||||
end
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
# Recipe:: hostsfile
|
||||
#
|
||||
|
||||
dirsrv_primary = search(:node, "role:dirsrv_primary AND chef_environment:#{node.chef_environment}").first
|
||||
dirsrv_supplier = search(:node, "role:dirsrv_supplier AND chef_environment:#{node.chef_environment}").first
|
||||
|
||||
unless dirsrv_primary.nil?
|
||||
primary_ip = dirsrv_primary['knife_zero']['host']
|
||||
unless dirsrv_supplier.nil?
|
||||
supplier_ip = dirsrv_supplier['knife_zero']['host']
|
||||
|
||||
hostsfile_entry primary_ip do
|
||||
hostsfile_entry supplier_ip do
|
||||
hostname "ldap.kosmos.local"
|
||||
unique true
|
||||
end
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
# Recipe:: default
|
||||
#
|
||||
|
||||
include_recipe "kosmos-dirsrv::hostsfile"
|
||||
|
||||
ejabberd_credentials = data_bag_item("credentials", "ejabberd")
|
||||
|
||||
ejabberd_version = node["kosmos-ejabberd"]["version"]
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
include_recipe 'apt'
|
||||
include_recipe 'ark'
|
||||
include_recipe 'composer'
|
||||
include_recipe 'kosmos-dirsrv::hostsfile'
|
||||
|
||||
server_name = 'wiki.kosmos.org'
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
# Recipe:: default
|
||||
#
|
||||
|
||||
include_recipe "kosmos-dirsrv::hostsfile"
|
||||
|
||||
working_directory = node["gitea"]["working_directory"]
|
||||
git_home_directory = "/home/git"
|
||||
repository_root_directory = "#{git_home_directory}/gitea-repositories"
|
||||
|
|
Loading…
Reference in New Issue