summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-10-14 02:18:56 +0000
committerGerrit Code Review <review@openstack.org>2016-10-14 02:18:56 +0000
commitceb30c9946761ad64890e0b13c453e7a5bc6201e (patch)
tree12f1b27b8632d7ff308bf6cc6846d99c13dc872d
parenta1b7af553de02e79f47af4110955e5fc73c385f3 (diff)
parent9f8944111c280de877326471899be23caca9bb94 (diff)
Merge "Split out hosts config deployment"
-rw-r--r--hosts-config.yaml30
-rw-r--r--overcloud-resource-registry-puppet.j2.yaml1
-rw-r--r--overcloud.j2.yaml30
-rw-r--r--puppet/all-nodes-config.yaml12
4 files changed, 54 insertions, 19 deletions
diff --git a/hosts-config.yaml b/hosts-config.yaml
new file mode 100644
index 00000000..df0addfd
--- /dev/null
+++ b/hosts-config.yaml
@@ -0,0 +1,30 @@
+heat_template_version: 2016-10-14
+description: 'All Hosts Config'
+
+parameters:
+ hosts:
+ type: comma_delimited_list
+
+resources:
+
+ hostsConfigImpl:
+ type: OS::Heat::StructuredConfig
+ properties:
+ group: os-apply-config
+ config:
+ hosts:
+ list_join:
+ - "\n"
+ - {get_param: hosts}
+
+outputs:
+ config_id:
+ description: The ID of the hostsConfigImpl resource.
+ value:
+ {get_resource: hostsConfigImpl}
+ hosts_entries:
+ description: |
+ The content that should be appended to your /etc/hosts if you want to get
+ hostname-based access to the deployed nodes (useful for testing without
+ setting up a DNS).
+ value: {get_attr: [hostsConfigImpl, config, hosts]}
diff --git a/overcloud-resource-registry-puppet.j2.yaml b/overcloud-resource-registry-puppet.j2.yaml
index c7f15105..1fb28128 100644
--- a/overcloud-resource-registry-puppet.j2.yaml
+++ b/overcloud-resource-registry-puppet.j2.yaml
@@ -3,6 +3,7 @@ resource_registry:
OS::TripleO::SoftwareDeployment: OS::Heat::StructuredDeployment
OS::TripleO::PostDeploySteps: puppet/post.yaml
OS::TripleO::AllNodes::SoftwareConfig: puppet/all-nodes-config.yaml
+ OS::TripleO::Hosts::SoftwareConfig: hosts-config.yaml
OS::TripleO::DefaultPasswords: default_passwords.yaml
# Tasks (for internal TripleO usage)
diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml
index db1a78bf..7e1f496c 100644
--- a/overcloud.j2.yaml
+++ b/overcloud.j2.yaml
@@ -214,8 +214,16 @@ resources:
EndpointMap: {get_attr: [EndpointMap, endpoint_map]}
DefaultPasswords: {get_attr: [DefaultPasswords, passwords]}
+ {{role.name}}HostsDeployment:
+ type: OS::Heat::StructuredDeployments
+ properties:
+ name: {{role.name}}HostsDeployment
+ config: {get_attr: [hostsConfig, config_id]}
+ servers: {get_attr: [{{role.name}}, attributes, nova_server_resource]}
+
{{role.name}}AllNodesDeployment:
type: OS::Heat::StructuredDeployments
+ depends_on: {{role.name}}HostsDeployment
properties:
name: {{role.name}}AllNodesDeployment
config: {get_attr: [allNodesConfig, config_id]}
@@ -303,6 +311,16 @@ resources:
MonitoringSubscriptions: {get_attr: [{{role.name}}ServiceChain, role_data, monitoring_subscriptions]}
{% endfor %}
+ hostsConfig:
+ type: OS::TripleO::Hosts::SoftwareConfig
+ properties:
+ hosts:
+{% for role in roles %}
+ - list_join:
+ - '\n'
+ - {get_attr: [{{role.name}}, hosts_entry]}
+{% endfor %}
+
allNodesConfig:
type: OS::TripleO::AllNodes::SoftwareConfig
properties:
@@ -311,12 +329,6 @@ resources:
cloud_name_storage: {get_param: CloudNameStorage}
cloud_name_storage_mgmt: {get_param: CloudNameStorageManagement}
cloud_name_ctlplane: {get_param: CloudNameCtlplane}
- hosts:
-{% for role in roles %}
- - list_join:
- - '\n'
- - {get_attr: [{{role.name}}, hosts_entry]}
-{% endfor %}
enabled_services:
list_join:
- ','
@@ -517,6 +529,10 @@ resources:
# Post deployment steps for all roles
AllNodesDeploySteps:
type: OS::TripleO::PostDeploySteps
+{% for role in roles %}
+ depends_on:
+ - {{role.name}}AllNodesDeployment
+{% endfor %}
properties:
servers:
{% for role in roles %}
@@ -599,7 +615,7 @@ outputs:
value:
list_join:
- "\n"
- - - {get_attr: [allNodesConfig, hosts_entries]}
+ - - {get_attr: [hostsConfig, hosts_entries]}
-
- str_replace:
template: IP HOST
diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml
index d64f70db..cc5e4eac 100644
--- a/puppet/all-nodes-config.yaml
+++ b/puppet/all-nodes-config.yaml
@@ -12,8 +12,6 @@ parameters:
type: string
cloud_name_ctlplane:
type: string
- hosts:
- type: comma_delimited_list
# FIXME(shardy) this can be comma_delimited_list when
# https://bugs.launchpad.net/heat/+bug/1617019 is fixed
enabled_services:
@@ -75,10 +73,6 @@ resources:
properties:
group: os-apply-config
config:
- hosts:
- list_join:
- - "\n"
- - {get_param: hosts}
hiera:
datafiles:
bootstrap_node:
@@ -217,9 +211,3 @@ outputs:
description: The ID of the allNodesConfigImpl resource.
value:
{get_resource: allNodesConfigImpl}
- hosts_entries:
- description: |
- The content that should be appended to your /etc/hosts if you want to get
- hostname-based access to the deployed nodes (useful for testing without
- setting up a DNS).
- value: {get_attr: [allNodesConfigImpl, config, hosts]}