Serve the Virtual Accelerator from a Machine Repository#
A machine repository versions the machine facts the simulator is built from apart from any deployment that drives it. It serves the Virtual Accelerator on its own, so the machine can be checked and run without an agent, and every deployment of the same machine mounts the same commit of it.
What goes where#
example-machine/ the machine repository
profile.yml its VA-only setup
data/facility/ the machine facts
identity.yaml records/ classes.yaml models.yaml decks/
limits.yaml seeds.yaml measurement/ scenarios/ fixes.yaml
imported/<layer>/
my-deployment/ a deployment
profile.yml states machine: vendor/example-machine/data/facility
vendor/example-machine/ the machine repository, mounted
data/facility/
knowledge/ ariel/ benchmarks/
The machine repository holds every machine fact, including its start set: the
scenarios marked start: true, which the simulator activates when it first
comes up. The deployment keeps only what it writes about its own use of the
machine: knowledge/, ariel/ and benchmarks/
(Describe your facility).
The machine’s own profile#
The machine repository’s profile.yml serves the Virtual Accelerator and
records it in a stored archive. It runs no agent, so it needs no provider key:
# The VA-only setup a machine repository carries beside its facility.
#
# It serves the facility's virtual accelerator and records it in a stored
# archive, with no agent services: building and serving it needs no provider
# key. It is an ordinary profile, not a materialized one, so `osprey validate`
# checks it as written. The start set is not stated here: the scenarios marked
# `start: true` in data/facility/scenarios/ are the machine's start set.
extends: hello-world
name: Example Machine
project_name: example-machine
data: data
virtual_accelerator:
port: 5064
va_archiver:
host: localhost
config:
control_system.connector.virtual_accelerator.serving: served
archiver.type: mongodb_archiver
osprey facility import, osprey build and osprey up work there as in
any deployment. Import a new machine there before any deployment mounts it: a
mount needs a machine root that already holds identity.yaml.
Mount it#
In the deployment, add the repository as a submodule (a nested clone works the
same) and name its facility directory in the root profile.yml:
git submodule add <url> vendor/example-machine
machine: vendor/example-machine/data/facility
machine: resolves and is folded into the profile hash like data:
(Build Profiles), so a new machine commit reports the build out of date.
Only the root profile.yml states it; every login drives the same
machine. A machine builds to the same facility file standalone and mounted,
except for a measurement kind only the mounting deployment’s package registers:
standalone, the kind is deferred with a kind-deferred warning and the
deployment judges its block (Register a measurement kind).
With machine: set, osprey facility import writes into the machine root,
except the knowledge index, which goes under the deployment’s
data/facility/knowledge/. Commit the change in the machine repository, then
the new submodule commit in the deployment.
Stops#
osprey facility validate and osprey build stop, naming the path and the
fix, on:
machine-missingThe machine root holds no
identity.yaml: the submodule is not initialised (git submodule update --init), ormachine:names the repository top instead of itsdata/facility.machine-restatedThe deployment’s
data/facility/holds a file outsideknowledge/,ariel/andbenchmarks/. Edit the fact in the machine repository and remove the deployment’s copy.profile-invalidmachine:anddata:overlap; a login file statesmachine:; or the profile statessimulation.default_scenariosbesidestart: truemarks or a mounted machine.simulation.default_scenarios: nullcancels a preset’s value.