Phenix
@nblair2/phenixv2026.05.30.2
01README
Full sceptre-phenix control via the HTTP API, split into five models — config, experiment, vm, cluster and user: config CRUD (Topology/Scenario/Experiment/Image/User), the experiment lifecycle (create/start/stop/delete, schedule, apps, topology, files, trigger), VM control (inventory, reconfigure, power, snapshots, captures, commit), and cluster/server reads (hosts, disks, apps, topologies, version, features, settings) plus identity (users, roles, long-lived tokens).
02Models
@nblair2/phenix/configv2026.05.30.2config.ts
fn config_list()
List all phenix configs, storing each one
fn config_get(kind: string, name: string)
Fetch a single config by kind and name and store it
| Argument | Type | Description |
|---|---|---|
| kind | string | Config kind: Topology, Scenario, Experiment, Image, or User |
| name | string | Config name (metadata.name) |
fn config_create(config?: record, file?: string)
Create a config from an inline object or a local YAML/JSON file
| Argument | Type | Description |
|---|---|---|
| config? | record | Inline config object ({apiVersion, kind, metadata, spec}); |
| file? | string | Path to a local YAML or JSON config document; mutually exclusive with config |
fn config_update(kind: string, name: string, config?: record, file?: string)
Replace an existing config (by kind/name) from an inline object or file
| Argument | Type | Description |
|---|---|---|
| kind | string | Config kind: Topology, Scenario, Experiment, Image, or User |
| name | string | Config name (metadata.name) |
| config? | record | Inline replacement config object; mutually exclusive with file |
| file? | string | Path to a local YAML or JSON config document; mutually exclusive with config |
fn config_delete(kind: string, name: string)
Delete a config by kind and name
| Argument | Type | Description |
|---|---|---|
| kind | string | Config kind: Topology, Scenario, Experiment, Image, or User |
| name | string | Config name (metadata.name) |
Resources
config(infinite)— A phenix config object (Topology, Scenario, Experiment, Image or User)
@nblair2/phenix/experimentv2026.05.30.2experiment.ts
fn experiment_list()
List all experiments, storing each one
fn experiment_get(name: string)
Fetch a single experiment by name and store its state
| Argument | Type | Description |
|---|---|---|
| name | string | Experiment name |
fn experiment_create(name: string, topology: string, scenario?: string, vlanMin?: number, vlanMax?: number, disabledApps?: array, deployMode?: string, defaultBridge?: string, useGreMesh?: boolean)
Create an experiment from a topology (and optional scenario).
| Argument | Type | Description |
|---|---|---|
| name | string | Unique experiment name |
| topology | string | Name of the Topology config to use |
| scenario? | string | Name of the Scenario config to apply (optional) |
| vlanMin? | number | Low end of the VLAN range |
| vlanMax? | number | High end of the VLAN range |
| disabledApps? | array | Scenario apps to disable for this experiment |
| deployMode? | string | Deploy mode (e.g. 'all', 'no-headnode', 'only-headnode') |
| defaultBridge? | string | Default minimega bridge name |
| useGreMesh? | boolean | Use a GRE mesh between cluster nodes |
fn experiment_delete(name: string)
Delete an experiment (must be stopped)
| Argument | Type | Description |
|---|---|---|
| name | string | Experiment name |
fn experiment_start(name: string)
Start (launch) an experiment, then store its updated state
| Argument | Type | Description |
|---|---|---|
| name | string | Experiment name |
fn experiment_stop(name: string)
Stop (tear down) a running experiment, then store its state
| Argument | Type | Description |
|---|---|---|
| name | string | Experiment name |
fn experiment_apps(name: string)
List the apps configured for an experiment
| Argument | Type | Description |
|---|---|---|
| name | string | Experiment name |
fn experiment_schedule_get(name: string)
Read the current VM-placement schedule for an experiment
| Argument | Type | Description |
|---|---|---|
| name | string | Experiment name |
fn experiment_schedule_set(name: string, algorithm: string)
Apply a scheduling algorithm to place an experiment's VMs
| Argument | Type | Description |
|---|---|---|
| name | string | Experiment name |
| algorithm | string | Scheduling algorithm (e.g. 'round-robin', 'isolate-experiment') |
fn experiment_topology(name: string)
Fetch the (expanded) topology of an experiment
| Argument | Type | Description |
|---|---|---|
| name | string | Experiment name |
fn experiment_files(name: string)
List the files associated with an experiment
| Argument | Type | Description |
|---|---|---|
| name | string | Experiment name |
fn experiment_trigger(name: string, apps?: array)
Trigger (re-run) running-stage apps for an experiment
| Argument | Type | Description |
|---|---|---|
| name | string | Experiment name |
| apps? | array | Specific apps to (re)trigger; omit to trigger all |
Resources
experiment(infinite)— A phenix experiment and its current lifecycle state
operation(7d)— Outcome of a one-shot phenix action (schedule, trigger, apps, etc.)
@nblair2/phenix/vmv2026.05.30.2vm.ts
fn vm_list(exp: string)
List all VMs in an experiment, storing each one
| Argument | Type | Description |
|---|---|---|
| exp | string | Experiment name |
fn vm_list_all()
List every VM across all experiments, storing each as a `vm` resource
fn vm_get(exp: string, name: string)
Fetch a single VM by name and store its state
| Argument | Type | Description |
|---|---|---|
| exp | string | Experiment name |
| name | string | VM name |
fn vm_update(exp: string, name: string, cpus?: number, ram?: number, disk?: string, dnb?: boolean, host?: string, snapshot?: boolean, interface?: object, tags?: record)
Update a VM's CPUs/RAM/disk, do-not-boot flag, host pin, snapshot
| Argument | Type | Description |
|---|---|---|
| exp | string | Experiment name |
| name | string | VM name |
| cpus? | number | Number of vCPUs |
| ram? | number | RAM in MB |
| disk? | string | Disk image path |
| dnb? | boolean | Set the do-not-boot flag |
| host? | string | Pin the VM to a cluster host |
| snapshot? | boolean | Run the disk in snapshot mode |
| interface? | object | Connect interface {index} to a {vlan} |
| tags? | record | Tags to set on the VM |
fn vm_start(exp: string, name: string)
Boot a VM, then store its updated state
| Argument | Type | Description |
|---|---|---|
| exp | string | Experiment name |
| name | string | VM name |
fn vm_stop(exp: string, name: string)
Power off (pause) a VM, then store its updated state
| Argument | Type | Description |
|---|---|---|
| exp | string | Experiment name |
| name | string | VM name |
fn vm_shutdown(exp: string, name: string)
Gracefully shut down a VM's guest OS, then store its state
| Argument | Type | Description |
|---|---|---|
| exp | string | Experiment name |
| name | string | VM name |
fn vm_restart(exp: string, name: string)
Restart a VM, then store its updated state
| Argument | Type | Description |
|---|---|---|
| exp | string | Experiment name |
| name | string | VM name |
fn vm_reset(exp: string, name: string)
Hard-reset a VM, then store its updated state
| Argument | Type | Description |
|---|---|---|
| exp | string | Experiment name |
| name | string | VM name |
fn vm_redeploy(exp: string, name: string, cpus?: number, ram?: number, disk?: string, injects?: boolean)
Redeploy a VM (optionally with new CPUs/RAM/disk and re-injection)
| Argument | Type | Description |
|---|---|---|
| exp | string | Experiment name |
| name | string | VM name |
| cpus? | number | Number of vCPUs |
| ram? | number | RAM in MB |
| disk? | string | Disk image path |
| injects? | boolean | Re-run file injections |
fn vm_snapshot_list(exp: string, name: string)
List the disk snapshots available for a VM
| Argument | Type | Description |
|---|---|---|
| exp | string | Experiment name |
| name | string | VM name |
fn vm_snapshot_create(exp: string, name: string, filename: string)
Create a disk snapshot of a VM
| Argument | Type | Description |
|---|---|---|
| exp | string | Experiment name |
| name | string | VM name |
| filename | string | Snapshot filename |
fn vm_snapshot_restore(exp: string, name: string, snapshot: string)
Restore a VM from a named disk snapshot
| Argument | Type | Description |
|---|---|---|
| exp | string | Experiment name |
| name | string | VM name |
| snapshot | string | Snapshot name to restore |
fn vm_commit(exp: string, name: string)
Commit a VM's current disk state to a new backing image
| Argument | Type | Description |
|---|---|---|
| exp | string | Experiment name |
| name | string | VM name |
fn vm_capture_start(exp: string, name: string, interface: number, filter?: string)
Start a packet capture on a VM interface
| Argument | Type | Description |
|---|---|---|
| exp | string | Experiment name |
| name | string | VM name |
| interface | number | Interface index to capture on |
| filter? | string | Optional BPF capture filter |
fn vm_capture_stop(exp: string, name: string)
Stop all packet captures on a VM
| Argument | Type | Description |
|---|---|---|
| exp | string | Experiment name |
| name | string | VM name |
Resources
vm(infinite)— A VM within a phenix experiment and its current state
operation(7d)— Outcome of a one-shot phenix action (snapshot, commit, capture, etc.)
@nblair2/phenix/clusterv2026.05.30.2cluster.ts
fn host_list()
List the cluster hosts (head and compute nodes)
fn disk_list()
List the disk images available on the cluster
fn application_list()
List the phenix apps available on the server
fn topology_list()
List the available Topology configs
fn topology_scenarios(topology: string)
List the scenarios compatible with a given topology
| Argument | Type | Description |
|---|---|---|
| topology | string | Topology name |
fn version()
Read the phenix server version
fn features()
Read the phenix server's enabled feature flags
fn settings_get()
Read the phenix server settings
Resources
host(7d)— A phenix cluster host (head or compute node)
disk(7d)— A disk image known to the phenix cluster
operation(7d)— Outcome of a one-shot phenix read (apps, topologies, version, etc.)
@nblair2/phenix/userv2026.05.30.2user.ts
fn user_list()
List all phenix users, storing each one
fn user_get(username: string)
Fetch a single user by username and store it
| Argument | Type | Description |
|---|---|---|
| username | string | Username |
fn user_create(username: string, password: string, firstName?: string, lastName?: string, roleName: string, resourceNames?: array)
Create a phenix user with an RBAC role
| Argument | Type | Description |
|---|---|---|
| username | string | New username |
| password | string | Initial password |
| firstName? | string | First name |
| lastName? | string | Last name |
| roleName | string | RBAC role name (e.g. 'Global Admin', 'VM Viewer') |
| resourceNames? | array | Resource-name globs the role is scoped to (e.g. ['*']) |
fn user_delete(username: string)
Delete a phenix user
| Argument | Type | Description |
|---|---|---|
| username | string | Username |
fn role_list()
List the available RBAC roles
fn token_create(username: string, lifetime: string, desc?: string)
Mint a long-lived API token for a user (the result includes the
| Argument | Type | Description |
|---|---|---|
| username | string | User to mint a token for |
| lifetime | string | Token lifetime: a Go duration ('720h') or an integer number of days |
| desc? | string | Description for the token |
Resources
user(infinite)— A phenix UI user and its RBAC role
operation(7d)— Outcome of a one-shot phenix action (role list, token mint, etc.)
03Previous Versions
2026.05.30.1May 31, 2026
04Stats
A
100 / 100
Downloads
0
Archive size
48.1 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned
Repository
https://github.com/nblair2/swamp-phenix05Platforms
06Labels