Public sandbox
The public sandbox runs this design on a hosted Infrahub instance that visitors open in a browser. Visitors do not install anything, run commands, or sign in as the administrator. The sandbox pipeline prepares the instance with the sandbox-setup task and resets it every night.
The local guides use http://localhost addresses and uv run invoke commands. In the sandbox, use the public addresses listed on the sandbox page and the browser steps below instead.
What the sandbox includes​
- Infrahub, with the schemas, menus, seed fabrics, repository, check definition, and generator triggers already loaded.
- Service Catalog, the Streamlit portal used by the day-2 guides.
The sandbox does not include:
- Semaphore. Its Ansible deployment, ANTA validation and ContainerLab tasks need devices that the sandbox cannot reach. Use a local stack for Run ANTA after deployment and ContainerLab.
- CloudVision validation. No seed fabric has
cloudvision_managedset, so thecv-config-validationcheck skips every fabric. - The Prefect task manager. It is not public. To follow generator runs, open Actions → Tasks in Infrahub.
Visitor walkthrough​
Sign in to Infrahub with the visitor account shown on the sandbox page. Merging into main can need a different visitor account from the one that creates branches. The sandbox page states which account can merge.
- Create a branch: open the branch selector in the top bar, select + Create branch and name it, for example
generate-fabric-l3ls-multipod-a. - Run the fabric generator: open Actions → Generator definitions, select generate-fabric, select Run, choose
Fabric-L3LS-MultiPod-Aand confirm. - Follow the generator chain in Actions → Tasks. The pod, rack, hostvar, and structured configuration generators start automatically. The full chain takes a few minutes.
- Check the devices in Devices → All Devices: super-spines, spines and leaves now exist on the branch.
- Create a proposed change from the branch. The pipeline renders the EOS configuration and documentation artifacts for every device. See Viewing artifacts for where to find them.
- Optionally, merge the proposed change with the account that can merge.
Provision your first fabric explains each step in more detail. Skip the command-line alternative in its first step: the sandbox has no shell.
Day-2 workflows in the Service Catalog​
Open the Service Catalog from the sandbox page, then follow Add a network segment, Add a server, Create a tenant, or Regenerate a fabric. Each workflow creates a branch. Links from the catalog open that branch in the public Infrahub interface.
The Service Catalog sends its requests to Infrahub with the API token it is configured with, not with the visitor's account. Whatever that token is allowed to do, every Service Catalog visitor can do.
Sandbox definition​
This section is for the people who maintain the sandbox definition in Infrahub.
Setup task​
The pipeline runs uv run invoke sandbox-setup. The task:
- Loads the schemas and waits until every Infrahub worker has the new schema.
- Loads the menus.
- Loads the
Commonseed data and the fabrics selected byINFRAHUB_SEED_FABRICS(all fabrics by default). - Registers
test-repositoryas a read-only repository fromINFRAHUB_REPO_URL, tracking the branch or tag inINFRAHUB_REPO_REF(mainwhen it is not set). The repository is read-only because Infrahub checks that it can push to a read-write repository, and a public repository registered without credentials does not allow that. - Waits up to 600 seconds for the repository to sync and stops with an error if the import fails.
- Loads the CloudVision check definition, its queries and webhook, and the generator triggers.
The task uses only INFRAHUB_ADDRESS, INFRAHUB_API_TOKEN, INFRAHUB_REPO_URL, INFRAHUB_REPO_REF and the optional INFRAHUB_SEED_FABRICS. It stops if INFRAHUB_ADDRESS or INFRAHUB_API_TOKEN is missing. It creates no accounts and changes no roles. All Infrahub requests go through the Infrahub Python SDK, which follows INFRAHUB_RETRY_ON_FAILURE and INFRAHUB_RETRY_STATUS_CODES.
To shorten setup, set INFRAHUB_SEED_FABRICS in setup_env to a comma-separated list of fabric directories, such as l3ls-multipod-a. The walkthrough above uses Fabric-L3LS-MultiPod-A only.
Images​
The Publish sandbox images workflow publishes two images to the Harbor registry set by the HARBOR_HOST repository variable:
<harbor>/opsmill/infrahub-arista-avd/task-worker: the Infrahub image with thesolution_arista_avdpackage, which the generators, transforms, and checks import. Set it as theimageof the built-intask-workercomponent. Use theinfrahub-<version>tag that matches the sandbox's Infrahub version.<harbor>/opsmill/infrahub-arista-avd/service-catalog: the Service Catalog.
Service Catalog application​
Run the Service Catalog with the generic-app driver, with these environment variables:
| Variable | Value |
|---|---|
STREAMLIT_SERVER_PORT | 8080, the port the generic-app driver serves |
INFRAHUB_ADDRESS | The Infrahub address reachable inside the cluster |
INFRAHUB_UI_URL | The public Infrahub address, used for links shown to visitors |
INFRAHUB_API_TOKEN | A token for the account the catalog writes as |
DEFAULT_BRANCH | main |
setup_env is readable configuration, not a secret store, so do not put the API token there.
The nightly reset restores Infrahub. The Service Catalog keeps no state of its own outside Infrahub.