Skip to content
Open
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
3 changes: 3 additions & 0 deletions miner/envs/runner/.env.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# generate one for yourself, e.g. `python3 -c 'import random; import string; print("".join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(50)))'`
SECRET_KEY=
# password for user "admin"
# generate one for yourself, e.g. `python3 -c 'import random; import string; print("".join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(16)))'`
DEFAULT_ADMIN_PASSWORD=
# generate one for yourself
POSTGRES_PASSWORD=
# make sure to unblock access to that port in your firewall
Expand Down
11 changes: 11 additions & 0 deletions miner/envs/runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ services:
With the `.env` and `docker-compose.yml` already in place, you can start the miner with `docker-compose up -d`.
Test if it is running properly with `docker-compose ps`.

## Admin panel

Your miner exposes an admin panel that allows you to check its health. To access it, use the same address and port as
the ones you expose in your axon. For example, type `http://198.66.65.12.13:8000` in your browser. To log in you need
to set up an admin password, either in .env or manually.

## Creating an admin user manually (not using DEFAULT_ADMIN_PASSWORD in .env)

Run `docker-compose exec miner-runner docker-compose exec app python manage.py createsuperuser` and follow
the instructions.

## How it works

The `backenddevelopersltd/compute-horde-miner-runner` docker image contains a `docker-compose.yml` file with all the necessary services to run a miner.
Expand Down
18 changes: 18 additions & 0 deletions validator/envs/runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ services:
```
# generate one for yourself, e.g. `python3 -c 'import random; import string; print("".join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(50)))'`
SECRET_KEY=
# password for user "admin"
# generate one for yourself, e.g. `python3 -c 'import random; import string; print("".join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(16)))'`
DEFAULT_ADMIN_PASSWORD=
# generate one for yourself, e.g. `python3 -c 'import random; import string; print("".join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(15)))'`
POSTGRES_PASSWORD=
# don't change POSTGRES_PASSWORD after you start your validator for the first time (but you have generate it before that)
Expand Down Expand Up @@ -85,6 +88,21 @@ ERROR: error while removing network: network ... has active endpoints
```
it is inconsequential, and we will remove it soon.

## Admin panel

Your validator exposes an admin panel that allows you to check its health. For security purposes, it is only accessible
at 127.0.0.1, so to access it, assuming you have SSH access to that machine do:
`ssh -L 8000:127.0.0.1:80 user@validator_machine`. After that you can access the panel on your local (the machine
on which you ran `ssh ...`) machine at `http://127.0.0.1:8000`. Important! the `80` in `ssh ...` will be different
if you set `HTTP_PORT`. If you don't, then 80 is the default. To log in you need to set up an admin password, either
in .env or manually.

## Creating an admin user manually (not using DEFAULT_ADMIN_PASSWORD in .env)

Run `docker-compose exec validator-runner docker-compose exec app python manage.py createsuperuser` and follow
the instructions.


## How it works

The `backenddevelopersltd/compute-horde-validator-runner` docker image contains a `docker-compose.yml` file with all the necessary services to run a validator.
Expand Down