From ad1cc0dd2bf7f11bc662ad240c5a748f8bd36f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Tue, 19 Mar 2019 20:26:12 +0100 Subject: [PATCH] enable 30303 for geth on master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- ansible/roles/faucet/defaults/main.yml | 1 + ansible/roles/faucet/tasks/firewall.yml | 12 ++++++++++++ ansible/roles/faucet/tasks/geth.yml | 1 + ansible/roles/geth-miner/tasks/container.yml | 2 ++ main.tf | 1 + 5 files changed, 17 insertions(+) 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 */ ] }