add keystore to faucet geth to manage account
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
45ee58d675
commit
a98ea99095
|
@ -2,4 +2,6 @@
|
||||||
# stage contains the network name
|
# stage contains the network name
|
||||||
faucet_network: '{{ stage }}'
|
faucet_network: '{{ stage }}'
|
||||||
faucet_account_pass: '{{lookup("passwordstore", "services/faucet/account-pass")}}'
|
faucet_account_pass: '{{lookup("passwordstore", "services/faucet/account-pass")}}'
|
||||||
|
faucet_account_addr: '{{lookup("passwordstore", "services/faucet/account-addr")}}'
|
||||||
|
faucet_account_json: '{{lookup("passwordstore", "services/faucet/account-json")}}'
|
||||||
faucet_domain: 'faucet-{{ stage }}.status.im'
|
faucet_domain: 'faucet-{{ stage }}.status.im'
|
||||||
|
|
|
@ -7,6 +7,8 @@ miner_network_ids:
|
||||||
rinkeby: 4
|
rinkeby: 4
|
||||||
|
|
||||||
faucet_account_pass: ~
|
faucet_account_pass: ~
|
||||||
|
faucet_account_addr: ~
|
||||||
|
faucet_account_json: ~
|
||||||
faucet_domain: ~
|
faucet_domain: ~
|
||||||
faucet_network: ~
|
faucet_network: ~
|
||||||
faucet_network_id: '{{ miner_network_ids[faucet_network] | mandatory }}'
|
faucet_network_id: '{{ miner_network_ids[faucet_network] | mandatory }}'
|
||||||
|
@ -22,6 +24,7 @@ faucet_geth_name: 'faucet-geth'
|
||||||
faucet_geth_vol: '/docker/{{ faucet_geth_name }}'
|
faucet_geth_vol: '/docker/{{ faucet_geth_name }}'
|
||||||
faucet_geth_main_port: 30303
|
faucet_geth_main_port: 30303
|
||||||
faucet_geth_rpc_port: 8545
|
faucet_geth_rpc_port: 8545
|
||||||
|
faucet_geth_rcp_api: 'eth,net,web3,admin,personal,shh'
|
||||||
faucet_geth_alias: 'geth,localhost'
|
faucet_geth_alias: 'geth,localhost'
|
||||||
|
|
||||||
# generic container settings
|
# generic container settings
|
||||||
|
|
|
@ -1,11 +1,30 @@
|
||||||
---
|
---
|
||||||
- name: Create container folders
|
- name: Create container folders
|
||||||
file:
|
file:
|
||||||
path: '{{ faucet_geth_vol }}/data'
|
path: '{{ item }}'
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: 0750
|
||||||
owner: dockremap
|
owner: dockremap
|
||||||
group: docker
|
group: docker
|
||||||
|
with_items:
|
||||||
|
- '{{ faucet_geth_vol }}/data'
|
||||||
|
- '{{ faucet_geth_vol }}/data/keystore'
|
||||||
|
|
||||||
|
- name: Create faucet wallet keystore file
|
||||||
|
copy:
|
||||||
|
dest: '{{ faucet_geth_vol }}/data/keystore/wallet.json'
|
||||||
|
content: '{{ faucet_account_json }}'
|
||||||
|
mode: 0640
|
||||||
|
owner: dockremap
|
||||||
|
group: docker
|
||||||
|
|
||||||
|
- name: Create faucet wallet password file
|
||||||
|
copy:
|
||||||
|
dest: '{{ faucet_geth_vol }}/data/keystore/wallet.pass'
|
||||||
|
content: '{{ faucet_account_pass }}'
|
||||||
|
mode: 0640
|
||||||
|
owner: dockremap
|
||||||
|
group: docker
|
||||||
|
|
||||||
- name: 'Create geth container: {{ faucet_geth_name }}'
|
- name: 'Create geth container: {{ faucet_geth_name }}'
|
||||||
docker_container:
|
docker_container:
|
||||||
|
@ -20,9 +39,11 @@
|
||||||
command: |
|
command: |
|
||||||
--datadir=/data
|
--datadir=/data
|
||||||
--networkid={{ faucet_network_id | mandatory }}
|
--networkid={{ faucet_network_id | mandatory }}
|
||||||
|
--password=/data/keystore/wallet.pass
|
||||||
|
--unlock={{ faucet_account_addr }}
|
||||||
--syncmode=light
|
--syncmode=light
|
||||||
--rpc
|
--rpc
|
||||||
--rpcapi=eth
|
--rpcapi={{ faucet_geth_rcp_api }}
|
||||||
--rpcvhosts={{ faucet_geth_alias }}
|
--rpcvhosts={{ faucet_geth_alias }}
|
||||||
--rpcaddr=0.0.0.0
|
--rpcaddr=0.0.0.0
|
||||||
--rpcport={{ faucet_geth_rpc_port }}
|
--rpcport={{ faucet_geth_rpc_port }}
|
||||||
|
@ -31,4 +52,4 @@
|
||||||
- '127.0.0.1:{{ faucet_geth_rpc_port }}:{{ faucet_geth_rpc_port }}'
|
- '127.0.0.1:{{ faucet_geth_rpc_port }}:{{ faucet_geth_rpc_port }}'
|
||||||
- '{{ faucet_geth_main_port }}:{{ faucet_geth_main_port }}'
|
- '{{ faucet_geth_main_port }}:{{ faucet_geth_main_port }}'
|
||||||
volumes:
|
volumes:
|
||||||
- '{{ faucet_geth_vol }}/data:/date'
|
- '{{ faucet_geth_vol }}/data:/data'
|
||||||
|
|
Loading…
Reference in New Issue