Puppet Class: storj
- Defined in:
- manifests/init.pp
Summary
This module manages StorjOverview
Init class of Storj module. It can installes Storj binaries and single Service.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'manifests/init.pp', line 61
class storj (
Storj::Authorization_token $authorization_token,
String $wallet,
String $mail,
Stdlib::Host $host,
String $storage,
Stdlib::Absolutepath $storage_path,
Pattern[/\d+\.\d+\.\d+/] $version = '1.1.1',
String $os = downcase($facts['kernel']),
# Installation
Stdlib::Absolutepath $base_dir = '/opt',
Stdlib::Absolutepath $bin_dir = '/usr/local/bin',
Stdlib::HTTPUrl $base_url = 'https://github.com/storj/storj/releases/download',
String $download_extension = 'zip',
Optional[Stdlib::HTTPUrl] $download_url = undef,
Optional[String] $extract_command = undef,
Stdlib::Absolutepath $config_dir = '/etc/storj',
# User Management
Boolean $manage_user = true,
Boolean $manage_group = true,
String $user = 'storj',
String $group = 'storj',
Stdlib::Absolutepath $user_shell = '/bin/false',
Array[String] $extra_groups = [],
# Service
Variant[Stdlib::Ensure::Service, Enum['absent']] $service_ensure = 'running',
String $docker_tag = 'beta',
Stdlib::Port $port = 28967,
Stdlib::Port $dashboard_port = 14002,
# Extra Management
Boolean $manage_docker = true,
) {
case $facts['architecture'] {
'x86_64', 'amd64': { $arch = 'amd64' }
'aarch64' : { $arch = 'arm64' }
'armv7l' : { $arch = 'arm' }
default: {
fail("Unsupported kernel architecture: ${facts['architecture']}")
}
}
if $download_url {
$real_download_url = $download_url
} else {
$real_download_url = "${base_url}/v${version}/identity_${os}_${arch}.${download_extension}"
}
include storj::install
include storj::config
include storj::service
Class['storj::install'] -> Class['storj::config'] -> Class['storj::service']
if $manage_docker {
include docker
Class['docker'] -> Class['storj::install']
}
}
|