Skip to content

Add a Docker Compose v2 deployment path#266

Open
mtelvers wants to merge 1 commit into
ocurrent:masterfrom
mtelvers:compose-v2
Open

Add a Docker Compose v2 deployment path#266
mtelvers wants to merge 1 commit into
ocurrent:masterfrom
mtelvers:compose-v2

Conversation

@mtelvers

Copy link
Copy Markdown
Member

Adds a Docker Compose v2 deployment mechanism and uses it to deploy ocurrent/ocaml-docs-ci#dill to dill.caelum.ci.dev.

The existing compose_cli only takes the compose file as an in-memory string and pins a single image. This adds a path where the docker-compose.yml is read from the build source (the Git checkout), so the target repo owns its own compose file, and multiple built images are pinned by digest into that file before docker compose up.

It's implemented as an embedded plugin building against the released current_docker public API (Raw.Cmd.docker / Raw.Image), so nothing needs upstreaming into ocurrent/ocurrent.

Embed a current_compose_v2 library (plugins/compose_v2/) that runs
'docker compose up' for a deployment, reading docker-compose.yml from the
build source (e.g. a Git checkout) and pinning built images to their
digests. It builds against the released current_docker via its public
Raw.Cmd.docker / Raw.Image API, so nothing needs upstreaming.

Wire it into the cluster deployer:
  - cluster.ml: deploy_info gains an optional compose deployment; after
    build+push+manifest, fetch the source commit and run compose_v2 on the
    target docker context.
  - pipeline.ml: add make_compose_deployment and a deployment for
    ocurrent/ocaml-docs-ci#dill -> dill.caelum.ci.dev.
  - create-config.sh: add the dill.caelum.ci.dev docker context.

main.ml: make --slack optional (no notifications when omitted).
.gitignore: never commit secrets/.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant