Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continue with website for release #4

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
9 changes: 0 additions & 9 deletions website/content/en/docs/Getting started/_index.md

This file was deleted.

9 changes: 0 additions & 9 deletions website/content/en/docs/Getting started/concepts.md

This file was deleted.

21 changes: 15 additions & 6 deletions website/content/en/docs/_index.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
---
title: Documentation Overview
linkTitle: Docs
linkTitle: Overview
menu: {main: {weight: 20}}
weight: 20
---

{{% pageinfo %}}
You are at the right place to learn about the Jumpstarter project!
Jumpstarter documentation is divided in two parts:

* This website: provides an overview of the project, architecture,
install instructions for the distributed services, and getting started guides.

* [docs.jumpstarter.dev](https://docs.jumpstarter.dev) provides detailed documentation
about the Jumpstarter Python client, exporter, driver models and pluggability.

Please refer to [our glossary](https://docs.jumpstarter.dev/glossary.html) for a
better understanding of the terms used on both websites.
{{% /pageinfo %}}



## What is Jumpstarter?

Jumpstarter is a project to enable **Hardware in the Loop** testing and development for Edge devices.
Jumpstarter is a project to provide a cloud native **Hardware in the Loop** testing and development
environment for Edge and Embedded firmware based devices.
<div style="text-align:center; width:70%">
<img style="width:30em" src="pipeline.svg"/>
<br/>
Expand Down Expand Up @@ -40,6 +52,3 @@ In a modern development cycle we want to know that our software changes work wel
* **What is it not good for?**: Managing edge devices. Jumpstarter is not a device management tool, it is a testing and development tool.

## Where should I go next?

* [Getting Started](/docs/Getting%20started/)

13 changes: 13 additions & 0 deletions website/content/en/docs/getting-started/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Getting Started
description: What do you need to get started with Jumpstarter?
#categories: [Examples, Placeholders]
tags: [test, docs]
weight: 3
---

Jumpstarter provides two modes of operation, a distributed mode, and a local-only mode.

The local-only mode is useful for development and testing of Jumpstarter drivers, and
very small labs, while the distributed mode is useful for bigger, more distributed labs
where collaboration across teams, seamless CI integration and device sharing is needed.
21 changes: 21 additions & 0 deletions website/content/en/docs/getting-started/distributed-mode/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Distributed Mode
description: Getting started with the Jumpstarter distributed mode
#categories: [Examples, Placeholders]
tags: [test, docs]
weight: 3
---

Jumpstarter's distributed mode is useful for labs, where teams need to collaborate
and share devices, for development and CI/CD testing.

The distributed service is provided from Kubernetes and provides:

* A registry of:
* Exporters
* Clients: users, and robot-users.

* The service to let clients Lease exporters.

* The routing between clients and exporters.

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: Service CLI Setup
weight: 10
description: >
This section explains how to setup the Jumpstarter CLI to work with the Jumpstarter distributed service.
---

The distributed service CLI (jmpctl) is a command line interface that enables easy administration
of your Exporters and Clients.

Please refer to https://github.com/jumpstarter-dev/jumpstarter-controller/releases/latest for
the latest release.

## Installing the CLI
{{< highlight bash >}}
export VERSION=0.1.0
export ARCH=amd64

curl -L https://github.com/jumpstarter-dev/jumpstarter-controller/releases/download/${VERSION}/jmpctl_${VERSION}_linux_${ARCH} -o /usr/local/bin/jmpctl
chmod a+x /usr/local/bin/jmpctl
{{< / highlight >}}

## Configuration
The `jmpctl` CLI requires a kubeconfig file with permissions to access the jumpstarter installation
namespace `jumpstarter-lab` is the default if you followed the previous install section.


## Usage
{{< highlight bash >}}
$ jmpctl
Admin CLI for managing jumpstarter

Usage:
jmpctl [command]

Available Commands:
client Manage clients
completion Generate the autocompletion script for the specified shell
exporter Manage exporters
help Help about any command

Flags:
-h, --help help for jmpctl
--kubeconfig string Path to the kubeconfig file to use
--namespace string Kubernetes namespace to operate on (default "default")
--timeout string command timeout (default "10s")

Use "jmpctl [command] --help" for more information about a command.

{{< / highlight >}}

Original file line number Diff line number Diff line change
@@ -1,45 +1,115 @@
---
title: Installation
title: Service Installation
weight: 1
description: >
This section contains the installation instructions for the Jumpstarter distributed service, and the python framework.
This section contains the installation instructions for the Jumpstarter distributed service.
---

## Installing the distributed service

When building a distributed environment with Jumpstarter, you will need to install the Jumpstarter distributed service. This service is responsible for managing the devices, and the communication between the devices and and clients.

You will need an OpenShift or Kubernetes deployment, and the right kubeconfig file with admin
credentials (at least the first install may need assistance from your cluster administrator
for the purpose of installing the service CRDs).

Alternatively you can setup a local Kubernetes cluster with [kind](https://kind.sigs.k8s.io/) (kubernetes in docker) following the instructions below.

{{% alert title="Note" color="info" %}}
The direct helm install will auto-generate random router and controller secrets, but if you use ArgoCD make sure to set these values to unique values.
{{% /alert %}}


{{< tabpane text=true right=false >}}
{{% tab header="**Methods**:" disabled=true /%}}
{{< tab header="**Helm with OpenShift**" >}}
{{< tab header="**OpenShift**" >}}

Please note that the global.baseDomain is used to create the host names for the services,
with the provided example the services will be available at grpc.jumpstarter.example.com
and router.jumpstarter.example.com.
<br/><br/>
To install using helm:

<br/>
{{< highlight bash >}}
helm upgrade jumpstarter --install oci://quay.io/jumpstarter-dev/helm/jumpstarter \
--create-namespace --namespace jumpstarter-lab \
--set global.baseDomain=jumpstarter.example.com \
--set global.metrics.enabled=true \
--set jumpstarter-controller.grpc.mode=route \
--version=0.1.0
{{< / highlight >}}
{{< /tab >}}

{{< tab header="**Kubernetes**" >}}
{{< highlight bash >}}
kind create cluster
helm upgrade jumpstarter --install oci://quay.io/jumpstarter-dev/helm/jumpstarter \
--create-namespace --namespace jumpstarter-lab \
--set global.baseDomain=devel.jumpstarter.dev \
--set global.metrics.enabled=true \
--set jumpstarter-controller.grpc.mode=route \
--version=0.0.4-24-g1a8a159
--set global.metrics.enabled=true # disable if metrics not available \
--set jumpstarter-controller.grpc.mode=ingress \
--version=0.1.0
{{< / highlight >}}
{{< /tab >}}
{{< tab header="**Helm with Kubernetes**" >}}

{{< highlight bash >}}
kind create cluster
{{< tab header="**Kind**" >}}
Kind is a tool for running local Kubernetes clusters using Podman or Docker container “nodes”.
<br/><br/>
Begin by figuring out the LAN ip address that it's accessible for your docker/podman host, and do:
{{< highlight bash >}}
export IP="LAN accessible address to your docker/podman instance"
{{< / highlight >}}
<br/><br/>
Then you can continue with:
{{< highlight bash >}}

cat <<EOF > kind_config.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
kubeadmConfigPatches:
- |
kind: ClusterConfiguration
apiServer:
extraArgs:
"service-node-port-range": "3000-32767"
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 80 # ingress controller
hostPort: 5080
protocol: TCP
- containerPort: 30010 # grpc nodeport
hostPort: 8082
protocol: TCP
- containerPort: 30011 # grpc router nodeport
hostPort: 8083
protocol: TCP
- containerPort: 443 # minimalistic UI
hostPort: 5443
protocol: TCP
EOF

export BASEDOMAIN="jumpstarter.${IP}.nip.io"
export GRPC_ENDPOINT="grpc.${BASEDOMAIN}:8082"
export GRPC_ROUTER_ENDPOINT="router.${BASEDOMAIN}:8083"

kind create cluster --config kind_config.yaml

helm upgrade jumpstarter --install oci://quay.io/jumpstarter-dev/helm/jumpstarter \
--create-namespace --namespace jumpstarter-lab \
--set global.baseDomain=devel.jumpstarter.dev \
--set global.metrics.enabled=true # disable if metrics not available \
--set jumpstarter-controller.grpc.mode=ingress \
--version=0.0.4-24-g1a8a159
--set global.baseDomain=${BASEDOMAIN} \
--set jumpstarter-controller.grpc.endpoint=${GRPC_ENDPOINT} \
--set jumpstarter-controller.grpc.routerEndpoint=${GRPC_ROUTER_ENDPOINT} \
--set global.metrics.enabled=false \
--set jumpstarter-controller.grpc.nodeport.enabled=true \
--set jumpstarter-controller.grpc.mode=nodeport \
--version=0.1.0
{{< / highlight >}}
{{< /tab >}}

{{< tab header="**ArgoCD in OpenShift**" >}}
<h3>Create namespace</h3>
First, we must create a namespace for the Jumpstarter installation. This namespace
Expand Down Expand Up @@ -86,7 +156,7 @@ spec:
- name: jumpstarter-controller.grpc.mode
value: "route"
repoURL: quay.io/jumpstarter-dev/helm
targetRevision: "0.0.4-24-g1a8a159"
targetRevision: "0.1.0"
{{< / highlight >}}

<h3>Note: CRDs</h3>
Expand Down Expand Up @@ -128,19 +198,6 @@ subjects:
namespace: openshift-gitops
{{< / highlight >}}

{{< /tab >}}

{{< tab header="**Helm in kind**" >}}
Kind is a tool for running local Kubernetes clusters using Podman or Docker container “nodes”.
{{< highlight bash >}}
kind create cluster
helm upgrade jumpstarter --install oci://quay.io/jumpstarter-dev/helm/jumpstarter \
--create-namespace --namespace jumpstarter-lab \
--set global.baseDomain=devel.jumpstarter.dev \
--set global.metrics.enabled=false \
--set jumpstarter-controller.grpc.mode=ingress \
--version=0.0.4-24-g1a8a159
{{< / highlight >}}
{{< /tab >}}
{{< /tabpane >}}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: Managing Clients
weight: 30
description: >
This section explains how to use the `jmpctl` CLI to create clients and manage them.
---


## Creating a client
{{< highlight bash >}}
jmpctl client create john --namespace jumpstarter-lab > john.yaml

# allow the client to be able to use all drivers
cat >> john.yaml <<EOF
drivers:
allow: []
unsafe: True
EOF
{{< / highlight >}}

This `john.yaml` should be shared with the user (John in this case) that will be
interacting with the Jumpstarter service as a consumer (developer, tester, etc.)
leasing exporters and developing/running tests. This file should be installed
to `~/.config/jumpstarter/clients/john.yaml`.

A client config can also be created and configured as a secret for a robot
CI/CD accounts that need to perform automated testing.

For additional details on the client configuration, please refer to the
[Client config](https://docs.jumpstarter.dev/config.html#clients) documentation on the docs
site.

On the kubernetes API, the new client is represented as a `client.jumpstarter.dev` custom resource:
```bash
kubectl get client john -n jumpstarter-lab -o yaml
```

{{< highlight yaml >}}
apiVersion: jumpstarter.dev/v1alpha1
kind: Client
metadata:
creationTimestamp: "2024-10-19T12:02:32Z"
generation: 1
name: john
namespace: jumpstarter-lab
resourceVersion: "20400"
uid: 4ea788ec-d964-4b1c-9e80-61b15e808426
spec: {}
status:
credential:
name: john-client
endpoint: grpc.jumpstarter.192.168.1.10.nip.io:8082
{{< / highlight >}}

## Listing clients

Listing can be performed through the CLI or the Kubernetes API.
{{< highlight bash >}}
jmpctl client list --namespace jumpstarter-lab
NAME AGE
john 3m27s
{{< / highlight >}}
or
{{< highlight bash >}}
kubectl get client -n jumpstarter-lab
NAME AGE
john 3m27s
{{< / highlight >}}

## Deleting a client
When a client is no longer needed, or we want to revoke access to the Jumpstarter service, we can
delete it.

{{< highlight bash >}}
jmpctl client delete john --namespace jumpstarter-lab
{{< / highlight >}}
or
{{< highlight bash >}}
kubectl delete client john -n jumpstarter-lab
{{< / highlight >}}
Loading