-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmake-files.sh
executable file
·43 lines (39 loc) · 1.07 KB
/
make-files.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env bash
. ./ips.txt
cat > config.yaml << FIN
---
bootstrap_url: http://$BOOTSTRAP:4040
cluster_name: $CLUSTER_NAME
exhibitor_storage_backend: zookeeper
exhibitor_zk_hosts: $BOOTSTRAP:2181
exhibitor_zk_path: /$CLUSTER_NAME
log_directory: /genconf/logs
master_discovery: static
master_list:
- $MASTER_00
- $MASTER_01
- $MASTER_02
- $MASTER_03
- $MASTER_04
resolvers:
- 8.8.4.4
- 8.8.8.8
FIN
cat > ip-detect << FIN
#!/usr/bin/env bash
# Uses the Scaleway metadata server to get the node's internal
# ipv4 address
curl http://169.254.42.42/conf | grep "PRIVATE_IP" | cut -d'=' -f2-3
FIN
cat > scw-install.sh << FIN
#!/usr/bin/env bash
mkdir /tmp/dcos && cd /tmp/dcos
printf "Waiting for installer to appear at Bootstrap URL"
until \$(curl -m 2 --connect-timeout 2 --output /dev/null --silent --head --fail http://$BOOTSTRAP:4040/dcos_install.sh); do
sleep 1
done
curl -O http://$BOOTSTRAP:4040/dcos_install.sh
sed -i "s/systemctl start dcos-link-env/systemctl enable dcos-link-env\nsystemctl start dcos-link-env/" dcos_install.sh
sudo bash dcos_install.sh \$1
FIN
rm -rf ./ips.txt