Skip to content

CivCloud: Entities

James Lott edited this page Aug 5, 2020 · 2 revisions

CivCloud entities are conceptual intermediary objects which are produced by the Ingest Subsystem and consumed by the Deployment Subsystem.

Project Resources

Status: Implemented, v0.1.0

Project Resources are definitions describing an application deployment in terms of services, volumes, and routes. Project resources are produced from end-user inputs.

Services

property description docker-compose section
name Service name compose service name
ports Open ports provided by Cervice [svc_name].expose
startup Describe whether a service should be started (specify false for jobs) label: civic-cloud.startup
containter_opts Describe options for container image, entrypoint, and args label: civic-cloud.image, [svc_name].entrypoint, [svc_name].command

Volumes

Volumes must specify at least the civic-cloud.size label in order to be created in the cloud platform. Otherwise, the volume is ignored.

property description docker-compose section
name Volume name Compose volume name
import Sources to import volume data from label: civic-cloud.import.[n].src
size Volume size (passed directly to truncate(1)) label: civic-cloud.size
bindings Which containers to bind-mount volumes into gathered from [svc_name].volumes

Routes

property description docker-compose section
host HTTP Host to bind route to label (service): civic-cloud.route.[n]
path HTTP request path to bind route to label (service): civic-cloud.route.[n]
binding Backend service/port targeted by route Inferred based on service route label is attached to

Cloud Sites

Status: Planned, v0.2.0

Cloud Sites are definitions describing a discrete infrastructure zone in terms of an infrastructure backend the zone is built on, projects deployed to the zone, deployment parameters (e.g., service replicas), and local overrides of project resources. Cloud Sites are produced from administrator inputs.

Infra Backend

The only current backend implementation is "Docker". "Kubernetes" probably planned in the future.

Project Deployments

Each Cloud Site can have multiple Project Deployment entities for the same project (e.g., deploying the same project to multiple nodes in the same site)

property description
name Name of the project to deploy
node Name of the node to deploy the project to
svc_counts Number of replicas for each service to run on the node

Project Overrides

Each cloud site can specify project resources which will override the user-provided resources (e.g., specify a different route hostname for a preprod site)

Clone this wiki locally