Docs
How-to guides

Edit a design

Change a design in the catalogue and plan its deployments again.

To change what a deployment builds, you change its design in the catalogue and plan the deployment again. The tutorial's Change the design walks through removing a server from a rack and following the deletes to NetBox.

  1. Open the design in the catalogue and select Edit.
  2. Replace the YAML, or upload the changed file. Give the new version a label, such as 1.1.0, or leave the label empty and the catalogue knows the version by its content hash.
  3. Select Save.
  4. Go to Deployments. Each deployment of the design says it has changed since it was applied. Open each one and select Redeploy: the deploy page opens with the variables it was applied with, at the version it applied. Select Plan the current version, then Plan.

The plan brings NetBox in line with the current version. Objects the design no longer describes, and the deployment created, are deleted; what a delete also deletes or changes is listed under it, and applying asks you to accept anything that reaches objects the plan doesn't list as its own changes. Other deployments of the same design are untouched until you redeploy them too, and each says so until you do.

Versions

The catalogue keeps every version a design has had. A version is its content: paste the same YAML again and it's the same version, whatever label you give it, and a label names one content, so relabelling 1.0.0 onto different content is refused. Pasting an earlier version's YAML makes that version current again. The design's Versions tab lists them, newest first, with who added each and which deployments applied it, and Deploy this version on any of them opens the deploy page at that version, which is how a deployment is moved back to an earlier one. From the command line, nbd catalogue versions <name> lists them, and nbd catalogue push --update saves a file as a new version.

The design's name is how other designs refer to it in nbd: references, and how its deployments find it, so Edit doesn't change it. To put a design under another name, select save it as a new design in the Edit dialog: the Add design dialog opens with the same YAML, and the original stays until you delete it.

Tags

Tags are how the catalogue is browsed: the search box on the Designs page suggests them with how many designs carry each, and region/emea reads as a facet and its value. A tag is kept in one form, trimmed and lower-case, so Region/EMEA and region/emea are the same tag, and a tag with an empty part between slashes, such as region/, is refused.

A design's tags are changed in the Edit dialog, or from the command line with nbd catalogue push --tag region/emea --tag tier/prod --update, which replaces them; a push without --tag leaves them as they are.

To fix a tag on every design at once, such as regoin/emea typed once by mistake, rename it: in the search box, the pencil beside the tag opens a dialog that says how many designs change, or from the command line, nbd catalogue rename-tag regoin/emea region/emea. Renaming onto a tag that already exists merges the two, and a design carrying both ends up with the one. The search box shows the new name on the next load. Renaming a tag needs the same permission as adding a design.

Deleting a design

Deleting a design leaves its deployments, and everything they own, where they are, and the Deployments page says the design is gone. The delete names those deployments first and goes ahead only once you confirm; nbd catalogue remove lists them and needs --force. Those deployments can still be torn down or released; to change one again, add a design back under the same name. A design that other designs are built from can't be deleted: Delete says so and names them, and the design's Used by tab lists them at any time.

On this page