Forge Home

horizon

Easily manage an instance of the Horizon Platform cryptocurrency client on your server.

8,375 downloads

8,211 latest version

3.3 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.1 (latest)
  • 0.1.0
released Aug 21st 2015

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'n00bsys0p-horizon', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add n00bsys0p-horizon
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install n00bsys0p-horizon --version 0.1.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

n00bsys0p/horizon — version 0.1.1 Aug 21st 2015

horizon

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with horizon
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

The Horizon module provides a way to easily manage a production instance of the Horizon cryptocurrency client.. It handles uptime assurance and security via user and process management.

Setup

What horizon affects

  • Installs:
    • unzip
    • pip
    • supervisord
    • Java Runtime Environment
  • Creates:
    • Data directory /var/lib/horizon (or the service user's name)
    • Supervisord program called "horizon" (or the selected service name)

Beginning with horizon

To get started, install this module with:

puppet module install n00bsys0p-horizon

Once you've got it installed, you can just use include ::horizon to use the default settings, or use the class syntax to specify changes like so:

class { 'horizon':
  client_version => '3.9.2',
  user           => 'hz'
  group          => 'hz',
  service_name   => 'hzclient'
  server_opts    => {
    'nhz.peerServerPort' => '7879',
    'nhz.myHallmark'     => 'deadbeefcafe'
  }
}

Reference

Classes

horizon

This is the class you will most likely be using to implement the module.

It takes the following parameters:

  • $client_version
    • The version of the Horizon client to install and run. Defaults to 4.0e.
  • $user
    • The user under which to install the Horizon node.
  • $group
    • The group under which to install the Horizon node.
  • $service_name
    • The name of the supervisord 'program' to configure.
  • $server_opts
    • A hash of options to write to the Horizon configuration file.

horizon::configure

Installs prerequisites - Java JRE, unzip; sets up the service user's home folder and software deployment folders under /var/lib.

No parameters.

horizon::service

Installs supervisord, pip and the Horizon supervisord program.

No parameters.

Defined Types

horizon::client

Downloads and installs a copy of the Horizon client you want to run.

The client software is installed under /var/lib/$::horizon::user/releases.

The one you've set to $current => true will be symlinked to /var/lib/$::horizon::user/current

The horizon::client's $title should be set to the version of the Horizon client you want to install. The version should not include the 'v' prefix.

Takes the following parameters:

  • $ensure
    • 'absent' will delete the stated version's data directory. Defaults to 'installed'.
  • $user
    • The system user's name. Defaults to 'horizon'.
  • $package_suffix
    • The Horizon package suffix defines the type of wallet you want to download. Defaults to '-node', as 99% or more of the time that's the one you're looking for in a remote server context.
  • $current
    • Whether this client is the currently enabled one. If true, this creates a symlink from /var/lib/releases/$::horizon::user to /var/lib/$::horizon::user/current. Defaults to true.
  • $server_opts
    • A hash of the options to set in the Horizon node configuration file.

Limitations

Currently tested on CentOS 6

If you set multiple client versions as current, the results may be unpredictable, as whichever client gets handled last will be the one that ends up running.

Development

Developers work in their own trees, then submit pull requests when they think their feature or bug fix is ready.