standardtech_bot.substrate_deployer
Ansible Role: Substrate Node
This role helps you install and set up a Substrate Node on a Virtual Machine.
Note: This role is still being developed. There may be bugs, and the variables may change as work continues.
Requirements
- Ansible version 2.7 or higher (It might work with older versions, but we can't promise it).
Considerations
- When downloading an archive, it should only have one binary file. If there are other files, the installation might fail.
Role Variables
You can change the following variables by checking the defaults/main.yml file. Here’s a quick list:
| Name | Default Value | Description | 
|---|---|---|
| substrate_node_install | true | Set to download the release and replace the existing one if different. | 
| substrate_node_configure | true | Set to perform configuration. | 
| substrate_node_version | 0.0.9 | Version to download; "latest" is also accepted. | 
| substrate_node_bin_dir | /usr/local/bin/ | Directory for the binary file. | 
| substrate_node_bin_name | opportunity-standalone | Name of the binary file and service. | 
| substrate_node_logging | syslog | Log type to use with systemd: 'syslog' or 'file'. | 
| substrate_node_restart | always | Restart policy for the service. | 
| substrate_node_logrotate_conf_enable | true | Enable log rotation for log files (requires substrate_node_loggingto be "file"). | 
| substrate_node_logrotate_conf | redacted | Log rotation configuration. | 
| substrate_node_role | Validator | Choose the node role: "Validator", "Collator," or "RPC". | 
| substrate_node_bootnodes | `` | List of bootnodes if needed. | 
| substrate_node_friendly_name | null | Name used by the Telemetry service. | 
| substrate_node_data_dir | /data | Directory for storing chain state. | 
| substrate_node_substrate_node_identity | `` | Node identity e.g. "alice", "bob". | 
| substrate_node_use_root | true | Use root user for permissions/running the binary. | 
| substrate_node_pruning | `` | Pruning mode: archive or constrained. | 
| substrate_node_chain | opportunity | Chain type to use. | 
| substrate_node_p2p_port | 30333 | libp2p communication port for the node. | 
| substrate_node_rpc_port | 9933 | HTTP RPC port for the node. | 
| substrate_node_rpc_external | false | Allow HTTP RPC access from outside localhost/polkadot.js. | 
| substrate_node_ws_port | 9944 | WebSocket port for the node. | 
| substrate_node_ws_external | false | Allow WebSocket RPC access from outside localhost/polkadot.js. | 
| substrate_node_rpc_cors | `` | List of allowed origins for external RPCs or 'all'. | 
| substrate_node_rpc_methods | `` | RPC mode options: Auto, Safe, Unsafe. | 
| substrate_node_prometheus_port | 9615 | Port for the Prometheus endpoint. | 
| substrate_node_prometheus_disable | false | Disable Prometheus endpoint if set to true. | 
| substrate_node_prometheus_external | false | Allow Prometheus access from outside localhost/polkadot.js. | 
Installation
Ansible Galaxy
Run ansible-galaxy install standardtech_bot.substrate_deployer to install the latest stable version of this role.
Requirements File
Add this to your requirements file:
roles:
  - name: substrate_deployer
    src: https://github.com/digitalnativeinc/ansible-role-substrate-deployer.git
    version: 0.6.0
To install the roles from the requirements file, use:
ansible-galaxy install -r requirements.yml
Playbook
You can use it in a playbook like this:
- hosts: all
  roles:
    - substrate_deployer
  vars:
    substrate_node_version: latest
    substrate_node_role: "Validator"
    substrate_node_friendly_name: "Standard Validator"
    substrate_node_logging: "file"
    substrate_node_data_dir: "/data"
    substrate_node_rpc_port: 9933
    substrate_node_bin_name: "opportunity-standalone"
License
This project is licensed under the MIT License. See LICENSE for more details.
Installa
 ansible-galaxy install standardtech_bot.substrate_deployerLicenza
 
            mit
          
Download
 
            96
          
Proprietario
 