cpln stack [SUBCOMMAND]
Commands:
cpln stack deploy deploy from a docker-compose file [aliases: up]
cpln stack manifest Generate a CPLN apply file from a docker-compose file
cpln stack rm Delete objects from a docker-compose file [aliases: down]
Options:
--help Show help [boolean]
stack deploy
deploy from a docker-compose file Refer to the compose deploy guide for more details. Usagecpln stack deploy [OPTIONS]
Reference
Reference
Command options:
--directory, --dir Path to parent folder of docker-compose file
--compose-file Name of the docker-compose file if alternative naming was used
--build Build images [boolean] [default: true]
Context options:
--profile Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
--org Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
--gvc Override the global virtual cloud. The default global virtual cloud can be set in your profile by using the `cpln profile update` command
Options:
--help Show help [boolean]
Example
Example
- Assuming there is a docker compose project in the current directory
cpln stack deploy
Created /org/demo-cpln-organization/secret/demo-secret
Created /org/demo-cpln-organization/gvc/demo-cpln-gvc/identity/demo-identity
Created /org/demo-cpln-organization/gvc/demo-cpln-gvc/volumeset/demo-volume
Created /org/demo-cpln-organization/gvc/demo-cpln-gvc/workload/demo-workload
Created /org/demo-cpln-organization/policy/demo-policy
stack manifest
Generate a CPLN spec file from a compose project. Outputs result to stdout. Note: this command will build and push images to CPLN Usagecpln stack manifest [OPTIONS]
Reference
Reference
Command options:
--directory, --dir Path to parent folder of docker-compose file
--compose-file Name of the docker-compose file if alternative naming was used
--build Build images [boolean] [default: false]
Context options:
--profile Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
--org Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
--gvc Override the global virtual cloud. The default global virtual cloud can be set in your profile by using the `cpln profile update` command
Format options:
--output, -o Set the output format [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
--color Colorize the output [boolean] [default: true]
--ts Timestamp format if the output format is text (e.g., --output=text) [choices: "iso", "local", "age"]
--max Maximum number of records to show. A value less than 1 will return all records. [number] [default: 50]
Options:
--help Show help [boolean]
Example
Example
- Assuming there is a docker compose project in the current directory.
cpln stack manifest
kind: secret
name: demo-secret
description: demo-secret
type: opaque
data:
encoding: plain
payload: demo secret
---
kind: identity
name: demo-identity
description: Identity to allow demo-workload to reveal secret
---
kind: volumeset
name: demo-volume
description: demo-volume
spec:
fileSystemType: ext4
initialCapacity: 10
performanceClass: general-purpose-ssd
---
kind: workload
name: demo-workload
description: demo-workload
spec:
type: standard
containers:
- name: demo-workload-container
cpu: 250m
memory: 53Mi
ports:
- number: 3000
image: demo-image:1.0
volumes:
- path: /secrets/secret.txt
uri: 'cpln://secret/demo-secret'
recoveryPolicy: retain
defaultOptions:
capacityAI: false
identityLink: /org/demo-cpln-organization/gvc/demo-cpln-gvc/identity/demo-identity
firewallConfig:
external:
inboundAllowCIDR:
- 0.0.0.0/0
outboundAllowCIDR:
- 0.0.0.0/0
---
kind: policy
name: demo-policy
description: Policy for workloads to reveal demo-secret
bindings:
- permissions:
- reveal
principalLinks:
- /org/demo-cpln-organization/gvc/demo-cpln-gvc/identity/demo-identity
targetKind: secret
targetLinks:
- /org/demo-cpln-organization/secret/demo-secret
stack rm
Delete all resources generated from a docker compose project. Usagecpln stack rm [OPTIONS]
Reference
Reference
Command options:
--directory, --dir Path to parent folder of docker-compose file
--compose-file Name of the docker-compose file if alternative naming was used
Context options:
--profile Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
--org Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
--gvc Override the global virtual cloud. The default global virtual cloud can be set in your profile by using the `cpln profile update` command
Options:
--help Show help [boolean]
Example
Example
- Assuming there is a docker compose project in the current directory
cpln stack rm
Deleted /org/demo-cpln-organization/secret/demo-secret
Deleted /org/demo-cpln-organization/gvc/demo-cpln-gvc/identity/demo-identity
Deleted /org/demo-cpln-organization/gvc/demo-cpln-gvc/volumeset/demo-volume
Deleted /org/demo-cpln-organization/gvc/demo-cpln-gvc/workload/demo-workload
Deleted /org/demo-cpln-organization/policy/demo-policy