[vcp] Increase timeout till VCP VMs online
[fuel.git] / mcp / scripts / user-data.template
1 #!/bin/bash
2 ##############################################################################
3 # Copyright (c) 2017 Mirantis Inc., Enea AB and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 SALT_REPO=repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.11
10 if [ "$(uname -i)" = "aarch64" ]; then
11   SALT_REPO=linux.enea.com/saltstack/apt/ubuntu/16.04/arm64/2016.11
12 fi
13 wget -O - "https://${SALT_REPO}/SALTSTACK-GPG-KEY.pub" | sudo apt-key add -
14 echo "deb https://${SALT_REPO} xenial main" > /etc/apt/sources.list.d/salt.list
15 apt update
16 apt-get install -y salt-minion
17 rm /etc/salt/minion_id
18 rm -f /etc/salt/pki/minion/minion_master.pub
19 echo "id: $(hostname).${CLUSTER_DOMAIN}" > /etc/salt/minion
20 echo "master: ${SALT_MASTER}" >> /etc/salt/minion
21 service salt-minion restart