added support for managing the packagecloud repo's

added packagecloud module as a dependency
This commit is contained in:
Matthias Crauwels 2017-02-10 14:54:17 +01:00
Родитель 3a545935c7
Коммит d8c233d89d
4 изменённых файлов: 91 добавлений и 0 удалений

Просмотреть файл

@ -9,6 +9,7 @@ class orchestrator (
$package_ensure = $orchestrator::params::package_ensure,
$package_manage = $orchestrator::params::package_manage,
$package_name = $orchestrator::params::package_name,
$repo_manage = $orchestrator::params::repo_manage,
$service_enable = $orchestrator::params::service_enable,
$service_ensure = $orchestrator::params::service_ensure,
$service_manage = $orchestrator::params::service_manage,
@ -20,6 +21,7 @@ class orchestrator (
validate_string($package_ensure)
validate_bool($package_manage)
validate_array($package_name)
validate_bool($repo_manage)
validate_bool($service_enable)
validate_string($service_ensure)
validate_bool($service_manage)
@ -28,6 +30,7 @@ class orchestrator (
# Using anchor pattern based on known issue:
# http://docs.puppetlabs.com/puppet/2.7/reference/lang_containment.html#known-issues
anchor { 'orchestrator::begin': } ->
class { '::orchestrator::repo': } ->
class { '::orchestrator::install': } ->
class { '::orchestrator::config': } ~>
class { '::orchestrator::my_cnf': } ~>

Просмотреть файл

@ -6,6 +6,7 @@ class orchestrator::params {
$package_ensure = 'present'
$package_manage = true
$package_name = [ 'orchestrator' ]
$repo_manage = true
$service_enable = true
$service_ensure = 'running'
$service_manage = true
@ -13,6 +14,7 @@ class orchestrator::params {
$srv_cnf = '/etc/orchestrator_srv.cnf'
$topology_cnf = '/etc/orchestrator.cnf'
# lint:ignore:140chars
$config_defaults = {
'Debug' => true,
'EnableSyslog' => false,
@ -150,4 +152,5 @@ class orchestrator::params {
'GraphitePath' => '',
'GraphiteConvertHostnameDotsToUnderscores' => true,
}
# lint:endignore
}

23
manifests/repo.pp Normal file
Просмотреть файл

@ -0,0 +1,23 @@
# Manage the packagecloud repo's
class orchestrator::repo inherits orchestrator {
if $orchestrator::manage_repo {
include packagecloud
case $::operatingsystem {
'Debian', 'Ubuntu': {
packagecloud::repo { 'github/orchestrator':
type => 'deb',
}
}
'Fedora', 'CentOS', 'RedHat': {
packagecloud::repo { 'github/orchestrator':
type => 'rpm',
}
}
default: {
fail("Operating system ${::operatingsystem} was not supported for adding repo's")
}
}
}
}

62
metadata.json Normal file
Просмотреть файл

@ -0,0 +1,62 @@
{
"name": "github-orchestrator",
"version": "1.0.1",
"author": "GitHub",
"license": "MIT",
"summary": "A module for installing and configuring Orchestrator (https://github.com/github/orchestrator/)",
"source": "https://github.com/github/puppet-orchestrator-for-mysql.git",
"project_page": "https://github.com/github/puppet-orchestrator-for-mysql",
"issues_url": "https://github.com/github/puppet-orchestrator-for-mysql/issues",
"tags": ["mysql", "orchestrator"],
"operatingsystem_support": [
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"5",
"6",
"7"
]
},
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"5",
"6",
"7"
]
},
{
"operatingsystem":"Fedora",
"operatingsystemrelease": [
"22",
"23",
"24"
]
},
{
"operatingsystem":"Debian",
"operatingsystemrelease": [
"7",
"8"
]
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"12.04",
"14.04",
"15.04",
"15.10",
"16.04"
]
}
],
"requirements": [
{ "name": "json", "version_requirement": ">=1.8.0" },
{ "name": "puppet", "version_requirement": ">= 3.2.0" }
],
"dependencies": [
{ "name": "puppetlabs/stdlib", "version_requirement": ">= 3.2.0 <5.0.0" },
{ "name": "computology/packagecloud", "version_requirement": ">= 0.2.0" }
]
}