Remove unused extraconfig scripts
config_then_reboot.yaml and run_puppet.sh aren't used anywhere in TripleO. Change-Id: If20a1ab8f347cdb82bf7912bec220c49a02edf14
This commit is contained in:
parent
2b05e90cea
commit
7dbdec29a0
@ -1,77 +0,0 @@
|
||||
heat_template_version: rocky
|
||||
|
||||
description: >
|
||||
Do some configuration, then reboot - sometimes needed for early-boot
|
||||
changes such as modifying kernel configuration
|
||||
|
||||
parameters:
|
||||
server:
|
||||
type: string
|
||||
RoleParameters:
|
||||
type: json
|
||||
description: Parameters specific to the role
|
||||
default: {}
|
||||
ServiceNames:
|
||||
type: comma_delimited_list
|
||||
default: []
|
||||
deployment_actions:
|
||||
default: ['CREATE', 'UPDATE']
|
||||
type: comma_delimited_list
|
||||
description: >
|
||||
List of stack actions that will trigger any deployments in this
|
||||
templates. The actions will be an empty list of the server is in the
|
||||
toplevel DeploymentServerBlacklist parameter's value.
|
||||
|
||||
conditions:
|
||||
deployment_actions_empty:
|
||||
equals:
|
||||
- {get_param: deployment_actions}
|
||||
- []
|
||||
|
||||
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:
|
||||
if:
|
||||
- deployment_actions_empty
|
||||
- []
|
||||
- ['CREATE'] # Only do this on CREATE
|
||||
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:
|
||||
if:
|
||||
- deployment_actions_empty
|
||||
- []
|
||||
- ['CREATE'] # Only do this on CREATE
|
||||
signal_transport: NO_SIGNAL
|
@ -1,31 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
function run_puppet {
|
||||
set -eux
|
||||
local manifest="$1"
|
||||
local role="$2"
|
||||
local step="$3"
|
||||
local rc=0
|
||||
|
||||
export FACTER_deploy_config_name="${role}Deployment_Step${step}"
|
||||
if [ -e "/etc/puppet/hieradata/heat_config_${FACTER_deploy_config_name}.json" ]; then
|
||||
set +e
|
||||
puppet apply --detailed-exitcodes \
|
||||
--modulepath \
|
||||
--summarize \
|
||||
/etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules \
|
||||
"${manifest}"
|
||||
rc=$?
|
||||
echo "puppet apply exited with exit code $rc"
|
||||
else
|
||||
echo "Step${step} doesn't exist for ${role}"
|
||||
fi
|
||||
set -e
|
||||
|
||||
if [ $rc -eq 2 -o $rc -eq 0 ]; then
|
||||
set +xu
|
||||
return 0
|
||||
fi
|
||||
set +xu
|
||||
return $rc
|
||||
}
|
Loading…
Reference in New Issue
Block a user