monoceros create-version
Change one of your own services without changing the workbenches already built
from it. They keep the version they were made from, briefing included, until
you move them forward with
monoceros upgrade. Run this command
before you edit the file.
monoceros create-version <service><service> is the file name of one of your own services in
~/.monoceros/templates/services/, without .yml. How you keep a service
there is on the services page.
Example
Section titled “Example”Your team keeps RabbitMQ as an own service in
~/.monoceros/templates/services/rabbitmq.yml, and the workbench acme was
built from it. (acme is a sample workbench name; use your own.) You want
RabbitMQ’s healthcheck to run every 5 seconds instead of every 10, and acme
should keep running as it is until you decide to move it.
Start a new version first:
monoceros create-version rabbitmq✔ Kept version 1 as ~/.monoceros/templates/services/rabbitmq@1.yml✔ ~/.monoceros/templates/services/rabbitmq.yml is now version 2: make your change there.ℹ In a team repository, commit both files there.The file as it was is now rabbitmq@1.yml, and rabbitmq.yml says
version: 2. Make your change in rabbitmq.yml:
healthcheck: test: [CMD, rabbitmq-diagnostics, -q, ping] interval: 5s retries: 5A workbench you create from now on gets version 2. acme stays on version 1,
which its yml records as ref: rabbitmq@1, until you move it forward. That
merges version 2 in and keeps anything you changed in acme.yml yourself:
monoceros upgrade acmeIf ~/.monoceros/templates is your team’s repository, commit both files. Your
colleagues get the new version with their next pull.
Behavior
Section titled “Behavior”- Keeps the current file unchanged.
rabbitmq.ymlis copied byte for byte torabbitmq@<n>.yml, where n is its version. - Raises the version in the current file. A file without a
version:line is version 1 and getsversion: 2undercategory:. Nothing else in the file changes, comments included. - Never overwrites a kept version. If
rabbitmq@<n>.ymlalready exists, the command stops and changes nothing. - Own services only. A shipped service like
postgresgets its versions with the CLI.
See also
Section titled “See also”- Keep your own services - the descriptor format and what a new version does.
monoceros upgrade- moves a workbench to the new version and keeps your edits.- Service descriptor - every field of the file.
- Reuse and share your setup - change a service you keep, alone or in the team’s repository.