summaryrefslogtreecommitdiffstats
path: root/mcp/scripts/lib_template.sh
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-08-10 16:52:43 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-08-29 01:27:28 +0200
commitcfa1c0d67ee23edcbc25d9620754159645981dd8 (patch)
tree4903bb104333324b025bb79e4e04921665da8fde /mcp/scripts/lib_template.sh
parent835cf06e032d1271ac831b2acc2ff542f1022848 (diff)
[docker] Add docker-compose definitions
Add configuration items for bringing up the Salt master Docker container using docker-compose: - mount <storage dir>/hosts as /etc/hosts - mount <storage dir>/salt as /etc/salt: * semi-persistent generated Salt information; - mount <storage dir>/nodes as /srv/salt/reclass/nodes: * semi-persistent generated reclass node data storage; - mount Fuel@OPNFV git repo in /root/fuel; - mount all other previously rsynced artifacts; - hook container to 3 networks/bridges: mcpcontrol, PXE/admin and management: * container IP addresses are managed by Docker, so no DHCP is used; - override upstream entrypoint.sh by mounting our own version on top; * run-time patch Salt to fix certain init system interactions due to 'Tini' looking like Upstart but behaving a bit differently; * work around directory traversal issues in Salt/reclass by using extensive `cp` (to be later mitigated at container build time); * overwrite reclass.system with our own version (patched), later to fetched pre-patched during container build; * overwrite salt-formulas with our patched versions; * create missing links for salt-formulas-* packages (e.g. gnocchi) which are not available as git repos upstream; - add mcp.rsa.pub to 'ubuntu' user's authorized_keys for SSH login to master node to remain backwards compatible; - mount configuration files for semi-persistent state preservation at container destroy/rebuild (using '-f' deploy argument); JIRA: FUEL-383 Change-Id: Ie17e578a7ebeb071b1c0e0a49ad58ffa6bbc89bb Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/scripts/lib_template.sh')
-rw-r--r--mcp/scripts/lib_template.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/mcp/scripts/lib_template.sh b/mcp/scripts/lib_template.sh
index 4b5b0563d..0cfc02fdf 100644
--- a/mcp/scripts/lib_template.sh
+++ b/mcp/scripts/lib_template.sh
@@ -79,7 +79,8 @@ function do_templates_cluster {
awk '/^---$/{f=1;next;}f' "${_yaml}" >> "${LOCAL_PDF}"
done
# shellcheck disable=SC2046
- j2args=$(find "${RECLASS_CLUSTER_DIR}" "$(readlink -f virsh_net)" $(readlink -f ./*j2) \
+ j2args=$(find "${RECLASS_CLUSTER_DIR}" "$(readlink -f virsh_net)" \
+ "$(readlink -f docker-compose)" $(readlink -f ./*j2) \
-name '*.j2' -exec echo -j {} \;)
# shellcheck disable=SC2086
if ! "${PHAROS_GEN_CFG}" -y "${LOCAL_PDF}" ${j2args} -b -v \