Deploy agent helps Tsuru (API) with the tough task of inspecting, building, and pushing Tsuru app images to the container registry.
The current version (v2) does it in a special way which makes Tsuru agnostic of container runtime APIs. It exposes a well-defined API over a gRPC service that translates all Tsuru operations to Buildkit service - but is not limited to it, e.g. it may be extended to support other build services like Google Cloud Build, kaniko, whatever.
To set up your local development environment for deploy-agent, follow these steps:
-
Install Dependencies
- Ensure you have Docker and Docker Compose (or the Docker Compose plugin) installed.
- Install Go (version 1.24 or higher).
- Install
protoc(Protocol Buffers compiler).
-
Prepare Loopback IP
-
The project uses a reserved IP (
169.196.255.254) on the loopback interface for local registry and Docker communication. -
Use the provided script to set up the loopback IP:
make setup
-
This will:
- Assign the fake IP to your loopback interface.
- Start Buildkit, Docker Registry, and Docker-in-Docker services using Docker Compose.
-
-
Run Tests
-
To run all tests (including integration tests):
make test test/integration
-
-
Cleanup
-
To stop services and remove the fake IP from your loopback interface:
make cleanup
-
-
Other Useful Commands
-
Lint the code:
make lint
-
Build the container image:
make build/container-image
-
The
misc/local-dev.shscript handles loopback IP setup/cleanup and works on both Linux and macOS.