tripleo-image-elements/elements/os-refresh-config
JUN JIE NAN beb0633894 Correct os-refresh-config README.md typo and format
Replace `run-parts' with `dib-run-parts' since os-refresh-config is
using it. Correct markdown code block format.

Change-Id: If0184b80d0f35bc30f9799135bd4f659889bcbbd
2013-11-28 09:44:04 +08:00
..
install.d Replace cfn-hup cron job with os-collect-config 2013-08-05 00:57:51 -07:00
os-refresh-config Add default to metadata in 99-refresh-completed 2013-11-26 13:26:24 +00:00
README.md Correct os-refresh-config README.md typo and format 2013-11-28 09:44:04 +08:00
element-deps Make generic waitcondition for os-refresh-config 2013-11-25 19:24:04 -08:00
source-repository-os-refresh-config Use openstack git repos when possible 2013-11-15 10:48:11 +02: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"}
}