Split act-runner into its own pod.
This commit is contained in:
parent
dcc6c62209
commit
ed2ae5f47b
@ -45,4 +45,4 @@ container:
|
||||
# Whether to use privileged mode or not when launching task containers (privileged mode is required for Docker-in-Docker).
|
||||
privileged: true
|
||||
# And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway).
|
||||
options: --add-host=gitea.local:host-gateway --volume "/var/lib/docker"
|
||||
options: --add-host=gitea.local:host-gateway --volume "/var/lib/docker" --volume "/data:/data:ro"
|
23
act-runner/docker-compose.yml
Normal file
23
act-runner/docker-compose.yml
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
services:
|
||||
runner:
|
||||
image: cerc/act-runner:local
|
||||
restart: always
|
||||
environment:
|
||||
- CONFIG_FILE=/config/act-runner-config.yml
|
||||
# Note: eMdEwIzSo87nBh0UFWZlbp308j6TNWr3WhWxQqIc is a static token we use for convenience in stand-alone deployments. Not secure, obviously.
|
||||
- GITEA_RUNNER_REGISTRATION_TOKEN=${CERC_GITEA_RUNNER_REGISTRATION_TOKEN:-eMdEwIzSo87nBh0UFWZlbp308j6TNWr3WhWxQqIc}
|
||||
- GITEA_INSTANCE_URL=${CERC_GITEA_INSTANCE_URL:-http://gitea.local:3000}
|
||||
- GITEA_RUNNER_LABELS=${CERC_GITEA_RUNNER_LABELS:-ubuntu-latest:docker://cerc/act-runner-task-executor:local,ubuntu-22.04:docker://cerc/act-runner-task-executor:local}
|
||||
extra_hosts:
|
||||
- "gitea.local:host-gateway"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- act-runner-data:/data
|
||||
- act-runner-config:/config:ro
|
||||
ports:
|
||||
- 8088
|
||||
|
||||
volumes:
|
||||
act-runner-data:
|
||||
act-runner-config:
|
4
act-runner/post_start.sh
Executable file
4
act-runner/post_start.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
if [[ -n "$CERC_SCRIPT_DEBUG" ]]; then
|
||||
set -x
|
||||
fi
|
4
act-runner/pre_start.sh
Executable file
4
act-runner/pre_start.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
if [[ -n "$CERC_SCRIPT_DEBUG" ]]; then
|
||||
set -x
|
||||
fi
|
@ -21,5 +21,6 @@ def create(context, extra_args):
|
||||
# Our goal here is just to copy the config file for act
|
||||
deployment_config_dir = context.deployment_dir.joinpath("data",
|
||||
"act-runner-config")
|
||||
source_config_file = Path(context.command_context.cluster_context.compose_files[0]).parent.joinpath("config", "act-runner-config.yml")
|
||||
compose_file = [f for f in context.command_context.cluster_context.compose_files if "act-runner" in f][0]
|
||||
source_config_file = Path(compose_file).parent.joinpath("config", "act-runner-config.yml")
|
||||
copy(source_config_file, deployment_config_dir)
|
@ -29,4 +29,4 @@ Details on how to setup remote debugging of the gitea server inside its containe
|
||||
#### Action Runners
|
||||
|
||||
A Dockerized action runner is deployed by default for the labels `ubuntu-latest` and `ubuntu-22.04`. Details on deploying
|
||||
additional runners can be found [here](act-runner.md).
|
||||
additional runners can be found [here](../act-runner/act-runner.md).
|
||||
|
@ -42,28 +42,6 @@ services:
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
|
||||
runner:
|
||||
image: cerc/act-runner:local
|
||||
restart: always
|
||||
environment:
|
||||
# Note: eMdEwIzSo87nBh0UFWZlbp308j6TNWr3WhWxQqIc is a static token we use for convenience in stand-alone deployments. Not secure, obviously.
|
||||
- GITEA_RUNNER_REGISTRATION_TOKEN=${CERC_GITEA_RUNNER_REGISTRATION_TOKEN:-eMdEwIzSo87nBh0UFWZlbp308j6TNWr3WhWxQqIc}
|
||||
- GITEA_INSTANCE_URL=http://gitea.local:3000
|
||||
- GITEA_RUNNER_LABELS=ubuntu-latest:docker://cerc/act-runner-task-executor:local,ubuntu-22.04:docker://cerc/act-runner-task-executor:local
|
||||
- CONFIG_FILE=/config/act-runner-config.yml
|
||||
extra_hosts:
|
||||
- "gitea.local:host-gateway"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- act-runner-data:/data
|
||||
- act-runner-config:/config:ro
|
||||
ports:
|
||||
- 8088:8088
|
||||
|
||||
|
||||
volumes:
|
||||
gitea-data:
|
||||
postgres-data:
|
||||
act-runner-data:
|
||||
act-runner-config:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user