Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm authored Oct 24, 2023
1 parent a3c3120 commit c048a72
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Katana-CI

This repository contains a tool that helps starting Katana sequencer on demand (mostly for CI purposes).
To work, the `katana-proxifier` binary must be deployed on a server with docker installed.

## Design

To keep things simple and flexible for CI, the `katana-proxifier` uses docker under the hood.
With an `in-memory` database for now, each user have an `api-key` that allows the `start` and `stop` of a Katana instance.
When a user starts an instance, a new container is created and started.

The database trait `ProxifierDb` is for now targetting `Sqlite`, but may be reworked to support any backend supported by `sqlx` rust crate.

## Usage

1. Start an instance
```bash
curl -H 'Content-Type: application/json' -H 'Authorization: Bearer my-key' https://katana-ci.arkproject.dev/start

# Returns a name:
4f2b3c60ae32
```
The start will return an instance `name`, that can then be used to target Katana for this specific instance.
The `name` returned is always URL friendly.

2. Use `starkli` to interact with the instance, for example:
```bash
starkli block --full --rpc https://katana-ci.arkproject.dev/<name>/katana
```

3. To check the logs, you can hit the endpoint `/logs` of your instance, by default it returns `25` tail lines. You can use `all` or any number you like using the query parameter `n`.
```bash
curl -H 'Content-Type: application/json' -H 'Authorization: Bearer my-key' http://localhost:5050/<name>/logs
```

4. Then, you can stop the instance if it's not needed.
```bash
curl -H 'Content-Type: application/json' -H 'Authorization: Bearer my-key' https://katana-ci.arkproject.dev/<name>/stop
```
# Work in progress
- [ ] Load initial users keys from environement file.
- [ ] Add an endpoint to register a user with a system of `whitelist-admins`.
- [ ] Deploy an instance to accept requests on `katana-ci.arkproject.dev`.

0 comments on commit c048a72

Please sign in to comment.