diff --git a/ansible/roles/faucet/defaults/main.yml b/ansible/roles/faucet/defaults/main.yml index 44e00b8..d475122 100644 --- a/ansible/roles/faucet/defaults/main.yml +++ b/ansible/roles/faucet/defaults/main.yml @@ -20,6 +20,7 @@ faucet_geth_tag: 'v1.8.23' faucet_geth_image: 'ethereum/client-go:{{ faucet_geth_tag }}' faucet_geth_name: 'faucet-geth' faucet_geth_vol: '/docker/{{ faucet_geth_name }}' +faucet_geth_main_port: 30303 faucet_geth_rpc_port: 8545 faucet_geth_alias: 'geth' diff --git a/ansible/roles/faucet/tasks/firewall.yml b/ansible/roles/faucet/tasks/firewall.yml index bda6dc7..260e6d1 100644 --- a/ansible/roles/faucet/tasks/firewall.yml +++ b/ansible/roles/faucet/tasks/firewall.yml @@ -1,4 +1,16 @@ --- +- name: Enable geth port + iptables: + comment: 'Enable geth' + action: insert + chain: DOCKER-USER + jump: ACCEPT + source: '0.0.0.0/0' + protocol: tcp + destination_port: '{{ faucet_geth_main_port }}' + notify: + - Save iptables rules + - name: Enable faucet HTTP port iptables: comment: 'Enable faucet' diff --git a/ansible/roles/faucet/tasks/geth.yml b/ansible/roles/faucet/tasks/geth.yml index 0ce3129..5d4bf1c 100644 --- a/ansible/roles/faucet/tasks/geth.yml +++ b/ansible/roles/faucet/tasks/geth.yml @@ -29,5 +29,6 @@ --v5disc ports: - '127.0.0.1:{{ faucet_geth_rpc_port }}:{{ faucet_geth_rpc_port }}' + - '{{ faucet_geth_main_port }}:{{ faucet_geth_main_port }}' volumes: - '{{ faucet_geth_vol }}/data:/date' diff --git a/ansible/roles/geth-miner/tasks/container.yml b/ansible/roles/geth-miner/tasks/container.yml index 8799e8e..223d363 100644 --- a/ansible/roles/geth-miner/tasks/container.yml +++ b/ansible/roles/geth-miner/tasks/container.yml @@ -16,6 +16,8 @@ --networkid={{ miner_network_id }} --datadir=/data --password=/data/keystore/faucet.pass + --port={{ faucet_geth_main_port }} + --v5disc --shh --shh.pow={{ miner_shh_pow }} --rpc diff --git a/main.tf b/main.tf index 85e6538..c333264 100644 --- a/main.tf +++ b/main.tf @@ -48,6 +48,7 @@ module "faucet-master" { open_ports = [ "80-80", /* HTTP */ "443-443", /* HTTPS */ + "30303" /* GETH */ ] }