├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── examples └── init.pp ├── files └── etc │ ├── logrotate.d │ └── orchestrator │ └── orchestrator_profile ├── manifests ├── config.pp ├── init.pp ├── install.pp ├── my_cnf.pp ├── params.pp ├── repo.pp └── service.pp ├── metadata.json └── templates ├── orchestrator.cnf.erb └── orchestrator.conf.json.erb /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | [fork]: https://github.com/github/puppet-orchestrator-for-mysql/fork 4 | [pr]: https://github.com/github/puppet-orchestrator-for-mysql/compare 5 | 6 | Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. 7 | 8 | ## Submitting a pull request 9 | 10 | 0. [Fork][fork] and clone the repository 11 | 0. Create a new branch: `git checkout -b my-branch-name` 12 | 0. Make your change, add tests, and make sure the tests still pass 13 | 0. Push to your fork and [submit a pull request][pr] 14 | 0. Pat your self on the back and wait for your pull request to be reviewed and merged. 15 | 16 | Here are a few things you can do that will increase the likelihood of your pull request being accepted: 17 | 18 | - Write tests. 19 | - Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests. 20 | - Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). 21 | 22 | ## Resources 23 | 24 | - [Contributing to Open Source on GitHub](https://guides.github.com/activities/contributing-to-open-source/) 25 | - [Using Pull Requests](https://help.github.com/articles/using-pull-requests/) 26 | - [GitHub Help](https://help.github.com) 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 GitHub 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # puppet-orchestrator-for-mysql 2 | 3 | This module is to install the MySQL tool called Orchestrator via puppet. Orchestrator is used for managing replication topologies. See https://github.com/github/orchestrator for instructions on appopriate configuration and setup. 4 | 5 | # Usage 6 | 7 | ``` 8 | $config_override = { 9 | 'Debug' => true, 10 | 'ReadOnly' => false, 11 | 'MySQLOrchestratorHost' => 'orchestrator.example.com', 12 | 'MySQLOrchestratorPort' => 3306, 13 | 'MySQLOrchestratorDatabase' => 'orchestrator', 14 | 'RemoveTextFromHostnameDisplay' => '.example.com:3306', 15 | 'SlaveLagQuery' => 'select lag from test.heartbeat_table', 16 | 'DiscoverByShowSlaveHosts' => false, 17 | 'DetectClusterAliasQuery' => 'select cluster_alias from test.cluster_info_table where 1=1', 18 | 'DetectClusterDomainQuery' => 'select cluster_domain from test.cluster_info_table where 1=1', 19 | 'DataCenterPattern' => '.*-(.*)-.*[.].*[.]example[.]com', 20 | 'PhysicalEnvironmentPattern' => '.*-.*-(.*)[.].*[.]example[.]com', 21 | 'PseudoGTIDPattern' => '`heartbeat` (ts, server_id, file, position, relay_master_log_file, exec_master_log_pos) VALUES', 22 | 'PseudoGTIDPatternIsFixedSubstring' => true, 23 | 'PseudoGTIDMonotonicHint' => 'heartbeat', 24 | 'DetectPseudoGTIDQuery' => 'select count(*)>0 as pseudo_gtid_exists from test.heartbeat_table where ts > NOW() - INTERVAL 2 DAY;', 25 | 'ProblemIgnoreHostnameFilters' => [ 26 | 'test-server-mysql', 27 | ], 28 | 'PromotionIgnoreHostnameFilters' => [ 29 | 'test-server-mysql', 30 | ], 31 | 'AuditLogFile' => '', 32 | 'AuthenticationMethod' => 'token', 33 | 'FailureDetectionPeriodBlockMinutes' => 60, 34 | 'RecoveryPollSeconds' => 5, 35 | 'RecoveryPeriodBlockSeconds' => 600, 36 | 'RecoveryIgnoreHostnameFilters' => [], 37 | 'RecoverMasterClusterFilters' => [ 38 | 'mysqla', 39 | 'mysqlb', 40 | ], 41 | 'RecoverIntermediateMasterClusterFilters' => [ 42 | 'mysqlb', 43 | 'mysqlc', 44 | ], 45 | 'OnFailureDetectionProcesses' => [ 46 | "sudo -i recovery-handler -t 'detection' -f '{failureType}' -h '{failedHost}' -C '{failureCluster}' -n '{countSlaves}'" 47 | ], 48 | 'PreFailoverProcesses' => [ 49 | "sudo -i recovery-handler -t 'pre-failover' -f '{failureType}' -h '{failedHost}' -C '{failureCluster}' -n '{countSlaves}'" 50 | ], 51 | 'PostFailoverProcesses' => [ 52 | "sudo -i recovery-handler -t 'post-failover' -f '{failureType}' -h '{failedHost}' -H '{successorHost}' -C '{failureCluster}' -n '{countSlaves}'" 53 | ], 54 | 'PostUnsuccessfulFailoverProcesses' => [], 55 | 'PostMasterFailoverProcesses' => [ 56 | "sudo setuidgid orc_user ssh {failedHost} 'sudo -i do_something_on_failed_host > /dev/null 2> /dev/null'", 57 | "sudo setuidgid orc_user ssh {successorHost} 'sudo -i do_something_on_new_host > /dev/null 2> /dev/null'", 58 | ], 59 | 'PostIntermediateMasterFailoverProcesses' => [ 60 | ], 61 | 'CoMasterRecoveryMustPromoteOtherCoMaster' => true, 62 | 'DetachLostSlavesAfterMasterFailover' => true, 63 | 'ApplyMySQLPromotionAfterMasterFailover' => false, 64 | 'MasterFailoverLostInstancesDowntimeMinutes' => 60, 65 | 'PostponeSlaveRecoveryOnLagMinutes' => 10, 66 | 'GraphitePollSeconds' => 60, 67 | 'GraphiteAddr' => 'graphite.example.com:2113', 68 | 'GraphitePath' => 'hosts.{hostname}.orchestrator', 69 | 'GraphiteConvertHostnameDotsToUnderscores' => true, 70 | } 71 | 72 | class { '::orchestrator': 73 | config_override => $config_override, 74 | package_ensure => 'latest', 75 | package_manage => true, 76 | } 77 | ``` 78 | # Assumptions 79 | 80 | * Puppetlab's stdlib is used by this module. 81 | 82 | * The orchestrator deb/rpm package is available to puppet if `orchestrator::params::package_manage` is `true`. 83 | 84 | * 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. 85 | 86 | ## Status 87 | Stable and in active development. 88 | 89 | ## Contributions 90 | Contributions are encouraged. See [CONTRIBUTING.md](https://github.com/github/puppet-orchestrator-for-mysql/blob/master/CONTRIBUTING.md) for more information. 91 | 92 | ## License 93 | Licensed under the [MIT License](http://en.wikipedia.org/wiki/MIT_License). 94 | The full license text is available in [LICENSE](https://github.com/github/puppet-orchestrator-for-mysql/blob/master/LICENSE). 95 | -------------------------------------------------------------------------------- /examples/init.pp: -------------------------------------------------------------------------------- 1 | node default { 2 | 3 | $user = 'root' 4 | $password = 'root' 5 | 6 | class { '::mysql::server': 7 | root_password => "%${password}%", 8 | remove_default_accounts => true, 9 | } -> 10 | class { '::orchestrator': 11 | config_override => { 12 | 'MySQLOrchestratorHost' => '127.0.0.1', 13 | }, 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /files/etc/logrotate.d/orchestrator: -------------------------------------------------------------------------------- 1 | /var/log/orchestrator.log { 2 | daily 3 | rotate 7 4 | missingok 5 | ifempty 6 | compress 7 | nodelaycompress 8 | copytruncate 9 | } 10 | -------------------------------------------------------------------------------- /files/etc/orchestrator_profile: -------------------------------------------------------------------------------- 1 | # Managed by puppet: do not edit directly! 2 | # 3 | # Add profile specific information needed for orchestrator 4 | -------------------------------------------------------------------------------- /manifests/config.pp: -------------------------------------------------------------------------------- 1 | # 2 | 3 | class orchestrator::config inherits orchestrator { 4 | 5 | # Create a merged together set of options. Rightmost hashes win over left. Requires stdlib 6 | $options = merge($orchestrator::config_defaults, $orchestrator::config_override) 7 | 8 | file { $orchestrator::config: 9 | ensure => file, 10 | owner => 0, 11 | group => 0, 12 | mode => '0644', 13 | content => template($orchestrator::config_template), 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /manifests/init.pp: -------------------------------------------------------------------------------- 1 | # 2 | # MySQL orchestrator: For managing replication and failover. 3 | # 4 | class orchestrator ( 5 | $config = $orchestrator::params::config, 6 | $config_defaults = $orchestrator::params::config_defaults, 7 | $config_override = {}, 8 | $config_template = $orchestrator::params::config_template, 9 | $package_ensure = $orchestrator::params::package_ensure, 10 | $package_manage = $orchestrator::params::package_manage, 11 | $package_name = $orchestrator::params::package_name, 12 | $repo_manage = $orchestrator::params::repo_manage, 13 | $service_enable = $orchestrator::params::service_enable, 14 | $service_ensure = $orchestrator::params::service_ensure, 15 | $service_manage = $orchestrator::params::service_manage, 16 | $service_name = $orchestrator::params::service_name, 17 | ) inherits orchestrator::params { 18 | 19 | validate_absolute_path($config) 20 | validate_string($config_template) 21 | validate_string($package_ensure) 22 | validate_bool($package_manage) 23 | validate_array($package_name) 24 | validate_bool($repo_manage) 25 | validate_bool($service_enable) 26 | validate_string($service_ensure) 27 | validate_bool($service_manage) 28 | validate_string($service_name) 29 | 30 | # Using anchor pattern based on known issue: 31 | # http://docs.puppetlabs.com/puppet/2.7/reference/lang_containment.html#known-issues 32 | anchor { 'orchestrator::begin': } -> 33 | class { '::orchestrator::repo': } -> 34 | class { '::orchestrator::install': } -> 35 | class { '::orchestrator::config': } ~> 36 | class { '::orchestrator::my_cnf': } ~> 37 | class { '::orchestrator::service': } -> 38 | anchor { 'orchestrator::end': } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /manifests/install.pp: -------------------------------------------------------------------------------- 1 | # 2 | class orchestrator::install inherits orchestrator { 3 | 4 | if $orchestrator::package_manage { 5 | 6 | package { $orchestrator::package_name: 7 | ensure => $orchestrator::package_ensure, 8 | } 9 | 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /manifests/my_cnf.pp: -------------------------------------------------------------------------------- 1 | # 2 | class orchestrator::my_cnf inherits orchestrator { 3 | $cnf_erb = 'orchestrator/orchestrator.cnf.erb' 4 | 5 | file { $orchestrator::topology_cnf: 6 | content => template($cnf_erb), 7 | mode => '0644', 8 | } 9 | file { $orchestrator::srv_cnf: 10 | content => template($cnf_erb), 11 | mode => '0644', 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /manifests/params.pp: -------------------------------------------------------------------------------- 1 | # 2 | class orchestrator::params { 3 | 4 | $config = '/etc/orchestrator.conf.json' 5 | $config_template = 'orchestrator/orchestrator.conf.json.erb' 6 | $package_ensure = 'present' 7 | $package_manage = true 8 | $package_name = [ 'orchestrator' ] 9 | $repo_manage = true 10 | $service_enable = true 11 | $service_ensure = 'running' 12 | $service_manage = true 13 | $service_name = 'orchestrator' 14 | $srv_cnf = '/etc/orchestrator_srv.cnf' 15 | $topology_cnf = '/etc/orchestrator.cnf' 16 | 17 | # lint:ignore:140chars 18 | $config_defaults = { 19 | 'Debug' => true, 20 | 'EnableSyslog' => false, 21 | 'ListenAddress' => ':3000', 22 | 'AgentsServerPort' => ':3001', 23 | 'MySQLTopologyCredentialsConfigFile' => $topology_cnf, 24 | 'MySQLTopologySSLPrivateKeyFile' => '', 25 | 'MySQLTopologySSLCertFile' => '', 26 | 'MySQLTopologySSLCAFile' => '', 27 | 'MySQLTopologySSLSkipVerify' => true, 28 | 'MySQLTopologyUseMutualTLS' => false, 29 | 'MySQLTopologyMaxPoolConnections' => 3, 30 | 'DatabaselessMode__experimental' => false, 31 | 'MySQLOrchestratorHost' => 'myorchestrator.backend.master.mcompany.com', 32 | 'MySQLOrchestratorPort' => 3306, 33 | 'MySQLOrchestratorDatabase' => 'orchestrator', 34 | 'MySQLOrchestratorCredentialsConfigFile' => $srv_cnf, 35 | 'MySQLOrchestratorSSLPrivateKeyFile' => '', 36 | 'MySQLOrchestratorSSLCertFile' => '', 37 | 'MySQLOrchestratorSSLCAFile' => '', 38 | 'MySQLOrchestratorSSLSkipVerify' => true, 39 | 'MySQLOrchestratorUseMutualTLS' => false, 40 | 'MySQLConnectTimeoutSeconds' => 1, 41 | 'DefaultInstancePort' => 3306, 42 | 'SlaveLagQuery' => '', 43 | 'SlaveStartPostWaitMilliseconds' => 1000, 44 | 'DiscoverByShowSlaveHosts' => true, 45 | 'InstancePollSeconds' => 5, 46 | 'ReadLongRunningQueries' => false, 47 | 'BinlogFileHistoryDays' => 10, 48 | 'UnseenInstanceForgetHours' => 240, 49 | 'SnapshotTopologiesIntervalHours' => 0, 50 | 'InstanceBulkOperationsWaitTimeoutSeconds' => 10, 51 | 'ActiveNodeExpireSeconds' => 5, 52 | 'HostnameResolveMethod' => 'default', 53 | 'MySQLHostnameResolveMethod' => '@@hostname', 54 | 'SkipBinlogServerUnresolveCheck' => true, 55 | 'ExpiryHostnameResolvesMinutes' => 60, 56 | 'RejectHostnameResolvePattern' => '', 57 | 'ReasonableReplicationLagSeconds' => 10, 58 | 'ProblemIgnoreHostnameFilters' => [], 59 | 'VerifyReplicationFilters' => false, 60 | 'MaintenanceOwner' => 'orchestrator', 61 | 'ReasonableMaintenanceReplicationLagSeconds' => 20, 62 | 'MaintenanceExpireMinutes' => 10, 63 | 'MaintenancePurgeDays' => 365, 64 | 'CandidateInstanceExpireMinutes' => 60, 65 | 'AuditLogFile' => '/var/log/orchestrator-audit.log', 66 | 'AuditToSyslog' => false, 67 | 'AuditPageSize' => 20, 68 | 'AuditPurgeDays' => 365, 69 | 'RemoveTextFromHostnameDisplay' => '.mycompany.com:3306', 70 | 'ReadOnly' => false, 71 | 'AuthenticationMethod' => '', 72 | 'HTTPAuthUser' => '', 73 | 'HTTPAuthPassword' => '', 74 | 'AuthUserHeader' => '', 75 | 'PowerAuthUsers' => ['*'], 76 | 'ClusterNameToAlias' => { 77 | '127.0.0.1' => 'test suite' 78 | }, 79 | 'AccessTokenUseExpirySeconds' => 60, 80 | 'AccessTokenExpiryMinutes' => 1440, 81 | 'DetectClusterAliasQuery' => '', 82 | 'DetectClusterDomainQuery' => '', 83 | 'DataCenterPattern' => '', 84 | 'PhysicalEnvironmentPattern' => '', 85 | 'PromotionIgnoreHostnameFilters' => [], 86 | 'ServeAgentsHttp' => false, 87 | 'AgentsUseSSL' => false, 88 | 'AgentsUseMutualTLS' => false, 89 | 'AgentSSLSkipVerify' => false, 90 | 'AgentSSLPrivateKeyFile' => '', 91 | 'AgentSSLCertFile' => '', 92 | 'AgentSSLCAFile' => '', 93 | 'AgentSSLValidOUs' => [], 94 | 'UseSSL' => false, 95 | 'UseMutualTLS' => false, 96 | 'SSLSkipVerify' => false, 97 | 'SSLPrivateKeyFile' => '', 98 | 'SSLCertFile' => '', 99 | 'SSLCAFile' => '', 100 | 'SSLValidOUs' => [], 101 | 'StatusEndpoint' => '/api/status', 102 | 'StatusSimpleHealth' => true, 103 | 'StatusOUVerify' => false, 104 | 'HttpTimeoutSeconds' => 60, 105 | 'AgentPollMinutes' => 60, 106 | 'AgentAutoDiscover' => false, 107 | 'UnseenAgentForgetHours' => 6, 108 | 'StaleSeedFailMinutes' => 60, 109 | 'SeedAcceptableBytesDiff' => 8192, 110 | 'PseudoGTIDPattern' => '`heartbeat` [(]ts, server_id, file, position, relay_master_log_file, exec_master_log_pos[)] VALUES', 111 | 'PseudoGTIDPatternIsFixedSubstring' => false, 112 | 'PseudoGTIDMonotonicHint' => 'heartbeat', 113 | 'DetectPseudoGTIDQuery' => 'select count(*)>0 as pseudo_gtid_exists from github_meta.heartbeat where ts > NOW() - INTERVAL 2 DAY;', 114 | 'BinlogEventsChunkSize' => 10000, 115 | 'BufferBinlogEvents' => true, 116 | 'SkipBinlogEventsContaining' => [], 117 | 'ReduceReplicationAnalysisCount' => false, 118 | 'FailureDetectionPeriodBlockMinutes' => 60, 119 | 'RecoveryPollSeconds' => 5, 120 | 'RecoveryPeriodBlockSeconds' => 600, 121 | 'RecoveryIgnoreHostnameFilters' => [], 122 | 'RecoverMasterClusterFilters' => [ 123 | '_master_pattern_' 124 | ], 125 | 'RecoverIntermediateMasterClusterFilters' => [ 126 | '_intermediate_master_pattern_' 127 | ], 128 | 'OnFailureDetectionProcesses' => [ 129 | "echo 'Detected {failureType} on {failureCluster}. Affected replicas: {countSlaves}' >> /tmp/recovery.log" 130 | ], 131 | 'PreFailoverProcesses' => [ 132 | "echo 'Will recover from {failureType} on {failureCluster}' >> /tmp/recovery.log" 133 | ], 134 | 'PostFailoverProcesses' => [ 135 | "echo '(for all types) Recovered from {failureType} on {failureCluster}. Failed: {failedHost}:{failedPort}; Successor: {successorHost}:{successorPort}' >> /tmp/recovery.log" 136 | ], 137 | 'PostUnsuccessfulFailoverProcesses' => [], 138 | 'PostMasterFailoverProcesses' => [ 139 | "echo 'Recovered from {failureType} on {failureCluster}. Failed: {failedHost}:{failedPort}; Promoted: {successorHost}:{successorPort}' >> /tmp/recovery.log" 140 | ], 141 | 'PostIntermediateMasterFailoverProcesses' => [ 142 | "echo 'Recovered from {failureType} on {failureCluster}. Failed: {failedHost}:{failedPort}; Successor: {successorHost}:{successorPort}' >> /tmp/recovery.log" 143 | ], 144 | 'CoMasterRecoveryMustPromoteOtherCoMaster' => true, 145 | 'DetachLostSlavesAfterMasterFailover' => true, 146 | 'ApplyMySQLPromotionAfterMasterFailover' => false, 147 | 'MasterFailoverLostInstancesDowntimeMinutes' => 60, 148 | 'PostponeSlaveRecoveryOnLagMinutes' => 10, 149 | 'OSCIgnoreHostnameFilters' => [], 150 | 'GraphitePollSeconds' => 60, 151 | 'GraphiteAddr' => '', 152 | 'GraphitePath' => '', 153 | 'GraphiteConvertHostnameDotsToUnderscores' => true, 154 | } 155 | # lint:endignore 156 | } 157 | -------------------------------------------------------------------------------- /manifests/repo.pp: -------------------------------------------------------------------------------- 1 | # Manage the packagecloud repo's 2 | class orchestrator::repo inherits orchestrator { 3 | if $orchestrator::repo_manage { 4 | include packagecloud 5 | 6 | case $::operatingsystem { 7 | 'Debian', 'Ubuntu': { 8 | packagecloud::repo { 'github/orchestrator': 9 | type => 'deb', 10 | } 11 | } 12 | 'Fedora', 'CentOS', 'RedHat': { 13 | packagecloud::repo { 'github/orchestrator': 14 | type => 'rpm', 15 | } 16 | } 17 | default: { 18 | fail("Operating system ${::operatingsystem} was not supported for adding repo's") 19 | } 20 | } 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /manifests/service.pp: -------------------------------------------------------------------------------- 1 | # 2 | class orchestrator::service inherits orchestrator { 3 | 4 | if ! ($orchestrator::service_ensure in [ 'running', 'stopped' ]) { 5 | fail('service_ensure parameter must be running or stopped') 6 | } 7 | 8 | if $orchestrator::service_manage == true { 9 | 10 | service { 'orchestrator': 11 | ensure => $orchestrator::service_ensure, 12 | enable => $orchestrator::service_enable, 13 | hasrestart => true, 14 | hasstatus => true, 15 | name => $orchestrator::service_name, 16 | subscribe => File[$orchestrator::config], 17 | } 18 | 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "github-orchestrator", 3 | "version": "1.0.1", 4 | "author": "GitHub", 5 | "license": "MIT", 6 | "summary": "A module for installing and configuring Orchestrator (https://github.com/github/orchestrator/)", 7 | "source": "https://github.com/github/puppet-orchestrator-for-mysql.git", 8 | "project_page": "https://github.com/github/puppet-orchestrator-for-mysql", 9 | "issues_url": "https://github.com/github/puppet-orchestrator-for-mysql/issues", 10 | "tags": ["mysql", "orchestrator"], 11 | "operatingsystem_support": [ 12 | { 13 | "operatingsystem": "RedHat", 14 | "operatingsystemrelease": [ 15 | "5", 16 | "6", 17 | "7" 18 | ] 19 | }, 20 | { 21 | "operatingsystem": "CentOS", 22 | "operatingsystemrelease": [ 23 | "5", 24 | "6", 25 | "7" 26 | ] 27 | }, 28 | { 29 | "operatingsystem":"Fedora", 30 | "operatingsystemrelease": [ 31 | "22", 32 | "23", 33 | "24" 34 | ] 35 | }, 36 | { 37 | "operatingsystem":"Debian", 38 | "operatingsystemrelease": [ 39 | "7", 40 | "8" 41 | ] 42 | }, 43 | { 44 | "operatingsystem": "Ubuntu", 45 | "operatingsystemrelease": [ 46 | "12.04", 47 | "14.04", 48 | "15.04", 49 | "15.10", 50 | "16.04" 51 | ] 52 | } 53 | ], 54 | "requirements": [ 55 | { "name": "json", "version_requirement": ">=1.8.0" }, 56 | { "name": "puppet", "version_requirement": ">= 3.2.0" } 57 | ], 58 | "dependencies": [ 59 | { "name": "puppetlabs/stdlib", "version_requirement": ">= 3.2.0 <5.0.0" }, 60 | { "name": "computology/packagecloud", "version_requirement": ">= 0.2.0" } 61 | ] 62 | } 63 | -------------------------------------------------------------------------------- /templates/orchestrator.cnf.erb: -------------------------------------------------------------------------------- 1 | [client] 2 | user=<%= @user %> 3 | password=%<%= @password %>% 4 | -------------------------------------------------------------------------------- /templates/orchestrator.conf.json.erb: -------------------------------------------------------------------------------- 1 | <% 2 | require 'json' 3 | %><%= JSON.pretty_generate(@options).gsub(/"([0-9]+)",$/, '\1,').gsub(/[:] "([0-9]+)"$/, ': \1') %> 4 | --------------------------------------------------------------------------------