enable swarm http interface at 8800

This commit is contained in:
Jakub Sokołowski 2018-08-28 10:05:21 -04:00
parent 20874c92fd
commit 9b49168180
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
3 changed files with 18 additions and 0 deletions

View File

@ -23,5 +23,9 @@ geth_rpc_port: 8545
geth_pass: ~ geth_pass: ~
geth_account: ~ geth_account: ~
# main http port
swarm_addr: '0.0.0.0'
swarm_port: 8800
# for key generation # for key generation
genkey_image: 'ethereum/client-go:alltools-latest' genkey_image: 'ethereum/client-go:alltools-latest'

View File

@ -11,11 +11,13 @@
restart: '{{ cont_restart }}' restart: '{{ cont_restart }}'
ports: ports:
- '{{ cont_port }}:{{ cont_port }}' - '{{ cont_port }}:{{ cont_port }}'
- '{{ swarm_port }}:8500'
links: links:
- '{{ geth_name }}:geth' - '{{ geth_name }}:geth'
command: | command: |
--debug --debug
--port={{ cont_port }} --port={{ cont_port }}
--httpaddr={{ swarm_addr }}
--bzzaccount={{ geth_account }} --bzzaccount={{ geth_account }}
--datadir=/data --datadir=/data
--keystore=/keys --keystore=/keys
@ -37,3 +39,14 @@
destination_port: '{{ cont_port }}' destination_port: '{{ cont_port }}'
notify: notify:
- Save iptables rules - Save iptables rules
- name: Enable swarm HTTP port
iptables:
comment: '{{ cont_name }} HTTP'
chain: INPUT
jump: ACCEPT
source: '0.0.0.0/0'
protocol: tcp
destination_port: '{{ swarm_port }}'
notify:
- Save iptables rules

View File

@ -54,6 +54,7 @@ module "swarm" {
eth_network = "${var.eth_network}" eth_network = "${var.eth_network}"
/* firewall */ /* firewall */
open_ports = [ open_ports = [
"8800-8800", /* http */
"30303-30303", /* geth */ "30303-30303", /* geth */
"30399-30399", /* swarm */ "30399-30399", /* swarm */
] ]