diff --git a/ansible/geth.yml b/ansible/geth.yml new file mode 100644 index 0000000..e4de6eb --- /dev/null +++ b/ansible/geth.yml @@ -0,0 +1,15 @@ +--- +- name: Pre-playbook checks + hosts: localhost + tasks: + - name: 'Verify Ansible version is 2.8 or newer' + assert: + that: 'ansible_version.full is version_compare("2.8", ">=")' + msg: 'Your Ansible version is lower than 2.8. Upgrade it.' + +- name: Configure geth nodes + hosts: nimbus-geth-goerli + roles: + - { role: swap-file, tags: swap-file } + - { role: infra-role-geth, tags: infra-role-geth } + - { role: infra-role-geth-exporter, tags: infra-role-geth-exporter } diff --git a/ansible/group_vars/nimbus-geth-goerli.yml b/ansible/group_vars/nimbus-geth-goerli.yml new file mode 100644 index 0000000..6d62aa2 --- /dev/null +++ b/ansible/group_vars/nimbus-geth-goerli.yml @@ -0,0 +1,27 @@ +--- +# This node is used as replacement for Infura for end-to-end tests. + +# Syncing can use a lot of mamory +swap_file_size_mb: 4096 + +# Geth node +geth_network_name: 'goerli' +geth_cont_name: 'geth-{{ geth_network_name }}' +geth_extra_alias: '{{ geth_cont_name }}' +geth_sync_mode: 'full' +geth_log_level_name: info +# Geth auth +geth_account_pass: '{{lookup("passwordstore", "service/Nimbus-Geth/password")}}' + +# Memory settings +geth_cont_mem_ratio: 0.7 + +# Geth metrics +geth_source_cont_name: '{{ geth_cont_name }}' +geth_expo_cont_name: '{{ geth_cont_name }}-metrics' +geth_expo_consul_id: '{{ geth_expo_cont_name }}' + +# Ports +geth_port: 30303 +geth_rpc_port: 8545 +geth_expo_cont_port: 9200 diff --git a/ansible/requirements.yml b/ansible/requirements.yml index 148e89b..94b72f7 100644 --- a/ansible/requirements.yml +++ b/ansible/requirements.yml @@ -42,3 +42,11 @@ - name: swap-file src: git@github.com:status-im/infra-role-swap-file.git scm: git + +- name: infra-role-geth + src: git@github.com:status-im/infra-role-geth.git + scm: git + +- name: infra-role-geth-exporter + src: git+git@github.com:status-im/infra-role-geth-exporter.git + scm: git