forked from openshift/puppet-openshift_origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure_origin.pp.mongo_replset.example
55 lines (51 loc) · 2.54 KB
/
configure_origin.pp.mongo_replset.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
$my_hostname='<BROKER01_FQDN>'
exec { "set_hostname":
command => "/bin/hostname ${my_hostname}",
unless => "/bin/hostname | /bin/grep ${my_hostname}",
}
if $::operatingsystem == 'CentOS' {
exec { "set_etc_hostname":
command => "/bin/sed -ri \'s/HOSTNAME=.*/HOSTNAME=${my_hostname}/\' /etc/sysconfig/network",
unless => "/bin/grep ${my_hostname} /etc/sysconfig/network",
}
}
class { 'openshift_origin' :
# Mongo Replication
mongodb_replicasets => true,
mongodb_replica_primary => true, # Set to false for secondary mongo servers
mongodb_replica_primary_ip_addr => '<PRIMARY_IP>', # i.e. broker01 IP address
# <IP>:<Port> of MongoDB replication members.
mongodb_replicasets_members => ['<MEMBER1_IP>:<MONGO_PORT>', '<MEMBER2_IP>:<MONGO_PORT>', '<MEMBER3_IP>:<MONGO_PORT>'],
mongodb_key => '<MONGODB_REPL_KEY>',
datastore1_ip_addr => '<MEMBER1_IP>',
datastore2_ip_addr => '<MEMBER2_IP>',
datastore3_ip_addr => '<MEMBER3_IP>',
# Components to install on this host:
roles => ['broker','nameserver','msgserver','datastore'],
# BIND / nameserver config
# This is the key for updating the OpenShift BIND server
bind_key => '<DNSSEC_BIND_KEY>',
# The domain under which applications should be created.
domain => '<FQDN>',
# Apps would be nameserver <app>-<namespace>.example.com
# This also creates hostnames for local components under our domain
register_host_with_nameserver => true,
# Forward requests for other domains (to Google by default)
conf_nameserver_upstream_dns => ['<UPSTREAM_DNS_IP>'],
# NTP Servers for OpenShift hosts to sync time
ntp_servers => ["<UPSTREAM_NTP_FQDN> iburst"],
# The FQDNs of the OpenShift component hosts
broker_hostname => $my_hostname,
nameserver_hostname => $my_hostname,
datastore_hostname => $my_hostname,
msgserver_hostname => $my_hostname,
# Auth OpenShift users created with htpasswd tool in /etc/openshift/htpasswd
broker_auth_plugin => 'htpasswd',
# Username and password for initial openshift user
openshift_user1 => 'openshift',
openshift_password1 => 'password',
#Enable development mode for more verbose logs
development_mode => true,
# Set if using an external-facing ethernet device other than eth0
conf_node_external_eth_dev => 'eth0',
}