Sites and agents
Admin 3 · 4:25
A new agent joins your Weik.io installation when you enrol it, and the agent's capabilities decide which deployments run on it. Until a matching agent is online, a production deploy is refused.
This part of the video couldn't be loaded.
What it covers
- A production deploy refused because no online agent matches it
- Agents, leaf nodes and the outbound connections to the hub
- Writing the agent's bundle with
weikio agent enrol fi-01 - Capabilities on agents and requirements on deployments
- The agent's page in the admin UI, with its capabilities, projects and environments under Configuration
- Taking an agent out of placement with
weikio agent drain, and back withweikio agent undrain
Commands in this video
Terminal
$ weikio deploy sandbox/hello --env production --version 0.1.0
$ weikio agent enrol fi-01 --host linux-compose --capabilities os=linux,region=fi,environment=production --projects sandbox,finance --via public
$ weikio get agents
$ weikio agent drain fi-01
$ weikio agent undrain fi-01Transcript
- 0:01An integration ready for production runs nowhere until an
- 0:05agent runs in production. This video puts one there.
- 0:13This is your Weik.io installation as the earlier admin videos left it.
- 0:19The hub decides where each deployment runs, and its host runs agent dev.
- 0:24Hello runs in devtest on agent dev.
- 0:29The published address is how agents dial out to Weik.io.
- 0:36Production has no online agent, so nothing runs there.
- 0:43weikio deploy sandbox/hello to production at version 0.1.0.
- 0:51No online agent matches it,
- 0:53so nothing is written or started. The fix is to enrol an agent that serves production.
- 1:03An agent needs a host, here Linux with Docker Compose.
- 1:08The drawing calls this host a site.
- 1:10The leaf node, the host's small relay,
- 1:13keeps one outward link to the published address.
- 1:17Nothing connects in, so the host needs no inbound port.
- 1:21The agent to enrol there is fi-01.
- 1:28weikio agent enrol fi-01 registers it in Weik.io and writes its bundle.
- 1:35The flags set the capabilities an admin writes,
- 1:39the agent's projects, and how it reaches Weik.io.
- 1:43Then the folder goes to the agent's host,
- 1:45where the setup script installs and starts it.
- 1:48weikio get agents lists the agents and their state.
- 1:52fi-01 is online, reaching Weik.io from its host.
- 2:01The same agents appear in the admin UI.
- 2:06There the Enrol agent dialog holds those same choices.
- 2:14fi-01's capabilities are os linux, region fi, environment production.
- 2:20Reported machine facts never count as capabilities.
- 2:24A deployment's requirements, plus the agent's projects, open the match:
- 2:29placement fills every matching agent, not one chosen agent.
- 2:34Hello's production deploy is typed again, now that fi-01 serves production.
- 2:40Hello runs on fi-01 within seconds,
- 2:43and the Weik.io CLI reports when all placed agents run it.
- 2:52fi-01's page tells you it is online, what it runs and whether that work is in sync.
- 3:00Under Configuration, the Placement section shows why placement chose fi-01, listing the capabilities it was given,
- 3:09the projects it may run, the environment it serves and hello's production deployment.
- 3:15The reported platform and the agent's key are beside it.
- 3:22weikio agent drain fi-01 takes it out of placement: what runs keeps running.
- 3:29fi-01 stays enrolled and keeps reporting.
- 3:33No other agent takes hello, so moving it would stop it.
- 3:37A deploy of the same version moves it. The undeploy command stops it.
- 3:44weikio agent undrain fi-01 clears the draining and puts fi-01 back in placement.
- 3:56The hub decides placement, and Weik.io keeps the records.
- 4:00Agents reach Weik.io through the leaf node's
- 4:02one outward link to the published address.
- 4:06Hello runs in devtest on dev, and its production deployment on fi-01.
- 4:11An agent is given an environment, and that choice decides which deployments it runs.
Next in this track
Admin 4 · 3:10 Watching the whole installation Watched