summaryrefslogtreecommitdiffstats
path: root/mcp/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'mcp/scripts')
-rw-r--r--mcp/scripts/globals.sh21
-rw-r--r--mcp/scripts/lib.sh8
-rwxr-xr-xmcp/scripts/log.sh2
-rw-r--r--mcp/scripts/net_mcpcontrol.xml.template4
m---------mcp/scripts/pharos0
-rwxr-xr-xmcp/scripts/salt.sh5
6 files changed, 31 insertions, 9 deletions
diff --git a/mcp/scripts/globals.sh b/mcp/scripts/globals.sh
new file mode 100644
index 000000000..6dabe65fe
--- /dev/null
+++ b/mcp/scripts/globals.sh
@@ -0,0 +1,21 @@
+#!/bin/bash -ex
+##############################################################################
+# Copyright (c) 2017 Ericsson AB, Mirantis Inc., Enea AB and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# Global variables
+export SSH_KEY=${SSH_KEY:-"/var/lib/opnfv/mcp.rsa"}
+export SALT_MASTER=${INSTALLER_IP:-10.20.0.2}
+export SALT_MASTER_USER=${SALT_MASTER_USER:-ubuntu}
+export MAAS_IP=${MAAS_IP:-${SALT_MASTER%.*}.3}
+
+# These should be determined from PDF later
+export MAAS_PXE_NETWORK=${MAAS_PXE_NETWORK:-192.168.11.0}
+
+# Derivated from above global vars
+export SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${SSH_KEY}"
+export SSH_SALT="${SALT_MASTER_USER}@${SALT_MASTER}"
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index dc4d9dc2f..fcc5d76ac 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -103,13 +103,7 @@ create_vms() {
vnode_networks[2]="${vnode_networks[0]}"
fi
for net in "${vnode_networks[@]:1}"; do
- net_type="bridge"
- # in case of custom network, host should already have the bridge in place
- if [ -f "net_${net}.xml" ] && \
- [ ! -d "/sys/class/net/${net}/bridge" ]; then
- net_type="network"
- fi
- net_args="${net_args} --network ${net_type}=${net},model=virtio"
+ net_args="${net_args} --network bridge=${net},model=virtio"
done
# shellcheck disable=SC2086
diff --git a/mcp/scripts/log.sh b/mcp/scripts/log.sh
index 1ae0953af..8c4bf3ef5 100755
--- a/mcp/scripts/log.sh
+++ b/mcp/scripts/log.sh
@@ -14,6 +14,8 @@ DEPLOY_LOG=$1
OPNFV_TMP_LOG="opnfv_fuel_logs"
[ -n "${DEPLOY_LOG}" ] || exit 0
+# shellcheck disable=SC1090
+[ -n "${SSH_OPTS}" ] || source "$(dirname "${BASH_SOURCE[0]}")/globals.sh"
# ssh to cfg01
# shellcheck disable=SC2086,2087
diff --git a/mcp/scripts/net_mcpcontrol.xml.template b/mcp/scripts/net_mcpcontrol.xml.template
index 722a66aa9..ab58851e8 100644
--- a/mcp/scripts/net_mcpcontrol.xml.template
+++ b/mcp/scripts/net_mcpcontrol.xml.template
@@ -2,9 +2,9 @@
<name>mcpcontrol</name>
<bridge name="mcpcontrol"/>
<forward mode="nat"/>
- <ip address="${MCP_CTRL_NETWORK_ROOTSTR}.1" netmask="255.255.255.0">
+ <ip address="${SALT_MASTER%.*}.1" netmask="255.255.255.0">
<dhcp>
- <range start="${MCP_CTRL_NETWORK_ROOTSTR}.2" end="${MCP_CTRL_NETWORK_ROOTSTR}.254"/>
+ <range start="${SALT_MASTER%.*}.2" end="${SALT_MASTER%.*}.254"/>
</dhcp>
</ip>
</network>
diff --git a/mcp/scripts/pharos b/mcp/scripts/pharos
-Subproject 908dab58edbbe8f22db14a9261693a54e9b2d8f
+Subproject 2c4fac2e41aaca9dd679b200ffc968eeb448b39
diff --git a/mcp/scripts/salt.sh b/mcp/scripts/salt.sh
index 081513c6b..b0a26873d 100755
--- a/mcp/scripts/salt.sh
+++ b/mcp/scripts/salt.sh
@@ -65,4 +65,9 @@ ssh ${SSH_OPTS} "${SSH_SALT}" bash -s << SALT_INSTALL_END
salt -C '* and not cfg01*' pkg.upgrade refresh=False
salt '*' state.sls ntp
+
+ # Temporary fixup for mismatch between neutron formula and reclass model
+ salt-call pkg.install salt-formula-neutron allow_updates=False refresh=False \
+ version=2016.12.1+201709251458.f0607d9-1xenial1
+ cd ${OPNFV_FUEL_DIR}/mcp/patches && ./patch.sh patches_neutron.list formulas
SALT_INSTALL_END