Merge "Add pre-network hook and example showing config-then-reboot"

changes/23/416723/1
Jenkins 6 years ago committed by Gerrit Code Review
commit 4a02aeb22e
  1. 48
      extraconfig/pre_network/config_then_reboot.yaml
  2. 1
      overcloud-resource-registry-puppet.j2.yaml
  3. 6
      puppet/blockstorage-role.yaml
  4. 6
      puppet/cephstorage-role.yaml
  5. 6
      puppet/compute-role.yaml
  6. 6
      puppet/controller-role.yaml
  7. 6
      puppet/objectstorage-role.yaml
  8. 6
      puppet/role.role.j2.yaml

@ -0,0 +1,48 @@
heat_template_version: 2014-10-16
description: >
Do some configuration, then reboot - sometimes needed for early-boot
changes such as modifying kernel configuration
parameters:
server:
type: string
resources:
SomeConfig:
type: OS::Heat::SoftwareConfig
properties:
group: script
config: |
#!/bin/bash
echo "did some config before reboot" > /root/pre-reboot-config
SomeDeployment:
type: OS::Heat::SoftwareDeployment
properties:
name: SomeDeployment
server: {get_param: server}
config: {get_resource: SomeConfig}
actions: ['CREATE'] # Only do this on CREATE
RebootConfig:
type: OS::Heat::SoftwareConfig
properties:
group: script
config: |
#!/bin/bash
# Stop os-collect-config to avoid any race collecting another
# deployment before reboot happens
systemctl stop os-collect-config.service
/sbin/reboot
RebootDeployment:
type: OS::Heat::SoftwareDeployment
depends_on: SomeDeployment
properties:
name: RebootDeployment
server: {get_param: server}
config: {get_resource: RebootConfig}
actions: ['CREATE'] # Only do this on CREATE
signal_transport: NO_SIGNAL

@ -11,6 +11,7 @@ resource_registry:
OS::TripleO::Tasks::PackageUpdate: extraconfig/tasks/yum_update.yaml
{% for role in roles %}
OS::TripleO::{{role.name}}::PreNetworkConfig: OS::Heat::None
OS::TripleO::{{role.name}}PostDeploySteps: puppet/post.yaml
OS::TripleO::{{role.name}}: puppet/{{role.name.lower()}}-role.yaml
OS::TripleO::{{role.name}}Config: puppet/{{role.name.lower()}}-config.yaml

@ -336,8 +336,14 @@ resources:
- - {get_attr: [BlockStorage, name]}
- ctlplane
PreNetworkConfig:
type: OS::TripleO::BlockStorage::PreNetworkConfig
properties:
server: {get_resource: BlockStorage}
NetworkDeployment:
type: OS::TripleO::SoftwareDeployment
depends_on: PreNetworkConfig
properties:
name: NetworkDeployment
config: {get_resource: NetworkConfig}

@ -342,8 +342,14 @@ resources:
- - {get_attr: [CephStorage, name]}
- ctlplane
PreNetworkConfig:
type: OS::TripleO::CephStorage::PreNetworkConfig
properties:
server: {get_resource: CephStorage}
NetworkDeployment:
type: OS::TripleO::SoftwareDeployment
depends_on: PreNetworkConfig
properties:
name: NetworkDeployment
config: {get_resource: NetworkConfig}

@ -345,6 +345,11 @@ resources:
- - {get_attr: [NovaCompute, name]}
- ctlplane
PreNetworkConfig:
type: OS::TripleO::Compute::PreNetworkConfig
properties:
server: {get_resource: NovaCompute}
NetworkConfig:
type: OS::TripleO::Compute::Net::SoftwareConfig
properties:
@ -358,6 +363,7 @@ resources:
NetworkDeployment:
type: OS::TripleO::SoftwareDeployment
depends_on: PreNetworkConfig
properties:
name: NetworkDeployment
config: {get_resource: NetworkConfig}

@ -364,6 +364,11 @@ resources:
- - {get_attr: [Controller, name]}
- ctlplane
PreNetworkConfig:
type: OS::TripleO::Controller::PreNetworkConfig
properties:
server: {get_resource: Controller}
NetworkConfig:
type: OS::TripleO::Controller::Net::SoftwareConfig
properties:
@ -377,6 +382,7 @@ resources:
NetworkDeployment:
type: OS::TripleO::SoftwareDeployment
depends_on: PreNetworkConfig
properties:
name: NetworkDeployment
config: {get_resource: NetworkConfig}

@ -336,8 +336,14 @@ resources:
- - {get_attr: [SwiftStorage, name]}
- ctlplane
PreNetworkConfig:
type: OS::TripleO::ObjectStorage::PreNetworkConfig
properties:
server: {get_resource: SwiftStorage}
NetworkDeployment:
type: OS::TripleO::SoftwareDeployment
depends_on: PreNetworkConfig
properties:
name: NetworkDeployment
config: {get_resource: NetworkConfig}

@ -359,8 +359,14 @@ resources:
- - {get_attr: [{{role}}, name]}
- ctlplane
PreNetworkConfig:
type: OS::TripleO::{{role}}::PreNetworkConfig
properties:
server: {get_resource: {{role}}}}
NetworkDeployment:
type: OS::TripleO::SoftwareDeployment
depends_on: PreNetworkConfig
properties:
name: NetworkDeployment
config: {get_resource: NetworkConfig}

Loading…
Cancel
Save