tripleo-image-elements/elements/os-refresh-config
Juan Antonio Osorio Robles 8688c2878a Set correct content-type for o-r-c curl calls
They contained json data, so they need application/json as the
content types. Else, some wsgi implementations will interpret the
contents in an undesired way, such as apache's mod_wsgi setting the
whole POST body as a POST parameter with no value.

Change-Id: Id988e8d286761550da4849c0695f5f5a37116a11
Closes-Bug: #1641589
2016-11-14 16:12:34 +02:00
..
install.d Merge "Update pbr version to match global requirements" 2015-07-02 20:02:16 +00:00
os-refresh-config Set correct content-type for o-r-c curl calls 2016-11-14 16:12:34 +02:00
README.md Correct os-refresh-config README.md typo and format 2013-11-28 09:44:04 +08:00
element-deps Migrate to package-installs scripts 2014-11-05 01:38:05 -08:00
package-installs.yaml Migrate os-*-config to package-installs v2 2015-04-30 16:12:40 -04:00
pkg-map Add pkg-map for os-*-config 2015-02-09 17:16:50 +09:00

README.md

Install os-refresh-config

os-refresh-config uses dib-run-parts to run scripts in a pre-defined set of directories. Its intended purpose is to quiesce (pre-configure.d), configure (configure.d), migrate (migration.d), and then activate (post-configure.d) a configuration on first boot or in response to Heat Metadata changes.

To cause a script to be run on every os-refresh-config run, install it into one of the following directories:

/opt/stack/os-config-refresh/pre-configure.d
/opt/stack/os-config-refresh/configure.d
/opt/stack/os-config-refresh/migration.d
/opt/stack/os-config-refresh/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'}
        }
    }
}

If you would like to signal a wait condition at the end of post-configure.d, a generic name of 'completion-handle' can be used like so:

{
    "completion-handle": {"Ref": "CompletionHandleName"}
}