-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.sh
More file actions
executable file
·31 lines (22 loc) · 897 Bytes
/
main.sh
File metadata and controls
executable file
·31 lines (22 loc) · 897 Bytes
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
#!/bin/bash
terraform apply
cd scripts
gcloud compute copy-files ./node1.sh elastic-node-1:~/ --zone us-west1-a
gcloud compute copy-files ./node2.sh elastic-node-2:~/ --zone us-west1-a
gcloud compute copy-files ./node3.sh elastic-node-3:~/ --zone us-west1-a
node=1
gcloud compute --project "that-big-universe" ssh --zone "us-west1-a" "elastic-node-$node" --command "\
sudo chmod 700 ./node$node.sh && \
sudo ./node$node.sh && \
sudo service elasticsearch start"
node=2
gcloud compute --project "that-big-universe" ssh --zone "us-west1-a" "elastic-node-$node" --command "\
sudo chmod 700 ./node$node.sh && \
sudo ./node$node.sh && \
sudo service elasticsearch start"
node=3
gcloud compute --project "that-big-universe" ssh --zone "us-west1-a" "elastic-node-$node" --command "\
sudo chmod 700 ./node$node.sh && \
sudo ./node$node.sh && \
sudo service elasticsearch start"
# ./readstatus.sh