X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=puppet%2Fceph-storage-puppet.yaml;h=bc9b4b5a5b28bc50bdbfaeea364bb7033718bc3a;hb=2e2fe4b7bcafa8c1f1b9789a40719f5fd146bcf8;hp=c9aa7bcf0dd4c7cf479621079be9ae70e429e437;hpb=6b5ac01d2e61af9efddd01b58bfc0f6cd1e8518f;p=apex-tripleo-heat-templates.git diff --git a/puppet/ceph-storage-puppet.yaml b/puppet/ceph-storage-puppet.yaml index c9aa7bcf..bc9b4b5a 100644 --- a/puppet/ceph-storage-puppet.yaml +++ b/puppet/ceph-storage-puppet.yaml @@ -1,2 +1,104 @@ heat_template_version: 2014-10-16 -description: 'Common Ceph Storage Configuration by Puppet' +description: 'OpenStack ceph storage node configured by Puppet' +parameters: + Flavor: + description: Flavor for the Ceph Storage node. + type: string + constraints: + - custom_constraint: nova.flavor + Image: + type: string + default: overcloud-ceph-storage + constraints: + - custom_constraint: glance.image + ImageUpdatePolicy: + default: 'REBUILD_PRESERVE_EPHEMERAL' + description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt. + type: string + KeyName: + description: Name of an existing EC2 KeyPair to enable SSH access to the instances + type: string + default: default + constraints: + - custom_constraint: nova.keypair + NtpServer: + type: string + default: '' + EnablePackageInstall: + default: 'false' + description: Set to true to enable package installation via Puppet + type: boolean + +resources: + CephStorage: + type: OS::Nova::Server + properties: + image: {get_param: Image} + image_update_policy: {get_param: ImageUpdatePolicy} + flavor: {get_param: Flavor} + key_name: {get_param: KeyName} + networks: + - network: ctlplane + user_data_format: SOFTWARE_CONFIG + user_data: {get_resource: NodeUserData} + + NodeUserData: + type: OS::TripleO::NodeUserData + + NetworkConfig: + type: OS::TripleO::CephStorage::Net::SoftwareConfig + + NetworkDeployment: + type: OS::TripleO::SoftwareDeployment + properties: + config: {get_attr: [NetworkConfig, config_id]} + server: {get_resource: CephStorage} + + CephStorageDeployment: + type: OS::Heat::StructuredDeployment + properties: + config: {get_resource: CephStorageConfig} + server: {get_resource: CephStorage} + input_values: + ntp_servers: + str_replace: + template: '["server"]' + params: + server: {get_param: NtpServer} + enable_package_install: {get_param: EnablePackageInstall} + + CephStorageConfig: + type: OS::Heat::StructuredConfig + properties: + group: os-apply-config + config: + hiera: + hierarchy: + - heat_config_%{::deploy_config_name} + - cephstorage + - ceph_cluster # provided by CephClusterConfig + - ceph + - '"%{::osfamily}"' + - common + datafiles: + common: + raw_data: {get_file: hieradata/common.yaml} + ceph: + raw_data: {get_file: hieradata/ceph.yaml} + cephstorage: + mapped_data: + ntp::servers: {get_input: ntp_servers} + enable_package_install: {get_input: enable_package_install} + +outputs: + hosts_entry: + value: + str_replace: + template: "IP HOST" + params: + IP: {get_attr: [CephStorage, networks, ctlplane, 0]} + HOST: {get_attr: [CephStorage, name]} + nova_server_resource: + description: Heat resource handle for the ceph storage server + value: + {get_resource: CephStorage}