Forge Home

sinopia

Module to manage sinopia installations

35,465 downloads

35,256 latest version

2.0 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

  • 1.0.1 (latest)
  • 1.0.0
released Jan 24th 2014

Start using this module

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

Add this module to your Puppetfile:

mod 'saheba-sinopia', '1.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add saheba-sinopia
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install saheba-sinopia --version 1.0.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

saheba/sinopia — version 1.0.1 Jan 24th 2014

puppet-sinopia module

Overview

Install sinopia npm-cache-server (https://github.com/rlidwka/sinopia) for Debian, Ubuntu, Fedora, and RedHat.

Dependencies

This module depends on the changes of a not yet merged pull request in puppetlabs/nodejs: https://github.com/puppetlabs/puppetlabs-nodejs/pull/63. Until they are merged you have to explicitely specify the dependency to nodejs in your librarian-puppet Puppetfile:

  # dependency puppetlabs/nodejs
  # replace it with:
  mod "puppetlabs/nodejs",
  :git => "https://github.com/saheba/puppetlabs-nodejs.git",
  :ref => 'npm_local_exec_user_param'  

Usage

class sinopia

Installs sinopia + required npms in one defined directory and integrates the sinopia as a service (/etc/init.d/sinopia). It also creates a user to run the sinopia server (default: sinopia). If you wish, you can change the username, see examples below.

Examples:

minimal:

  class { '::sinopia':
    conf_admin_pw_hash => 'your-pw-hash',
  }

You can generate the admin password hash according to https://github.com/rlidwka/sinopia via command-line:

  $ node
  > crypto.createHash('sha1').update('your-admin-password').digest('hex')

You can also override several configuration parameters.

  class { '::sinopia':
    install_root        => '/usr/local',
    install_dir         => 'sinopiaxy',
    conf_admin_pw_hash  => 'your-pw-hash',
    conf_port           => '8080',
    deamon_user         => 'sinopiaxy',
    conf_listen_to_address  => '127.0.0.1',
    conf_max_body_size  => '10mb',
    conf_max_age_in_sec => '604800',
    install_as_service  => false,
  }

The default values for all so far configurable parameters are:

  class { '::sinopia':
    install_root        => '/opt',
    install_dir         => 'sinopia',
    deamon_user            => 'sinopia',
    conf_listen_to_address     => '0.0.0.0',
    conf_port              => '4783',
    conf_admin_pw_hash
    conf_user_pw_combinations => undef,
    conf_max_body_size     => '1mb',
    conf_max_age_in_sec    => '86400',
    install_as_service     => true,
  }

Supported Platforms

The module has been tested on the following operating systems. Testing and patches for other platforms are welcomed.

  • RedHat EL6.