Merge pull request #21 from joshuafernandes/lists

strings to lists, privacy updates
pull/22/head 0.2.0
Joshua Fernandes 4 years ago committed by GitHub
commit 5ac4fae576
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      README.md
  2. 11
      defaults/main.yml
  3. 6
      tasks/main.yml
  4. 7
      templates/besu.service.j2
  5. 10
      templates/config.toml.j2

@ -82,11 +82,11 @@ All variables which can be overridden are stored in [defaults/main.yml](defaults
| `besu_permissions_accounts_contract_address` | ___unset___ | The contract address for onchain accounts permissioning | | `besu_permissions_accounts_contract_address` | ___unset___ | The contract address for onchain accounts permissioning |
| `besu_permissions_nodes_contract_address` | ___unset___ | The contract address for onchain nodes permissioning | | `besu_permissions_nodes_contract_address` | ___unset___ | The contract address for onchain nodes permissioning |
| `besu_cmdline_args` | "" | Command line args that are passed in as overrides | | `besu_cmdline_args` | "" | Command line args that are passed in as overrides |
| `besu_env_opts` | "" | Settings passed to the JVM through `BESU_OPTS` environment variable. eg: `-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005` | | `besu_env_opts` | [] | Settings passed to the JVM through `BESU_OPTS` environment variable. eg: `[-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005]s` |
| `orion_version` | ___unset___ | Version of Orion installed. When supplied, adds required privacy config items and requires `orion_config_dir` and `orion_key_name` to be set | | `besu_privacy_enabled` | false | Enable privacy |
| `orion_config_dir` | ___unset___ | Path to Orion configuration directory | | `besu_privacy_url` | "" | URL to contact Orion on including port eg: `http://localhost:8888` |
| `orion_key_name` | ___unset___ | Name of the Node Key | | `besu_privacy_public_key_file` | ""| Path to Orion public key |
| `besu_privacy_marker_tx_signing_key_file` | "" | Path of the private key file used to sign Privacy Marker Transactions. If you do not specify this option, Besu signs each transaction with a different randomly generated key. |
### Example Playbook ### Example Playbook

@ -59,8 +59,15 @@ besu_metrics_host: 0.0.0.0
besu_metrics_port: 9545 besu_metrics_port: 9545
besu_bootnodes: [] besu_bootnodes: []
besu_host_whitelist: ["*"] besu_host_whitelist: ["*"]
besu_cmdline_args: "" besu_cmdline_args: []
besu_env_opts: "" besu_env_opts: []
# privacy
besu_privacy_enabled: "false"
besu_privacy_url: "http://127.0.0.1:8888"
besu_privacy_public_key_file: ""
besu_privacy_marker_tx_signing_key_file: ""
# internal state to maintain idempotency # internal state to maintain idempotency
besu_state_updates: [] besu_state_updates: []

@ -12,10 +12,12 @@
incompatible. If trying to build a specific git refspec, use incompatible. If trying to build a specific git refspec, use
"besu_git_refspec" instead of besu_version. "besu_git_refspec" instead of besu_version.
when: besu_version is defined and besu_build_from_source when: besu_version is defined and besu_build_from_source
- name: Check orion_version is not set when fast sync is enabled - name: Check besu_privacy_enabled is not set when fast sync is enabled
fail: fail:
msg: Orion and Fast-Sync are incompatible msg: Orion and Fast-Sync are incompatible
when: orion_version is defined and besu_sync_mode == "FAST" when: ( besu_privacy_enabled|bool == True ) and
( besu_privacy_public_key_file != "" ) and
( besu_sync_mode == "FAST" )
- name: Include OS and distribution specific variables - name: Include OS and distribution specific variables
include_vars: "{{ item }}" include_vars: "{{ item }}"

@ -6,15 +6,15 @@ After=syslog.target network.target
User={{ besu_user }} User={{ besu_user }}
Group={{ besu_group }} Group={{ besu_group }}
Environment=HOME=/home/{{ besu_user }} Environment=HOME=/home/{{ besu_user }}
{% if besu_log4j_config_file %} {% if besu_log4j_config_file != "" %}
Environment=LOG4J_CONFIGURATION_FILE={{ besu_log4j_config_file }} Environment=LOG4J_CONFIGURATION_FILE={{ besu_log4j_config_file }}
{% endif %} {% endif %}
{% if besu_env_opts %} {% if besu_env_opts %}
Environment='BESU_OPTS={{ besu_env_opts }}' Environment='BESU_OPTS={{besu_env_opts|map('to_json')|join(' ')}}'
{% endif %} {% endif %}
Type=simple Type=simple
{% if besu_cmdline_args %} {% if besu_cmdline_args %}
ExecStart=/bin/sh -c "{{ besu_current_dir }}/bin/besu --config-file={{ besu_config_dir }}/config.toml {{ besu_cmdline_args }} >> {{besu_log_dir}}/besu.log 2>&1" ExecStart=/bin/sh -c "{{ besu_current_dir }}/bin/besu --config-file={{ besu_config_dir }}/config.toml {{besu_cmdline_args|map('to_json')|join(' ')}} >> {{besu_log_dir}}/besu.log 2>&1"
{% else %} {% else %}
ExecStart=/bin/sh -c "{{ besu_current_dir }}/bin/besu --config-file={{ besu_config_dir }}/config.toml >> {{besu_log_dir}}/besu.log 2>&1" ExecStart=/bin/sh -c "{{ besu_current_dir }}/bin/besu --config-file={{ besu_config_dir }}/config.toml >> {{besu_log_dir}}/besu.log 2>&1"
{% endif %} {% endif %}
@ -24,3 +24,4 @@ RestartSec=10s
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

@ -103,9 +103,13 @@ bootnodes=[{{besu_bootnodes|map('to_json')|join(',')}}]
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if orion_version is defined %} {% if besu_privacy_enabled|bool == True %}
# Orion # Orion
privacy-enabled=true privacy-enabled=true
privacy-url="http://127.0.0.1:8888" privacy-url="{{besu_privacy_url}}"
privacy-public-key-file="{{ orion_config_dir }}/{{ orion_key_name }}.pub" privacy-public-key-file="{{besu_privacy_public_key_file}}"
{% if besu_privacy_marker_tx_signing_key_file != "" %}
privacy-marker-transaction-signing-key-file="{{besu_privacy_marker_tx_signing_key_file}}"
{% endif %} {% endif %}
{% endif %}

Loading…
Cancel
Save