Skip to content

Commit 0b74f0d

Browse files
committed
chore: support pegboard container runner inside docker compose (#2611)
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->
1 parent 91fd539 commit 0b74f0d

File tree

13 files changed

+729
-62
lines changed

13 files changed

+729
-62
lines changed

.github/workflows/release.yaml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -248,34 +248,6 @@ jobs:
248248
secret-files: |
249249
netrc=${{ runner.temp }}/netrc
250250
251-
- name: Build & Push (rivetgg/client:isolate-v8-runner)
252-
uses: docker/build-push-action@v4
253-
with:
254-
context: .
255-
push: true
256-
tags: rivetgg/rivet-client:isolate-v8-runner-${{ steps.vars.outputs.sha_short }}${{ matrix.arch_suffix }}
257-
file: docker/universal/Dockerfile
258-
target: isolate-v8-runner
259-
platforms: ${{ matrix.platform }}
260-
secrets: |
261-
fontawesome_package_token=${{ secrets.FONTAWESOME_PACKAGE_TOKEN }}
262-
secret-files: |
263-
netrc=${{ runner.temp }}/netrc
264-
265-
- name: Build & Push (rivetgg/client:container-runner)
266-
uses: docker/build-push-action@v4
267-
with:
268-
context: .
269-
push: true
270-
tags: rivetgg/rivet-client:container-runner-${{ steps.vars.outputs.sha_short }}${{ matrix.arch_suffix }}
271-
file: docker/universal/Dockerfile
272-
target: container-runner
273-
platforms: ${{ matrix.platform }}
274-
secrets: |
275-
fontawesome_package_token=${{ secrets.FONTAWESOME_PACKAGE_TOKEN }}
276-
secret-files: |
277-
netrc=${{ runner.temp }}/netrc
278-
279251
- name: Build & Push (rivetgg/rivet:monolith)
280252
uses: docker/build-push-action@v4
281253
with:

Cargo.lock

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker/dev-full/docker-compose.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services:
1313
- RIVET_OTEL_ENABLED=1
1414
- RIVET_OTEL_SAMPLER_RATIO=1
1515
- RIVET_OTEL_ENDPOINT=http://otel-collector:4317
16-
# - RUST_LOG=debug,hyper=info
16+
- RUST_LOG=debug,hyper=info
1717
stop_grace_period: 0s
1818
ports:
1919
# API
@@ -44,6 +44,8 @@ services:
4444
interval: 2s
4545
timeout: 10s
4646
retries: 10
47+
# Initial SQL migrations sometimes take time to run
48+
start_period: 30s
4749

4850
rivet-edge-server:
4951
build:
@@ -60,7 +62,7 @@ services:
6062
- RIVET_OTEL_SAMPLER_RATIO=1
6163
- RIVET_SERVICE_NAME=rivet-edge
6264
- RIVET_OTEL_ENDPOINT=http://otel-collector:4317
63-
# - RUST_LOG=debug,hyper=info
65+
- RUST_LOG=debug,hyper=info
6466
stop_grace_period: 0s
6567
ports:
6668
# API
@@ -138,7 +140,7 @@ services:
138140
- RIVET_OTEL_SAMPLER_RATIO=1
139141
- RIVET_SERVICE_NAME=rivet-guard
140142
- RIVET_OTEL_ENDPOINT=http://otel-collector:4317
141-
# - RUST_LOG=debug,hyper=info
143+
- RUST_LOG=debug,hyper=info
142144
stop_grace_period: 0s
143145
ports:
144146
# HTTP
@@ -198,22 +200,27 @@ services:
198200
platform: linux/amd64
199201
restart: unless-stopped
200202
command: -c /etc/rivet-client/config.jsonc
203+
# entrypoint: entrypoint.sh
204+
# Required for runc & cnitool to operate
205+
privileged: true
201206
environment:
202207
- RUST_BACKTRACE=1
203208
- RUST_LOG_ANSI_COLOR=1
204209
- RIVET_OTEL_ENABLED=1
205210
- RIVET_OTEL_SAMPLER_RATIO=1
206211
- RIVET_SERVICE_NAME=rivet-client
207212
- RIVET_OTEL_ENDPOINT=http://otel-collector:4317
208-
# - RUST_LOG=debug,hyper=info
213+
- RUST_LOG=debug,hyper=info
209214
stop_grace_period: 0s
210215
depends_on:
211216
rivet-edge-server:
212217
condition: service_healthy
213218
foundationdb:
214219
condition: service_healthy
215220
volumes:
221+
# - ./rivet-client/entrypoint.sh:/usr/local/bin/entrypoint.sh:ro
216222
- ./rivet-client/config.jsonc:/etc/rivet-client/config.jsonc:ro
223+
- ./rivet-client/rivet-actor.conflist:/opt/cni/config/rivet-actor.conflist:ro
217224
- client-data:/var/lib/rivet-client
218225
ports:
219226
# Enable host networking for actors

docker/dev-full/rivet-client/config.jsonc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
22
"client": {
33
"runner": {
4-
"flavor": "isolate",
5-
// Enables running in non-privileged Docker containers
6-
"use_mounts": false
4+
"flavor": "container",
5+
"use_resource_constraints": false
76
},
87
"cluster": {
98
// This is safe to hardcode
@@ -15,6 +14,7 @@
1514
]
1615
}
1716
},
17+
// TODO: Compare this to network in cluster config
1818
"network": {
1919
"bind_ip": "127.0.0.1",
2020
// Point to DNS name inside Docker container

0 commit comments

Comments
 (0)