summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-09-11 06:13:03 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-09-11 18:02:55 +0200
commit519def66f241c4a9d0d3ac3aa8bd47484a25188b (patch)
treefaa7be24f07813e0ac02899dbc2529036ef7a6fa
parentb666bc50b2b8b1bb8cde5cdab280f0409bde4958 (diff)
[cleanup] Move default storage dir to /var/lib
Since we switched to dockerized Salt master and mounting the full contents of the current git repo inside cfg01's /root/fuel dir, exposing temporary deploy artifacts should be avoided, i.e. the default temporary storage location (configurable via '-S' deploy arg) should be moved outside the git repo. JIRA: FUEL-383 Change-Id: I32f7197b018fd853867de42f5618650ac9022dc9 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-rw-r--r--.gitignore2
-rwxr-xr-xci/deploy.sh11
-rw-r--r--mcp/deploy/images/.gitkeep0
3 files changed, 8 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 059072f14..4a787d9b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,8 +9,6 @@
**/docs_build/
**/docs_output/
**/releng/
-**/mcp/deploy/images/
-**/mcp/scripts/user-data.sh
**/mcp/scripts/virsh_net/*.xml
**/mcp/scripts/docker-compose/*.yaml
**/mcp/scripts/*.img
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 11218196e..0e084d295 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -107,7 +107,9 @@ $(notify_i "Input parameters to the build script are:" 2)
Note that without the required packages, deploy will fail.
-s Deployment-scenario, this points to a short deployment scenario name, which
has to be defined in config directory (e.g. os-odl-nofeature-ha).
--S Storage dir for VM images, default is mcp/deploy/images
+-S Storage dir for VM images, default is /var/lib/opnfv/tmpdir
+ It is recommended to store the deploy artifacts on a fast disk, outside of
+ the current git repository (so clean operations won't erase it).
$(notify_i "[NOTE] sudo & virsh priviledges are needed for this script to run" 3)
@@ -116,7 +118,8 @@ Example:
$(notify_i "sudo $(basename "$0") \\
-b file:///home/jenkins/securedlab \\
-l lf -p pod2 \\
- -s os-odl-nofeature-ha" 2)
+ -s os-odl-nofeature-ha \\
+ -S /home/jenkins/tmpdir" 2)
EOF
}
@@ -130,7 +133,7 @@ EOF
CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x
MCP_REPO_ROOT_PATH=$(readlink -f "$(dirname "${BASH_SOURCE[0]}")/..")
DEPLOY_DIR=$(cd "${MCP_REPO_ROOT_PATH}/mcp/scripts"; pwd)
-MCP_STORAGE_DIR=$(cd "${MCP_REPO_ROOT_PATH}/mcp/deploy/images"; pwd)
+MCP_STORAGE_DIR='/var/lib/opnfv/tmpdir'
URI_REGEXP='(file|https?|ftp)://.*'
BASE_CONFIG_URI="file://${MCP_REPO_ROOT_PATH}/mcp/scripts/pharos"
@@ -242,6 +245,8 @@ pushd "${DEPLOY_DIR}" > /dev/null
# scenario, etc.
# Install required packages on jump server
+sudo mkdir -p "${MCP_STORAGE_DIR}"
+sudo chown "${USER}:${USER}" "${MCP_STORAGE_DIR}"
if [ ${USE_EXISTING_PKGS} -eq 1 ]; then
notify "[NOTE] Skipping distro pkg installation" 2
else
diff --git a/mcp/deploy/images/.gitkeep b/mcp/deploy/images/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/mcp/deploy/images/.gitkeep
+++ /dev/null