Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
$fsid = '076a5970-b23b-4cad-91bb-fadccfb26a31'
$mon_secret = 'AQD7kyJQQGoOBhAAqrPAqSopSwPrrfMMomzVdw=='
Exec {
path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin'
}
#
class role_ceph (
$fsid,
$auth_type = 'cephx'
) {
class { 'ceph::conf':
fsid => $fsid,
auth_type => $auth_type,
cluster_network => "${::network_eth0}/24",
public_network => "${::network_eth0}/24"
}
include ceph::apt::ceph
}
#
class role_ceph_mon (
$id
) {
class { 'role_ceph':
fsid => $::fsid,
auth_type => 'cephx',
}
ceph::mon { $id:
monitor_secret => $::mon_secret,
mon_port => 6789,
mon_addr => $ipaddress_eth0,
}
}
node 'ceph1.test' {
if !empty($::ceph_admin_key) {
@@ceph::key { 'admin':
secret => $::ceph_admin_key,
keyring_path => '/etc/ceph/keyring',
}
}
class { 'role_ceph_mon': id => 0 }
# osd defination
class { 'ceph::osd' :
public_address => $ipaddress_eth0,
cluster_address => $ipaddress_eth0,
}
ceph::osd::device { '/dev/vdb': }
}
node 'ceph2.test' {
class { 'role_ceph_mon': id => 1 }
# osd defination
class { 'ceph::osd' :
public_address => $ipaddress_eth0,
cluster_address => $ipaddress_eth0,
}
ceph::osd::device { '/dev/vdb': }
}
node 'ceph3.test' {
class { 'role_ceph_mon': id => 2 }
# osd defination
class { 'ceph::osd' :
public_address => $ipaddress_eth0,
cluster_address => $ipaddress_eth0,
}
ceph::osd::device { '/dev/vdb': }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment