make geth miner use existing account

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-03-19 13:16:25 +01:00
parent f75d82bc19
commit b317719f65
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
4 changed files with 18 additions and 21 deletions

View File

@ -1,6 +1,6 @@
---
# stage contains the network name
miner_network: '{{ stage }}'
miner_account_pass: '{{lookup("passwordstore", "services/faucet/miners-pass")}}'
miner_base_account_addr: '{{lookup("passwordstore", "services/faucet/account-addr")}}'
miner_base_account_pass: '{{lookup("passwordstore", "services/faucet/account-pass")}}'
miner_base_account_json: '{{lookup("passwordstore", "services/faucet/account-json")}}'

View File

@ -8,17 +8,17 @@ miner_network_ids:
miner_network: ~
miner_network_id: '{{ miner_network_ids[miner_network] | mandatory }}'
# miner etherum account
miner_account_pass: ~
# miner reward account
miner_base_account_pass: ~
miner_base_account_addr: ~
miner_base_account_json: ~
miner_cont_tag: v1.8.23
miner_cont_image: 'ethereum/client-go:{{ miner_cont_tag }}'
miner_cont_name: 'geth-miner'
miner_cont_vol: '/docker/{{ miner_cont_name }}'
miner_verbosity: 3
miner_extra_data: 'Status.im Miner'
miner_main_port: 30303
miner_rpc_port: 8545

View File

@ -1,30 +1,27 @@
---
- name: Create container folders
file:
path: '{{ miner_cont_vol }}/data'
path: '{{ item }}'
state: directory
mode: 0750
owner: dockremap
group: docker
with_items:
- '{{ miner_cont_vol }}/data'
- '{{ miner_cont_vol }}/data/keystore'
- name: Create account password file
copy:
dest: '{{ miner_cont_vol }}/data/account.pass'
content: '{{ miner_account_pass }}'
mode: 0750
dest: '{{ miner_cont_vol }}/data/keystore/faucet.pass'
content: '{{ miner_base_account_pass | mandatory }}'
mode: 0640
owner: dockremap
group: docker
- name: Create miner account
docker_container:
name: 'miner-account-gen'
image: '{{ miner_cont_image }}'
user: root
pull: true
command: |
account new
--datadir=/data
--password=/data/account.pass
volumes:
- '{{ miner_cont_vol }}/data:/data:rw'
- name: Create account keystore file
copy:
dest: '{{ miner_cont_vol }}/data/keystore/faucet.json'
content: '{{ miner_base_account_json | mandatory }}'
mode: 0640
owner: dockremap
group: docker

View File

@ -15,7 +15,7 @@
command: |
--networkid={{ miner_network_id }}
--datadir=/data
--password=/data/account.pass
--password=/data/keystore/faucet.pass
--shh
--shh.pow={{ miner_shh_pow }}
--rpc