ddca77553d
Update pending templates to use the release name alias. Change-Id: I39f9be212d3e9f3bec6f45d9757eca7a3b0ccc06
101 lines
2.5 KiB
YAML
101 lines
2.5 KiB
YAML
heat_template_version: ocata
|
|
|
|
description: >
|
|
Do some configuration, then reboot - sometimes needed for early-boot
|
|
changes such as modifying kernel configuration
|
|
|
|
parameters:
|
|
server:
|
|
type: string
|
|
{{role}}KernelArgs:
|
|
type: string
|
|
default: ""
|
|
{{role}}TunedProfileName:
|
|
type: string
|
|
default: ""
|
|
{{role}}HostCpusList:
|
|
type: string
|
|
default: ""
|
|
|
|
conditions:
|
|
param_exists:
|
|
or:
|
|
- not:
|
|
equals:
|
|
- get_param: {{role}}KernelArgs
|
|
- ""
|
|
- not:
|
|
equals:
|
|
- get_param: {{role}}TunedProfileName
|
|
- ""
|
|
|
|
resources:
|
|
|
|
HostParametersConfig:
|
|
type: OS::Heat::SoftwareConfig
|
|
condition: param_exists
|
|
properties:
|
|
group: ansible
|
|
inputs:
|
|
- name: _KERNEL_ARGS_
|
|
- name: _TUNED_PROFILE_NAME_
|
|
- name: _HOST_CPUS_LIST_
|
|
outputs:
|
|
- name: result
|
|
config:
|
|
get_file: ansible_host_config.ansible
|
|
|
|
HostParametersDeployment:
|
|
type: OS::Heat::SoftwareDeployment
|
|
condition: param_exists
|
|
properties:
|
|
name: HostParametersDeployment
|
|
server: {get_param: server}
|
|
config: {get_resource: HostParametersConfig}
|
|
actions: ['CREATE'] # Only do this on CREATE
|
|
input_values:
|
|
_KERNEL_ARGS_: {get_param: {{role}}KernelArgs}
|
|
_TUNED_PROFILE_NAME_: {get_param: {{role}}TunedProfileName}
|
|
_HOST_CPUS_LIST_: {get_param: {{role}}HostCpusList}
|
|
|
|
RebootConfig:
|
|
type: OS::Heat::SoftwareConfig
|
|
condition: param_exists
|
|
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
|
|
condition: param_exists
|
|
depends_on: HostParametersDeployment
|
|
properties:
|
|
name: RebootDeployment
|
|
server: {get_param: server}
|
|
config: {get_resource: RebootConfig}
|
|
actions: ['CREATE'] # Only do this on CREATE
|
|
signal_transport: NO_SIGNAL
|
|
|
|
outputs:
|
|
result:
|
|
value:
|
|
get_attr: [HostParametersDeployment, result]
|
|
condition: param_exists
|
|
stdout:
|
|
value:
|
|
get_attr: [HostParametersDeployment, deploy_stdout]
|
|
condition: param_exists
|
|
stderr:
|
|
value:
|
|
get_attr: [HostParametersDeployment, deploy_stderr]
|
|
condition: param_exists
|
|
status_code:
|
|
value:
|
|
get_attr: [HostParametersDeployment, deploy_status_code]
|
|
condition: param_exists
|