sia

Ansible Role: Sia

Build Status Ansible Galaxy License

The Sia Ansible role installs Sia on a node and automates its initial provisioning steps.

Features

  • Unattended install
    • This role allows you to provision a Sia node from start to finish completely unattended. No more waiting hours for the blockchain to sync or the wallet to unlock before you can proceed to the next step of installation.
  • Service installation
    • Will install Sia as a systemd service.
  • Idempotent
    • This role is idempotent. You can run it against the same server multiple times and it will not change the server's state unless necessary.
  • Simple upgrade
    • With this role, upgrading your Sia version is simply a matter of changing the version variable.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

The version of Sia to install:

sia_version: 1.3.7

The location to install Sia:

sia_dir: "/opt/{{ sia_package }}"

The convenience symlink that will always point to the latest version of Sia (e.g. /opt/sia/siac wallet):

sia_symlink: "/opt/sia"

The location to store Sia data files (blockchain files, encrypted wallet files, and other Sia metadata):

sia_data_dir: "/opt/sia-data"

Specifies whether or not to use the bootstrap method to sync the Sia blockchain:

sia_bootstrap_blockchain: False

Username and group to use for Sia service:

sia_user: sia
sia_group: "{{ sia_user }}"

Sia modules to load (see the --modules parameter of siad):

sia_modules: cgtwrh

Path (on the control node, localhost) to a file to store newly created seed passphrases. If specified, and ansible-role-sia provisions a node with an unitialized wallet, Ansible will initialize the wallet with a random Sia seed and save the passphrase to this file. If the node already has an initialized wallet, this variable is ignored.

sia_seed_path: null

The 29-word Sia passphrase to use to initialize the node's Sia wallet. If the node already has an initialized wallet, this variable is ignored.

sia_seed: null

The passphrase to decrypt the node's wallet:

sia_wallet_password: "{{ sia_seed }}"

Dependencies

None

Example Playbook

example.yml

- hosts: all
  roles:
    - { role: mtlynch.sia }

Running Example Playbook

To run the example playbook, example.yml (above), run the following commands:

ansible-galaxy install mtlynch.sia
ansible-playbook example.yml

Additional Examples

See this blog post for additional examples.

License

MIT

Author Information

This role was created in 2018 by Michael Lynch.

About

Sia distributed storage network

Install
ansible-galaxy install mtlynch/ansible-role-sia
GitHub repository
License
mit
Downloads
43