Skip to content

Commit d80431d

Browse files
authored
Merge pull request #177 from jumpstarter-dev/dynamic-version-in-doc
Parameterize version numbers in docs
2 parents f0f92e6 + 426fb9e commit d80431d

22 files changed

+160
-121
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Adapter API Reference
2+
3+
```{warning}
4+
This project is still evolving, so these docs may be incomplete or out-of-date.
5+
```
6+
7+
### Adapters
8+
```{eval-rst}
9+
.. automodule:: jumpstarter.client.adapters
10+
:members:
11+
```

docs/source/api-reference/drivers.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ This project is still evolving, so these docs may be incomplete or out-of-date.
1818
:members:
1919
```
2020

21-
### Adapters
22-
```{eval-rst}
23-
.. automodule:: jumpstarter.client.adapters
24-
:members:
25-
```
26-
2721
## Example
2822
```{testsetup} *
2923
import jumpstarter.common.importlib

docs/source/api-reference/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ This section provides details on the Jumpstarter core API and contrib drivers.
44

55
```{toctree}
66
drivers.md
7+
adapters.md
78
contrib/index.md
89
```

docs/source/cli/getting-started.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ configurations, and run transient or persistent exporter instances.
1212

1313
The `jmp` and `jmp-exporter` CLI tools are available as part of the `jumpstarter` Python package.
1414
You can learn how to install this package [here](../installation/python-package.md),
15-
but it is also available as a container image `quay.io/jumpstarter/jumpstarter:main`.
15+
but it is also available as a container image
16+
```{code-block}
17+
:substitutions:
18+
quay.io/jumpstarter/jumpstarter:{{version}}
19+
```
1620

1721
To check if you have the client CLI installed, run:
1822

docs/source/cli/run-tests.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,12 @@ service.
1414
Alternatively the client can receive the endpoint and token as environment variables:
1515

1616
```bash
17-
export JUMPSTARTER_ENDPOINT=jumpstarter.my-lab.com:1443
18-
export JUMPSTARTER_TOKEN=dGhpc2lzYXRva2VuLTEyMzQxMjM0MTIzNEyMzQtc2Rxd3Jxd2VycXdlcnF3ZXJxd2VyLTEyMzQxMjM0MTIz
17+
export JMP_ENDPOINT=jumpstarter.my-lab.com:1443
18+
export JMP_TOKEN=dGhpc2lzYXRva2VuLTEyMzQxMjM0MTIzNEyMzQtc2Rxd3Jxd2VycXdlcnF3ZXJxd2VyLTEyMzQxMjM0MTIz
1919
```
2020

2121
This is useful for CI/CD systems that inject the environment variables into the pipeline.
2222

23-
A custom location to the client configuration can also be passed using the following
24-
environment variable. This is useful in situations where there are multiple client
25-
configurations or in an environment when the config is mounted as a file.
26-
27-
```bash
28-
export JUMPSTARTER_CONFIG=/etc/jumpstarter/my-client.yaml
29-
```
30-
3123
## Running tests locally (without a server)
3224

3325
When no client configuration or environment variables are set, the client will

docs/source/conf.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@
1818
# -- General configuration ---------------------------------------------------
1919
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
2020

21-
extensions = ["sphinxcontrib.mermaid", "myst_parser", "sphinx.ext.autodoc", "sphinx.ext.doctest", "sphinx_click"]
21+
extensions = [
22+
"sphinxcontrib.mermaid",
23+
"myst_parser",
24+
"sphinx.ext.autodoc",
25+
"sphinx.ext.doctest",
26+
"sphinx_click",
27+
"sphinx_substitution_extensions",
28+
]
2229

2330
templates_path = ["_templates"]
2431
exclude_patterns = []
@@ -32,4 +39,13 @@
3239
# html_static_path = ["_static"]
3340
html_extra_path = ["extra"]
3441
html_title = "Jumpstarter Docs"
42+
3543
myst_heading_anchors = 3
44+
myst_enable_extensions = [
45+
"substitution",
46+
]
47+
myst_substitutions = {
48+
"requires_python": ">=3.11",
49+
"version": "0.5.0",
50+
"controller_version": "0.5.0",
51+
}

docs/source/config.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,15 +224,11 @@ The exporter configuration may also be provided by environment variables which
224224
may be useful in CI or when writing a script that uses Jumpstarter.
225225

226226
- `JUMPSTARTER_GRPC_INSECURE` - Set to `1` to disable TLS verification.
227-
- `JMP_EXPORTER_CONFIG` - A path to a exporter configuration YAML file
228227
to use.
229-
- `JMP_EXPORTER` - The name of a registered exporter config to use.
230228
- `JMP_ENDPOINT` - The gRPC endpoint of the Jumpstarter controller server
231229
(overrides the config value).
232230
- `JMP_TOKEN` - An exporter auth token generated by the controller
233231
(overrides the config value).
234-
- `JMP_DRIVERS` - A comma-separated list of allowed driver namespaces
235-
to automatically load (overrides the config value).
236232

237233
## Running an Exporter
238234

@@ -244,11 +240,12 @@ the network.
244240

245241
To run the exporter container on a test runner using Podman:
246242

247-
```bash
243+
```{code-block} bash
244+
:substitutions:
248245
$ sudo podman run --rm -ti --name my-exporter --net=host --privileged \
249246
-e JUMPSTARTER_GRPC_INSECURE=1 \
250247
-v /run/udev:/run/udev -v /dev:/dev -v /etc/jumpstarter:/etc/jumpstarter \
251-
quay.io/jumpstarter-dev/jumpstarter:main \
248+
quay.io/jumpstarter-dev/jumpstarter:{{version}} \
252249
jmp-exporter run my-exporter
253250
254251
INFO:jumpstarter.exporter.exporter:Registering exporter with controller
@@ -269,15 +266,16 @@ To run the exporter as a service podman-systemd is recommended, by using podman-
269266
you can simply create a systemd service file at `/etc/containers/systemd/my-exporter.container` with
270267
the following content:
271268

272-
```ini
269+
```{code-block} ini
270+
:substitutions:
273271
[Unit]
274272
Description=My exporter
275273
276274
[Container]
277275
ContainerName=my-exporter
278276
Environment=JUMPSTARTER_GRPC_INSECURE=1
279277
Exec=jmp-exporter run my-exporter
280-
Image=quay.io/jumpstarter-dev/jumpstarter:main
278+
Image=quay.io/jumpstarter-dev/jumpstarter:{{version}}
281279
Network=host
282280
PodmanArgs=--privileged
283281
Volume=/run/udev:/run/udev

docs/source/drivers.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Drivers in Jumpstarter consist of three components:
1515

1616
- `Driver` - Implements the logic to configure and use the interface(s) provided
1717
by the host system. e.g. a TCP port.
18-
- `DriverInterface` - Defines the contract between the driver client and the
19-
driver itself.
18+
- `DriverInterface` - Optionally defines the contract between the driver client and the
19+
driver itself, so multiple drivers can share the same client.
2020
- `DriverClient` - Provides a user-friendly interface that can be used byclients
2121
to interact with the underlying `Driver` either locally or remotely over the network.
2222

@@ -25,8 +25,8 @@ The exporter instance runs the `Driver` itself to interact with the hardware.
2525
Clients use a `DriverClient` class to interact with the driver through the
2626
contract defined in the `DriverInterface`.
2727

28-
When a client connects to the exporter and requests a lease, a session is created
29-
for each set of tests to execute. Within the session, the specified `Driver`
28+
When a client requests a lease and connects to the exporter, a session is created
29+
for all the tests the client has to execute. Within the session, the specified `Driver`
3030
subclass is instantiated for each of the configured interfaces defined in the
3131
exporter configuration. These driver instances live throughout the duration of
3232
the session and can run setup/teardown logic and keep state internally for that

docs/source/installation/container-jmp.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ packages locally, you can create an alias to run the `jmp` client in a container
77
It is recommended to add the alias to your shell profile.
88
```
99

10-
```bash
10+
```{code-block} bash
11+
:substitutions:
1112
$ alias jmp='podman run --rm -it -e JUMPSTARTER_GRPC_INSECURE=1 \
1213
-v "${HOME}/.config/jumpstarter/:/root/.config/jumpstarter" \
13-
quay.io/jumpstarter-dev/jumpstarter:main jmp'
14+
quay.io/jumpstarter-dev/jumpstarter:{{version}} jmp'
1415
```
1516

1617
Then you can try:
@@ -30,13 +31,14 @@ to mount access to devices into the container, provide host network access,
3031
and run the container in privileged mode, this probably needs to be run as **root**.
3132

3233

33-
```bash
34+
```{code-block} bash
35+
:substitutions:
3436
$ mkdir -p "${HOME}/.config/jumpstarter/" /etc/jumpstarter
3537
3638
# you may want to add this alias to the profile
3739
$ alias jmp-exporter='podman run --rm -it -e JUMPSTARTER_GRPC_INSECURE=1 \
3840
-v "${HOME}/.config/jumpstarter/:/root/.config/jumpstarter" \
3941
--net=host --privileged \
4042
-v /run/udev:/run/udev -v /dev:/dev -v /etc/jumpstarter:/etc/jumpstarter \
41-
quay.io/jumpstarter-dev/jumpstarter:main jmp-exporter'
43+
quay.io/jumpstarter-dev/jumpstarter:{{version}} jmp-exporter'
4244
```

docs/source/installation/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The Jumpstarter components which can be installed are:
1010
| --------- | ----------- |
1111
| jumpstarter-controller | The Jumpstarter Controller service, runs in k8s, manages exporters, clients, leases, and provides routing |
1212
| jmpctl | The Jumpstarter administrator CLI tool, simplifies the administrator experience when managing clients or exporters on the controller |
13-
| jmp / j / python packages | The Jumpstarter Python package. This is necessary to lease ad interact with the exporters, it's also the component ran on the exporter hosts as a service. In most cases installation is not necessary and can be consumed through a container. |
13+
| jmp /jmp-exporter / j / python packages | The Jumpstarter Python package. This is necessary to lease and interact with the exporters, it's also the component ran on the exporter hosts as a service. In most cases installation is not necessary and can be consumed through a container. |
1414

1515

1616
```{toctree}

0 commit comments

Comments
 (0)