Command Line Interface Experimental
The velyr-pack commands: compose, orbital, launch and version.
velyr-pack compose [-f velyr.toml] [-check] <env>
velyr-pack orbital [-f velyr.toml] <env>
velyr-pack launch [-f velyr.toml]
velyr-pack version| Flag | Commands | Meaning |
|---|---|---|
-f <path> | compose, orbital, launch | Manifest to read. Default velyr.toml in the current directory. |
-check | compose | Fail instead of writing when the stack file is out of date. |
Flags go before the environment name: velyr-pack compose -check production, not
velyr-pack compose production -check (the second form prints the usage and exits 1).
Every command except version loads and validates the whole manifest first, so an
error in one environment fails commands for every environment.
Exit status. 0 on success. 1 on any error, with one line on stderr: velyr-pack: <reason>. The
troubleshooting page lists the messages.
compose#
velyr-pack compose [-f velyr.toml] [-check] <env>Renders the services of <env> and writes them into the env's file, replacing the lines from # velyr:begin
to # velyr:end:
services:
# velyr:begin
# velyr:end
redis: # outside the markers: never touched
image: redis:7-alpinefileis resolved relative to the manifest, not the current directory: with-f deploy/velyr.tomlandfile = "stack.yml", the command writesdeploy/stack.yml.- Only the block changes. Anchors, networks, volumes and hand-written services around it are kept byte for byte; velyr-pack does not parse or reformat the YAML.
- When the rendered block equals the current one, the file is not written (its modification time stays).
- The file must already exist and contain both markers, indented two spaces at the start of a line.
With -check, nothing is written. The command exits 0 when the file is up to date and 1 with
<file> is out of date: run velyr-pack compose <env> when it is not. Run it in CI so the generated block can
only change through velyr.toml:
$ velyr-pack compose -check production
velyr-pack: stack.yml is out of date: run velyr-pack compose production
$ echo $?
1To regenerate every environment:
$ for env in production staging; do velyr-pack compose "$env"; doneSee the rollout policy for what each generated service contains.
orbital#
velyr-pack orbital [-f velyr.toml] <env>Prints one YAML list item per service of <env> that has scale, in manifest order. Services without scale
are skipped, and an env without any prints nothing.
$ velyr-pack orbital production
- shop_worker:list:default:1:4:500
- shop_consumer-orders:kafka:orders:2:12:1000:3The line format and every field are described in velyr.toml: scale. The two-space indent lets you paste the output under a key of the autoscaler's YAML config.
launch#
velyr-pack launch [-f velyr.toml]Prints the CNB launch.toml
process list for the manifest, sorted by process name:
$ velyr-pack launch -f examples/laravel/velyr.toml
[[processes]]
type = "scheduler"
command = ["php", "artisan", "schedule:work"]
[[processes]]
type = "web"
command = ["php", "artisan", "octane:start", "--server=frankenphp", "--host=0.0.0.0", "--port=8000"]
default = true
[[processes]]
type = "worker"
command = ["php", "artisan", "queue:work", "--max-time=3600"]The velyr builders run this at build time, so you only need it to see what an image will declare. A process is
default when it is the only one with health. launch takes no environment: it only reads [processes].
version#
velyr-pack versionPrints the release tag the binary was built from (v0.1.0-alpha.4), or dev for a binary built with
go install or go build.