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 --name "ACME Shop"
created project /projects/acme (01a1b3a0-…)
Two things to know before you type it:
- Every project holds everything. Environments running changes and
workflows against git remotes, assets (templated nodes with their
own action catalogs, pinned template versions and version history)
directly under the project or under its environments, and entities.
There is no project type to choose; whether you may create assets is
decided by your licence's
assetsfeature and limit, not by the project. (Older scripts that still pass--project-typekeep working — the flag is accepted, noted on stderr and ignored.) - 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. If your licence does not carry the assets
feature, or its asset limit is reached, the server refuses by name and
tells you exactly what to do, for example:
assets require an enterprise licence with the "assets" feature — the basic licence does not include it (opschain admin licence apply)
Prefer files for repeatable setups: -f node.yaml supplies the same
attributes (name, description, 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.- Every project holds environments, assets and entities; an asset needs a
--template <code>:<version>that exists and a licence carrying theassetsfeature. 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).