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

Fix nodebalancer CLI and removed autogen accesses 2 #1148

Merged
merged 2 commits into from
Dec 13, 2024
Merged
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
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
Loading