summaryrefslogtreecommitdiffstats
path: root/mcp/reclass/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'mcp/reclass/scripts')
-rwxr-xr-xmcp/reclass/scripts/infra.sh8
-rwxr-xr-xmcp/reclass/scripts/salt.sh4
2 files changed, 10 insertions, 2 deletions
diff --git a/mcp/reclass/scripts/infra.sh b/mcp/reclass/scripts/infra.sh
index 182d90692..7f5c210db 100755
--- a/mcp/reclass/scripts/infra.sh
+++ b/mcp/reclass/scripts/infra.sh
@@ -5,6 +5,10 @@ SALT_MASTER=192.168.10.100
BASE_IMAGE=https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
declare -A NODES=( [cfg01]=4096 [ctl01]=6144 [ctl02]=6144 [ctl03]=6144 [gtw01]=2048 [cmp01]=2048 )
+# get required packages
+apt-get install -y mkisofs curl virtinst cpu-checker qemu-kvm
+
+# generate ssh key
[ -f $SSH_KEY ] || ssh-keygen -f $SSH_KEY -N ''
# get base image
@@ -60,6 +64,9 @@ done
CONNECTION_ATTEMPTS=20
SLEEP=15
+# refresh salt master host key
+ssh-keygen -R $SALT_MASTER
+
# wait until ssh on Salt master is available
echo "Attempting to ssh to Salt master ..."
ATTEMPT=1
@@ -71,5 +78,6 @@ while (($ATTEMPT <= $CONNECTION_ATTEMPTS)); do
(*) echo "${ATTEMPT}/${CONNECTION_ATTEMPTS}> ssh server ain't ready yet, waiting for ${SLEEP} seconds ..." ;;
esac
sleep $SLEEP
+ ssh-keyscan -t ecdsa $SALT_MASTER >> ~/.ssh/known_hosts
((ATTEMPT+=1))
done
diff --git a/mcp/reclass/scripts/salt.sh b/mcp/reclass/scripts/salt.sh
index c202ab574..6495bbce2 100755
--- a/mcp/reclass/scripts/salt.sh
+++ b/mcp/reclass/scripts/salt.sh
@@ -11,8 +11,8 @@ ssh -i mcp.rsa ubuntu@192.168.10.100 bash -s << SALT_INSTALL_END
apt-get install -y git curl subversion
svn export --force https://github.com/salt-formulas/salt-formulas/trunk/deploy/scripts /srv/salt/scripts
- git clone --depth=1 https://git.opnfv.org/fuel
- ln -s fuel/mcp/reclass /srv/salt/reclass
+ git clone --depth=1 --recurse-submodules https://git.opnfv.org/fuel
+ ln -s $(pwd)/fuel/mcp/reclass /srv/salt/reclass
cd /srv/salt/scripts
MASTER_HOSTNAME=cfg01.virtual-mcp-ocata-ovs.local ./salt-master-init.sh