Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ clean: clean-docs clean-venv clean-build clean-test
.PHONY: sync docs docs-all serve-all test test-packages build clean-test clean-docs clean-venv clean-build \
mypy-jumpstarter \
mypy-jumpstarter-cli-admin \
mypy-jumpstarter-cli-client \
mypy-jumpstarter-driver-can \
mypy-jumpstarter-driver-dutlink \
mypy-jumpstarter-driver-network \
Expand Down
2 changes: 1 addition & 1 deletion docs/source/api-reference/drivers/flashers.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ This doesn't work with sphinx-click, so we'll just use the raw CLI
```
-->
```bash
$ jmp client shell -l board ti-03
$ jmp shell -l board=ti-03
INFO:jumpstarter.client.lease:Created lease request for labels {'board': 'ti-03'} for 0:30:00
jumpstarter ⚡remote ➤ j storage
Usage: j storage [OPTIONS] COMMAND [ARGS]...
Expand Down
2 changes: 1 addition & 1 deletion docs/source/api-reference/drivers/yepkit.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ client.power.off()

### CLI access
```bash
$ sudo ~/.cargo/bin/uv run jmp exporter shell -c ./packages/jumpstarter-driver-yepkit/examples/exporter.yaml
$ sudo ~/.cargo/bin/uv run jmp shell --exporter-config ./packages/jumpstarter-driver-yepkit/examples/exporter.yaml
WARNING:Ykush:No serial number provided for ykush, using the first one found: YK25838
INFO:Ykush:Power OFF for Ykush YK25838 on port 1
INFO:Ykush:Power OFF for Ykush YK25838 on port 2
Expand Down
4 changes: 2 additions & 2 deletions docs/source/cli/clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ self-signed certificates.

3. Those details can be installed as a secret on CI, or passed down to the final user.

Then the user can create the client using the [jmp client](./reference/jmp-client.md#jmp-client-config-create) CLI:
Then the user can create the client using the [jmp](./reference/jmp.md#jmp-config-client-create) CLI:

```bash
$ jmp client config create my-client
$ jmp config client create my-client
Enter a valid Jumpstarter service endpoint: devl.jumpstarter.dev
Enter a Jumpstarter auth token (hidden): ***
Enter a comma-separated list of allowed driver packages (optional):
Expand Down
23 changes: 4 additions & 19 deletions docs/source/cli/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,24 @@ This section provides details on the Jumpstarter CLI.
## jmp

The base jmp command contains a set of subcommands for the different featuers, those
can also be installed and used independently as `jmp-admin`, `jmp-client`, and
`jmp-exporter`, `jmp-driver`.
can also be installed and used independently as `jmp-admin` and `jmp`.

```bash
jmp [OPTIONS] COMMAND [ARGS]...
```

### commands

```{toctree}
:maxdepth: 1
jmp-admin.md
```

The `jmp-admin` or `jmp admin` CLI allows administration of exporters and clients in a Kubernetes cluster. To use this CLI, you must have a valid `kubeconfig` and access to the cluter/namespace where the Jumpstarter controller resides.

```{toctree}
:maxdepth: 1
jmp-client.md
jmp-admin.md
```

The `jmp-client` or `jmp client` CLI allows interaction with Jumpstarter as a clients.


```{toctree}
:maxdepth: 1
jmp-exporter.md
```
The `jmp-exporter` or `jmp exporter` CLI allows you to run Jumpstarter exporters as services, container, or standalone.
The `jmp` CLI allows interaction with Jumpstarter as a clients or exporter.

```{toctree}
:maxdepth: 1
jmp-driver.md
jmp.md
```

The `jmp-driver` or `jmp driver` CLI allows you to list and create Jumpstarter drivers.
2 changes: 1 addition & 1 deletion docs/source/cli/reference/jmp-admin.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# admin
# jmp-admin

```{eval-rst}
.. click:: jumpstarter_cli_admin:admin
Expand Down
7 changes: 0 additions & 7 deletions docs/source/cli/reference/jmp-client.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/source/cli/reference/jmp-driver.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/source/cli/reference/jmp-exporter.md

This file was deleted.

7 changes: 7 additions & 0 deletions docs/source/cli/reference/jmp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# jmp

```{eval-rst}
.. click:: jumpstarter_cli:jmp
:prog: jmp
:nested: full
```
4 changes: 2 additions & 2 deletions docs/source/cli/run-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Communication between the local client and exporter take place over a local
socket provided by `$JUMPSTARTER_HOST`.

```
$ jmp-exporter shell -c /exporter-config.yaml
$ jmp shell --exporter-config /exporter-config.yaml
$$ echo $JUMPSTARTER_HOST
$$ j ...
$$ exit
Expand All @@ -45,7 +45,7 @@ the base class will attempt to:

1. Use a local connection based on the `JUMPSTARTER_HOST` environment variable
2. Use an existing lease based on the `JMP_LEASE` environment variable, and existing credentials.
See the cli reference for [jmp lease request](../cli-reference/jmp.md#jmp-lease-request).
See the cli reference for [jmp create lease](../cli-reference/jmp.md#jmp-create-lease).
3. Request a lease based on the `selector` provided in the test class.

```{eval-rst}
Expand Down
36 changes: 18 additions & 18 deletions docs/source/config/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Jumpstarter can be configured as either a client, an exporter, or both depending
on your use case and deployment strategy.

By default, a local client and exporter session are automatically initialized when
running test scripts through `jmp exporter shell` command.
running test scripts through `jmp shell` command.
This allows for easy testing of new drivers, client libraries, or verifying that tests work
on your local bench.

Expand Down Expand Up @@ -90,30 +90,30 @@ please follow the instructions in the [Jumpstarter service CLI](../cli/clients.m

Importing a new client is as simple as copying the administrator provided yaml
file to `~/.config/jumpstarter/clients/`, alternatively if we have the token
and endpoint the `jmp client config create <name>` command can be used to create
and endpoint the `jmp config client create <name>` command can be used to create
the config file.

To switch between different client configs, use the `jmp client config use <name>` command:
To switch between different client configs, use the `jmp config client use <name>` command:

```bash
$ jmp client config use another
$ jmp config client use another
Using client config '/home/jdoe/.config/jumpstarter/clients/another.yaml'
```

All client configurations can be listed with `jmp client config list`:
All client configurations can be listed with `jmp config client list`:

```bash
$ jmp client config list
$ jmp config client list
CURRENT NAME ENDPOINT PATH
* default jumpstarter1.my-lab.com:1443 /home/jdoe/.config/jumpstarter/clients/default.yaml
myclient jumpstarter2.my-lab.com:1443 /home/jdoe/.config/jumpstarter/clients/myclient.yaml
another jumpstarter3.my-lab.com:1443 /home/jdoe/.config/jumpstarter/clients/another.yaml
```

Clients can also be removed using `jmp client config delete <name>`:
Clients can also be removed using `jmp config client delete <name>`:

```bash
$ jmp client config delete myclient
$ jmp config client delete myclient
Deleted client config '/home/jdoe/.config/jumpstarter/clients/myclient.yaml'
```

Expand Down Expand Up @@ -202,40 +202,40 @@ please follow the instructions in the [Jumpstarter service CLI](../cli/exporters

### Creating a exporter configuration file
To create a new exporter configuration file from a know endpoint and
token the `jmp exporter config create <name>` command can be used.
token the `jmp config exporter create <name>` command can be used.

```bash
$ jmp exporter config create myexporter
$ jmp config exporter create myexporter
Endpoint: grpc.jumpstarter.my.domain.com
Token: <<token>>
```

To use a specific config when starting the exporter:

```bash
$ jmp exporter run my-exporter
$ jmp run --exporter my-exporter
Using exporter config '/etc/jumpstarter/exporters/another/exporter.yaml'
```

The path to a config can also be provided:

```bash
jmp exporter run -c /etc/jumpstarter/exporters/another/exporter.yaml
jmp run --exporter-config /etc/jumpstarter/exporters/another/exporter.yaml
```

All exporter configurations can be listed with `jmp exporter config list`:
All exporter configurations can be listed with `jmp config exporter list`:

```bash
$ jmp exporter config list
$ jmp config exporter list
ALIAS PATH
test-exporter-2 /etc/jumpstarter/exporters/test-exporter-2.yaml
my-exporter /etc/jumpstarter/exporters/my-exporter.yaml
```

Exporers can also be removed using `jmp exporter config delete <name>`:
Exporters can also be removed using `jmp config exporter delete <name>`:

```bash
$ jmp exporter config delete myexporter
$ jmp config exporter delete myexporter
Deleted exporter config '/etc/jumpstarter/exporters/myexporter.yaml'
```

Expand Down Expand Up @@ -269,7 +269,7 @@ To run the exporter container on a test runner using Podman:
$ sudo podman run --rm -ti --name my-exporter --net=host --privileged \
-v /run/udev:/run/udev -v /dev:/dev -v /etc/jumpstarter:/etc/jumpstarter \
quay.io/jumpstarter-dev/jumpstarter:{{version}} \
jmp-exporter run my-exporter
jmp run --exporter my-exporter

INFO:jumpstarter.exporter.exporter:Registering exporter with controller
INFO:jumpstarter.exporter.exporter:Currently not leased
Expand All @@ -296,7 +296,7 @@ Description=My exporter

[Container]
ContainerName=my-exporter
Exec=/jumpstarter/bin/jmp exporter run my-exporter
Exec=/jumpstarter/bin/jmp run --exporter my-exporter
Image=quay.io/jumpstarter-dev/jumpstarter:{{version}}
Network=host
PodmanArgs=--privileged
Expand Down
10 changes: 5 additions & 5 deletions docs/source/config/oidc.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Finally, instruct the users to login with the following commands

```
# for clients
jmp client login <client alias> --endpoint <jumpstarter controller endpoint> \
jmp login --client <client alias> --endpoint <jumpstarter controller endpoint> \
--namespace <namespace> --name <client name> \
--issuer https://<keycloak domain>/realms/<realm name>
# without additional options, the users would be directed to login with the web browser
Expand All @@ -43,10 +43,10 @@ jmp client login <client alias> --endpoint <jumpstarter controller endpoint> \
--token <token>

# for exporters
jmp exporter login <exporter alias> --endpoint <jumpstarter controller endpoint> \
jmp login --exporter <exporter alias> --endpoint <jumpstarter controller endpoint> \
--namespace <namespace> --name <exporter name> \
--issuer https://<keycloak domain>/realms/<realm name>
# --username, --password and --token are also accepted by jmp exporter login
# --username, --password and --token are also accepted
```

### Dex (for authenticating with kubernetes Service Accounts)
Expand Down Expand Up @@ -147,14 +147,14 @@ Finally, instruct the users to login with the following commands in pods configu

```
# for clients
jmp client login <client alias> --endpoint <jumpstarter controller endpoint> \
jmp login --client <client alias> --endpoint <jumpstarter controller endpoint> \
--namespace <namespace> --name <client name> \
--issuer https://dex.dex.svc.cluster.local:5556 \
--connector-id kubernetes \
--token $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)

# for exporters
jmp exporter login <exporter alias> --endpoint <jumpstarter controller endpoint> \
jmp login --exporter <exporter alias> --endpoint <jumpstarter controller endpoint> \
--namespace <namespace> --name <exporter name> \
--issuer https://dex.dex.svc.cluster.local:5556 \
--connector-id kubernetes \
Expand Down
40 changes: 28 additions & 12 deletions docs/source/getting-started/setup-exporter-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ To edit the config file with your default text editor, run the following command

```bash
# Opens the config for "testing" in your default editor
$ jmp exporter config edit testing
$ jmp config exporter edit testing
```

Add the `storage` and `power` drivers under the `export` field in the config file.
Expand All @@ -79,13 +79,13 @@ export:

## Run an Exporter

To run the exporter locally, we can use the `jmp exporter` CLI tool.
To run the exporter locally, we can use the `jmp` CLI tool.

Run the following command to start the exporter locally using the config file:

```bash
# Runs the exporter "testing" locally
$ jmp exporter run testing
$ jmp run --exporter testing
```

The exporter will stay running until the process is exited via `^C` or the shell
Expand Down Expand Up @@ -129,26 +129,42 @@ Python API.

```bash
# Spawn a shell using the "hello" client
$ jmp client shell hello
$ jmp shell --client hello --selector example.com/board=foo

# Usage for jmp client shell
$ jmp client shell --help
Usage: jmp client shell [OPTIONS] [NAME]
# Usage for jmp shell
$ jmp shell --help
Usage: jmp shell [OPTIONS]

Spawns a shell connecting to a leased remote exporter
Spawns a shell connecting to a local or remote exporter
Comment thread
NickCao marked this conversation as resolved.

Options:
-l, --label <TEXT TEXT>...
-n, --lease TEXT
--help Show this message and exit.
--exporter-config PATH Path of exporter config
--exporter TEXT Alias of exporter config
--client-config PATH Path to client config
--client TEXT Alias of client config
--lease TEXT
-l, --selector TEXT Selector (label query) to filter on, supports '=',
'==', and '!=' (e.g. -l key1=value1,key2=value2).
Matching objects must satisfy all of the specified
label constraints.
--duration DURATION Accepted duration formats:

PnYnMnDTnHnMnS - ISO 8601 duration format
HH:MM:SS - time in hours, minutes, seconds
D days, HH:MM:SS - time prefixed by X days
D d, HH:MM:SS - time prefixed by X d

See https://docs.rs/speedate/latest/speedate/ for
details [default: (00:30:00)]
--help Show this message and exit.
```

Once a lease is acquired, we can interact with the drivers hosted by the exporter
within the shell instance.

```bash
# Spawn a shell using the "hello" client
$ jmp client shell hello
$ jmp shell --client hello --selector example.com/board=foo

# Running inside client shell
$ j
Expand Down
Loading