diff options
author | Michael Polenchuk <mpolenchuk@mirantis.com> | 2017-05-26 12:12:15 +0400 |
---|---|---|
committer | Michael Polenchuk <mpolenchuk@mirantis.com> | 2017-05-26 14:27:47 +0400 |
commit | f85c84133c2f8d6aec3c707cfb92cb03db543bd6 (patch) | |
tree | 00ed2d88b364ad39366a8fa6f7f0a27d89d1a283 /mcp/reclass/scripts/infra.sh | |
parent | 27d968bc35ef4f622acd171ada778a4e0f4c76fb (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/infra.sh')
-rwxr-xr-x | mcp/reclass/scripts/infra.sh | 8 |
1 files changed, 8 insertions, 0 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 |