Puppet Class: scaleio

Inherited by:
scaleio::mdm::resources
scaleio::mdm::installation
Defined in:
manifests/init.pp

Overview

manage an scaleio installation

Parameters:

  • version: which version to be installed. default: installed (latest in repo)

  • password: for the mdm

  • old_password: if you want to change the password, you have to provide the

    old one for change.
    
  • monitoring_user username for the monitor user

  • monitoring_passwd: password for mionitoring user

  • external_monitoring_user: external monitoring software user (eq splunk user)i that allow running scli cmd for monitoring

  • syslog_ip_port: if set we will configure a syslog server

  • users: scaleio users to be created

    userName:
      role     : 'Monitor'   # one of Monitor, Configure, Administrator
      password : 'myPw'      # pw to be set when creating the account
    
  • protection_domains: array with names of protection domains to be configured

  • storage_pools: storage pool to be created/managed, hash looking as follows:

    myPoolName:
      protection_domain : myProtectionDomainName
      spare_policy      : 35%
      ramcache          : 'enabled' # or disabled
    
  • sds: hash containing SDS definitions, format:

    'sds_name':
      protection_domain : 'pdomain1',
      ips               : ['10.0.0.2', '10.0.0.3'],
      port              : '7072', # optional
      pool_devices      : {
        'myPool'  : ['/tmp/aa', '/tmp/ab'],
        'myPool2' : ['/tmp/ac', '/tmp/ad'],
      }
    
  • sdc_names: hash containing SDC names, format:

    'sdc_ip:
      desc => 'mySDCname'
    
  • volumes: hash containing volumes, format:

    'volName':
      storage_pool:       'poolName'
      protection_domain:  'protDomainName'
      size:               504 # volume size in GB
      type:               'thin' # either thin or thick
      sdc_nodes:          ['node1', 'node2'] # array containing SDC names the volume shall be mapped to
    
  • purge: shall the not defined resources (f.e. protection domain, storage pool etc.) be purged

  • components: will configure the different components any out of:

    - sds
    - sdc
    - tb
    - lia
    
  • lvm: add scini types to lvm.conf to be able to create lvm pv on SIO volumes

  • use_consul: shall consul be used:

    - to wait for secondary mdm being ready for setup
    - to wait for tiebreak being ready for setup
    - to wait for SDSs being ready for adding to cluster
    
  • restricted_sdc_mode: use restricted SDC mode (true/false)

Parameters:

  • version (Any) (defaults to: 'installed')
  • system_name (Any) (defaults to: 'my-sio-system')
  • password (Any) (defaults to: 'myS3cr3t')
  • old_password (Any) (defaults to: 'admin')
  • mdms (Any) (defaults to: { })
  • tiebreakers (Any) (defaults to: { })
  • bootstrap_mdm_name (Any) (defaults to: '')
  • use_consul (Any) (defaults to: false)
  • users (Any) (defaults to: { })
  • protection_domains (Any) (defaults to: [ ])
  • storage_pools (Any) (defaults to: { })
  • sds (Any) (defaults to: { })
  • sds_defaults (Any) (defaults to: { })
  • sdcs (Any) (defaults to: { })
  • volumes (Any) (defaults to: { })
  • components (Any) (defaults to: [])
  • purge (Any) (defaults to: false)
  • restricted_sdc_mode (Any) (defaults to: true)
  • lvm (Any) (defaults to: false)
  • syslog_ip_port (Any) (defaults to: undef)
  • monitoring_user (Any) (defaults to: 'monitoring')
  • monitoring_passwd (Any) (defaults to: 'Monitor1')
  • external_monitoring_user (Any) (defaults to: false)


56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'manifests/init.pp', line 56

class scaleio(
  $version                  = 'installed',
  $system_name              = 'my-sio-system',
  $password                 = 'myS3cr3t',
  $old_password             = 'admin',

  $mdms                     = { },
  $tiebreakers              = { },
  $bootstrap_mdm_name       = '',

  $use_consul               = false,

  $users                    = { },
  $protection_domains       = [ ],
  $storage_pools            = { },
  $sds                      = { },
  $sds_defaults             = { },
  $sdcs                     = { },
  $volumes                  = { },
  $components               = [],
  $purge                    = false,

  $restricted_sdc_mode      = true,

  $lvm                      = false,
  $syslog_ip_port           = undef,
  $monitoring_user          = 'monitoring',
  $monitoring_passwd        = 'Monitor1',
  $external_monitoring_user = false,
) {

  ensure_packages(['numactl'])

  include ::scaleio::rpmkey

  if $scaleio::use_consul {
    include ::consul
  }

  # extract all local ip addresses of all interfaces
  if $::interfaces {
    $interface_names = split($::interfaces, ',')
    $interfaces_addresses = split(inline_template('<%=
      @interface_names.reject{ |ifc| ifc == "lo" }.map{
        |ifc| scope.lookupvar("ipaddress_#{ifc}")
      }.join(" ")%>'), ' ')


    if ! empty($mdms) {
      $cluster_setup_ips = any2array($mdms[$bootstrap_mdm_name]['ips'])
      $cluster_setup_ip = $cluster_setup_ips[0]

      # check whether one of the local IPs matches with one of the defined MDM IPs
      # => if so, install MDM on this host
      $mdms_first_ips = scaleio_get_first_mdm_ips($mdms, 'ips')
      $current_mdm_ips = any2array(intersection($mdms_first_ips, $interfaces_addresses))
      $current_mdm_ip = $current_mdm_ips[0]
    }

    if ! empty($tiebreakers) {
      # check whether one of the local IPs matches with one of the defined tb IPs
      # => if so, install tb on this host
      $tbs_first_ips = scaleio_get_first_mdm_ips($tiebreakers, 'ips')
      $current_tb_ips = any2array(intersection($tbs_first_ips, $interfaces_addresses))
      $current_tb_ip = $current_tb_ips[0]
    }
  }

  if 'sdc' in $components {
    include scaleio::sdc
  }
  if 'sds' in $components {
    include scaleio::sds
  }
  if 'lia' in $components {
    include scaleio::lia
  }
  if 'mdm' in $components or has_ip_address($current_mdm_ip) {
    include scaleio::mdm
  }
  if 'tb' in $components or has_ip_address($current_tb_ip) {
    include scaleio::tb
  }
}