Look for local.json in preference to config.json.

We've had a long standing ugliness where config.json was edited by
devtest to set the ssh username, and then when one commits a
tripleo-image-elements change, it would include your username. This is
undesirable :).

Change-Id: I3129bf638e519f2b03a05cae482e26fd5aef40b1
This commit is contained in:
Robert Collins 2014-02-14 09:45:22 +13:00
parent fced2ae2c4
commit 92d40e9be2
3 changed files with 16 additions and 5 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ dist
build
AUTHORS
ChangeLog
elements/seed-stack-config/local.json

View File

@ -12,10 +12,12 @@ at boot-time by Heat itself).
Usage
-----
Edit config.json to customise it for your deployment environment. The default
is configured for nova-baremetal operation in a seed VM. The configuration
options are documented in the actual elements that use the configuration - e.g.
nova, neutron etc.
Copy config.json (our basic schema) to local.json and customise it for your
deployment environment. The default is mostly configured for nova-baremetal
operation in a seed VM (just add SSH key). The configuration options are
documented in the actual elements that use the configuration - e.g. nova,
neutron etc. If local.json does not exist, config.json will be used, but
this is for backwards compatability and will be removed in a future release.
Configuration keys
------------------

View File

@ -2,4 +2,12 @@
set -eux
mkdir -p /var/lib/cloud/data
install -D -m 0755 -o root -g root $(dirname $0)/../config.json /var/lib/heat-cfntools/cfn-init-data
CONFIG_DIR="$(dirname $0)/../"
if [ -e "$CONFIG_DIR/local.json" ]; then
CONFIG_FILE="$CONFIG_DIR/local.json"
else
echo "Deprecated: Using config.json rather than local.json" >&2
CONFIG_FILE="$CONFIG_DIR/config.json"
fi
install -D -m 0755 -o root -g root "$CONFIG_FILE" /var/lib/heat-cfntools/cfn-init-data