Command Line Interface
Deploy From Docker-Compose
Overview
Using the CLI, you can deploy docker-compose resources directly to Control Plane.
Prerequisites
- Permissions to push an image
- Permissions to create a workload, volumeset, secret, identity
- Install the CLI
- A docker-compose project
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 withhttp://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 tonone
deploy.resource.limit.cpus
anddeploy.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/orenv_file
ports
andexpose
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.