Skip to content

added support for managing the packagecloud repo's #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ This module is to install the MySQL tool called Orchestrator via puppet. Orchest

* The orchestrator deb/rpm package is available to puppet if `orchestrator::params::package_manage` is `true`.

* Puppet will manage the [Orchestrator Packagecloud repo](https://packagecloud.io/github/orchestrator) if `orchestrator::params::repo_manage` is `true`. *Note*: this functionality will require the [computology/packagecloud]( https://forge.puppet.com/computology/packagecloud) module dependency.

## Status
Stable and in active development.

Expand Down
16 changes: 16 additions & 0 deletions examples/init.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
node default {

$user = 'root'
$password = 'root'

class { '::mysql::server':
root_password => "%${password}%",
remove_default_accounts => true,
} ->
class { '::orchestrator':
config_override => {
'MySQLOrchestratorHost' => '127.0.0.1',
},
}

}
3 changes: 3 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
$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,
Expand All @@ -20,6 +21,7 @@
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)
Expand All @@ -28,6 +30,7 @@
# 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': } ~>
Expand Down
3 changes: 3 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
$package_ensure = 'present'
$package_manage = true
$package_name = [ 'orchestrator' ]
$repo_manage = true
$service_enable = true
$service_ensure = 'running'
$service_manage = true
$service_name = 'orchestrator'
$srv_cnf = '/etc/orchestrator_srv.cnf'
$topology_cnf = '/etc/orchestrator.cnf'

# lint:ignore:140chars
$config_defaults = {
'Debug' => true,
'EnableSyslog' => false,
Expand Down Expand Up @@ -150,4 +152,5 @@
'GraphitePath' => '',
'GraphiteConvertHostnameDotsToUnderscores' => true,
}
# lint:endignore
}
23 changes: 23 additions & 0 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Manage the packagecloud repo's
class orchestrator::repo inherits orchestrator {
if $orchestrator::repo_manage {
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 changes: 62 additions & 0 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -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" }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it needs to be the reference to the puppet forge: https://forge.puppet.com/computology/packagecloud (which links back to the github repo you mentioned)

]
}