1.2 Build and change your own
Included from Basic tierassets
After this you can: create a project, an environment and an asset of your own, update a node, and know why deletion is a separate lesson.
Before you start — tick each one:
- Lesson 1.1 — Projects, environments, assets — and hosts (
opschain learn 1.1)
In the GUI: the estate tree shows a node you create the moment the server records it, and its page carries the tab strip — Activity first, Properties and Settings last.
Lesson 1.1 walked an estate somebody else built. Now you build your own:
a project, an environment beneath it and, if you have a template to pin,
an asset. Every create is recorded by the server as an audit event — the
Academy's build-an-estate exercise reads exactly those events and
nodes back, so what you type here is what it checks.
1. Create a project
The path you give nodes create says what you are creating. Start with
the project:
opschain nodes create acme --project-type enterprise --name "ACME Shop"
created project /projects/acme (01a1b3a0-…)
Two things to decide before you type it:
- Standard vs enterprise. A
standardproject (the default) holds environments running changes and workflows against git remotes — the classic model. Anenterpriseproject additionally allows assets beneath it: templated nodes with their own action catalogs, pinned template versions and version history. The type cannot be changed after creation — the only recovery is recreating the project — so pick--project-type enterprisewhen your estate models individual systems as assets. It is a modelling choice per project, unrelated to your licence tier. - Codes are immutable. The code is the last path segment, lowercase
letters, digits and underscores;
--nameis the display name (defaults to the code) and can change later.
2. Create an environment
opschain nodes create acme/environments/dev --name "Development"
created environment /projects/acme/environments/dev (01a1b3a0-…)
The parent must already exist: the environment's path is the project's
path plus /environments/<code>. List what you have so far:
opschain nodes list acme
PATH KIND NAME TEMPLATE MAINTENANCE
/projects/acme project ACME Shop - -
/projects/acme/environments/dev environment Development - -
3. Create an asset
Assets always need --template <code>:<version> — the template is where
an asset's actions come from, and the version must already exist on the
server:
opschain nodes create acme/environments/dev/assets/web --template web-template:1.0.0
created asset /projects/acme/environments/dev/assets/web (01a1b3a0-…)
If you have no template version yet, skip this step and come back after lesson 3.4 creates one — the project and the environment are what the Academy exercise asks for. The server refuses an asset under a standard project by name, telling you exactly what to do:
assets require an Enterprise project: acme is Standard (the type is set at creation and cannot be changed — recreate the project with project_type: enterprise)
Prefer files for repeatable setups: -f node.yaml supplies the same
attributes (name, description, project_type, template_code,
template_version), with flags winning over file values.
4. Update a node
nodes update sends only what you supply — everything else keeps its
stored value:
opschain nodes update acme --description "ACME online shop estate"
updated project /projects/acme
opschain nodes update acme/environments/dev --archived=true
opschain nodes update acme/environments/dev/assets/web --template-version 1.1.0
--archived hides a node from day-to-day work without destroying
anything (nodes list shows it with an (archived) suffix), and
--archived=false brings it back. --template-version repoints an
asset to another version of its own template — the everyday upgrade
move.
5. What about deleting?
Deliberately not here. Deleting a node destroys its whole subtree, so it
lives with the administrative tooling rather than in the everyday nodes
family — lesson 8.3 covers the decommission drill (export → delete →
destroy) as an admin operation, and opschain docs cli/admin-nodes-delete
is the verb.
Check yourself
- Do
opschain nodes listandopschain properties showreturn exactly the two nodes and the one key your scenario named? The Academy'sbuild-an-estateexercise readsapi:projects:createthenapi:nodes:createfor the environment, and the property it asked for on the project. - After
nodes create, what is the full path of the environment you created, and what doesnodes listprint in its KIND column for it? - Verified version:
opschain academyruns thebuild-an-estateexercise against this lesson.
What you learned
nodes create <path>creates whatever the path names; the parent must exist and the last segment becomes the immutable code.- A project's type is chosen at creation and never changes; assets need an enterprise project and a
--template <code>:<version>that exists. nodes updatesends only what you supply; archiving hides a node without destroying anything.- Deletion is an administrative drill in lesson 8.3, not an everyday verb.
Next: lesson 1.3 — Properties and settings: the overlay (opschain learn 1.3), or back to your track (opschain learn).