2. Write service.json
service.json is the only manifest Service Lasso should need to acquire, configure, start, monitor, and update a service.
Minimum Manifest Contract
Every release-backed service manifest should define:
idnamedescriptionversionenabledartifact.kind: "archive"artifact.source.type: "github-release"artifact.source.repoartifact.source.tagartifact.platforms.<platform>.assetNameartifact.platforms.<platform>.archiveTypeartifact.platforms.<platform>.commandwhen the archive exposes an executable
Use service.json Reference for field-level detail.
Add Runtime Behavior
Managed services usually also need:
portsfor named service portsurlsfor operator-facing linkshealthcheckfor process, HTTP, TCP, file, or variable readinessenvfor service-local runtime valuesglobalenvfor values other services can consumedepend_onfor startup orderinginstall.filesorconfig.fileswhen Service Lasso must write config filessetup.stepswhen the service must run one-shot setup commands after install/config
Provider services usually need:
role: "provider"globalenventries that expose installed tool paths- a cheap probe/version command where useful
- setup steps when the provider must generate local files, install trust material, or prepare a tool cache
- no long-running daemon healthcheck unless the provider truly starts a process
Add Setup Steps When Needed
Use setup.steps for work that must execute locally after install/config but should not be supervised as a long-running daemon. Common examples include generating local certificates, installing service-local Python dependencies, creating a database schema, or loading sample data.
{
"setup": {
"steps": {
"generate-cert": {
"description": "Generate local development certificates.",
"commandline": {
"win32": "mkcert.exe -key-file \"${SERVICE_DATA_PATH}\\mkcert.key\" -cert-file \"${SERVICE_DATA_PATH}\\mkcert.pem\" *.localhost",
"default": "mkcert -key-file \"${SERVICE_DATA_PATH}/mkcert.key\" -cert-file \"${SERVICE_DATA_PATH}/mkcert.pem\" *.localhost"
},
"timeoutSeconds": 60,
"rerun": "ifMissing"
}
}
}
}
Rules:
- No
execservicemeans the setup command runs directly. execserviceruns the setup step through a provider such as@node,@python, or@java.commandline.win32,commandline.linux, andcommandline.darwinoverridecommandline.default.rerun: "ifMissing"is the default bootstrap-friendly behavior.rerun: "manual"is for destructive or sample/demo steps that should only run when explicitly requested.
Pin the Release
The manifest must point to a real release asset:
{
"artifact": {
"kind": "archive",
"source": {
"type": "github-release",
"repo": "service-lasso/lasso-example",
"tag": "2026.4.29-abc1234"
}
}
}
The release tag uses yyyy.m.d-<shortsha>. Artifact names should include the exact upstream service, runtime, framework, or tool version.
Exit Criteria
Move to step 3 only when:
service.jsoncan identify the exact GitHub release asset to download- commands, env, dependencies, ports, and health checks match the planned service shape
- the manifest can be copied into
services/<service-id>/service.jsonwithout needing a second hidden metadata file