This Ansible playbook deploys a Nomad + Consul cluster into an Ubuntu Server 20.04 machine and runs an Ethereum node in the Ropsten test net as a containerized nomad job (Docker). The ledger data is permanently persisted to a mounted drive.
Preserve the contents of the files and only change the mentioned values.
cd ansible
# Example
[nomad_servers]
10.0.0.1:22
[nomad_clients]
10.0.0.1:22
[all:vars]
ansible_user=myuser
ansible_ssh_user=myuser
ansible_ssh_private_key_file=~/.ssh/id_rsa
# Example
DATA_VOLUME_DEVICE_NAME: sdc
DATA_VOLUME_FILESYSTEM: ext4
DATA_VOLUME_MOUNT_POINT: /data
DATA_VOLUME_DATA_OWNER: myuser
This step can be removed with proper docker auth configuration (TODO).
# Example
DOCKER_HUB_USERNAME: "myuser"
DOCKER_HUB_PASSWORD: "mypass"
ansible-galaxy install -r requirements.yml
ansible-playbook eth-node.yaml
You can access the Nomad UI via:
http://<server_ip>:4646/ui/jobs
- Setup Docker static token authentication on the node to avoid having to specify credentials.
- Setup monitoring (in this config it doesn't make much sense to setup monitoring services on the same machine).
- Implement better health checks for the Ethereum node.