Skip to content

Commit

Permalink
Clarified setup instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne committed Oct 2, 2020
1 parent f6606c3 commit a8cf807
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
6 changes: 5 additions & 1 deletion PREREQUISITES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@


This project relies on docker and docker-compose, and git to bring the
project itself in. It has been tested on Linux and Windows 10, and is
project itself in. It has been tested on Linux, and is
expected to work on MacOS.

## Ubuntu Prerequisites

> Note: The following prerequisites will be installed on the Linux server you
> will run your node on. The machine you use to connect *to* the Linux server
> only requires an SSH client.
```
sudo apt update && sudo apt dist-upgrade
sudo apt install docker docker-compose git
Expand Down
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,29 @@ Please see [setup instructions](SETUP.md) and then come back here.

## Step 3: Build the client

Build all required images from source. This will take 20-30 minutes.<br />
`sudo docker-compose build`
> **Important** Before you build, verify once more that `LOCAL_UID` in `.env`
> is the UID of your user (check with `echo $UID`), and that the file `.env`
> (dot env) is called exactly that, and contains the parameters you expect.
> You will get errors about missing permissions if the UID is wrong.
Build all required images from source. This will take 20-30 minutes. Assuming
you cloned the project into `eth2-docker`:
```
cd ~/eth2-docker
sudo docker-compose build
```

## Step 4: Create an eth2 wallet and validator keystore and deposit files

You will deposit eth to the deposit contract, and receive locked eth2 in turn.<br />
[RECOMMENDATIONS.md](RECOMMENDATIONS.md) has comments on key security.

Make sure you're in the project directory, `cd ~/eth2-docker` by default.

Edit the `.env` file to set the number of validators you wish to run. The default
is just one (1) validator.

This command will get you ready to deposit eth:<br />
This command will get you ready to deposit eth:
`sudo docker-compose run deposit-cli`

The created files will be in the directory `.eth2/validator_keys` in this project.
Expand Down
18 changes: 16 additions & 2 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ git clone https://github.com/eth2-educators/eth2-docker.git
cd eth2-docker
```

> Note: All work will be done from within the `~/eth2-docker` directory.
> All commands that have you interact with the "dockerized" client will
> be carried out from within that directory.
## Client choice

Please choose:
Expand All @@ -49,18 +53,28 @@ Please choose:
* Whether to run a grafana dashboard for monitoring

> Note: Teku is written in Java, which makes it memory-hungry. In its default configuration, you may
> want a machine with 16 GiB of RAM. See .env for a parameter to restrict Teku to 4 GiB of RAM.
> want a machine with 16 GiB of RAM. See `.env` for a parameter to restrict Teku to 4 GiB of RAM.
First, copy the environment file.<br />
`cp default.env .env`

> This file is called `.env` (dot env), and that name has to be exact. docker-compose
> will otherwise show errors about not being able to find a `docker-compose.yml` file,
> which this project does not use.
Then, adjust the contents of `.env`. On Ubuntu Linux, you can run `nano .env`.
- Set the `GRAFFITI` string if you want a POAP or just a specific string
- If you are on Linux, adjust `LOCAL_UID` to the UID of the logged-in user.
- If you are on Linux, **adjust `LOCAL_UID` to the UID of the logged-in user**.
`echo $UID` will show it to you. It is highly recommended to run as a non-root
user on Linux. On [Debian](https://devconnected.com/how-to-add-a-user-to-sudoers-on-debian-10-buster/)
you may need to install `sudo` and add your user to the `sudoers` group. Ubuntu
has that functionality built-in.

> **Important**: The step above needs to be completed before the client is
> built. Use the same user to configure, build and run the client. If the
> UID in `.env` does not match the UID of the user, then you will get
> permissions errors during use.
- Set the `COMPOSE_FILE` entry depending on the client you are going to run,
and with which options. See below for available compose files.
- If you are going to use a 3rd-party provider as your eth1 chain source, set `ETH1_NODE` to that URL.
Expand Down

0 comments on commit a8cf807

Please sign in to comment.