From 36e4b9754dedef27637c09b510829f686bd469e4 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Sat, 16 Sep 2017 21:13:11 +0200 Subject: PDF parsing support - add new git submodule pointing to OPNFV Pharos; - use Pharos 'generate_config.sh' to parse the PDF using the Fuel installer adapter and generate dynamically; - build outside current git repo and sync separately to prevent sensitive data leak; - add PDF sample based on LF-POD2, should be used with 'ci/deploy.sh -l local -p pod1'; Change-Id: I4e1b95f180bcd5ade5d86f516628eb8edbe64b1c Signed-off-by: Alexandru Avadanii --- mcp/scripts/pharos | 1 + mcp/scripts/salt.sh | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) create mode 160000 mcp/scripts/pharos (limited to 'mcp/scripts') diff --git a/mcp/scripts/pharos b/mcp/scripts/pharos new file mode 160000 index 000000000..c4b4629b5 --- /dev/null +++ b/mcp/scripts/pharos @@ -0,0 +1 @@ +Subproject commit c4b4629b59923e049500fc776b8a251d4cd4c3b9 diff --git a/mcp/scripts/salt.sh b/mcp/scripts/salt.sh index 4effa6b4f..081513c6b 100755 --- a/mcp/scripts/salt.sh +++ b/mcp/scripts/salt.sh @@ -13,15 +13,18 @@ F_GIT_ROOT=$(git rev-parse --show-toplevel) OPNFV_TMP_DIR="/home/${SALT_MASTER_USER}/fuel" OPNFV_FUEL_DIR="/root/fuel" - -# patch reclass-system-salt-model locally before copying it over -make -C "${F_GIT_ROOT}/mcp/patches" deepclean patches-import +OPNFV_RDIR="reclass/classes/cluster/all-mcp-ocata-common" +LOCAL_PDF_RECLASS=$1 # push to cfg01 current git repo first (including submodules), at ~ubuntu/fuel # later we move it to ~root/fuel and delete the temporary clone rsync -Erl --delete -e "ssh ${SSH_OPTS}" \ --exclude-from="${F_GIT_ROOT}/.gitignore" \ "${F_GIT_ROOT}/" "${SSH_SALT}:$(basename "${OPNFV_TMP_DIR}")/" +if [ -n "${LOCAL_PDF_RECLASS}" ] && [ -f "${LOCAL_PDF_RECLASS}" ]; then + rsync -e "ssh ${SSH_OPTS}" "${LOCAL_PDF_RECLASS}" \ + "${SSH_SALT}:$(basename "${OPNFV_TMP_DIR}")/mcp/${OPNFV_RDIR}/opnfv/" +fi # ssh to cfg01 # shellcheck disable=SC2086,2087 @@ -36,8 +39,7 @@ ssh ${SSH_OPTS} "${SSH_SALT}" bash -s << SALT_INSTALL_END mv ${OPNFV_TMP_DIR} ${OPNFV_FUEL_DIR} && chown -R root.root ${OPNFV_FUEL_DIR} ln -s ${OPNFV_FUEL_DIR}/mcp/reclass /srv/salt/reclass ln -s ${OPNFV_FUEL_DIR}/mcp/deploy/scripts /srv/salt/scripts - cd /srv/salt/reclass/classes/cluster/all-mcp-ocata-common && \ - ln -s "\$(uname -i)" arch + cd /srv/salt/${OPNFV_RDIR} && ln -s "\$(uname -i)" arch cp -r ${OPNFV_FUEL_DIR}/mcp/metadata/service /usr/share/salt-formulas/reclass cd /srv/salt/reclass/classes/service && \ -- cgit 1.2.3-korg