Fix aws setup

This commit is contained in:
Natalia Gulko 2018-11-07 10:42:21 -08:00 committed by natalia
parent f03dadf975
commit f5b2f8364c
4 changed files with 54 additions and 7 deletions

View File

@ -19,8 +19,8 @@
cidr_ip: 0.0.0.0/0
rules_egress:
- proto: all
from_port: all
to_port: all
from_port: 1
to_port: 65535
cidr_ip: 0.0.0.0/0
tags: blockscout
@ -58,7 +58,7 @@
wait_for: host={{ item.public_ip }} port=22 delay=90 timeout=320 state=started
with_items: "{{ ec2.instances }}"
when: ec2.changed
tags: blockscout
tags: blockscout
- name: Installing python
hosts: launched
@ -72,7 +72,7 @@ tags: blockscout
raw: test -e /usr/bin/python || (sudo apt -y update && sudo apt install -y python-minimal)
- name: EC2 access setup
hosts: blockscout
become: True
hosts: launched
become: False
roles:
- blockscout-access

View File

@ -21,8 +21,8 @@
purge_rules: false
rules_egress:
- proto: all
from_port: all
to_port: all
from_port: 1
to_port: 65535
cidr_ip: 0.0.0.0/0
- name: Add ssh access

View File

@ -1,5 +1,8 @@
---
- name: Create node.toml
template: src=node.toml.j2 dest={{ home }}/node.toml owner={{ username }} group={{ username }} mode=0644
- name: Clone poanetwork/blockscout repo from GitHub
git:
repo: "https://github.com/{{ MAIN_REPO_FETCH }}/blockscout"
@ -20,6 +23,17 @@
group: '{{ username }}'
mode: 0644
- name: Replace Parity url
replace:
path: "{{ item.path }}"
regexp: "{{ item.regexp1 }}"
replace: "{{ item.replace }}"
with_items:
- { path: '{{ home }}/blockscout/apps/explorer/config/dev/parity.exs', regexp1: 'https.*network', replace: 'http://localhost:8545'}
- { path: '{{ home }}/blockscout/apps/explorer/config/dev/parity.exs', regexp1: 'wss.*ws', replace: 'ws://localhost:8546'}
- { path: '{{ home }}/blockscout/apps/indexer/config/dev/parity.exs', regexp1: 'https.*network', replace: 'http://localhost:8545'}
- { path: '{{ home }}/blockscout/apps/indexer/config/dev/parity.exs', regexp1: 'wss.*ws', replace: 'ws://localhost:8546'}
- name: Install dependencies
shell: cd {{ home }}/blockscout && mix local.hex --force && mix do deps.get, local.rebar --force, deps.compile, compile

View File

@ -0,0 +1,33 @@
[parity]
chain = "spec.json"
base_path = "parity_data"
[rpc]
apis = ["all"]
cors=["all"]
[network]
reserved_peers="{{ home }}/bootnodes.txt"
nat="extip:{{ ansible_host }}"
port = 30303
[websockets]
disable = false
port = 8546
interface = "all"
origins = ["all"]
apis = ["all"]
hosts = ["all"]
[ipc]
disable = true
[ui]
disable = true
[snapshots]
disable_periodic = true
[footprint]
tracing = "on"
pruning = "archive"