The mesh-lab container goes with its Dockerfile, build bases, bus credential and state directory. What the image installed — git, make, python, file, iproute2, sudo, npm, go and the incus client — are packages of the machine, and docker and incus are reached through their sockets as the runtime's account. The forge is an operator's setting, which reaches a file and never a bundle's words, so the tools read it from the env-file the mesh already fills, at each call; that is the one code change.
94 lines
1.6 KiB
JSON
94 lines
1.6 KiB
JSON
{
|
|
"module": "lab",
|
|
"version": "1",
|
|
"capabilities": [
|
|
"container-runtime",
|
|
"virtualisation"
|
|
],
|
|
"resources": [
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "."
|
|
},
|
|
{
|
|
"id": "work",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh-lab-runs",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "runtime-env",
|
|
"type": "file",
|
|
"path": "${dir:state}/lab.env",
|
|
"mode": "0600",
|
|
"content": "MESH_LAB_FORGE=${setting:forge}\n"
|
|
},
|
|
{
|
|
"id": "git",
|
|
"type": "package",
|
|
"package": "git"
|
|
},
|
|
{
|
|
"id": "make",
|
|
"type": "package",
|
|
"package": "make"
|
|
},
|
|
{
|
|
"id": "python",
|
|
"type": "package",
|
|
"package": "python"
|
|
},
|
|
{
|
|
"id": "file",
|
|
"type": "package",
|
|
"package": "file"
|
|
},
|
|
{
|
|
"id": "iproute2",
|
|
"type": "package",
|
|
"package": "iproute2"
|
|
},
|
|
{
|
|
"id": "sudo",
|
|
"type": "package",
|
|
"package": "sudo"
|
|
},
|
|
{
|
|
"id": "npm",
|
|
"type": "package",
|
|
"package": "npm"
|
|
},
|
|
{
|
|
"id": "go",
|
|
"type": "package",
|
|
"package": "go"
|
|
},
|
|
{
|
|
"id": "incus",
|
|
"type": "package",
|
|
"package": "incus"
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "code",
|
|
"kind": "bundle",
|
|
"language": "typescript",
|
|
"entrypoints": [
|
|
"tools/index.js"
|
|
],
|
|
"loads": [
|
|
"tools/index.js"
|
|
],
|
|
"env": {
|
|
"MESH_LAB_WORK": "${dir:work}",
|
|
"MESH_LAB_ENV_FILE": "${dir:state}/lab.env"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|