forked from wormhole-foundation/wormhole
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bigtable.yaml
176 lines (175 loc) · 4.39 KB
/
bigtable.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
apiVersion: v1
kind: Service
metadata:
labels:
app: bigtable-emulator
name: bigtable-emulator
spec:
ports:
- name: clients
port: 8086
targetPort: clients
protocol: TCP
selector:
app: bigtable-emulator
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app: bigtable-emulator
name: bigtable-emulator
spec:
serviceName: bigtable-emulator
replicas: 1
selector:
matchLabels:
app: bigtable-emulator
template:
metadata:
labels:
app: bigtable-emulator
spec:
containers:
- name: bigtable-emulator
image: google/cloud-sdk:353.0.0-alpine@sha256:594278737ce111f7922afa8722b4b526c19938e74b9ab931d23c4d2755802d3a
env:
- name: BIGTABLE_EMULATOR_HOST
value: localhost:8086
command:
- /bin/sh
- -c
- |
echo project = local-dev > ~/.cbtrc
echo instance = wormhole >> ~/.cbtrc
gcloud --quiet components install beta cbt bigtable
gcloud --quiet beta emulators bigtable start --host-port=0.0.0.0:8086 &
sleep 3
cbt createtable v2Events "families=MessagePublication,QuorumState,TokenTransferPayload,AssetMetaPayload,NFTTransferPayload,TokenTransferDetails,ChainDetails"
nc -lkp 2000 0.0.0.0
readinessProbe:
periodSeconds: 2
failureThreshold: 300
tcpSocket:
port: 2000
ports:
- containerPort: 8086
name: clients
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
labels:
app: pubsub-emulator
name: pubsub-emulator
spec:
ports:
- name: listeners
port: 8085
targetPort: listeners
protocol: TCP
selector:
app: pubsub-emulator
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app: pubsub-emulator
name: pubsub-emulator
spec:
serviceName: pubsub-emulator
replicas: 1
selector:
matchLabels:
app: pubsub-emulator
template:
metadata:
labels:
app: pubsub-emulator
spec:
containers:
- name: pubsub-emulator
image: gcr.io/google.com/cloudsdktool/cloud-sdk@sha256:d7748afac2e3dc3768bfd0db16d26a7c538821146e433874acff0eb1cfd853ba
env:
- name: PUBSUB_EMULATOR_HOST
value: localhost:8085
- name: PUBSUB_PROJECT_ID
value: local-dev
command:
- /bin/sh
- -c
- |
gcloud --quiet components install beta pubsub-emulator
gcloud --quiet beta emulators pubsub start --host-port=0.0.0.0:8085
readinessProbe:
periodSeconds: 2
failureThreshold: 300
tcpSocket:
port: 8085
ports:
- containerPort: 8085
name: listeners
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
labels:
app: bigtable-functions
name: bigtable-functions
spec:
ports:
- name: functions
port: 8090
targetPort: functions
protocol: TCP
selector:
app: bigtable-functions
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app: cloud-functions
name: cloud-functions
spec:
serviceName: cloud-functions
replicas: 1
selector:
matchLabels:
app: cloud-functions
template:
metadata:
labels:
app: cloud-functions
spec:
containers:
- name: cloud-functions
image: cloud-functions
env:
- name: BIGTABLE_EMULATOR_HOST
value: bigtable-emulator:8086
- name: PUBSUB_EMULATOR_HOST
value: pubsub-emulator:8085
- name: GCP_PROJECT
value: local-dev
- name: BIGTABLE_INSTANCE
value: wormhole
- name: PUBSUB_NEW_VAA_TOPIC
value: new-vaa-devnet
- name: PUBSUB_NEW_VAA_SUBSCRIPTION
value: extract-payload-devnet
- name: PUBSUB_TOKEN_TRANSFER_DETAILS_TOPIC
value: create-token-transfer-details-devnet
- name: PUBSUB_TOKEN_TRANSFER_DETAILS_SUBSCRIPTION
value: calculate-transfer-data-devnet
ports:
- containerPort: 8080
name: functions
protocol: TCP
readinessProbe:
httpGet:
port: 8080
path: /readyz