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

Revise Siren documentation #6553

Open
wants to merge 9 commits into
base: unstable
Choose a base branch
from
Open

Conversation

chong-he
Copy link
Member

Proposed Changes

Update Siren documentation in Lighthouse book. There are quite some changes compared to the original doc so I will leave some comments to sections to highlight the change. I have also combined Configuration and Installation together as they are quite related to start Siren.


> To access from another machine on the same network (192.168.0.200) set the Beacon Node and Validator Client `--http-address` as `192.168.0.200`. When this is set, the validator client requires the flag `--beacon-nodes http://192.168.0.200:5052` to connect to the beacon node.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about this part. I think this is not necessary if we can connect Siren via SSH. Proposing to remove this to make things simpler.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The aim for Siren is to be as easily accessible as possible, asking them to expose a port over a reverse ssh tunnel is way more complicated. Just exposing the port and accessing the webapp directly that way fits better in the end-user application


1. You can now start Siren with:
```bash
docker run --rm -ti --name siren -p 4443:443 --env-file $PWD/.env --net host sigp/siren
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't get the port 4443:443. Removing the flag -p 4443:443 still works, though with a warning:
metadata.metadataBase is not set for resolving social open graph or twitter images, using "http://localhost:3000". See https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadatabase

Should we keep this? I am not sure if we keep this, but we haven't used it anywhere else later. Please feel free to correct me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--net host is the culprit here: it automatically exposes all ports to the host (including port 80)
it is really bad to advise it as default as it is hugely unsafe.
for some reason it it necessary for people who installed docker though a snap though.

@chong-he chong-he added ready-for-review The code is ready for review docs Documentation labels Oct 31, 2024
Copy link
Member

@antondlr antondlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you can wait a couple days, I can make suggestion commits for the items I stipulated (https instead of ssh).
and/or if you're confused we can have a call to discuss it, so I can explain.


1. You can now start Siren with:
```bash
docker run --rm -ti --name siren -p 4443:443 --env-file $PWD/.env --net host sigp/siren
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--net host is the culprit here: it automatically exposes all ports to the host (including port 80)
it is really bad to advise it as default as it is hugely unsafe.
for some reason it it necessary for people who installed docker though a snap though.


> To access from another machine on the same network (192.168.0.200) set the Beacon Node and Validator Client `--http-address` as `192.168.0.200`. When this is set, the validator client requires the flag `--beacon-nodes http://192.168.0.200:5052` to connect to the beacon node.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The aim for Siren is to be as easily accessible as possible, asking them to expose a port over a reverse ssh tunnel is way more complicated. Just exposing the port and accessing the webapp directly that way fits better in the end-user application

book/src/ui-authentication.md Outdated Show resolved Hide resolved

Siren requires a connection to both a Lighthouse Validator Client and a Lighthouse Beacon Node.
To enable connection, you must generate .env file based on the provided .env.example
Siren supports any operating system that supports container runtimes and/or NodeJS 18, this includes Linux, MacOS, and Windows. The recommended way of running Siren is by launching the [docker container](https://hub.docker.com/r/sigp/siren).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Siren supports any operating system that supports container runtimes and/or NodeJS 18, this includes Linux, MacOS, and Windows. The recommended way of running Siren is by launching the [docker container](https://hub.docker.com/r/sigp/siren).
Siren supports any operating system that supports container runtimes and/or NodeJS 18, this includes Linux, MacOS, and Windows. The recommended way of running Siren is by launching the [docker container](https://hub.docker.com/r/sigp/siren).
Ubuntu users: Please note that Docker installed as a snap is not ideal; the preferred way to install Docker on Ubuntu is outlined [here.](https://docs.docker.com/engine/install/ubuntu/)

If you require accessibility from another machine within the network, configure the `--http-address` to match the local LAN IP of the system running the Beacon Node and Validator Client.
## Running the Docker container (Recommended)

The common usage is to run Siren at a client computer connecting to a server running the node. The following guide is to setup Siren at a client computer and connect it to the server via SSH, so that Siren can be accessed and viewed from the client computer's browser.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is 100% not the case anymore with the "new" dockerised setup.
the preferred way to run it nowadays is to have the docker container as close to the BN and VC as possible, running all the time, with its https port exposed to local LAN.
(this was the whole reason of the architectural overahaul)


When Siren is successfully run, you should see the log `LOG [NestApplication] Nest application successfully started +118ms`, indicating that Siren has started.

1. On the client computer, SSH to the server:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as before; no ssh should be necessary.
expose the https port on the node, access over https.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation ready-for-review The code is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants