summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-09-21 14:00:28 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-09-21 14:00:28 +0000
commitf172f8e3dc92710f79a33ad38aa3da6313da879c (patch)
tree610357bbcea7a37a1cb9a5d16c8502cb1eb74296
parent7099ffcba4c7a84dfd2ac53fd59149948665f884 (diff)
parent3ee785abc3b36e10a5c89e879168725a135b731b (diff)
Merge "[state] virtual_init: Limit to mas01 on baremetal"
-rwxr-xr-xci/deploy.sh1
-rwxr-xr-xmcp/config/states/virtual_init1
-rw-r--r--mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml.j22
-rw-r--r--mcp/reclass/classes/cluster/mcp-common-ha/infra/init.yml.j22
-rw-r--r--mcp/reclass/classes/cluster/mcp-common-noha/openstack_init.yml.j22
-rw-r--r--mcp/scripts/docker-compose/docker-compose.yaml.j24
-rw-r--r--mcp/scripts/lib.sh2
7 files changed, 8 insertions, 6 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 41ac60237..3a0f9f9e5 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -278,6 +278,7 @@ generate_ssh_key
export MAAS_SSH_KEY="$(cat "$(basename "${SSH_KEY}").pub")"
# Expand jinja2 templates based on PDF data and env vars
+[[ "${DEPLOY_SCENARIO}" =~ -ha$ ]] || MCP_VCP=0
export MCP_REPO_ROOT_PATH MCP_VCP MCP_STORAGE_DIR MCP_DOCKER_TAG MCP_CMP_SS \
MCP_JUMP_ARCH=$(uname -i) MCP_DEPLOY_SCENARIO="${DEPLOY_SCENARIO}"
do_templates_scenario "${MCP_STORAGE_DIR}" "${TARGET_LAB}" "${TARGET_POD}" \
diff --git a/mcp/config/states/virtual_init b/mcp/config/states/virtual_init
index 47d69cd8a..46d880471 100755
--- a/mcp/config/states/virtual_init
+++ b/mcp/config/states/virtual_init
@@ -17,6 +17,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/xdf_data.sh"
CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x
# shellcheck disable=SC2154,SC2086,SC2116
LOCAL_VIRT_NODES=$(echo ${virtual_nodes[*]}) # unquoted to filter space
+[[ ! "${LOCAL_VIRT_NODES}" =~ mas01 ]] || LOCAL_VIRT_NODES='mas01'
NODE_MASK="${LOCAL_VIRT_NODES// /|}"
wait_for 5.0 "salt-call state.sls reclass,linux.network,salt.minion \
diff --git a/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml.j2 b/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml.j2
index 15fbf2853..eb0a538f6 100644
--- a/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml.j2
+++ b/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml.j2
@@ -12,6 +12,8 @@ classes:
parameters:
_param:
openstack_version: queens
+ apt_mk_version: nightly
+ mcp_repo_version: 1.1
banner_company_name: OPNFV
diff --git a/mcp/reclass/classes/cluster/mcp-common-ha/infra/init.yml.j2 b/mcp/reclass/classes/cluster/mcp-common-ha/infra/init.yml.j2
index 59d75d478..05b96e40b 100644
--- a/mcp/reclass/classes/cluster/mcp-common-ha/infra/init.yml.j2
+++ b/mcp/reclass/classes/cluster/mcp-common-ha/infra/init.yml.j2
@@ -12,8 +12,6 @@ classes:
# - cluster.mcp-common-ha.stacklight.client
parameters:
_param:
- apt_mk_version: nightly
- mcp_repo_version: 1.1
salt_version: 2017.7
cluster_domain: ${_param:cluster_name}.local
# stacklight_environment: ${_param:cluster_domain}
diff --git a/mcp/reclass/classes/cluster/mcp-common-noha/openstack_init.yml.j2 b/mcp/reclass/classes/cluster/mcp-common-noha/openstack_init.yml.j2
index 875c7603b..5aae27c41 100644
--- a/mcp/reclass/classes/cluster/mcp-common-noha/openstack_init.yml.j2
+++ b/mcp/reclass/classes/cluster/mcp-common-noha/openstack_init.yml.j2
@@ -9,8 +9,6 @@
---
parameters:
_param:
- apt_mk_version: nightly
- mcp_repo_version: 1.1
openstack_region: RegionOne
admin_email: root@localhost
cluster_public_protocol: http
diff --git a/mcp/scripts/docker-compose/docker-compose.yaml.j2 b/mcp/scripts/docker-compose/docker-compose.yaml.j2
index 7cd845511..a3119f92b 100644
--- a/mcp/scripts/docker-compose/docker-compose.yaml.j2
+++ b/mcp/scripts/docker-compose/docker-compose.yaml.j2
@@ -23,11 +23,13 @@ services:
- {{ conf.MCP_REPO_ROOT_PATH }}:/root/fuel
- {{ conf.MCP_REPO_ROOT_PATH }}/mcp/scripts/docker-compose/files/entrypoint.sh:/entrypoint.sh
- {{ conf.MCP_STORAGE_DIR }}/pod_config.yml:/root/pod_config.yml
- - {{ conf.MCP_STORAGE_DIR }}/base_image_opnfv_fuel_vcp.img:/srv/salt/env/prd/salt/files/control/images/base_image_opnfv_fuel_vcp.img
- {{ conf.MCP_STORAGE_DIR }}/nodes:/srv/salt/reclass/nodes
- {{ conf.MCP_STORAGE_DIR }}/pki:/etc/pki
- {{ conf.MCP_STORAGE_DIR }}/salt:/etc/salt
- {{ conf.MCP_STORAGE_DIR }}/hosts:/etc/hosts
+{%- if conf.MCP_VCP %}
+ - {{ conf.MCP_STORAGE_DIR }}/base_image_opnfv_fuel_vcp.img:/srv/salt/env/prd/salt/files/control/images/base_image_opnfv_fuel_vcp.img
+{%- endif %}
hostname: cfg01
domainname: {{ conf.cluster.domain }}
privileged: true
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index 293262e89..c6a3d219e 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -270,7 +270,7 @@ function prepare_vms {
if [ "${image_dir}/${_tmp}" -ef "${image_dir}/${image}" ]; then
echo "[INFO] Patched base image found"
else
- rm -f "${image_dir}/${image%.*}"*
+ rm -rf "${image_dir}/${image%.*}"*
if [[ ! "${repos_pkgs_str}" =~ ^\^+$ ]]; then
echo "[INFO] Patching base image ..."
cp "${image_dir}/${_o}" "${image_dir}/${_tmp}"