Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import "params.pp"
- import "classes/authorized_keys.pp"
- import "classes/apt_ubuntu_config.pp"
- import "roles/*.pp"
- node common {
- # Params
- class{ "os_params": }
- # APT repositories
- class{ "os_apt_config": }
- # MySQL Galera
- node 'your_server' inherits common {
- class { 'os_role_galera':
- local_ip => $ipaddress_eth1,
- }
- }
- # HAproxy
- node 'your_server', 'your_server', 'your_server' inherits common {
- class {"os_role_loadbalancer":
- keepalived_interface => "eth1",
- keystone => true,
- keystone_admin => true,
- galera => true,
- compute_api => true,
- quantum_server => true,
- horizon => true,
- keepalived_ipvs => [ $os_params::vip_openstack, $os_params::vip_galera, $os_params::vip_midonet ]
- }
- $haproxy_auth = split($os_params::haproxy_auth,":")
- }
- # OpenStack Controllers
- node 'your_server', 'your_server' inherits common{
- # Quantum
- class{'os_role_quantum':
- local_ip => $ipaddress_eth1,
- quantum_interface => 'eth1',
- }
- # Nova + Cinder
- class{'os_compute_api':
- local_ip => $ipaddress_eth1,
- }
- # MySQL Galera
- class { 'os_role_galera':
- local_ip => $ipaddress_eth1,
- }
- # Keystone
- class {"os_role_keystone":
- local_ip => $ipaddress_eth1,
- }
- # RabbitMQ
- class{'os_role_rabbitmq': }
- }
- # OpenStack Compute nodes
- node 'your_server', 'your_server', 'your_server' inherits common{
- class {"os_compute_hypervisor":
- local_ip => $ipaddress_eth1
- }
- }
- node 'your_server', 'your_server', 'your_server', 'your_server' inherits common{
- class {"os_compute_hypervisor":
- local_ip => $ipaddress_eth0
- }
- }
- # Ceph Storage nodes
- node 'your_server' inherits common{
- if !empty($::ceph_admin_key) {
- @@ceph::key { 'admin':
- secret => $::ceph_admin_key,
- keyring_path => '/etc/ceph/keyring',
- }
- }
- class { 'role_ceph_mon': id => 0 }
- class { 'ceph::osd' :
- public_address => 'eth1',
- cluster_address => 'eth1',
- }
- ceph::osd::device { '/dev/sda': }
- ceph::osd::device { '/dev/sdb': }
- ceph::osd::device { '/dev/sde': }
- ceph::osd::device { '/dev/sdf': }
- # FIXME(fc): extract these values from $os_params::ceph_*_device
- ceph_osd_journal { ['sda', 'sdb', 'sde', 'sdf']: }
- Exec {
- path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin'
- }
- }
- node 'your_server' inherits common{
- class { 'role_ceph_mon': id => 1 }
- class { 'ceph::osd' :
- public_address => 'eth1',
- cluster_address => 'eth1',
- }
- ceph::osd::device { '/dev/sda': }
- ceph::osd::device { '/dev/sdb': }
- ceph::osd::device { '/dev/sde': }
- ceph::osd::device { '/dev/sdf': }
- Exec {
- path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin'
- }
- }
- node 'your_server' inherits common{
- class { 'role_ceph_mon': id => 2 }
- class { 'ceph::osd' :
- public_address => 'eth1',
- cluster_address => 'eth1',
- }
- ceph::osd::device { '/dev/sda': }
- ceph::osd::device { '/dev/sdb': }
- ceph::osd::device { '/dev/sde': }
- ceph::osd::device { '/dev/sdf': }
- Exec {
- path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin'
- }
- }
- node 'your_server' inherits common{
- class { 'role_ceph_mon': id => 3 }
- class { 'ceph::osd' :
- public_address => 'eth1',
- cluster_address => 'eth1',
- }
- ceph::osd::device { '/dev/sdb': }
- ceph::osd::device { '/dev/sdc': }
- ceph::osd::device { '/dev/sdd': }
- ceph::osd::device { '/dev/sde': }
- ceph::osd::device { '/dev/sdf': }
- ceph::osd::device { '/dev/sdg': }
- ceph::osd::device { '/dev/sdh': }
- ceph::osd::device { '/dev/sdi': }
- ceph::osd::device { '/dev/sdj': }
- ceph::osd::device { '/dev/sdk': }
- ceph::osd::device { '/dev/sdl': }
- ceph::osd::device { '/dev/sdm': }
- ceph::osd::device { '/dev/sdn': }
- ceph::osd::device { '/dev/sdo': }
- ceph::osd::device { '/dev/sdp': }
- Exec {
- path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin'
- }
- }
- node 'your_server' inherits common{
- class { 'role_ceph_mon': id => 4 }
- class { 'ceph::osd' :
- public_address => 'eth1',
- cluster_address => 'eth1',
- }
- ceph::osd::device { '/dev/sdb': }
- ceph::osd::device { '/dev/sdc': }
- ceph::osd::device { '/dev/sdd': }
- ceph::osd::device { '/dev/sde': }
- ceph::osd::device { '/dev/sdf': }
- ceph::osd::device { '/dev/sdg': }
- ceph::osd::device { '/dev/sdh': }
- ceph::osd::device { '/dev/sdi': }
- ceph::osd::device { '/dev/sdj': }
- ceph::osd::device { '/dev/sdk': }
- ceph::osd::device { '/dev/sdl': }
- ceph::osd::device { '/dev/sdm': }
- ceph::osd::device { '/dev/sdn': }
- ceph::osd::device { '/dev/sdo': }
- ceph::osd::device { '/dev/sdp': }
- Exec {
- path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin'
- }
- }
- node 'your_server' inherits common{
- class { 'role_ceph_mon': id => 5 }
- class { 'ceph::osd' :
- public_address => 'eth1',
- cluster_address => 'eth1',
- }
- ceph::osd::device { '/dev/sdb': }
- ceph::osd::device { '/dev/sdc': }
- ceph::osd::device { '/dev/sdd': }
- ceph::osd::device { '/dev/sde': }
- ceph::osd::device { '/dev/sdf': }
- ceph::osd::device { '/dev/sdg': }
- ceph::osd::device { '/dev/sdh': }
- ceph::osd::device { '/dev/sdi': }
- ceph::osd::device { '/dev/sdj': }
- ceph::osd::device { '/dev/sdk': }
- ceph::osd::device { '/dev/sdl': }
- ceph::osd::device { '/dev/sdm': }
- ceph::osd::device { '/dev/sdn': }
- ceph::osd::device { '/dev/sdo': }
- ceph::osd::device { '/dev/sdp': }
- Exec {
- path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin'
- }
- }
- node 'your_server' inherits common{
- class { 'role_ceph_mon': id => 6 }
- class { 'ceph::osd' :
- public_address => 'eth1',
- cluster_address => 'eth1',
- }
- ceph::osd::device { '/dev/sdb': }
- ceph::osd::device { '/dev/sdc': }
- ceph::osd::device { '/dev/sdd': }
- ceph::osd::device { '/dev/sde': }
- ceph::osd::device { '/dev/sdf': }
- ceph::osd::device { '/dev/sdg': }
- ceph::osd::device { '/dev/sdh': }
- ceph::osd::device { '/dev/sdi': }
- ceph::osd::device { '/dev/sdj': }
- ceph::osd::device { '/dev/sdk': }
- ceph::osd::device { '/dev/sdl': }
- ceph::osd::device { '/dev/sdm': }
- ceph::osd::device { '/dev/sdn': }
- ceph::osd::device { '/dev/sdo': }
- ceph::osd::device { '/dev/sdp': }
- Exec {
- path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin'
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement