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

Update "Getting started" guide after setting up local environment #297

Merged
merged 4 commits into from
Jul 28, 2023
Merged
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
15 changes: 13 additions & 2 deletions doc/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ clients are then handled using Docker images.

This section covers how to set up a local API instance using the default
self-contained configuration. It doesn't rely on any external services.
Commands from the sections below should be run within a directory containing
[`kernelci-api`](https://github.com/kernelci/kernelci-api.git) repository.

### Create the environment file

Expand Down Expand Up @@ -123,10 +125,10 @@ For example, to check it's working:

```
$ curl -X 'GET' \
'http://localhost:8001/latest/me' \
'http://localhost:8001/latest/whoami' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJib2IifQ.KHkILtsJaCmueOfFCj79HGr6kHamuZFdB1Yz_5GqcC4'
{"_id":"615f30020eb7c3c6616e5ac3","username":"bob","hashed_password":"$2b$12$VtfVij6zz20F/Qr0Ri18O.11.0LJMMXyJxAJAHQbKU0jC96eo2fr.","active":true}
{"id":"615f30020eb7c3c6616e5ac3","username":"bob","hashed_password":"$2b$12$VtfVij6zz20F/Qr0Ri18O.11.0LJMMXyJxAJAHQbKU0jC96eo2fr.","active":true}
```

### Setup SSH keys
Expand Down Expand Up @@ -197,6 +199,10 @@ this page, we'll focus on the simple case with just a `docker-compose` API
instance as described in the previous section and one instance for the
pipeline.

Commands from the sections below should be run within a directory containing
[`kernelci-pipeline`](https://github.com/kernelci/kernelci-pipeline.git)
repository.

### Configure the API token

The previous section about setting up the API explains how to generate a token.
Expand All @@ -207,6 +213,11 @@ file which provides environment variables for the Docker containers:
echo "KCI_API_TOKEN=<your token>" >> .env
```

> **Note** Admin API token created in the previous section can be used for
> initial Pipeline instance testing. In production environment the best
> practice would be to create a separate (non-admin) user with required scopes
> and generate a new API token for that user.

gctucker marked this conversation as resolved.
Show resolved Hide resolved
### Start docker-compose

Then the pipeline can simply be started with docker-compose:
Expand Down