memcached (openstack) is no longer in use
[mirror/dsa-puppet.git] / 3rdparty / modules / neutron / examples / neutron_with_pacemaker.pp
1 # Example: managing neutron controller services with pacemaker
2 #
3 # By setting enabled to false, these services will not be started at boot.  By setting
4 # manage_service to false, puppet will not kill these services on every run.  This
5 # allows the Pacemaker resource manager to dynamically determine on which node each
6 # service should run.
7 #
8 # The puppet commands below would ideally be applied to at least three nodes.
9 #
10 # Note that neutron-server is associated with the virtual IP address as
11 # it is called from external services.  The remaining services connect to the
12 # database and/or message broker independently.
13 #
14 # Example pacemaker resource configuration commands (configured once per cluster):
15 #
16 # sudo pcs resource create neutron_vip ocf:heartbeat:IPaddr2 params ip=192.0.2.3 \
17 #   cidr_netmask=24 op monitor interval=10s
18 #
19 # sudo pcs resource create neutron_server_service lsb:neutron-server
20 # sudo pcs resource create neutron_dhcp_agent_service lsb:neutron-dhcp-agent
21 # sudo pcs resource create neutron_l3_agent_service lsb:neutron-l3-agent
22 #
23 # sudo pcs constraint colocation add neutron_server_service with neutron_vip
24
25 class { 'neutron':
26   verbose               => true,
27   allow_overlapping_ips => true,
28   service_plugins       => [ 'dhcp', 'l3' ]
29 }
30
31 class { 'neutron::server':
32   enabled           => false,
33   manage_service    => false,
34   keystone_password => 'password',
35   connection        => 'mysql://neutron:password@192.168.1.1/neutron',
36 }
37
38 class { 'neutron::agents::dhcp':
39   enabled        => false,
40   manage_service => false,
41 }
42
43 class { 'neutron::agents::l3':
44   enabled        => false,
45   manage_service => false,
46 }
47