-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup_vxlan.sh
71 lines (66 loc) · 3.18 KB
/
setup_vxlan.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
gcloud compute instances add-metadata user-desktop --zone $ZONE \
--metadata startup-script='set -x
ip link add vxlan0 type vxlan id 42 dev ens4 dstport 4789
bridge fdb append to 00:00:00:00:00:00 dst <AWS_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <AM_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <AW0_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <UC0_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <UC1_IP> dev vxlan0
ip addr add 10.200.0.2/24 dev vxlan0
ip link set up dev vxlan0
'
gcloud compute instances add-metadata admin-workstation --zone $ZONE \
--metadata startup-script='set -x
ip link add vxlan0 type vxlan id 42 dev ens4 dstport 4789
bridge fdb append to 00:00:00:00:00:00 dst <AM_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <AW0_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <UC0_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <UC1_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <UD_IP> dev vxlan0
ip addr add 10.200.0.3/24 dev vxlan0
ip link set up dev vxlan0
'
gcloud compute instances add-metadata admin-cluster-master --zone $ZONE \
--metadata startup-script='set -x
ip link add vxlan0 type vxlan id 42 dev ens4 dstport 4789
bridge fdb append to 00:00:00:00:00:00 dst <AW0_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <AWS_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <UC0_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <UC1_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <UD_IP> dev vxlan0
ip addr add 10.200.0.4/24 dev vxlan0
ip link set up dev vxlan0
'
gcloud compute instances add-metadata admin-cluster-worker0 --zone $ZONE \
--metadata startup-script='set -x
ip link add vxlan0 type vxlan id 42 dev ens4 dstport 4789
bridge fdb append to 00:00:00:00:00:00 dst <AM_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <AWS_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <UC0_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <UC1_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <UD_IP> dev vxlan0
ip addr add 10.200.0.5/24 dev vxlan0
ip link set up dev vxlan0
'
gcloud compute instances add-metadata user-cluster-master --zone $ZONE \
--metadata startup-script='set -x
ip link add vxlan0 type vxlan id 42 dev ens4 dstport 4789
bridge fdb append to 00:00:00:00:00:00 dst <AM_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <AW0_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <AWS_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <UC1_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <UD_IP> dev vxlan0
ip addr add 10.200.0.6/24 dev vxlan0
ip link set up dev vxlan0
'
gcloud compute instances add-metadata user-cluster-worker0 --zone $ZONE \
--metadata startup-script='set -x
ip link add vxlan0 type vxlan id 42 dev ens4 dstport 4789
bridge fdb append to 00:00:00:00:00:00 dst <AM_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <AW0_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <AWS_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <UC0_IP> dev vxlan0
bridge fdb append to 00:00:00:00:00:00 dst <UD_IP> dev vxlan0
ip addr add 10.200.0.7/24 dev vxlan0
ip link set up dev vxlan0
'