Skip to content
Snippets Groups Projects
storage.pp 1.26 KiB
Newer Older
  • Learn to ignore specific revisions
  • Quentin Machu's avatar
    Quentin Machu committed
    class iaas::role::storage (
    
    ## Variables to be uncommented if needed
    
    #  $cluster_vlan = undef,
    #  $cluster_ipaddress = undef,
    #  $cluster_netmask = undef,
    #  $osd_disk = undef,
    #  $osd_partition = undef,
    #  $osd_uuid = undef,
    
    Quentin Machu's avatar
    Quentin Machu committed
    ) {
      # Base
      class { 'iaas::profile::base': } ->
    
    
    #  # Ceph cluster network - enable for VLAN
    
    #  network_config { "eth0.${cluster_vlan}":
    #    ensure  => 'present',
    #    family  => 'inet',
    #    method  => 'static',
    #    ipaddress => $cluster_ipaddress,
    #    netmask   => $cluster_netmask,
    #    onboot  => 'true',
    #  } ->
    #  exec { "ifup_eth0.${cluster_vlan}":
    #    command => "ifup eth0.${cluster_vlan}",
    #  } ->
    
    Quentin Machu's avatar
    Quentin Machu committed
    
      # Ceph
      class { 'ceph::profile::base': } ->
      class { 'ceph::profile::mon': } ->
      class { 'ceph::keys': } ->
    
    ## Trick to use a partition for an OSD
    #  exec { "ceph-osd-sgdisk-${osd_partition}":
    
    #    command => "sgdisk --change-name='${osd_partition}:ceph data' --partition-guid=${osd_partition}:${osd_uuid} --typecode=${osd_partition}:4fbd7e29-9d25-41b8-afd0-062c0ceff05d -- ${osd_disk} && partprobe",
    #    unless => "/bin/true  # comment to satisfy puppet syntax requirements
    #    set -ex
    #    ceph-disk list 2> /dev/null | grep ' *${osd_disk}${osd_partition}.*ceph data'
    #    ",
    #    logoutput => true,
    #  } ->
    #
    
      class { 'ceph::osds': }
    
    Quentin Machu's avatar
    Quentin Machu committed
    }