Skip to content

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.

Terminal window
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.

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:

Terminal window
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: 5

A 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:

Terminal window
monoceros upgrade acme

If ~/.monoceros/templates is your team’s repository, commit both files. Your colleagues get the new version with their next pull.

  • Keeps the current file unchanged. rabbitmq.yml is copied byte for byte to rabbitmq@<n>.yml, where n is its version.
  • Raises the version in the current file. A file without a version: line is version 1 and gets version: 2 under category:. Nothing else in the file changes, comments included.
  • Never overwrites a kept version. If rabbitmq@<n>.yml already exists, the command stops and changes nothing.
  • Own services only. A shipped service like postgres gets its versions with the CLI.