diff options
author | Steven Hardy <shardy@redhat.com> | 2015-06-15 05:13:07 -0400 |
---|---|---|
committer | Steve Baker <sbaker@redhat.com> | 2015-06-17 10:23:09 +1200 |
commit | 1f37302f6b8ef7e6ce8dfe37eba528535493dbf9 (patch) | |
tree | 385276e1674166716cd35a52da8a6e27a75f377a /puppet | |
parent | 48d07db384a3e8a36a2a92e95ef3ad4ed5c6071e (diff) |
Allow control of hostname formatting
Currently, we use the heat default server names, which results in some
fairly unreadable hostnames due to the level of nesting in the templates.
e.g ov-sszdbj5rdne-0-bhseh65edxv6-Controller-zoqc6tlypbdp
Instead, we allow the user to specify a format string per role, defaulted
to a string which formats the name e.g <stackname>-controller-<index>
e.g overcloud-controller-0
Optionally additional hostname components (not replaced by heat) could be
added, such that deployment time customization of hostnames via firstboot
scripts (e.g cloud-init) may be possible.
Should anyone wish to maintain the old heat-generated names, they can pass
an empty string via these parameters, which heat will treat as if no "name"
property was provided to OS::Nova::Server.
Change-Id: I1730caa0c2256f970da22ab21fa3aa1549b3f90b
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/ceph-storage-puppet.yaml | 4 | ||||
-rw-r--r-- | puppet/cinder-storage-puppet.yaml | 4 | ||||
-rw-r--r-- | puppet/compute-puppet.yaml | 4 | ||||
-rw-r--r-- | puppet/controller-puppet.yaml | 4 | ||||
-rw-r--r-- | puppet/swift-storage-puppet.yaml | 4 |
5 files changed, 20 insertions, 0 deletions
diff --git a/puppet/ceph-storage-puppet.yaml b/puppet/ceph-storage-puppet.yaml index 1ab381af..cd32766c 100644 --- a/puppet/ceph-storage-puppet.yaml +++ b/puppet/ceph-storage-puppet.yaml @@ -39,6 +39,9 @@ parameters: description: > Setting to a previously unused value during stack-update will trigger package update on all nodes + Hostname: + type: string + default: '' # Defaults to Heat created hostname resources: CephStorage: @@ -52,6 +55,7 @@ resources: - network: ctlplane user_data_format: SOFTWARE_CONFIG user_data: {get_resource: NodeUserData} + name: {get_param: Hostname} NodeUserData: type: OS::TripleO::NodeUserData diff --git a/puppet/cinder-storage-puppet.yaml b/puppet/cinder-storage-puppet.yaml index 74df116a..d4ed7b9a 100644 --- a/puppet/cinder-storage-puppet.yaml +++ b/puppet/cinder-storage-puppet.yaml @@ -117,6 +117,9 @@ parameters: description: > Setting to a previously unused value during stack-update will trigger package update on all nodes + Hostname: + type: string + default: '' # Defaults to Heat created hostname resources: BlockStorage: @@ -130,6 +133,7 @@ resources: - network: ctlplane user_data_format: SOFTWARE_CONFIG user_data: {get_resource: NodeUserData} + name: {get_param: Hostname} NodeUserData: type: OS::TripleO::NodeUserData diff --git a/puppet/compute-puppet.yaml b/puppet/compute-puppet.yaml index 9e17b890..4fa9b6b9 100644 --- a/puppet/compute-puppet.yaml +++ b/puppet/compute-puppet.yaml @@ -258,6 +258,9 @@ parameters: description: > Setting to a previously unused value during stack-update will trigger package update on all nodes + Hostname: + type: string + default: '' # Defaults to Heat created hostname resources: @@ -274,6 +277,7 @@ resources: - network: ctlplane user_data_format: SOFTWARE_CONFIG user_data: {get_resource: NodeUserData} + name: {get_param: Hostname} NodeUserData: type: OS::TripleO::NodeUserData diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml index 05bd27ab..8e0dc40e 100644 --- a/puppet/controller-puppet.yaml +++ b/puppet/controller-puppet.yaml @@ -460,6 +460,9 @@ parameters: description: > Setting to a previously unused value during stack-update will trigger package update on all nodes + Hostname: + type: string + default: '' # Defaults to Heat created hostname resources: @@ -474,6 +477,7 @@ resources: - network: ctlplane user_data_format: SOFTWARE_CONFIG user_data: {get_resource: NodeUserData} + name: {get_param: Hostname} NodeUserData: type: OS::TripleO::NodeUserData diff --git a/puppet/swift-storage-puppet.yaml b/puppet/swift-storage-puppet.yaml index e7ac6135..11ddef89 100644 --- a/puppet/swift-storage-puppet.yaml +++ b/puppet/swift-storage-puppet.yaml @@ -62,6 +62,9 @@ parameters: description: Mapping of service_name -> network name. Typically set via parameter_defaults in the resource registry. type: json + Hostname: + type: string + default: '' # Defaults to Heat created hostname resources: @@ -75,6 +78,7 @@ resources: - network: ctlplane user_data_format: SOFTWARE_CONFIG user_data: {get_resource: NodeUserData} + name: {get_param: Hostname} NodeUserData: type: OS::TripleO::NodeUserData |