-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose_deploy.yaml
180 lines (179 loc) · 7.68 KB
/
compose_deploy.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
177
178
179
180
name: aruna
volumes:
keycloak:
driver: local
database:
driver: local
proxy_config_01:
driver: local
proxy_config_02:
driver: local
gateway_config:
driver: local
services:
init:
image: busybox:stable-musl
volumes:
- keycloak:/keycloak
- database:/database
- proxy_config_01:/proxy_config_01
- proxy_config_02:/proxy_config_02
- gateway_config:/gateway_config
command: >
sh -c "wget -O /keycloak/realm.json https://raw.githubusercontent.com/ArunaStorage/aruna/main/components/server/tests/common/keycloak/realm.json &&
wget -O /database/initial_data.sql https://raw.githubusercontent.com/ArunaStorage/aruna/main/components/server/tests/common/initial_data.sql &&
sed -i -e 's#http://localhost:50052#http://proxy_01:50052#g' /database/initial_data.sql &&
sed -i -e 's#http://localhost:50055#http://proxy_02:50055#g' /database/initial_data.sql &&
sed -i -e 's#http://localhost:1998/realms/test/protocol/openid-connect/certs#http://keycloak:8080/realms/test/protocol/openid-connect/certs#g' /database/initial_data.sql &&
wget -O /database/server_schema.sql https://raw.githubusercontent.com/ArunaStorage/aruna/main/components/server/src/database/schema.sql &&
wget -O /database/proxy_schema.sql https://raw.githubusercontent.com/ArunaStorage/aruna/main/components/data_proxy/src/database/schema.sql &&
wget -O /proxy_config_01/config.toml https://raw.githubusercontent.com/ArunaStorage/aruna/main/components/data_proxy/config.toml &&
wget -O /gateway_config/config.yaml https://raw.githubusercontent.com/ArunaStorage/grpc-gateway/main/config/config-local.yaml &&
sed -i -e 's#127.0.0.1#server#g' /gateway_config/config.yaml &&
wget -O /proxy_config_02/config.toml https://raw.githubusercontent.com/ArunaStorage/aruna/main/components/data_proxy/config.toml &&
sed -i -e 's#./src/database/schema.sql#/run/schema.sql#g' /proxy_config_01/config.toml &&
sed -i -e '23s#proxy#proxy_01#' /proxy_config_01/config.toml &&
sed -i -e 's#./src/database/schema.sql#/run/schema.sql#g' /proxy_config_02/config.toml &&
sed -i -e 's#01H81W0ZMB54YEP5711Q2BK46V#01HG8P9FFW12TZ1YWX32A1KT28#g' /proxy_config_02/config.toml &&
sed -i -e 's#1337#1338#g' /proxy_config_02/config.toml &&
sed -i -e 's#0.0.0.0:50052#0.0.0.0:50055#g' /proxy_config_02/config.toml
sed -i -e '23s#proxy#proxy_02#' /proxy_config_02/config.toml &&
sed -i -e 's#MC4CAQAwBQYDK2VwBCIEIM/FI+bYw+auSKGyGqeISRIEjofvZV/lbK7QL1wkuCey#MC4CAQAwBQYDK2VwBCIEIBWCkwQIGKaEgpLVIcT9V1za1bqZBwcrcUad8ex9iVxV#g' /proxy_config_02/config.toml &&
sed -i -e 's#MCowBQYDK2VwAyEAnouQBh4GHPCD/k85VIzPyCdOijVg2qlzt2TELwTMy4c=#MCowBQYDK2VwAyEAN77yqfv4hAdHTxrG576xqOgpqS8LuZUSjYXyJiUwfws=#g' /proxy_config_02/config.toml &&
sed -i -e 's#http://localhost:50051#http://server:50051#g' /proxy_config_01/config.toml &&
sed -i -e 's#http://localhost:50051#http://server:50051#g' /proxy_config_02/config.toml &&
sed -i -e '20s#localhost#yugabyte#' /proxy_config_01/config.toml &&
sed -i -e '20s#localhost#yugabyte#' /proxy_config_02/config.toml &&
sed -i -e 's#force_path_style = false#force_path_style = true#g' /proxy_config_01/config.toml &&
sed -i -e 's#force_path_style = false#force_path_style = true#g' /proxy_config_02/config.toml &&
sed -i -e 's#http://localhost:9000#http://minio:9000#g' /proxy_config_01/config.toml &&
sed -i -e 's#http://localhost:9000#http://minio:9000#g' /proxy_config_02/config.toml &&
cat /proxy_config_02/config.toml"
nats:
image: nats:latest
ports:
- 4222:4222
- 8222:8222
command: --http_port 8222 --js
meili:
image: getmeili/meilisearch:latest
ports:
- 7700:7700
environment:
MEILI_MASTER_KEY: "MASTER_KEY"
yugabyte:
image: yugabytedb/yugabyte:2.19.2.0-b121
hostname: yugabyte
ports:
- 5433:5433
command: 'bin/yugabyted start --tserver_flags="enable_wait_queues=true,enable_deadlock_detection=true,yb_enable_read_committed_isolation=true" --daemon=false'
healthcheck:
test: ["CMD-SHELL", 'ysqlsh -h yugabyte -p 5433 --command="\l"']
interval: 30s
timeout: 10s
retries: 5
start_period: 20s
start_interval: 5s
keycloak:
image: quay.io/keycloak/keycloak:21.0.2
depends_on:
init:
condition: service_completed_successfully
ports:
- 1998:8080
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
volumes:
- keycloak:/opt/keycloak/data/import/
command: "start-dev --import-realm"
minio:
image: minio/minio
ports:
- 9000:9000
- 9001:9001
environment:
MINIO_DOMAIN: minio:9000
command: "server /data --console-address ':9001'"
load_database:
depends_on:
yugabyte:
condition: service_healthy
init:
condition: service_completed_successfully
restart: on-failure
image: postgres:alpine3.18
volumes:
- database:/data/init/
command: >
sh -c "psql 'postgres://yugabyte@yugabyte:5433' -c 'DROP DATABASE IF EXISTS test' &&
psql 'postgres://yugabyte@yugabyte:5433' -c 'DROP DATABASE IF EXISTS proxy_01' &&
psql 'postgres://yugabyte@yugabyte:5433' -c 'DROP DATABASE IF EXISTS proxy_02' &&
psql 'postgres://yugabyte@yugabyte:5433' -c 'CREATE DATABASE test' &&
psql 'postgres://yugabyte@yugabyte:5433' -c 'CREATE DATABASE proxy_01' &&
psql 'postgres://yugabyte@yugabyte:5433' -c 'CREATE DATABASE proxy_02' &&
psql 'postgres://yugabyte@yugabyte:5433/test' < /data/init/server_schema.sql &&
psql 'postgres://yugabyte@yugabyte:5433/proxy_01' < /data/init/proxy_schema.sql &&
psql 'postgres://yugabyte@yugabyte:5433/proxy_02' < /data/init/proxy_schema.sql &&
psql 'postgres://yugabyte@yugabyte:5433/test' < /data/init/initial_data.sql"
server:
image: harbor.computational.bio.uni-giessen.de/aruna/aruna-server:2.0.1
depends_on:
load_database:
condition: service_completed_successfully
ports:
- 50051:50051
environment:
DATABASE_SCHEMA: /run/schema.sql
DATABASE_HOST: yugabyte
MEILISEARCH_HOST: http://meili:7700
NATS_HOST: nats:4222
proxy_01:
image: harbor.computational.bio.uni-giessen.de/aruna/arunadataproxy:2.0.1
depends_on:
load_database:
condition: service_completed_successfully
server:
condition: service_started
ports:
- 50052:50052
- 1337:1337
environment:
CONFIG: /run/config/config.toml
volumes:
- proxy_config_01:/run/config/
proxy_02:
image: harbor.computational.bio.uni-giessen.de/aruna/arunadataproxy:2.0.1
depends_on:
load_database:
condition: service_completed_successfully
server:
condition: service_started
ports:
- 50055:50055
- 1338:1338
environment:
CONFIG: /run/config/config.toml
volumes:
- proxy_config_02:/run/config/
web:
network_mode: host
image: harbor.computational.bio.uni-giessen.de/aruna/arunaweb:latest
depends_on:
server:
condition: service_started
proxy_01:
condition: service_started
proxy_02:
condition: service_started
ports:
- 3000:3000
gateway:
image: harbor.computational.bio.uni-giessen.de/aruna/aruna-rest-gateway:2.0.0
depends_on:
server:
condition: service_started
ports:
- 8080:8080
volumes:
- gateway_config:/config/