spacelift-io / local-worker-pool

Run a worker pool locally with Docker Compose

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Local Worker Pool

Run a worker pool (and VCS Agent, if applicable) locally with Docker Compose.

Requirements

The Docker engine and Docker Compose must be installed on the local machine for this to work.

The easiest way to achieve install those tools is probably to install Docker Desktop.

Installation

  • Copy the .worker.env.example file into .worker.env.
  • Edit the .worker.env file to set the Spacelift worker pool token and your certificate private key as described in the documentation.

Allowing the worker pool to resolve private dns

  • Copy the .docker-daemon.json.example file into .docker-daemon.json.
  • Edit the .docker-daemon.json file to configure the private DNS IPs.
  • Uncomment the services.dind_sidecar.volumes section in docker-compose.yml to mount the config file to the correct path.

In case of running a selfhosted VCS Agent Pool, add this additional configuration:

  • Copy the .vcs.env.example file into .vcs.env.
  • Edit the .vcs.env file to set the Spacelift VCS Agent Pool token as described in the documentation.
  • Uncomment the services.vcs section in docker-compose-yml to create the VCS Agent Pool container

Usage

  • Start the worker pool in the background: docker compose up -d.
  • (optional) Watch the logs: docker compose logs -f.
  • Delete the worker pool Docker containers: docker compose down -v.

About

Run a worker pool locally with Docker Compose