diff options
author | Steve Baker <sbaker@redhat.com> | 2016-12-08 14:44:35 +1300 |
---|---|---|
committer | Flavio Percoco <flaper87@gmail.com> | 2016-12-19 18:13:57 +0100 |
commit | d5cd18d3c5e1a54cb15be39e421f98fd01e1a99c (patch) | |
tree | 1dca58f2f35c0ccfc7c6cf04e0d3f060b7f82d32 | |
parent | e6bc52058174d4dd5e35f075f20c58c164206d98 (diff) |
Introduce role-specific NodeUserData, use for docker
Currently when the docker environments are invoked, every node has the
boot script run which replaces os-collect-config with the heat-agents
container. This should only be happening on Compute nodes currently,
and each role will be converted to heat-agents one at a time.
This change implements a role-specific NodeUserData resource and uses
that mechanism to run docker/firstboot/install_docker_agents.yaml only
on Compute nodes.
Change-Id: Id81811dbcaf0e661c3980aa25f3ca80db5ef0954
-rw-r--r-- | environments/docker.yaml | 2 | ||||
-rw-r--r-- | overcloud-resource-registry-puppet.j2.yaml | 4 | ||||
-rw-r--r-- | puppet/blockstorage-role.yaml | 7 | ||||
-rw-r--r-- | puppet/cephstorage-role.yaml | 7 | ||||
-rw-r--r-- | puppet/compute-role.yaml | 7 | ||||
-rw-r--r-- | puppet/controller-role.yaml | 7 | ||||
-rw-r--r-- | puppet/objectstorage-role.yaml | 7 | ||||
-rw-r--r-- | puppet/role.role.j2.yaml | 7 |
8 files changed, 47 insertions, 1 deletions
diff --git a/environments/docker.yaml b/environments/docker.yaml index 0755c61f..9b0f65f9 100644 --- a/environments/docker.yaml +++ b/environments/docker.yaml @@ -1,6 +1,6 @@ resource_registry: # Docker container with heat agents for containerized compute node. - OS::TripleO::NodeUserData: ../docker/firstboot/install_docker_agents.yaml + OS::TripleO::Compute::NodeUserData: ../docker/firstboot/install_docker_agents.yaml OS::TripleO::Services::NovaLibvirt: ../docker/services/nova-libvirt.yaml OS::TripleO::Services::ComputeNeutronOvsAgent: ../docker/services/neutron-ovs-agent.yaml OS::TripleO::Services::NovaCompute: ../docker/services/nova-compute.yaml diff --git a/overcloud-resource-registry-puppet.j2.yaml b/overcloud-resource-registry-puppet.j2.yaml index ebbeef6e..a267ac66 100644 --- a/overcloud-resource-registry-puppet.j2.yaml +++ b/overcloud-resource-registry-puppet.j2.yaml @@ -49,10 +49,14 @@ resource_registry: # Hooks for operator extra config # NodeUserData == Cloud-init additional user-data, e.g cloud-config + # role::NodeUserData == Role specific cloud-init additional user-data # ControllerExtraConfigPre == Controller configuration pre service deployment # NodeExtraConfig == All nodes configuration pre service deployment # NodeExtraConfigPost == All nodes configuration post service deployment OS::TripleO::NodeUserData: firstboot/userdata_default.yaml +{% for role in roles %} + OS::TripleO::{{role.name}}::NodeUserData: firstboot/userdata_default.yaml +{% endfor %} OS::TripleO::NodeTLSCAData: OS::Heat::None OS::TripleO::NodeTLSData: OS::Heat::None OS::TripleO::NodeExtraConfig: puppet/extraconfig/pre_deploy/default.yaml diff --git a/puppet/blockstorage-role.yaml b/puppet/blockstorage-role.yaml index 00f586cd..e788e790 100644 --- a/puppet/blockstorage-role.yaml +++ b/puppet/blockstorage-role.yaml @@ -142,6 +142,8 @@ resources: type: multipart - config: {get_resource: NodeUserData} type: multipart + - config: {get_resource: RoleUserData} + type: multipart # Creates the "heat-admin" user if configured via the environment # Should return a OS::Heat::MultipartMime reference via OS::stack_id @@ -153,6 +155,11 @@ resources: NodeUserData: type: OS::TripleO::NodeUserData + # For optional operator role-specific userdata + # Should return a OS::Heat::MultipartMime reference via OS::stack_id + RoleUserData: + type: OS::TripleO::BlockStorage::NodeUserData + ExternalPort: type: OS::TripleO::BlockStorage::Ports::ExternalPort properties: diff --git a/puppet/cephstorage-role.yaml b/puppet/cephstorage-role.yaml index 82cc0134..1d6cbaeb 100644 --- a/puppet/cephstorage-role.yaml +++ b/puppet/cephstorage-role.yaml @@ -148,6 +148,8 @@ resources: type: multipart - config: {get_resource: NodeUserData} type: multipart + - config: {get_resource: RoleUserData} + type: multipart # Creates the "heat-admin" user if configured via the environment # Should return a OS::Heat::MultipartMime reference via OS::stack_id @@ -159,6 +161,11 @@ resources: NodeUserData: type: OS::TripleO::NodeUserData + # For optional operator role-specific userdata + # Should return a OS::Heat::MultipartMime reference via OS::stack_id + RoleUserData: + type: OS::TripleO::CephStorage::NodeUserData + ExternalPort: type: OS::TripleO::CephStorage::Ports::ExternalPort properties: diff --git a/puppet/compute-role.yaml b/puppet/compute-role.yaml index 30a64835..2eb287cd 100644 --- a/puppet/compute-role.yaml +++ b/puppet/compute-role.yaml @@ -162,6 +162,8 @@ resources: type: multipart - config: {get_resource: NodeUserData} type: multipart + - config: {get_resource: RoleUserData} + type: multipart # Creates the "heat-admin" user if configured via the environment # Should return a OS::Heat::MultipartMime reference via OS::stack_id @@ -173,6 +175,11 @@ resources: NodeUserData: type: OS::TripleO::NodeUserData + # For optional operator role-specific userdata + # Should return a OS::Heat::MultipartMime reference via OS::stack_id + RoleUserData: + type: OS::TripleO::Compute::NodeUserData + ExternalPort: type: OS::TripleO::Compute::Ports::ExternalPort properties: diff --git a/puppet/controller-role.yaml b/puppet/controller-role.yaml index a60cc942..c286f26c 100644 --- a/puppet/controller-role.yaml +++ b/puppet/controller-role.yaml @@ -181,6 +181,8 @@ resources: type: multipart - config: {get_resource: NodeUserData} type: multipart + - config: {get_resource: RoleUserData} + type: multipart # Creates the "heat-admin" user if configured via the environment # Should return a OS::Heat::MultipartMime reference via OS::stack_id @@ -192,6 +194,11 @@ resources: NodeUserData: type: OS::TripleO::NodeUserData + # For optional operator role-specific userdata + # Should return a OS::Heat::MultipartMime reference via OS::stack_id + RoleUserData: + type: OS::TripleO::Controller::NodeUserData + ExternalPort: type: OS::TripleO::Controller::Ports::ExternalPort properties: diff --git a/puppet/objectstorage-role.yaml b/puppet/objectstorage-role.yaml index 49b2704d..61be37f4 100644 --- a/puppet/objectstorage-role.yaml +++ b/puppet/objectstorage-role.yaml @@ -142,6 +142,8 @@ resources: type: multipart - config: {get_resource: NodeUserData} type: multipart + - config: {get_resource: RoleUserData} + type: multipart # Creates the "heat-admin" user if configured via the environment # Should return a OS::Heat::MultipartMime reference via OS::stack_id @@ -153,6 +155,11 @@ resources: NodeUserData: type: OS::TripleO::NodeUserData + # For optional operator role-specific userdata + # Should return a OS::Heat::MultipartMime reference via OS::stack_id + RoleUserData: + type: OS::TripleO::ObjectStorage::NodeUserData + ExternalPort: type: OS::TripleO::SwiftStorage::Ports::ExternalPort properties: diff --git a/puppet/role.role.j2.yaml b/puppet/role.role.j2.yaml index d0eeed19..ac31a9da 100644 --- a/puppet/role.role.j2.yaml +++ b/puppet/role.role.j2.yaml @@ -160,6 +160,8 @@ resources: type: multipart - config: {get_resource: NodeUserData} type: multipart + - config: {get_resource: RoleUserData} + type: multipart # Creates the "heat-admin" user if configured via the environment # Should return a OS::Heat::MultipartMime reference via OS::stack_id @@ -171,6 +173,11 @@ resources: NodeUserData: type: OS::TripleO::NodeUserData + # For optional operator role-specific userdata + # Should return a OS::Heat::MultipartMime reference via OS::stack_id + RoleUserData: + type: OS::TripleO::{{role}}::NodeUserData + ExternalPort: type: OS::TripleO::{{role}}::Ports::ExternalPort properties: |