-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathyugabyte-deployment.yaml
135 lines (121 loc) · 3.53 KB
/
yugabyte-deployment.yaml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
imports:
- path: ./template/network.jinja
name: network.jinja
- path: ./template/instance.jinja
name: instance.jinja
- path: ./script/startup-script.sh
name: startup-script.sh
resources:
- name: yugabyte-network
type: network.jinja
properties:
region: us-central1
subnets:
- range: 10.0.1.0/24
name: subnet-1
- range: 10.0.2.0/24
name: subnet-2
- range: 10.0.3.0/24
name: subnet-3
- type: compute.v1.address
name: in-address-0
properties:
region: us-central1
addressType: INTERNAL
subnetwork: $(ref.subnet-1.selfLink)
- type: compute.v1.address
name: in-address-1
properties:
region: us-central1
addressType: INTERNAL
subnetwork: $(ref.subnet-2.selfLink)
- type: compute.v1.address
name: in-address-2
properties:
region: us-central1
addressType: INTERNAL
subnetwork: $(ref.subnet-3.selfLink)
- name: yb-firewall-rule
type: compute.v1.firewall
properties:
network: $(ref.yugabyte-network.selfLink)
allowed:
- IPProtocol: 'TCP'
ports: ['7000','9000','22','5433']
sourceRanges: ['0.0.0.0/0']
- name: yb-intra-firewall-rule
type: compute.v1.firewall
properties:
network: $(ref.yugabyte-network.selfLink)
allowed:
- IPProtocol: 'TCP'
ports: ['7100','9100', '5433', '9042']
sourceRanges: ['10.0.0.0/16']
- type: compute.v1.address
name: ip-address-0
properties:
region: us-central1
- type: compute.v1.address
name: ip-address-1
properties:
region: us-central1
- type: compute.v1.address
name: ip-address-2
properties:
region: us-central1
- name: yb-instance-1
type: instance.jinja
properties:
zone: us-central1-a
machineType: n1-standard-8
subnetwork: subnet-1
in-address: in-address-0
ex-address: ip-address-0
metadata-from-file:
startup-script: startup-script.sh
metadata:
in-address-0: $(ref.in-address-0.address)
in-address-1: $(ref.in-address-1.address)
in-address-2: $(ref.in-address-2.address)
dependsOn: $(ref.in-address-0.address)
- name: yb-instance-2
type: instance.jinja
properties:
zone: us-central1-b
machineType: n1-standard-8
subnetwork: subnet-2
in-address: in-address-1
ex-address: ip-address-1
metadata-from-file:
startup-script: startup-script.sh
metadata:
in-address-0: $(ref.in-address-0.address)
in-address-1: $(ref.in-address-1.address)
in-address-2: $(ref.in-address-2.address)
dependsOn: $(ref.in-address-1.address)
- name: yb-instance-3
type: instance.jinja
properties:
zone: us-central1-c
machineType: n1-standard-8
subnetwork: subnet-3
in-address: in-address-2
ex-address: ip-address-2
metadata-from-file:
startup-script: startup-script.sh
metadata:
in-address-0: $(ref.in-address-0.address)
in-address-1: $(ref.in-address-1.address)
in-address-2: $(ref.in-address-2.address)
dependsOn: $(ref.in-address-2.address)
outputs:
- name: UI
value: http://$(ref.yb-instance-1.networkInterfaces[0].accessConfigs[0].natIP):7000
- name: JDBC
value: postgresql://yugabyte@$(ref.yb-instance-1.networkInterfaces[0].accessConfigs[0].natIP):5433
- name: YSQL
value: ysqlsh -U yugabyte -h $(ref.yb-instance-1.networkInterfaces[0].accessConfigs[0].natIP) -p 5433
- name: YCQL
value: ycqlsh $(ref.yb-instance-1.networkInterfaces[0].accessConfigs[0].natIP) 9042
- name: YEDIS
value: redis-cli -h $(ref.yb-instance-1.networkInterfaces[0].accessConfigs[0].natIP) -p 6379