Deploy From Docker-Compose

Overview

Using the CLI, you can deploy docker-compose resources directly to Control Plane.

Prerequisites

Deploy project

Refer to the stack deploy command for details and examples on how to deploy from a docker-compose project.

Delete project

Refer to the stack rm command for details and examples on how to delete resources generated by a docker-compose project.

Generate Control Plane Spec

You can generate a Control Plane spec without deploying the resources. Refer to the stack manifest command for details and examples on how generate a Control Plane spec from a docker-compose project.

Requirements

  • Service-to-service connections must use the CPLN local syntax for host name.
    • Workload name would be the service name in this case.
    • E.g., if service1 connects to service to using http://service2:8080, this must be replaced with http://service2.{GVC}.cpln.local:8080
  • Docker Compose file must specify all ports to be exposed, even just internally exposed ports.

Translation Notes

  • Compose services become single container workloads
  • Compose networks are used to configure the internal firewall of the workload
  • Compose volumes are converted to volumesets, with 10gb storage
  • Compose secrets, conifgs, and file bind mounts are converted to secrets. Necessary policies and identities will be created.
  • All external outbound requests are enabled by default, unless network_mode is set to none
  • deploy.resource.limit.cpus and deploy.resource.limit.memory will determine cpu and memory allocation respectively.
  • Default cpu and memory (if above not specified) set to 42m and 128Mi respectively
  • Environment variables determined from environment field and/or env_file
  • ports and expose field maps to container ports
    • Note: We only use the container port, not host port. Other services MUST connect to the container port.
  • Capacity AI will be enabled if deploy.resources.reservations < deploy.resources.limits
  • deploy.replicas will determine replica count (min AND max)
  • healthcheck values will map to readiness probe
  • Services with a GPU device will have GPU enabled.
    • Note: cpu and memory values may have to be increased if GPU is enabled.
Copyright © 2024 Control Plane Corporation. All rights reserved. Revision 44e6d472
Contents