strings to lists, privacy updates

pull/21/head
Joshua Fernandes 5 years ago
parent b959397c09
commit 25128b9436
  1. 9
      README.md
  2. 9
      defaults/main.yml
  3. 4
      tasks/main.yml
  4. 7
      templates/besu.service.j2
  5. 7
      templates/config.toml.j2

@ -82,11 +82,10 @@ 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_nodes_contract_address` | ___unset___ | The contract address for onchain nodes permissioning |
| `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` |
| `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 |
| `orion_config_dir` | ___unset___ | Path to Orion configuration directory |
| `orion_key_name` | ___unset___ | Name of the Node Key |
| `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` |
| `besu_privacy_enabled` | false | Enable privacy |
| `besu_privacy_url` | "" | URL to contact Orion on including port eg: `http://localhost:8888` |
| `besu_privacy_public_key_file` | ""| Path to Orion public key |
### Example Playbook

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

@ -12,10 +12,10 @@
incompatible. If trying to build a specific git refspec, use
"besu_git_refspec" instead of besu_version.
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:
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_sync_mode == "FAST" )
- name: Include OS and distribution specific variables
include_vars: "{{ item }}"

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

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

Loading…
Cancel
Save