platform challenge group scaffolds new challenges and manages their lifecycle on a running master. Its group help is Manage and scaffold challenges (base/src/platform_network/cli_app/main.py:61).
There are two kinds of command here:
createruns locally and only writes files — no master required.register,activate,deactivate,pull,restartcall the master admin API and require a configured admin token.
platform challenge create
Scaffolds a new challenge repository from the built-in template (base/src/platform_network/cli_app/main.py:857-870).
Admin lifecycle commands
Each of these posts to the master admin API atmaster.registry_url with an X-Admin-Token header (base/src/platform_network/cli_app/main.py:99-100). They share the --config option, defaulting to config/master.example.yaml.
platform challenge register — register a challenge record
platform challenge register — register a challenge record
Creates a challenge record on the master via
POST /v1/admin/challenges (base/src/platform_network/cli_app/main.py:881-891). The record version is taken from the image tag, or latest when the image has no tag (base/src/platform_network/cli_app/main.py:888).platform challenge activate / deactivate
platform challenge activate / deactivate
Toggle a registered challenge on or off.
activate posts /v1/admin/challenges/{slug}/activate (base/src/platform_network/cli_app/main.py:894-898); deactivate posts /v1/admin/challenges/{slug}/deactivate (base/src/platform_network/cli_app/main.py:901-905).platform challenge pull — re-pull the challenge image
platform challenge pull — re-pull the challenge image
Triggers the master to pull the challenge’s image via
POST /v1/admin/challenges/{slug}/pull (base/src/platform_network/cli_app/main.py:908-912).platform challenge restart — restart a running challenge
platform challenge restart — restart a running challenge
Restarts the challenge runtime via
POST /v1/admin/challenges/{slug}/restart (base/src/platform_network/cli_app/main.py:915-919).Related
Challenge integration
How a challenge plugs into the master and registry.
Create a challenge
The end-to-end guide to scaffolding and shipping a challenge.
Admin API
The admin routes these lifecycle commands call.