summaryrefslogtreecommitdiffstats
path: root/mcp/reclass/scripts
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2017-05-26 12:12:15 +0400
committerMichael Polenchuk <mpolenchuk@mirantis.com>2017-05-26 14:27:47 +0400
commitf85c84133c2f8d6aec3c707cfb92cb03db543bd6 (patch)
tree00ed2d88b364ad39366a8fa6f7f0a27d89d1a283 /mcp/reclass/scripts
parent27d968bc35ef4f622acd171ada778a4e0f4c76fb (diff)
[mcp] Replace reclass system models with submodule
Change-Id: Id693f7b0f3542d605b0f71601f3bd21eb882c7ba Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
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