Skip to content

Commit

Permalink
Merge pull request #1148 from moonstream-to/revert-1147-revert-1145-f…
Browse files Browse the repository at this point in the history
…ix-nb-access

Fix nodebalancer CLI and removed autogen accesses 2
  • Loading branch information
kompotkot authored Dec 13, 2024
2 parents edf5d9b + 00e3e94 commit 1de7b7f
Show file tree
Hide file tree
Showing 12 changed files with 779 additions and 634 deletions.
29 changes: 14 additions & 15 deletions nodebalancer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,36 @@
## Installation

- Prepare environment variables, according to `sample.env`.
- Build application
- Build an application

```bash
go build -o nodebalancer .
```

## Work with nodebalancer
## CLI

**IMPORTANT** Do not use flag `-debug` in production.

### add-access
Node balancer access manipulation requires an administration token to create and modify resources within the Bugout moonstream application.

### add new access

Add new access for user:

```bash
nodebalancer add-access \
--user-id "<user_uuid>" \
--access-id "<access_uuid>" \
./nodebalancer access add \
--access-token "<bugout_access_token>"
--name "Access name" \
--description "Description of access" \
--extended-methods false \
--blockchain--access true
--description "Description of access"
```

### delete-access
### delete access

Delete user access:

```bash
nodebalancer delete-access \
--user-id "<user_uuid>" \
./nodebalancer access delete \
--access-token "<bugout_access_token>"
--access-id "<access_uuid>"
```

Expand All @@ -42,10 +41,10 @@ If `access-id` not specified, all user accesses will be deleted.
### users

```bash
nodebalancer users | jq .
./nodebalancer access list --access-token "<bugout_access_token>" | jq .
```

This command will return a list of bugout resources of registered users to access node balancer with their `crawlers/app/project` (in our project we will call it `crawlers`).
This command will return a list of bugout resources of registered users to access node balancer.

```json
[
Expand All @@ -72,7 +71,7 @@ This command will return a list of bugout resources of registered users to acces
### server

```bash
nodebalancer server -host 0.0.0.0 -port 8544 -healthcheck
./nodebalancer server --host 0.0.0.0 --port 8544 --healthcheck
```

Flag `--healthcheck` will execute background process to ping-pong available nodes to keep their status and current block number.
Expand Down
Loading

0 comments on commit 1de7b7f

Please sign in to comment.