diff --git a/manifests/init.pp b/manifests/init.pp index acd1321..5adc069 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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': } ~> diff --git a/manifests/params.pp b/manifests/params.pp index ded9e98..3181c5c 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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 } diff --git a/manifests/repo.pp b/manifests/repo.pp new file mode 100644 index 0000000..dd10e23 --- /dev/null +++ b/manifests/repo.pp @@ -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") + } + } + } + +} diff --git a/metadata.json b/metadata.json new file mode 100644 index 0000000..95251eb --- /dev/null +++ b/metadata.json @@ -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" } + ] +}