Skip to content

Commit 6db845d

Browse files
committed
Add barbecue nodes to CI
1 parent 6041ecb commit 6db845d

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/ci.yaml

+61
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,14 @@ jobs:
375375
env:
376376
MIX_ENV: dev
377377
services:
378+
rabbitmq:
379+
image: rabbitmq:3.10.5-management-alpine
380+
ports:
381+
- 5673:5672
382+
- 15673:15672
383+
env:
384+
RABBITMQ_DEFAULT_USER: trento
385+
RABBITMQ_DEFAULT_PASS: trento
378386
postgres:
379387
image: postgres
380388
env:
@@ -392,7 +400,60 @@ jobs:
392400
image: grafana/grafana:8.3.5
393401
ports:
394402
- 3000:3000
403+
hana_node01:
404+
image: ghcr.io/trento-project/barbecue-hana_node01:latest
405+
options: >-
406+
--add-host=host.docker.internal:host-gateway
407+
--hostname=hana_node01
408+
env:
409+
TRENTO_API_KEY: some-random-string
410+
TRENTO_FACTS_SERVICE_URL: amqp://trento:[email protected]:5673
411+
TRENTO_SERVER_URL: http://host.docker.internal:4000
412+
hana_node02:
413+
image: ghcr.io/trento-project/barbecue-hana_node02:latest
414+
options: >-
415+
--add-host=host.docker.internal:host-gateway
416+
--hostname=hana_node02
417+
env:
418+
TRENTO_API_KEY: some-random-string
419+
TRENTO_FACTS_SERVICE_URL: amqp://trento:[email protected]:5673
420+
TRENTO_SERVER_URL: http://host.docker.internal:4000
395421
steps:
422+
- name: Create Wanda's database
423+
run: docker exec ${{ job.services.postgres.id }} psql -U postgres -c "CREATE DATABASE wanda"
424+
- name: Run Wanda init task
425+
run: |
426+
docker run \
427+
-e DATABASE_URL=$DATABASE_URL \
428+
-e AMQP_URL=$AMQP_URL \
429+
-e SECRET_KEY_BASE=$SECRET_KEY_BASE \
430+
-e CORS_ENABLED=$CORS_ENABLED \
431+
-e CORS_ORIGIN=$CORS_ORIGIN \
432+
-e ACCESS_TOKEN_ENC_SECRET=$ACCESS_TOKEN_ENC_SECRET \
433+
-e REFRESH_TOKEN_ENC_SECRET=$REFRESH_TOKEN_ENC_SECRET \
434+
-p 4001:4000 \
435+
--add-host=host.docker.internal:host-gateway \
436+
ghcr.io/trento-project/trento-wanda:rolling eval "Wanda.Release.init()"
437+
docker run \
438+
-e DATABASE_URL=$DATABASE_URL \
439+
-e AMQP_URL=$AMQP_URL \
440+
-e SECRET_KEY_BASE=$SECRET_KEY_BASE \
441+
-e CORS_ENABLED=$CORS_ENABLED \
442+
-e CORS_ORIGIN=$CORS_ORIGIN \
443+
-e ACCESS_TOKEN_ENC_SECRET=$ACCESS_TOKEN_ENC_SECRET \
444+
-e REFRESH_TOKEN_ENC_SECRET=$REFRESH_TOKEN_ENC_SECRET \
445+
-p 4001:4000 \
446+
--add-host=host.docker.internal:host-gateway \
447+
--detach \
448+
ghcr.io/trento-project/trento-wanda:rolling start
449+
env:
450+
DATABASE_URL: ecto://postgres:[email protected]:5433/wanda
451+
AMQP_URL: amqp://trento:[email protected]:5673
452+
SECRET_KEY_BASE: s2ZdE+3+ke1USHEJ5O45KT364KiXPYaB9cJPdH3p60t8yT0nkLexLBNw8TFSzC7k
453+
CORS_ENABLED: "true"
454+
CORS_ORIGIN: http://localhost:4000
455+
ACCESS_TOKEN_ENC_SECRET: s2ZdE+3+ke1USHEJ5O45KT364KiXPYaB9cJPdH3p60t8yT0nkLexLBNw8TFSzC7k
456+
REFRESH_TOKEN_ENC_SECRET: L0wvcZh3ACQpibVhV/nh5jd/NaZWL4ijZxTxGJMGpacuXIBc4In3YCwXeVM98ygp
396457
- name: Cancel Previous Runs
397458
uses: styfle/[email protected]
398459
with:

0 commit comments

Comments
 (0)