From 348df7d675f245737941880914add9666812833e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 18 Mar 2019 22:19:55 +0100 Subject: [PATCH] fix miner configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- .../{faucet_miners.yml => faucet-miners.yml} | 0 ansible/main.yml | 14 +++++++------- ansible/roles/geth-miner/defaults/main.yml | 1 + ansible/roles/geth-miner/tasks/consul.yml | 2 +- ansible/roles/geth-miner/tasks/container.yml | 9 ++++----- 5 files changed, 13 insertions(+), 13 deletions(-) rename ansible/group_vars/{faucet_miners.yml => faucet-miners.yml} (100%) diff --git a/ansible/group_vars/faucet_miners.yml b/ansible/group_vars/faucet-miners.yml similarity index 100% rename from ansible/group_vars/faucet_miners.yml rename to ansible/group_vars/faucet-miners.yml diff --git a/ansible/main.yml b/ansible/main.yml index 93c55b7..4b7b9ec 100644 --- a/ansible/main.yml +++ b/ansible/main.yml @@ -1,11 +1,11 @@ --- -- name: Configure faucet proxy - hosts: faucet-master - roles: - - role: origin-cert - tags: origin-cert - - role: faucet-proxy - tags: faucet-proxy +#- name: Configure faucet proxy +# hosts: faucet-master +# roles: +# - role: origin-cert +# tags: origin-cert +# - role: faucet-proxy +# tags: faucet-proxy - name: Configure faucet miners hosts: faucet-miners diff --git a/ansible/roles/geth-miner/defaults/main.yml b/ansible/roles/geth-miner/defaults/main.yml index 994264f..e6876d8 100644 --- a/ansible/roles/geth-miner/defaults/main.yml +++ b/ansible/roles/geth-miner/defaults/main.yml @@ -6,6 +6,7 @@ miner_base_account_addr: ~ miner_cont_tag: v1.7.2 miner_cont_image: 'ethereum/client-go:{{ miner_cont_tag }}' miner_cont_name: 'geth-miner' +miner_cont_vol: '/docker/{{ miner_cont_name }}' miner_main_port: 30303 miner_rpc_port: 8545 diff --git a/ansible/roles/geth-miner/tasks/consul.yml b/ansible/roles/geth-miner/tasks/consul.yml index 55073ba..29cbb7e 100644 --- a/ansible/roles/geth-miner/tasks/consul.yml +++ b/ansible/roles/geth-miner/tasks/consul.yml @@ -11,4 +11,4 @@ checks: - id: geth-miner-rpc-health type: script - script: 'curl -s -X POST -H Content-type:application/json --data {"jsonrpc":"2.0","method":"admin_nodeInfo","params":[],"id":1} http://localhost:{{ rpc_port }}/' + script: 'curl -s -X POST -H Content-type:application/json --data {"jsonrpc":"2.0","method":"admin_nodeInfo","params":[],"id":1} http://localhost:{{ miner_rpc_port }}/' diff --git a/ansible/roles/geth-miner/tasks/container.yml b/ansible/roles/geth-miner/tasks/container.yml index 641cc35..abbcd3f 100644 --- a/ansible/roles/geth-miner/tasks/container.yml +++ b/ansible/roles/geth-miner/tasks/container.yml @@ -1,8 +1,9 @@ --- - name: Create container folders file: - path: '{{ miner_vol }}/data' - owner: dockeremap + path: '{{ miner_cont_vol }}/data' + state: directory + owner: dockremap group: docker - name: Create geth miner @@ -22,7 +23,6 @@ --{{ miner_network | mandatory }} --etherbase="{{ miner_base_account_addr | mandatory }}" --datadir=/data - --password=/conf/account-pass --shh --shh.pow={{ miner_shh_pow }} --rpc @@ -35,5 +35,4 @@ --mine --miner.threads="{{ ansible_processor_vcpus }}" volumes: - -v /home/geth/data: \ - - '{{ miner_vol }}/data:/data/:rw' + - '{{ miner_cont_vol }}/data:/data:rw'