Retire puppet-qdr: Remove Project Content
Depends-on: https://review.opendev.org/c/openstack/project-config/+/907951 Change-Id: I77f7bc94b8d1b3459c64f44f5d18d5f8c747ae4a
This commit is contained in:
parent
e349e5feba
commit
31aeb84bae
@ -1,6 +0,0 @@
|
||||
fixtures:
|
||||
repositories:
|
||||
"stdlib": "https://github.com/puppetlabs/puppetlabs-stdlib.git"
|
||||
"apt": "https://github.com/puppetlabs/puppetlabs-apt.git"
|
||||
symlinks:
|
||||
"qdr": "#{source_dir}"
|
26
.gitignore
vendored
26
.gitignore
vendored
@ -1,26 +0,0 @@
|
||||
# Add patterns in here to exclude files created by tools integrated with this
|
||||
# repository, such as test frameworks from the project's recommended workflow,
|
||||
# rendered documentation and package builds.
|
||||
#
|
||||
# Don't add patterns to exclude files created by preferred personal tools
|
||||
# (editors, IDEs, your operating system itself even). These should instead be
|
||||
# maintained outside the repository, for example in a ~/.gitignore file added
|
||||
# with:
|
||||
#
|
||||
# git config --global core.excludesfile '~/.gitignore'
|
||||
|
||||
pkg/
|
||||
Gemfile.lock
|
||||
vendor/
|
||||
spec/fixtures/
|
||||
.vagrant/
|
||||
.bundle/
|
||||
coverage/
|
||||
.idea/
|
||||
*.iml
|
||||
/openstack
|
||||
/log
|
||||
|
||||
# Files created by releasenotes build
|
||||
releasenotes/build
|
||||
.tox
|
52
.pdkignore
52
.pdkignore
@ -1,52 +0,0 @@
|
||||
# common list used in puppetlabs repos
|
||||
.git/
|
||||
.*.sw[op]
|
||||
.metadata
|
||||
.yardoc
|
||||
.yardwarns
|
||||
*.iml
|
||||
/.bundle/
|
||||
/.idea/
|
||||
/.vagrant/
|
||||
/coverage/
|
||||
/bin/
|
||||
/doc/
|
||||
/Gemfile.local
|
||||
/Gemfile.lock
|
||||
/junit/
|
||||
/log/
|
||||
/pkg/
|
||||
/spec/fixtures/manifests/
|
||||
/spec/fixtures/modules/*
|
||||
/tmp/
|
||||
/vendor/
|
||||
/convert_report.txt
|
||||
/update_report.txt
|
||||
.DS_Store
|
||||
.project
|
||||
.envrc
|
||||
/inventory.yaml
|
||||
/spec/fixtures/litmus_inventory.yaml
|
||||
/.fixtures.yml
|
||||
/Gemfile
|
||||
/.gitattributes
|
||||
/.gitignore
|
||||
/.pdkignore
|
||||
/.puppet-lint.rc
|
||||
/Rakefile
|
||||
/rakelib/
|
||||
/.rspec
|
||||
/..yml
|
||||
/.yardopts
|
||||
/spec/
|
||||
/.vscode/
|
||||
/.sync.yml
|
||||
/.devcontainer/
|
||||
# OpenStack-specific files
|
||||
/bindep.txt
|
||||
/.gitreview
|
||||
/releasenotes/
|
||||
/setup.cfg
|
||||
/setup.py
|
||||
/tox.ini
|
||||
/.zuul.yaml
|
@ -1,6 +0,0 @@
|
||||
- project:
|
||||
templates:
|
||||
- puppet-openstack-check-jobs
|
||||
- puppet-openstack-module-unit-jobs
|
||||
- puppet-openstack-litmus-jobs
|
||||
- release-notes-jobs-python3
|
@ -1,19 +0,0 @@
|
||||
The source repository for this project can be found at:
|
||||
|
||||
https://opendev.org/openstack/puppet-qdr
|
||||
|
||||
Pull requests submitted through GitHub are not monitored.
|
||||
|
||||
To start contributing to OpenStack, follow the steps in the contribution guide
|
||||
to set up and use Gerrit:
|
||||
|
||||
https://docs.openstack.org/contributors/code-and-documentation/quick-start.html
|
||||
|
||||
Bugs should be filed on Launchpad:
|
||||
|
||||
https://bugs.launchpad.net/puppet-qdr
|
||||
|
||||
For more specific information about contributing to this repository, see the
|
||||
Puppet OpenStack contributor guide:
|
||||
|
||||
https://docs.openstack.org/puppet-openstack-guide/latest/contributor/contributing.html
|
36
Gemfile
36
Gemfile
@ -1,36 +0,0 @@
|
||||
source ENV['GEM_SOURCE'] || "https://rubygems.org"
|
||||
|
||||
group :development, :test, :system_tests do
|
||||
spec_helper_dir = '/home/zuul/src/opendev.org/openstack/puppet-openstack_spec_helper'
|
||||
if File.directory?(spec_helper_dir)
|
||||
if ENV['ZUUL_PROJECT'] == 'openstack/puppet-openstack_spec_helper'
|
||||
gem 'puppet-openstack_spec_helper',
|
||||
:path => '../..',
|
||||
:require => 'false'
|
||||
else
|
||||
gem 'puppet-openstack_spec_helper',
|
||||
:path => spec_helper_dir,
|
||||
:require => 'false'
|
||||
end
|
||||
else
|
||||
spec_helper_version = ENV['ZUUL_BRANCH'] || "master"
|
||||
gem 'puppet-openstack_spec_helper',
|
||||
:git => 'https://opendev.org/openstack/puppet-openstack_spec_helper',
|
||||
:ref => spec_helper_version,
|
||||
:require => 'false'
|
||||
end
|
||||
end
|
||||
|
||||
if facterversion = ENV['FACTER_GEM_VERSION']
|
||||
gem 'facter', facterversion, :require => false
|
||||
else
|
||||
gem 'facter', :require => false
|
||||
end
|
||||
|
||||
if puppetversion = ENV['PUPPET_GEM_VERSION']
|
||||
gem 'puppet', puppetversion, :require => false
|
||||
else
|
||||
gem 'puppet', :require => false
|
||||
end
|
||||
|
||||
# vim:ft=ruby
|
202
LICENSE
202
LICENSE
@ -1,202 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
188
README.md
188
README.md
@ -1,188 +0,0 @@
|
||||
Team and repository tags
|
||||
========================
|
||||
|
||||
[![Team and repository tags](https://governance.openstack.org/tc/badges/puppet-qdr.svg)](https://governance.openstack.org/tc/reference/tags/index.html)
|
||||
|
||||
<!-- Change things from this point on -->
|
||||
|
||||
# qdr
|
||||
|
||||
#### Table of Contents
|
||||
|
||||
1. [Overview](#overview)
|
||||
2. [Module Description - Manage the QPID Dispatch Router](#module-description)
|
||||
3. [Setup - The basics of getting started with qdr](#setup)
|
||||
* [What qdr affects](#what-qdr-affects)
|
||||
* [Setup requirements](#setup-requirements)
|
||||
* [Beginning with qdr](#beginning-with-qdr)
|
||||
4. [Usage - Configuration options and additional functionality](#usage)
|
||||
5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
|
||||
5. [Limitations - OS compatibility, etc.](#limitations)
|
||||
6. [Development - Guide for contributing to the module](#development)
|
||||
7. [Contributors - Those with commits](#contributors)
|
||||
8. [Release Notes - Release notes for the project](#release-notes)
|
||||
9. [Repository - The project source code repository](#repository)
|
||||
|
||||
## Overview
|
||||
|
||||
This module manages the QPID Dispatch Router (qdr) found at:
|
||||
|
||||
http://qpid.apache.org/components/dispatch-router/
|
||||
|
||||
The dispatch router provides flexible and scalable interconnect between any AMQP 1.0 endpoints, whether they be clients, brokers or other AMQP-enabled services
|
||||
|
||||
Support is intended for Red Hat and Ubuntu OS family deployed with Pupppet V4.x
|
||||
|
||||
## Module Description
|
||||
|
||||
This module sets up the installations, configuration and management of the QPID Dispatch
|
||||
Router (qdr) class and has a number of providers that correpsond the router configuration
|
||||
entities such as listeners and connectors.
|
||||
|
||||
This module will facilitate the deployment of a full/partial mesh topology of QPID Dispatch
|
||||
Routers serving as the messaging interconnect for a site.
|
||||
|
||||
|
||||
## Setup
|
||||
|
||||
### What qdr affects
|
||||
|
||||
* repository files
|
||||
* packages
|
||||
* configuration files
|
||||
* service
|
||||
* configuration entities
|
||||
|
||||
### Beginning with qdr
|
||||
|
||||
```puppet
|
||||
include qdr
|
||||
```
|
||||
|
||||
The default configuration currently installs Qpid-Dispatch-Router 0.6
|
||||
|
||||
## Usage
|
||||
|
||||
All configuration parameters can be managed via the main qdr class.
|
||||
|
||||
```puppet
|
||||
class { 'qdr' :
|
||||
service_enable => true,
|
||||
container_workder_threads => 4,
|
||||
listener_port => 15672,
|
||||
}
|
||||
```
|
||||
|
||||
## Class Reference
|
||||
|
||||
* qdr: Provides the basic installation and configuration sequence
|
||||
* qdr::config: Provides qdrouterd configuration
|
||||
* qdr::install: Performs package installations
|
||||
* qdr::params: Aggregates configuration data for router
|
||||
* qdr::service: Manages the qdrouterd service state
|
||||
|
||||
|
||||
## Resource Types
|
||||
|
||||
### qdr\_address
|
||||
|
||||
Resource to manage address prefixes for distribution and phasing
|
||||
|
||||
Query all current internal addresses: '$puppet resource qdr_address'
|
||||
|
||||
```puppet
|
||||
qdr_address { 'anyAddress' :
|
||||
prefix => 'unicast',
|
||||
distribution => 'closest',
|
||||
}
|
||||
```
|
||||
|
||||
### qdr\_connector
|
||||
|
||||
Resource configuration entity to establish outgoing connections from the router.
|
||||
|
||||
Query all current connectors: '$puppet resource qdr_connector'
|
||||
|
||||
```puppet
|
||||
qdr_connector { 'anyConnector' :
|
||||
addr => '10.10.10.10',
|
||||
port => '1234',
|
||||
role => 'inter_router',
|
||||
max_frame_size => '65536',
|
||||
}
|
||||
```
|
||||
|
||||
### qdr\_listener
|
||||
|
||||
Listens for incoming connection requests to the router
|
||||
|
||||
Query all current listeners: '$puppet resource qdr_listener'
|
||||
|
||||
```puppet
|
||||
qdr_listener { 'anyListener' :
|
||||
addr => '10.10.10.10',
|
||||
port => '5678',
|
||||
role => 'normal',
|
||||
sasl_mechanisms => 'DIGEST-MD5,EXTERNAL',
|
||||
}
|
||||
```
|
||||
|
||||
### qdr\_log
|
||||
|
||||
Control log settings for a particular module on the running router
|
||||
|
||||
Query all current log module settings: '$puppet resource qdr_log'
|
||||
|
||||
### qdr\_user
|
||||
|
||||
Users for internal sasl authentication
|
||||
|
||||
Query all current internal users: '$puppet resource qdr_user'
|
||||
|
||||
```puppet
|
||||
qdr_user { 'anyUser' :
|
||||
password => 'changeme',
|
||||
}
|
||||
```
|
||||
|
||||
## Resource Providers
|
||||
|
||||
### qdmanage
|
||||
|
||||
An AMQP management client tool for used with any standard AMQP managed endpoint.
|
||||
|
||||
## Limitations
|
||||
|
||||
This module has been tested on the following platforms:
|
||||
|
||||
* CentOS 7
|
||||
* Ubuntu 15.10
|
||||
|
||||
|
||||
### Apt module dependence
|
||||
|
||||
If running Debian os family, puppetlabs-apt module is required
|
||||
|
||||
## Development
|
||||
|
||||
Developer documentation for the entire puppet-openstack project.
|
||||
|
||||
* https://docs.openstack.org/puppet-openstack-guide/latest/
|
||||
|
||||
## Contributors
|
||||
|
||||
* https://github.com/openstack/puppet-qdr/graphs/contributors
|
||||
|
||||
|
||||
## Release Notes
|
||||
|
||||
* https://docs.openstack.org/releasenotes/puppet-qdr
|
||||
|
||||
Repository
|
||||
----------
|
||||
|
||||
* https://opendev.org/openstack/puppet-qdr
|
||||
|
||||
If you aren't using changelog, put your release notes here (though you should
|
||||
consider using changelog). You may also add any additional sections you feel are
|
||||
necessary or important to include here. Please use the `## ` header.
|
8
README.rst
Normal file
8
README.rst
Normal file
@ -0,0 +1,8 @@
|
||||
This project is no longer maintained.
|
||||
|
||||
The contents of this repository are still available in the Git source code
|
||||
management system. To see the contents of this repository before it reached its
|
||||
end of life, please check out the previous commit with "git checkout HEAD^1".
|
||||
|
||||
For any further questions, please email openstack-discuss@lists.openstack.org
|
||||
or join #openstack-dev on OFTC.
|
12
bindep.txt
12
bindep.txt
@ -1,12 +0,0 @@
|
||||
# This is a cross-platform list tracking distribution packages needed by tests;
|
||||
# see https://docs.openstack.org/infra/bindep/ for additional information.
|
||||
|
||||
libxml2-devel [test platform:rpm]
|
||||
libxml2-dev [test platform:dpkg]
|
||||
libxslt-devel [test platform:rpm]
|
||||
libxslt1-dev [test platform:dpkg]
|
||||
ruby-devel [test platform:rpm]
|
||||
ruby-dev [test platform:dpkg]
|
||||
zlib1g-dev [test platform:dpkg]
|
||||
zlib-devel [test platform:rpm]
|
||||
puppet [build]
|
@ -1,6 +0,0 @@
|
||||
# This is required for the docs build jobs
|
||||
sphinx>=3.5.1 # BSD
|
||||
openstackdocstheme>=2.2.7 # Apache-2.0
|
||||
|
||||
# This is required for the releasenotes build jobs
|
||||
reno>=3.2.0 # Apache-2.0
|
@ -1,23 +0,0 @@
|
||||
node default {
|
||||
|
||||
# Qpid Dispatch Router common class
|
||||
class { 'qdr' :
|
||||
# Currently no mandatory parameters
|
||||
}
|
||||
|
||||
# Create a listener type
|
||||
# qdr_listener { 'GoodListener' :
|
||||
# ensure => present,
|
||||
# addr => '127.0.0.1',
|
||||
# port => '6789',
|
||||
# role => 'normal',
|
||||
# auth_peer => true,
|
||||
# sasl_mechanisms => 'ANONYMOUS,DIGEST-MD5,EXTERNAL,PLAIN',
|
||||
# }
|
||||
|
||||
# Create a user for sasl db
|
||||
# qdr_user { 'SaslUser' :
|
||||
# ensure => present,
|
||||
# password => 'testpw',
|
||||
# }
|
||||
}
|
@ -1,101 +0,0 @@
|
||||
require "json"
|
||||
|
||||
Puppet::Type.type(:qdr_address).provide(:qdmanage) do
|
||||
|
||||
# should rely on environment rather fq path
|
||||
commands :qdmanage => '/usr/bin/qdmanage'
|
||||
|
||||
mk_resource_methods
|
||||
|
||||
def initialize(value={})
|
||||
super(value)
|
||||
@property_flush = {}
|
||||
end
|
||||
|
||||
def self.get_list_of_addresses
|
||||
begin
|
||||
@addresses=JSON.load(qdmanage('QUERY','--type=address'))
|
||||
rescue Puppet::ExecutionFailure => e
|
||||
@addresses = {}
|
||||
end
|
||||
end
|
||||
|
||||
def self.get_address_properties(address)
|
||||
address_properties = {}
|
||||
|
||||
address_properties[:provider] = :qdmanage
|
||||
address_properties[:ensure] = :present
|
||||
address_properties[:name] = address["name"]
|
||||
address_properties[:prefix] = address["prefix"]
|
||||
address_properties[:distribution] = address["distribution"]
|
||||
address_properties[:waypoint] = address["waypoint"].to_s
|
||||
address_properties[:ingressPhase] = address["ingressPhase"]
|
||||
address_properties[:egressPhase] = address["egressPhase"]
|
||||
|
||||
address_properties
|
||||
end
|
||||
|
||||
def self.instances
|
||||
addresses = []
|
||||
get_list_of_addresses.each do |address|
|
||||
addresses << new( :prefix => address["prefix"],
|
||||
:name => address["name"],
|
||||
:ensure => :present,
|
||||
:distribution => address["distribution"],
|
||||
:waypoint => address["waypoint"].to_s,
|
||||
:ingressPhase => address["ingressPhase"],
|
||||
:egressPhase => address["egressPhase"])
|
||||
end
|
||||
addresses
|
||||
end
|
||||
|
||||
def create
|
||||
@property_flush[:ensure] = :present
|
||||
end
|
||||
|
||||
def exists?
|
||||
@property_hash[:ensure] == :present
|
||||
end
|
||||
|
||||
def destroy
|
||||
@property_flush[:ensure] = :absent
|
||||
end
|
||||
|
||||
def self.prefetch(resources)
|
||||
instances.each do |prov|
|
||||
if resource = resources[prov.prefix]
|
||||
resource.provider = prov
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def set_address
|
||||
# TODO(ansmith) - full CRUD once supported by qdmanage
|
||||
if @property_flush[:ensure] == :absent
|
||||
notice("Address destroy not supported")
|
||||
return
|
||||
end
|
||||
|
||||
begin
|
||||
# TODO(ansmith) - prefix uniqueness check
|
||||
qdmanage('CREATE',
|
||||
'--type=address',
|
||||
'--prefix',
|
||||
resource[:prefix],
|
||||
'distribution='+resource[:distribution],
|
||||
'waypoint='+resource[:waypoint].to_s,
|
||||
'ingressPhase='+resource[:ingressPhase],
|
||||
'egressPhase='+resource[:egressPhase])
|
||||
rescue Puppet::ExecutionFailure => e
|
||||
return
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def flush
|
||||
set_address
|
||||
|
||||
@property_hash = self.class.get_address_properties(resource[:prefix])
|
||||
end
|
||||
|
||||
end
|
@ -1,111 +0,0 @@
|
||||
require "json"
|
||||
|
||||
Puppet::Type.type(:qdr_connector).provide(:qdmanage) do
|
||||
|
||||
# should rely on environment rather fq path
|
||||
commands :qdmanage => '/usr/bin/qdmanage'
|
||||
|
||||
mk_resource_methods
|
||||
|
||||
def initialize(value={})
|
||||
super(value)
|
||||
@property_flush = {}
|
||||
end
|
||||
|
||||
def self.get_list_of_connectors
|
||||
begin
|
||||
@connectors=JSON.load(qdmanage('QUERY','--type=connector'))
|
||||
rescue Puppet::ExecutionFailure => e
|
||||
@connectors = {}
|
||||
end
|
||||
end
|
||||
|
||||
def self.get_connector_properties(connector)
|
||||
connector_properties = {}
|
||||
|
||||
connector_properties[:provider] = :qdmanage
|
||||
connector_properties[:ensure] = :present
|
||||
connector_properties[:name] = connector["name"]
|
||||
connector_properties[:addr] = connector["addr"]
|
||||
connector_properties[:port] = connector["port"]
|
||||
connector_properties[:role] = connector["role"].to_s
|
||||
connector_properties[:allow_redirect] = connector["allowRedirect"].to_s
|
||||
connector_properties[:sasl_mechanisms] = connector["saslMechanisms"].to_s
|
||||
connector_properties[:max_frame_size] = connector["maxFrameSize"].to_s
|
||||
connector_properties[:idle_timeout_seconds] = connector["idleTimeoutSeconds"].to_s
|
||||
connector_properties[:strip_annotations] = connector["stripAnnotations"].to_s
|
||||
|
||||
connector_properties
|
||||
end
|
||||
|
||||
def self.instances
|
||||
connectors = []
|
||||
get_list_of_connectors.each do |connector|
|
||||
connectors << new(:name => connector["name"],
|
||||
:ensure => :present,
|
||||
:addr => connector["addr"],
|
||||
:port => connector["port"],
|
||||
:role => connector["role"].to_s,
|
||||
:sasl_mechanisms => connector["saslMechanisms"].to_s,
|
||||
:allow_redirect => connector["allowRedirect"].to_s,
|
||||
:max_frame_size => connector["maxFrameSize"].to_s,
|
||||
:idle_timeout_seconds => connector["idleTimeoutSeconds"].to_s,
|
||||
:strip_annotations => connector["stripAnnotations"].to_s)
|
||||
end
|
||||
connectors
|
||||
end
|
||||
|
||||
def create
|
||||
@property_flush[:ensure] = :present
|
||||
end
|
||||
|
||||
def exists?
|
||||
@property_hash[:ensure] == :present
|
||||
end
|
||||
|
||||
def destroy
|
||||
@property_flush[:ensure] = :absent
|
||||
end
|
||||
|
||||
def self.prefetch(resources)
|
||||
instances.each do |prov|
|
||||
if resource = resources[prov.name]
|
||||
resource.provider = prov
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def set_connector
|
||||
# TODO(ansmith) - full CRUD once supported by qdmanage
|
||||
if @property_flush[:ensure] == :absent
|
||||
notice("Connector destroy not supported")
|
||||
return
|
||||
end
|
||||
|
||||
begin
|
||||
# TODO(ansmith) - name, addr:port uniqueness check
|
||||
qdmanage('CREATE',
|
||||
'--type=connector',
|
||||
'--name',
|
||||
resource[:name],
|
||||
'addr='+resource[:addr],
|
||||
'port='+resource[:port],
|
||||
'role='+resource[:role].to_s,
|
||||
'saslMechanisms='+resource[:sasl_mechanisms].to_s,
|
||||
'allowRedirect='+resource[:allow_redirect].to_s,
|
||||
'maxFrameSize='+resource[:max_frame_size].to_s,
|
||||
'idleTimeoutSeconds='+resource[:idle_timeout_seconds].to_s,
|
||||
'stripAnnotations='+resource[:strip_annotations].to_s)
|
||||
rescue Puppet::ExecutionFailure => e
|
||||
return
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def flush
|
||||
set_connector
|
||||
|
||||
@property_hash = self.class.get_connector_properties(resource[:name])
|
||||
end
|
||||
|
||||
end
|
@ -1,111 +0,0 @@
|
||||
require "json"
|
||||
|
||||
Puppet::Type.type(:qdr_listener).provide(:qdmanage) do
|
||||
|
||||
# should rely on environment rather fq path
|
||||
commands :qdmanage => '/usr/bin/qdmanage'
|
||||
|
||||
mk_resource_methods
|
||||
|
||||
def initialize(value={})
|
||||
super(value)
|
||||
@property_flush = {}
|
||||
end
|
||||
|
||||
def self.get_list_of_listeners
|
||||
begin
|
||||
@listeners=JSON.load(qdmanage('QUERY','--type=listener'))
|
||||
rescue Puppet::ExecutionFailure => e
|
||||
@listeners = {}
|
||||
end
|
||||
end
|
||||
|
||||
def self.get_listener_properties(listener)
|
||||
listener_properties = {}
|
||||
|
||||
listener_properties[:provider] = :qdmanage
|
||||
listener_properties[:ensure] = :present
|
||||
listener_properties[:name] = listener["name"]
|
||||
listener_properties[:addr] = listener["addr"]
|
||||
listener_properties[:port] = listener["port"]
|
||||
listener_properties[:role] = listener["role"].to_s
|
||||
listener_properties[:sasl_mechanisms] = listener["saslMechanisms"].to_s
|
||||
listener_properties[:auth_peer] = listener["authenticatePeer"].to_s
|
||||
listener_properties[:require_encryption] = listener["requireEncryption"].to_s
|
||||
listener_properties[:require_ssl] = listener["requireSsl"].to_s
|
||||
listener_properties[:max_frame_size] = listener["maxFrameSize"].to_s
|
||||
|
||||
listener_properties
|
||||
end
|
||||
|
||||
def self.instances
|
||||
listeners = []
|
||||
get_list_of_listeners.each do |listener|
|
||||
listeners << new( :name => listener["name"],
|
||||
:ensure => :present,
|
||||
:addr => listener["addr"],
|
||||
:port => listener["port"],
|
||||
:role => listener["role"].to_s,
|
||||
:sasl_mechanisms => listener["saslMechanisms"].to_s,
|
||||
:auth_peer => listener["authenticatePeer"].to_s,
|
||||
:require_encryption => listener["requireEncryption"].to_s,
|
||||
:require_ssl => listener["requireSsl"].to_s,
|
||||
:max_frame_size => listener["maxFrameSize"].to_s)
|
||||
end
|
||||
listeners
|
||||
end
|
||||
|
||||
def create
|
||||
@property_flush[:ensure] = :present
|
||||
end
|
||||
|
||||
def exists?
|
||||
@property_hash[:ensure] == :present
|
||||
end
|
||||
|
||||
def destroy
|
||||
@property_flush[:ensure] = :absent
|
||||
end
|
||||
|
||||
def self.prefetch(resources)
|
||||
instances.each do |prov|
|
||||
if resource = resources[prov.name]
|
||||
resource.provider = prov
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def set_listener
|
||||
# TODO(ansmith) - full CRUD once supported by qdmanage
|
||||
if @property_flush[:ensure] == :absent
|
||||
notice("Listener destroy not supported")
|
||||
return
|
||||
end
|
||||
|
||||
begin
|
||||
# TODO(ansmith) - name, addr:port uniqueness check
|
||||
qdmanage('CREATE',
|
||||
'--type=listener',
|
||||
'--name',
|
||||
resource[:name],
|
||||
'addr='+resource[:addr],
|
||||
'port='+resource[:port],
|
||||
'role='+resource[:role].to_s,
|
||||
'saslMechanisms='+resource[:sasl_mechanisms].to_s,
|
||||
'authenticatePeer='+resource[:auth_peer].to_s,
|
||||
'requireEncryption='+resource[:require_encryption].to_s,
|
||||
'requireSsl='+resource[:require_ssl].to_s,
|
||||
'maxFrameSize='+resource[:max_frame_size].to_s)
|
||||
rescue Puppet::ExecutionFailure => e
|
||||
return
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def flush
|
||||
set_listener
|
||||
|
||||
@property_hash = self.class.get_listener_properties(resource[:name])
|
||||
end
|
||||
|
||||
end
|
@ -1,83 +0,0 @@
|
||||
require "json"
|
||||
|
||||
Puppet::Type.type(:qdr_log).provide(:qdmanage) do
|
||||
|
||||
# should rely on environment rather fq path
|
||||
commands :qdmanage => '/usr/bin/qdmanage'
|
||||
|
||||
mk_resource_methods
|
||||
|
||||
def initialize(value={})
|
||||
super(value)
|
||||
@property_flush = {}
|
||||
end
|
||||
|
||||
def self.get_list_of_loggers
|
||||
begin
|
||||
@loggers=JSON.load(qdmanage('QUERY','--type=log'))
|
||||
rescue Puppet::ExecutionFailure => e
|
||||
@loggers = {}
|
||||
end
|
||||
end
|
||||
|
||||
def self.get_logger_properties(listener)
|
||||
logger_properties = {}
|
||||
|
||||
logger_properties[:provider] = :qdmanage
|
||||
logger_properties[:name] = logger["name"]
|
||||
logger_properties[:module] = logger["module"]
|
||||
|
||||
logger_properties
|
||||
end
|
||||
|
||||
def self.instances
|
||||
loggers = []
|
||||
get_list_of_loggers.each do |logger|
|
||||
loggers << new( :name => logger["name"],
|
||||
:module => logger["module"])
|
||||
end
|
||||
loggers
|
||||
end
|
||||
|
||||
# def create
|
||||
# @property_flush[:ensure] = :present
|
||||
# end
|
||||
|
||||
def exists?
|
||||
@property_hash[:ensure] == :present
|
||||
end
|
||||
|
||||
# def destroy
|
||||
# @property_flush[:ensure] = :absent
|
||||
# end
|
||||
|
||||
def self.prefetch(resources)
|
||||
instances.each do |prov|
|
||||
if resource = resources[prov.name]
|
||||
resource.provider = prov
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def set_logger
|
||||
# TODO(ansmith) - full CRUD once supported by qdmanage
|
||||
|
||||
begin
|
||||
# TODO(ansmith) - name, addr:port uniqueness check
|
||||
qdmanage('UPDATE',
|
||||
'--type=log',
|
||||
'--name',
|
||||
resource[:name])
|
||||
rescue Puppet::ExecutionFailure => e
|
||||
return
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def flush
|
||||
set_logger
|
||||
|
||||
@property_hash = self.class.get_logger_properties(resource[:name])
|
||||
end
|
||||
|
||||
end
|
@ -1,44 +0,0 @@
|
||||
|
||||
Puppet::Type.type(:qdr_user).provide(:sasl) do
|
||||
|
||||
commands :saslpasswd2 => 'saslpasswd2'
|
||||
optional_commands :sasldblistusers2 => 'sasldblistusers2'
|
||||
|
||||
def self.instances
|
||||
users = []
|
||||
userlist=sasldblistusers2('-f', '/var/lib/qdrouterd/qdrouterd.sasldb').split(/\n/).each do |line|
|
||||
if line =~ /^(\S+)@(\S+):.*$/
|
||||
users << new(:name => $1,
|
||||
:ensure => :present)
|
||||
else
|
||||
raise Puppet::Error, "Cannot parse invalid user line: #{line}"
|
||||
end
|
||||
end
|
||||
users
|
||||
end
|
||||
|
||||
def create
|
||||
# is there a way to pipe to commands?
|
||||
if not system(%{echo "#{resource[:password]}" | saslpasswd2 -f '/var/lib/qdrouterd/qdrouterd.sasldb' #{resource[:name]}})
|
||||
|
||||
raise Puppet::Error, "Failed to create user"
|
||||
end
|
||||
system("chmod '0644' '/var/lib/qdrouterd/qdrouterd.sasldb'")
|
||||
end
|
||||
|
||||
def destroy
|
||||
saslpasswd2('-f', '/var/lib/qdrouterd/qdrouterd.sasldb', '-d', resource[:name])
|
||||
rescue Puppet::ExecutionFailure => e
|
||||
return
|
||||
end
|
||||
|
||||
def exists?
|
||||
begin
|
||||
users = sasldblistusers2('-f', "/var/lib/qdrouterd/qdrouterd.sasldb").split(/\n/).detect do |user|
|
||||
user.match(/^#{resource[:name]}@.*$/)
|
||||
end
|
||||
rescue
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
@ -1,58 +0,0 @@
|
||||
Puppet::Type.newtype(:qdr_address) do
|
||||
desc "Type for managing qdrouterd address prefixes for distribution and phasing"
|
||||
|
||||
ensurable do
|
||||
defaultto(:present)
|
||||
newvalue(:present) do
|
||||
provider.create
|
||||
end
|
||||
newvalue(:absent) do
|
||||
provider.destroy
|
||||
end
|
||||
end
|
||||
|
||||
autorequire(:service) { 'qdrouterd' }
|
||||
|
||||
newparam(:name, :namevar => true) do
|
||||
desc "The name of the address prefix"
|
||||
newvalues(/^\S+$/)
|
||||
end
|
||||
|
||||
newproperty(:prefix) do
|
||||
desc "The unique prefix for the address-space"
|
||||
newvalues(/^\S+$/)
|
||||
end
|
||||
|
||||
newproperty(:distribution) do
|
||||
desc "The treatment of traffic associated with the address"
|
||||
defaultto :balanced
|
||||
newvalues(:balanced, :closest, :multicast)
|
||||
end
|
||||
|
||||
newproperty(:waypoint) do
|
||||
defaultto :false
|
||||
newvalues(:true, :false)
|
||||
|
||||
def should_to_s(value)
|
||||
value.inspect
|
||||
end
|
||||
|
||||
def is_to_s(value)
|
||||
value.inspect
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
newproperty(:ingressPhase) do
|
||||
desc "Override for the ingress phase for this address"
|
||||
defaultto ('0')
|
||||
# newvalues(/^d+/)
|
||||
end
|
||||
|
||||
newproperty(:egressPhase) do
|
||||
desc "Override for the ingress phase for this address"
|
||||
defaultto ('0')
|
||||
# newvalues(/^d+/)
|
||||
end
|
||||
|
||||
end
|
@ -1,86 +0,0 @@
|
||||
Puppet::Type.newtype(:qdr_connector) do
|
||||
desc "Type for managing qdrouterd connection instances"
|
||||
|
||||
ensurable do
|
||||
defaultto(:present)
|
||||
newvalue(:present) do
|
||||
provider.create
|
||||
end
|
||||
newvalue(:absent) do
|
||||
provider.destroy
|
||||
end
|
||||
end
|
||||
|
||||
autorequire(:service) { 'qdrouterd' }
|
||||
|
||||
newparam(:name, :namevar => true) do
|
||||
desc "The unique name for the connector"
|
||||
newvalues(/^\s*\S+\s*$/)
|
||||
end
|
||||
|
||||
newproperty(:addr) do
|
||||
desc "The outgoing connection host's IP address, IPv4 or IPv6"
|
||||
end
|
||||
|
||||
newproperty(:port) do
|
||||
desc "The outgoing connection host port number"
|
||||
newvalues(/^\d+/)
|
||||
end
|
||||
|
||||
newproperty(:role) do
|
||||
desc "The role for connections established by the listener"
|
||||
defaultto :normal
|
||||
newvalues(:normal, :inter_router, :on_demand)
|
||||
end
|
||||
|
||||
newproperty(:sasl_mechanisms) do
|
||||
desc "List of accepted SASL authentication mechansisms"
|
||||
defaultto "ANONYMOUS,DIGEST-MD5,EXTERNAL,PLAIN"
|
||||
end
|
||||
|
||||
newproperty(:allowRedirect) do
|
||||
defaultto :false
|
||||
newvalues(:true, :false)
|
||||
|
||||
def should_to_s(value)
|
||||
value.inspect
|
||||
end
|
||||
|
||||
def is_to_s(value)
|
||||
value.inspect
|
||||
end
|
||||
end
|
||||
|
||||
newproperty(:max_frame_size) do
|
||||
desc "The largest contiguous set of uninterrupted data that can be sent"
|
||||
defaultto ('65536')
|
||||
|
||||
validate do |value|
|
||||
unless value =~ /\d{1,5}/ &&
|
||||
value.to_i <= 65536
|
||||
fail("Invalid max frame size #{value}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
newproperty(:idle_timeout_seconds) do
|
||||
desc "The largest contiguous set of uninterrupted data that can be sent"
|
||||
defaultto ('16')
|
||||
|
||||
# what would the validation be? Max timeout value?
|
||||
end
|
||||
|
||||
newproperty(:strip_annotations) do
|
||||
defaultto :both
|
||||
newvalues(:in, :out, :both, :no)
|
||||
|
||||
def should_to_s(value)
|
||||
value.inspect
|
||||
end
|
||||
|
||||
def is_to_s(value)
|
||||
value.inspect
|
||||
end
|
||||
end
|
||||
|
||||
end
|
@ -1,97 +0,0 @@
|
||||
Puppet::Type.newtype(:qdr_listener) do
|
||||
desc "Type for managing qdrouterd listener instances"
|
||||
|
||||
ensurable do
|
||||
defaultto(:present)
|
||||
newvalue(:present) do
|
||||
provider.create
|
||||
end
|
||||
newvalue(:absent) do
|
||||
provider.destroy
|
||||
end
|
||||
end
|
||||
|
||||
autorequire(:service) { 'qdrouterd' }
|
||||
|
||||
newparam(:name, :namevar => true) do
|
||||
desc "The unique name for the listener"
|
||||
newvalues(/^\S+$/)
|
||||
end
|
||||
|
||||
newproperty(:addr) do
|
||||
desc "The listening host's IP address, IPv4 or IPv6"
|
||||
end
|
||||
|
||||
newproperty(:port) do
|
||||
desc "The listening port number on the host"
|
||||
end
|
||||
|
||||
newproperty(:role) do
|
||||
desc "The role for connections established by the listener"
|
||||
defaultto :normal
|
||||
newvalues(:normal, :inter_router, :on_demand)
|
||||
end
|
||||
|
||||
newproperty(:sasl_mechanisms) do
|
||||
desc "List of accepted SASL authentication mechansisms"
|
||||
defaultto "ANONYMOUS,DIGEST-MD5,EXTERNAL,PLAIN"
|
||||
end
|
||||
|
||||
newproperty(:auth_peer) do
|
||||
defaultto :false
|
||||
newvalues(:true, :false)
|
||||
|
||||
def should_to_s(value)
|
||||
value.inspect
|
||||
end
|
||||
|
||||
def is_to_s(value)
|
||||
value.inspect
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
newproperty(:require_encryption) do
|
||||
desc "Require the connection to the peer to be encryped"
|
||||
defaultto :false
|
||||
newvalues(:true, :false)
|
||||
|
||||
def should_to_s(value)
|
||||
value.inspect
|
||||
end
|
||||
|
||||
def is_to_s(value)
|
||||
value.inspect
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
newproperty(:require_ssl) do
|
||||
desc "Require the use of SSL or TLS on the connection"
|
||||
defaultto :false
|
||||
newvalues(:true, :false)
|
||||
|
||||
def should_to_s(value)
|
||||
value.inspect
|
||||
end
|
||||
|
||||
def is_to_s(value)
|
||||
value.inspect
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
newproperty(:max_frame_size) do
|
||||
desc "The largest contiguous set of uninterrupted data that can be sent"
|
||||
defaultto ('65536')
|
||||
|
||||
validate do |value|
|
||||
unless value =~ /\d{1,5}/ &&
|
||||
value.to_i <= 65536
|
||||
fail("Invalid max frame size #{value}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
@ -1,24 +0,0 @@
|
||||
Puppet::Type.newtype(:qdr_log) do
|
||||
desc "Type for managing qdrouterd module log instances"
|
||||
|
||||
ensurable do
|
||||
defaultto(:present)
|
||||
newvalue(:present) do
|
||||
provider.create
|
||||
end
|
||||
newvalue(:absent) do
|
||||
provider.destroy
|
||||
end
|
||||
end
|
||||
|
||||
autorequire(:service) { 'qdrouterd' }
|
||||
|
||||
newparam(:name, :namevar => true) do
|
||||
desc "The unique name for the log module"
|
||||
end
|
||||
|
||||
newproperty(:module) do
|
||||
desc "The qdrouterd log module source"
|
||||
end
|
||||
|
||||
end
|
@ -1,31 +0,0 @@
|
||||
Puppet::Type.newtype(:qdr_user) do
|
||||
desc "Type for managing qdr users such as with sasl provider, etc."
|
||||
|
||||
ensurable do
|
||||
defaultto(:present)
|
||||
newvalue(:present) do
|
||||
provider.create
|
||||
end
|
||||
newvalue(:absent) do
|
||||
provider.destroy
|
||||
end
|
||||
end
|
||||
|
||||
autorequire(:service) { 'qdrouterd' }
|
||||
|
||||
newparam(:name, :namevar => true) do
|
||||
desc "The name of user"
|
||||
newvalues(/^\S+$/)
|
||||
end
|
||||
|
||||
newparam(:password) do
|
||||
desc "The user password to be set on creation"
|
||||
end
|
||||
|
||||
validate do
|
||||
if self[:ensure] == :present and ! self[:password]
|
||||
raise Puppet::Error => 'Must set password when creating user' unless self[:password]
|
||||
end
|
||||
end
|
||||
|
||||
end
|
@ -1,61 +0,0 @@
|
||||
# == Class qdr::config
|
||||
#
|
||||
# This class is called from qdr for qdrouterd service configuration
|
||||
#
|
||||
class qdr::config inherits qdr {
|
||||
|
||||
$service_config_path = $::qdr::params::service_config_path
|
||||
$service_home = $::qdr::params::service_home
|
||||
$log_output = $::qdr::log_output
|
||||
$router_debug_dump = $::qdr::router_debug_dump
|
||||
$service_config_template = 'qdr/qdrouterd.conf.erb'
|
||||
|
||||
file { $service_home :
|
||||
ensure => directory,
|
||||
owner => '0',
|
||||
group => '0',
|
||||
mode => '0755',
|
||||
}
|
||||
|
||||
file { '/etc/qpid-dispatch' :
|
||||
ensure => directory,
|
||||
owner => '0',
|
||||
group => '0',
|
||||
mode => '0644',
|
||||
}
|
||||
|
||||
file { '/etc/qpid-dispatch/ssl' :
|
||||
ensure => directory,
|
||||
owner => '0',
|
||||
group => '0',
|
||||
mode => '0644',
|
||||
}
|
||||
|
||||
$show_diff = ($::qdr::listener_ssl_password == undef)
|
||||
|
||||
file { 'qdrouterd.conf' :
|
||||
ensure => file,
|
||||
path => $service_config_path,
|
||||
content => template($service_config_template),
|
||||
owner => '0',
|
||||
group => '0',
|
||||
mode => '0644',
|
||||
show_diff => $show_diff,
|
||||
notify => Class['qdr::service'],
|
||||
}
|
||||
|
||||
file { $router_debug_dump :
|
||||
ensure => directory,
|
||||
owner => '0',
|
||||
group => '0',
|
||||
mode => '0766',
|
||||
}
|
||||
|
||||
file { $log_output :
|
||||
ensure => file,
|
||||
owner => '0',
|
||||
group => '0',
|
||||
mode => '0666',
|
||||
}
|
||||
|
||||
}
|
@ -1,208 +0,0 @@
|
||||
# == Class: qdr
|
||||
#
|
||||
# Full description of class qdr here.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*connectors*]
|
||||
# (optional) An array of hashes containing connector configuration
|
||||
# Defaults to []
|
||||
#
|
||||
# [*ssl_profiles*]
|
||||
# (optional) An array of hashes containing the ssl profiles
|
||||
# Defaults to []
|
||||
#
|
||||
# [*ensure_package*]
|
||||
# (optional) The state of the qdr packages
|
||||
# Defaults to 'installed'
|
||||
#
|
||||
# [*ensure_service*]
|
||||
# (optional) The state of the qdr service
|
||||
# Defaults to 'running'
|
||||
#
|
||||
# [*enable_service*]
|
||||
# (optional) The administrative status of the qdr service
|
||||
# Defaults to 'true'
|
||||
#
|
||||
# [*extra_listeners*]
|
||||
# (optional) An array of hashes containing extra listener configuration
|
||||
# Defaults to []
|
||||
#
|
||||
# [*listener_addr*]
|
||||
# (optional) Service host name
|
||||
# Defaults to '127.0.0.1'
|
||||
#
|
||||
# [*listener_auth_peer*]
|
||||
# (optional)
|
||||
# Defaults to false
|
||||
#
|
||||
# [*listener_idle_timeout*]
|
||||
# (optional)
|
||||
# Defaults to '16'
|
||||
#
|
||||
# [*listener_max_frame_size*]
|
||||
# (optional) Maximum frame size used for a message delivery over the
|
||||
# connection
|
||||
# Defaults to '16384'
|
||||
#
|
||||
# [*listener_port*]
|
||||
# (optional) Service port number (AMQP)
|
||||
# Defaults to '5672'
|
||||
#
|
||||
# [*listener_require_encrypt*]
|
||||
# (optional) Require the connection to the peer to be encrypted
|
||||
# Defaults to false
|
||||
#
|
||||
# [*listener_require_ssl*]
|
||||
# (optional) Require the use of SSL or TLS on the connection
|
||||
# Defaults to false
|
||||
#
|
||||
# [*listener_sasl_mech*]
|
||||
# (optional) List of accepted SASL auth mechanisms
|
||||
# Defaults to 'ANONYMOUS'
|
||||
#
|
||||
# [*listener_ssl_cert_db*]
|
||||
# (optional) Path to certificate db
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*listener_ssl_cert_file*]
|
||||
# (optional) Path to certificat file
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*listener_ssl_key_file*]
|
||||
# (optional) Path to private key file
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*listener_ssl_pw_file*]
|
||||
# (optional) Path to password file for certificate key
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*listener_ssl_password*]
|
||||
# (optional) Password to be supplied
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*listener_trusted_certs*]
|
||||
# (optional) Path to file containing trusted certificates
|
||||
# Defaults to 'UNSET'
|
||||
#
|
||||
# [*autolink_addresses*]
|
||||
# (optional) An array of hashes containing the autoLink addresses
|
||||
# Defaults to []
|
||||
#
|
||||
# [*extra_addresses*]
|
||||
# (optional) An array of hashes containing extra address configuration
|
||||
# Defaults to []
|
||||
#
|
||||
# [*log_module*]
|
||||
# (optional) The log module to configure
|
||||
# Defaults to 'DEFAULT'
|
||||
#
|
||||
# [*log_enable*]
|
||||
# (optional) Log level for a module
|
||||
# Defaults to 'debug+'
|
||||
#
|
||||
# [*log_output*]
|
||||
# (optional) Target destination for log message
|
||||
# Defaults to '/var/log/qdrouterd/qdrouterd.log'
|
||||
#
|
||||
# [*router_debug_dump*]
|
||||
# (optional) Path to file for debugging information
|
||||
# Defaults to '/var/log/qdrouterd'
|
||||
#
|
||||
# [*router_hello_interval*]
|
||||
# (optional) Router HELLO message interval in seconds
|
||||
# Defaults to 1
|
||||
#
|
||||
# [*router_hello_max_age*]
|
||||
# (optional) Neighbor router age timeout in seconds
|
||||
# Defaults to 3
|
||||
#
|
||||
# [*router_id*]
|
||||
# (optional) Router unique identifer
|
||||