Merge "Integrate os-refresh-config with heat-cfntools"
This commit is contained in:
commit
9215817ec9
@ -1,2 +1,2 @@
|
||||
heat-cfntools
|
||||
os-config-applier
|
||||
os-refresh-config
|
@ -0,0 +1,5 @@
|
||||
[main]
|
||||
stack={{heat.stack.name}}
|
||||
credential-file=/var/lib/cloud/data/cfn-credentials
|
||||
region={{heat.stack.region}}
|
||||
interval=10
|
@ -0,0 +1,8 @@
|
||||
{{#heat.refresh}}
|
||||
[os-refresh-config-{{resource}}]
|
||||
triggers=post.add,post.delete.post.update
|
||||
path=Resources.{{resource}}.Metadata
|
||||
action=os-refresh-config
|
||||
runas=root
|
||||
|
||||
{{/heat.refresh}}
|
@ -14,3 +14,19 @@ it into one of the following directories:
|
||||
/opt/stack/os-refresh-config/migration.d
|
||||
/opt/stack/os-refresh-config/post-configure.d
|
||||
```
|
||||
|
||||
If you want to have os-refresh-config run on any updates to a particular
|
||||
Resource in the heat stack, you will need at the minimum the following snippet
|
||||
of json in this instance's Metadata:
|
||||
|
||||
{
|
||||
"OpenStack::Config": {
|
||||
"heat":
|
||||
"access_key_id": {"Ref": "ApiKeyResource"},
|
||||
"secret_key": {"Fn::GetAtt": [ "ApiKeyResource", "SecretAccessKey" ]},
|
||||
"refresh": [ {"resource": "SomeResource"} ],
|
||||
"stack": {Ref: 'AWS::Stack'},
|
||||
"region": {Ref: 'AWS::Region'}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Note that this install.d script must be run after os-config-applier's
|
||||
# install script so that we can make use of os-config-apply
|
||||
set -eu
|
||||
script_home=$(dirname $0)
|
||||
template_home=$(os-config-applier --print-templates)/etc/cfn
|
||||
install -o root -g root -m 0644 -D $script_home/cfn-hup.conf $template_home/cfn-hup.conf
|
||||
install -o root -g root -m 0644 -D $script_home/hooks.conf $template_home/hooks.d/os-refresh-config.conf
|
@ -1,5 +0,0 @@
|
||||
[main]
|
||||
stack={{OpenStack::Heat::Stack.Name}}
|
||||
credential-file=/var/lib/cloud/data/cfn-credentials
|
||||
region={{OpenStack::Heat::Stack.Region}}
|
||||
interval=10
|
@ -1,5 +0,0 @@
|
||||
[os-refresh-config]
|
||||
triggers=post.add,post.delete.post.update
|
||||
path=Resources.{{OpenStack::Heat::Stack.RefreshResource}}.Metadata
|
||||
action=os-refresh-config
|
||||
runas=root
|
Loading…
Reference in New Issue
Block a user