Browse Source

Retire puppet-panko.

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 #puppet-openstack on OFTC.

Change-Id: I1660e839a5ca63d982ed5dcb180068053bda081f
changes/90/791890/8
Matthias Runge 4 weeks ago
parent
commit
5a97842973
125 changed files with 7 additions and 4479 deletions
  1. +0
    -26
      .gitignore
  2. +0
    -7
      .zuul.yaml
  3. +0
    -19
      CONTRIBUTING.rst
  4. +0
    -36
      Gemfile
  5. +0
    -176
      LICENSE
  6. +0
    -81
      README.md
  7. +7
    -0
      README.rst
  8. +0
    -1
      Rakefile
  9. +0
    -12
      bindep.txt
  10. +0
    -6
      doc/requirements.txt
  11. +0
    -16
      examples/panko.pp
  12. +0
    -27
      lib/puppet/provider/panko_api_paste_ini/ini_setting.rb
  13. +0
    -10
      lib/puppet/provider/panko_api_uwsgi_config/ini_setting.rb
  14. +0
    -10
      lib/puppet/provider/panko_config/ini_setting.rb
  15. +0
    -52
      lib/puppet/type/panko_api_paste_ini.rb
  16. +0
    -29
      lib/puppet/type/panko_api_uwsgi_config.rb
  17. +0
    -53
      lib/puppet/type/panko_config.rb
  18. +0
    -195
      manifests/api.pp
  19. +0
    -25
      manifests/client.pp
  20. +0
    -38
      manifests/config.pp
  21. +0
    -83
      manifests/db.pp
  22. +0
    -64
      manifests/db/mysql.pp
  23. +0
    -49
      manifests/db/postgresql.pp
  24. +0
    -40
      manifests/db/sync.pp
  25. +0
    -49
      manifests/deps.pp
  26. +0
    -96
      manifests/expirer.pp
  27. +0
    -41
      manifests/healthcheck.pp
  28. +0
    -33
      manifests/init.pp
  29. +0
    -109
      manifests/keystone/auth.pp
  30. +0
    -274
      manifests/keystone/authtoken.pp
  31. +0
    -149
      manifests/logging.pp
  32. +0
    -38
      manifests/params.pp
  33. +0
    -68
      manifests/policy.pp
  34. +0
    -160
      manifests/wsgi/apache.pp
  35. +0
    -41
      manifests/wsgi/uwsgi.pp
  36. +0
    -75
      metadata.json
  37. +0
    -4
      releasenotes/notes/add-expirer-class-080c2b7a43abcd0d.yaml
  38. +0
    -5
      releasenotes/notes/add-pool_timeout-option-for-db-843951f42f4807ba.yaml
  39. +0
    -5
      releasenotes/notes/add-use_journal-option-for-logging-a7df62b5b71eca68.yaml
  40. +0
    -3
      releasenotes/notes/add_db_sync_timeout-8a7c5b0b701f71d0.yaml
  41. +0
    -4
      releasenotes/notes/add_enable_proxy_header_parsing-1a39719e142d5e6f.yaml
  42. +0
    -4
      releasenotes/notes/add_mysql_enable_ndb-option-a5c6dd40f7b4b9eb.yaml
  43. +0
    -3
      releasenotes/notes/add_storage_related_parameter-4a20fabdf26d2525.yaml
  44. +0
    -3
      releasenotes/notes/authtoken_manage_memcache_package-f2526ff13c3a7c58.yaml
  45. +0
    -6
      releasenotes/notes/batchsize-9f201b538828370d.yaml
  46. +0
    -7
      releasenotes/notes/default-domain-344433953d3840bb.yaml
  47. +0
    -4
      releasenotes/notes/deprecate_auth_uri_parameter-b7145764da4687aa.yaml
  48. +0
    -4
      releasenotes/notes/deprecate_database_min_pool_size-option-a72d11a510c51344.yaml
  49. +0
    -4
      releasenotes/notes/deprecate_ensure_package_parameter-78135a334d98fe23.yaml
  50. +0
    -4
      releasenotes/notes/deprecate_idle_timeout_parameter-8bacd3cd2b5b7021.yaml
  51. +0
    -6
      releasenotes/notes/deprecate_pki_related_parameters-aeecfa846786582d.yaml
  52. +0
    -4
      releasenotes/notes/deprecate_revocation_cache_time_parameter-3a02718c60f28284.yaml
  53. +0
    -4
      releasenotes/notes/dont-include-logging-init-98a82d12086c1402.yaml
  54. +0
    -16
      releasenotes/notes/drop-standalone-api-67411e39ae327e8e.yaml
  55. +0
    -5
      releasenotes/notes/expirer-ensure-05c77588f136c659.yaml
  56. +0
    -7
      releasenotes/notes/expirer-maxdelay-d6a05b7e61e5f7fa.yaml
  57. +0
    -3
      releasenotes/notes/fix-api-port-default-871345e935f23439.yaml
  58. +0
    -5
      releasenotes/notes/healthcheck-97c3e1d45eb48df5.yaml
  59. +0
    -5
      releasenotes/notes/keystone-authtoken-interface-fa6f3766fc97cc86.yaml
  60. +0
    -5
      releasenotes/notes/keystone-authtoken-service_type-f412297d1a40eecb.yaml
  61. +0
    -4
      releasenotes/notes/log-json-a220c2b1f3164c26.yaml
  62. +0
    -5
      releasenotes/notes/max_request_body_size-b4d7bf22decb115a.yaml
  63. +0
    -4
      releasenotes/notes/migrate-policy-format-from-json-to-yaml-916e0f6171e69ef1.yaml
  64. +0
    -3
      releasenotes/notes/openstack_db_tag-8ad108d6f8e07a9e.yaml
  65. +0
    -5
      releasenotes/notes/os_workers_for_worker_count-377cfa64e935822c.yaml
  66. +0
    -5
      releasenotes/notes/oslo_policy-enforce_scope-e1658ff1930bca3a.yaml
  67. +0
    -5
      releasenotes/notes/policy-dirs-201b48d122960265.yaml
  68. +0
    -5
      releasenotes/notes/policy-enforce_new_defaults-0e1be9adb34783d9.yaml
  69. +0
    -3
      releasenotes/notes/postgres-0f2d04def1149954.yaml
  70. +0
    -4
      releasenotes/notes/puppet4-mysql-func-361ea787e56650ee.yaml
  71. +0
    -10
      releasenotes/notes/release-note-ubuntu-py3-c4571d214552aa00.yaml
  72. +0
    -4
      releasenotes/notes/remove-auth-uri-3f06c78dc4084faf.yaml
  73. +0
    -5
      releasenotes/notes/remove-explicit-log-e931f303c9bf7946.yaml
  74. +0
    -3
      releasenotes/notes/remove_deprecated_ensure_package_option-8af908c11bc0b950.yaml
  75. +0
    -3
      releasenotes/notes/remove_deprecated_keystone_revocation_cache_time_option-afcc54dbcc215692.yaml
  76. +0
    -5
      releasenotes/notes/remove_deprecated_pki_related_options-920fd6ffb82df356.yaml
  77. +0
    -3
      releasenotes/notes/remove_idle_timeout_option-881dee47d7bb281d.yaml
  78. +0
    -4
      releasenotes/notes/restart-apache-4f14dda1daf456d4.yaml
  79. +0
    -4
      releasenotes/notes/service_token_roles-897d112ef648f5b2.yaml
  80. +0
    -5
      releasenotes/notes/service_token_roles_required-9c6d1e6cf4202483.yaml
  81. +0
    -5
      releasenotes/notes/set-event-time-to-live-5769fa43abddbc0a.yaml
  82. +0
    -3
      releasenotes/notes/set-user-domain-default-3da3f24dfe35e9c0.yaml
  83. +0
    -7
      releasenotes/notes/uwsgi-4142dfdaac67fec8.yaml
  84. +0
    -5
      releasenotes/notes/wsgi_process_options-03a80f11e4fcd30b.yaml
  85. +0
    -0
      releasenotes/source/_static/.placeholder
  86. +0
    -256
      releasenotes/source/conf.py
  87. +0
    -27
      releasenotes/source/index.rst
  88. +0
    -6
      releasenotes/source/ocata.rst
  89. +0
    -6
      releasenotes/source/pike.rst
  90. +0
    -6
      releasenotes/source/queens.rst
  91. +0
    -6
      releasenotes/source/rocky.rst
  92. +0
    -6
      releasenotes/source/stein.rst
  93. +0
    -6
      releasenotes/source/train.rst
  94. +0
    -5
      releasenotes/source/unreleased.rst
  95. +0
    -6
      releasenotes/source/ussuri.rst
  96. +0
    -6
      releasenotes/source/victoria.rst
  97. +0
    -6
      releasenotes/source/wallaby.rst
  98. +0
    -13
      setup.cfg
  99. +0
    -22
      setup.py
  100. +0
    -233
      spec/classes/panko_api_spec.rb

+ 0
- 26
.gitignore View File

@ -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

+ 0
- 7
.zuul.yaml View File

@ -1,7 +0,0 @@
- project:
templates:
- puppet-openstack-check-jobs
- puppet-openstack-module-unit-jobs
- puppet-openstack-integration-jobs-scenario001
- puppet-openstack-litmus-jobs
- release-notes-jobs-python3

+ 0
- 19
CONTRIBUTING.rst View File

@ -1,19 +0,0 @@
The source repository for this project can be found at:
https://opendev.org/openstack/puppet-panko
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-panko
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

+ 0
- 36
Gemfile View File

@ -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

+ 0
- 176
LICENSE View File

@ -1,176 +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.

+ 0
- 81
README.md View File

@ -1,81 +0,0 @@
Team and repository tags
========================
[![Team and repository tags](https://governance.openstack.org/tc/badges/puppet-panko.svg)](https://governance.openstack.org/tc/reference/tags/index.html)
<!-- Change things from this point on -->
panko
=======
#### Table of Contents
1. [Overview - What is the panko module?](#overview)
2. [Module Description - What does the module do?](#module-description)
3. [Setup - The basics of getting started with panko](#setup)
4. [Implementation - An under-the-hood peek at what the module is doing](#implementation)
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
--------
The panko module is a part of [OpenStack](https://opendev.org/openstack), an effort by the OpenStack infrastructure team to provide continuous integration testing and code review for OpenStack and OpenStack community projects not part of the core software. The module its self is used to flexibly configure and manage the events service for OpenStack.
Module Description
------------------
The panko module is a thorough attempt to make Puppet capable of managing the entirety of panko. This includes manifests to provision region specific endpoint and database connections. Types are shipped as part of the panko module to assist in manipulation of configuration files.
Setup
-----
**What the panko module affects**
* [Panko](https://docs.openstack.org/panko/latest/), the events service for OpenStack.
### Installing panko
panko is not currently in Puppet Forge, but is anticipated to be added soon. Once that happens, you'll be able to install panko with:
puppet module install openstack/panko
### Beginning with panko
To utilize the panko module's functionality you will need to declare multiple resources.
Implementation
--------------
### panko
panko is a combination of Puppet manifest and ruby code to delivery configuration and extra functionality through types and providers.
Limitations
------------
* All the panko types use the CLI tools and so need to be ran on the panko node.
Development
-----------
Developer documentation for the entire puppet-openstack project.
* https://docs.openstack.org/puppet-openstack-guide/latest/
Contributors
------------
* https://github.com/openstack/puppet-panko/graphs/contributors
Release Notes
-------------
* https://docs.openstack.org/releasenotes/puppet-panko
Repository
----------
* https://opendev.org/openstack/puppet-panko

+ 7
- 0
README.rst View File

@ -0,0 +1,7 @@
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 #puppet-openstack on OFTC.

+ 0
- 1
Rakefile View File

@ -1 +0,0 @@
require 'puppet-openstack_spec_helper/rake_tasks'

+ 0
- 12
bindep.txt View File

@ -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]

+ 0
- 6
doc/requirements.txt View File

@ -1,6 +0,0 @@
# This is required for the docs build jobs
sphinx>=3.5.1 # BSD
openstackdocstheme>=2.2.1 # Apache-2.0
# This is required for the releasenotes build jobs
reno>=3.1.0 # Apache-2.0

+ 0
- 16
examples/panko.pp View File

@ -1,16 +0,0 @@
class { 'panko': }
class { 'panko::keystone::authtoken':
password => 'a_big_secret',
}
class { 'panko::api':
enabled => true,
service_name => 'httpd',
}
include apache
class { 'panko::wsgi::apache':
ssl => false,
}
class { 'panko::auth':
auth_password => 'a_big_secret',
}

+ 0
- 27
lib/puppet/provider/panko_api_paste_ini/ini_setting.rb View File

@ -1,27 +0,0 @@
Puppet::Type.type(:panko_api_paste_ini).provide(
:ini_setting,
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
) do
def section
resource[:name].split('/', 2).first
end
def setting
resource[:name].split('/', 2).last
end
def separator
'='
end
def self.file_path
'/etc/panko/api_paste.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

+ 0
- 10
lib/puppet/provider/panko_api_uwsgi_config/ini_setting.rb View File

@ -1,10 +0,0 @@
Puppet::Type.type(:panko_api_uwsgi_config).provide(
:ini_setting,
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def self.file_path
'/etc/panko/panko-api-uwsgi.ini'
end
end

+ 0
- 10
lib/puppet/provider/panko_config/ini_setting.rb View File

@ -1,10 +0,0 @@
Puppet::Type.type(:panko_config).provide(
:ini_setting,
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) do
def self.file_path
'/etc/panko/panko.conf'
end
end

+ 0
- 52
lib/puppet/type/panko_api_paste_ini.rb View File

@ -1,52 +0,0 @@
Puppet::Type.newtype(:panko_api_paste_ini) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from /etc/panko/api_paste.ini'
newvalues(/\S+\/\S+/)
end
newproperty(:value) do
desc 'The value of the setting to be defined.'
munge do |value|
value = value.to_s.strip
value.capitalize! if value =~ /^(true|false)$/i
value
end
def is_to_s( currentvalue )
if resource.secret?
return '[old secret redacted]'
else
return currentvalue
end
end
def should_to_s( newvalue )
if resource.secret?
return '[new secret redacted]'
else
return newvalue
end
end
end
newparam(:secret, :boolean => true) do
desc 'Whether to hide the value from Puppet logs. Defaults to `false`.'
newvalues(:true, :false)
defaultto false
end
newparam(:ensure_absent_val) do
desc 'A value that is specified as the value property will behave as if ensure => absent was specified'
defaultto('<SERVICE DEFAULT>')
end
autorequire(:anchor) do
['panko::install::end']
end
end

+ 0
- 29
lib/puppet/type/panko_api_uwsgi_config.rb View File

@ -1,29 +0,0 @@
Puppet::Type.newtype(:panko_api_uwsgi_config) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from /etc/panko/panko-api-uwsgi.ini'
newvalues(/\S+\/\S+/)
end
newproperty(:value) do
desc 'The value of the setting to be defined.'
munge do |value|
value = value.to_s.strip
value.capitalize! if value =~ /^(true|false)$/i
value
end
newvalues(/^[\S ]*$/)
end
newparam(:ensure_absent_val) do
desc 'A value that is specified as the value property will behave as if ensure => absent was specified'
defaultto('<SERVICE DEFAULT>')
end
autorequire(:anchor) do
['panko::install::end']
end
end

+ 0
- 53
lib/puppet/type/panko_config.rb View File

@ -1,53 +0,0 @@
Puppet::Type.newtype(:panko_config) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from panko.conf'
newvalues(/\S+\/\S+/)
end
newproperty(:value) do
desc 'The value of the setting to be defined.'
munge do |value|
value = value.to_s.strip
value.capitalize! if value =~ /^(true|false)$/i
value
end
newvalues(/^[\S ]*$/)
def is_to_s( currentvalue )
if resource.secret?
return '[old secret redacted]'
else
return currentvalue
end
end
def should_to_s( newvalue )
if resource.secret?
return '[new secret redacted]'
else
return newvalue
end
end
end
newparam(:secret, :boolean => true) do
desc 'Whether to hide the value from Puppet logs. Defaults to `false`.'
newvalues(:true, :false)
defaultto false
end
newparam(:ensure_absent_val) do
desc 'A value that is specified as the value property will behave as if ensure => absent was specified'
defaultto('<SERVICE DEFAULT>')
end
autorequire(:anchor) do
['panko::install::end']
end
end

+ 0
- 195
manifests/api.pp View File

@ -1,195 +0,0 @@
# Installs & configure the panko api service
#
# == Parameters
#
# [*enabled*]
# (optional) Should the service be enabled.
# Defaults to true
#
# [*manage_service*]
# (optional) Whether the service should be managed by Puppet.
# Defaults to true.
#
# [*package_ensure*]
# (optional) ensure state for package.
# Defaults to 'present'
#
# [*service_name*]
# (optional) Name of the service that will be providing the
# server functionality of panko-api.
# If the value is 'httpd', this means panko-api will be a web
# service, and you must use another class to configure that
# web service. For example, use class { 'panko::wsgi::apache'...}
# to make panko-api be a web app using apache mod_wsgi.
# Defaults to '$::panko::params::api_service_name'
#
# [*sync_db*]
# (optional) Run panko-upgrade db sync on api nodes after installing the package.
# Defaults to false
#
# [*auth_strategy*]
# (optional) Configure panko authentication.
# Can be set to noauth and keystone.
# Defaults to 'keystone'.
#
# [*enable_proxy_headers_parsing*]
# (Optional) Enable paste middleware to handle SSL requests through
# HTTPProxyToWSGI middleware.
# Defaults to $::os_service_default.
#
# [*max_request_body_size*]
# (Optional) Set max request body size
# Defaults to $::os_service_default.
#
# [*max_retries*]
# (Optional) Maximum number of connection retries during startup.
# Set to -1 to specify an infinite retry count. (integer value)
# Defaults to $::os_service_default.
#
# [*retry_interval*]
# (Optional) Interval between retries of connection.
# Defaults to $::os_service_default.
#
# [*es_ssl_enabled*]
# (Optional) Enable HTTPS connection in the Elasticsearch connection.
# Defaults to $::os_service_default.
#
# [*es_index_name*]
# (Optional) The name of the index in Elasticsearch (string value).
# Defaults to $::os_service_default.
#
# [*event_time_to_live*]
# (Optional) Number of seconds that events are kept in the database for
# (<= 0 means forever)
# Defaults to $::os_service_default.
#
# DEPRECATED PARAMETERS
#
# [*host*]
# (optional) The panko api bind address.
# Defaults to undef
#
# [*port*]
# (optional) The panko api port.
# Defaults to undef
#
# [*workers*]
# (optional) Number of workers for Panko API server.
# Defaults to undef
#
# [*max_limit*]
# (optional) The maximum number of items returned in a
# single response from a collection resource.
# Defaults to undef
#
class panko::api (
$manage_service = true,
$enabled = true,
$package_ensure = 'present',
$service_name = $::panko::params::api_service_name,
$sync_db = false,
$auth_strategy = 'keystone',
$enable_proxy_headers_parsing = $::os_service_default,
$max_request_body_size = $::os_service_default,
$max_retries = $::os_service_default,
$retry_interval = $::os_service_default,
$es_ssl_enabled = $::os_service_default,
$es_index_name = $::os_service_default,
$event_time_to_live = $::os_service_default,
# DEPRECATED PARAMETERS
$host = undef,
$port = undef,
$workers = undef,
$max_limit = undef,
) inherits panko::params {
if $host != undef {
warning('The panko::api::host parameter is deprecated and has no effect')
}
if $port != undef {
warning('The panko::api::port parameter is deprecated and has no effect')
}
if $workers != undef {
warning('The panko::api::workers parameter is deprecated and has no effect')
}
if $max_limit != undef {
warning('The panko::api::max_limit parameter is deprecated and has no effect')
}
include panko::deps
include panko::policy
package { 'panko-api':
ensure => $package_ensure,
name => $::panko::params::api_package_name,
tag => ['openstack', 'panko-package'],
}
if $manage_service {
if $enabled {
$service_ensure = 'running'
} else {
$service_ensure = 'stopped'
}
}
if $sync_db {
include panko::db::sync
}
$api_service_name = $::panko::params::api_service_name
if $api_service_name != 'httpd' and $service_name == $api_service_name {
service { 'panko-api':
ensure => $service_ensure,
name => $api_service_name,
enable => $enabled,
hasstatus => true,
hasrestart => true,
tag => ['panko-service', 'panko-db-sync-service'],
}
} elsif $service_name == 'httpd' {
include apache::params
Service <| title == 'httpd' |> {
tag +> ['panko-service', 'panko-db-sync-service']
}
Class['panko::db'] -> Service[$service_name]
if $api_service_name != 'httpd' {
service { 'panko-api':
ensure => 'stopped',
name => $api_service_name,
enable => false,
tag => ['panko-service', 'panko-db-sync-service'],
}
# we need to make sure panko-api/eventlet is stopped before trying to start apache
Service['panko-api'] -> Service[$service_name]
}
} else {
fail('Invalid service_name.')
}
panko_config {
'storage/max_retries': value => $max_retries;
'storage/retry_interval': value => $retry_interval;
'storage/es_ssl_enabled': value => $es_ssl_enabled;
'storage/es_index_name': value => $es_index_name;
'database/event_time_to_live': value => $event_time_to_live;
}
if $auth_strategy == 'keystone' {
include panko::keystone::authtoken
panko_api_paste_ini {
'pipeline:main/pipeline': value => 'panko+auth',
}
} else {
panko_api_paste_ini {
'pipeline:main/pipeline': value => 'panko+noauth',
}
}
oslo::middleware { 'panko_config':
enable_proxy_headers_parsing => $enable_proxy_headers_parsing,
max_request_body_size => $max_request_body_size,
}
}

+ 0
- 25
manifests/client.pp View File

@ -1,25 +0,0 @@
# == Class: panko::client
#
# Installs the panko python library.
#
# === Parameters:
#
# [*ensure*]
# (Optional) Ensure state for pachage.
# Defaults to 'present'.
#
class panko::client (
$ensure = 'present'
) {
include panko::deps
include panko::params
package { 'python-pankoclient':
ensure => $ensure,
name => $::panko::params::client_package_name,
tag => 'openstack',
}
}

+ 0
- 38
manifests/config.pp View File

@ -1,38 +0,0 @@
# == Class: panko::config
#
# This class is used to manage arbitrary panko configurations.
#
# === Parameters
#
# [*panko_config*]
# (optional) Allow configuration of arbitrary panko configurations.
# The value is an hash of panko_config resources. Example:
# { 'DEFAULT/foo' => { value => 'fooValue'},
# 'DEFAULT/bar' => { value => 'barValue'}
# }
# In yaml format, Example:
# panko_config:
# DEFAULT/foo:
# value: fooValue
# DEFAULT/bar:
# value: barValue
#
# [*panko_api_paste_ini*]
# (optional) Allow configuration of /etc/panko/api_paste.ini options.
#
# NOTE: The configuration MUST NOT be already handled by this module
# or Puppet catalog compilation will fail with duplicate resources.
#
class panko::config (
$panko_config = {},
$panko_api_paste_ini = {},
) {
include panko::deps
validate_legacy(Hash, 'validate_hash', $panko_config)
validate_legacy(Hash, 'validate_hash', $panko_api_paste_ini)
create_resources('panko_config', $panko_config)
create_resources('panko_api_paste_ini', $panko_api_paste_ini)
}

+ 0
- 83
manifests/db.pp View File

@ -1,83 +0,0 @@
# == Class: panko::db
#
# Configure the panko database
#
# === Parameters
#
# [*database_connection*]
# (Optional) Url used to connect to database.
# Defaults to 'sqlite:////var/lib/panko/panko.sqlite'.
#
# [*database_connection_recycle_time*]
# (Optional) Timeout when db connections should be reaped.
# Defaults to $::os_service_default
#
# [*database_db_max_retries*]
# (optional) Maximum retries in case of connection error or deadlock error
# before error is raised. Set to -1 to specify an infinite retry count.
# Defaults to $::os_service_default
#
# [*database_max_retries*]
# (Optional) Maximum number of database connection retries during startup.
# Setting -1 implies an infinite retry count.
# Defaults to $::os_service_default
#
# [*database_retry_interval*]
# (Optional) Interval between retries of opening a database connection.
# Defaults to $::os_service_default
#
# [*database_max_pool_size*]
# (Optional)Maximum number of SQL connections to keep open in a pool.
# Defaults to $::os_service_default
#
# [*database_max_overflow*]
# (Optional) If set, use this value for max_overflow with sqlalchemy.
# Defaults to $::os_service_default
#
# [*database_pool_timeout*]
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
# Defaults to $::os_service_default
#
# [*mysql_enable_ndb*]
# (Optional) If True, transparently enables support for handling MySQL
# Cluster (NDB).
# Defaults to $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*database_min_pool_size*]
# (Optional) Minimum number of SQL connections to keep open in a pool.
# Defaults to undef
#
class panko::db (
$database_connection = 'sqlite:////var/lib/panko/panko.sqlite',
$database_connection_recycle_time = $::os_service_default,
$database_max_pool_size = $::os_service_default,
$database_db_max_retries = $::os_service_default,
$database_max_retries = $::os_service_default,
$database_retry_interval = $::os_service_default,
$database_max_overflow = $::os_service_default,
$database_pool_timeout = $::os_service_default,
$mysql_enable_ndb = $::os_service_default,
# DEPRECATED PARAMETERS
$database_min_pool_size = undef,
) {
include panko::deps
if $database_min_pool_size {
warning('The database_min_pool_size parameter is deprecated, and will be removed in a future release.')
}
oslo::db { 'panko_config':
connection => $database_connection,
connection_recycle_time => $database_connection_recycle_time,
db_max_retries => $database_db_max_retries,
max_retries => $database_max_retries,
retry_interval => $database_retry_interval,
max_pool_size => $database_max_pool_size,
max_overflow => $database_max_overflow,
pool_timeout => $database_pool_timeout,
mysql_enable_ndb => $mysql_enable_ndb,
}
}

+ 0
- 64
manifests/db/mysql.pp View File

@ -1,64 +0,0 @@
# The panko::db::mysql class implements mysql backend for panko
#
# This class can be used to create tables, users and grant
# privilege for a mysql panko database.
#
# == Parameters
#
# [*password*]
# (Required) Password to connect to the database.
#
# [*dbname*]
# (Optional) Name of the database.
# Defaults to 'panko'.
#
# [*user*]
# (Optional) User to connect to the database.
# Defaults to 'panko'.
#
# [*host*]
# (Optional) The default source host user is allowed to connect from.
# Defaults to '127.0.0.1'
#
# [*allowed_hosts*]
# (Optional) Other hosts the user is allowed to connect from.
# Defaults to 'undef'.
#
# [*charset*]
# (Optional) The database charset.
# Defaults to 'utf8'
#
# [*collate*]
# (Optional) The database collate.
# Only used with mysql modules >= 2.2.
# Defaults to 'utf8_general_ci'
#
class panko::db::mysql(
$password,
$dbname = 'panko',
$user = 'panko',
$host = '127.0.0.1',
$charset = 'utf8',
$collate = 'utf8_general_ci',
$allowed_hosts = undef
) {
include panko::deps
validate_legacy(String, 'validate_string', $password)
::openstacklib::db::mysql { 'panko':
user => $user,
password => $password,
dbname => $dbname,
host => $host,
charset => $charset,
collate => $collate,
allowed_hosts => $allowed_hosts,
}
Anchor['panko::db::begin']
~> Class['panko::db::mysql']
~> Anchor['panko::db::end']
}

+ 0
- 49
manifests/db/postgresql.pp View File

@ -1,49 +0,0 @@
# == Class: panko::db::postgresql
#
# Class that configures postgresql for panko
# Requires the Puppetlabs postgresql module.
#
# === Parameters
#
# [*password*]
# (Required) Password to connect to the database.
#
# [*dbname*]
# (Optional) Name of the database.
# Defaults to 'panko'.
#
# [*user*]
# (Optional) User to connect to the database.
# Defaults to 'panko'.
#
# [*encoding*]
# (Optional) The charset to use for the database.
# Default to undef.
#
# [*privileges*]
# (Optional) Privileges given to the database user.
# Default to 'ALL'
#
class panko::db::postgresql(
$password,
$dbname = 'panko',
$user = 'panko',
$encoding = undef,
$privileges = 'ALL',
) {
include panko::deps
::openstacklib::db::postgresql { 'panko':
password => $password,
dbname => $dbname,
user => $user,
encoding => $encoding,
privileges => $privileges,
}
Anchor['panko::db::begin']
~> Class['panko::db::postgresql']
~> Anchor['panko::db::end']
}

+ 0
- 40
manifests/db/sync.pp View File

@ -1,40 +0,0 @@
#
# Class to execute panko-manage db_sync
#
# == Parameters
#
# [*extra_params*]
# (Optional) String of extra command line parameters to append
# to the panko-dbsync command.
# Defaults to undef
#
# [*db_sync_timeout*]
# (Optional) Timeout for the execution of the db_sync
# Defaults to 300
#
class panko::db::sync(
$extra_params = undef,
$db_sync_timeout = 300,
) {
include panko::deps
exec { 'panko-db-sync':
command => "panko-dbsync --config-file /etc/panko/panko.conf ${extra_params}",
path => '/usr/bin',
user => 'panko',
refreshonly => true,
try_sleep => 5,
tries => 10,
timeout => $db_sync_timeout,
logoutput => 'on_failure',
subscribe => [
Anchor['panko::install::end'],
Anchor['panko::config::end'],
Anchor['panko::dbsync::begin']
],
notify => Anchor['panko::dbsync::end'],
tag => 'openstack-db',
}
}

+ 0
- 49
manifests/deps.pp View File

@ -1,49 +0,0 @@
# == Class: panko::deps
#
# Panko anchors and dependency management
#
class panko::deps {
# Setup anchors for install, config and service phases of the module. These
# anchors allow external modules to hook the begin and end of any of these
# phases. Package or service management can also be replaced by ensuring the
# package is absent or turning off service management and having the
# replacement depend on the appropriate anchors. When applicable, end tags
# should be notified so that subscribers can determine if installation,
# config or service state changed and act on that if needed.
anchor { 'panko::install::begin': }
-> Package<| tag == 'panko-package'|>
~> anchor { 'panko::install::end': }
-> anchor { 'panko::config::begin': }
-> Panko_config<||>
~> anchor { 'panko::config::end': }
-> anchor { 'panko::db::begin': }
-> anchor { 'panko::db::end': }
~> anchor { 'panko::dbsync::begin': }
-> anchor { 'panko::dbsync::end': }
~> anchor { 'panko::service::begin': }
~> Service<| tag == 'panko-service' |>
~> anchor { 'panko::service::end': }
# policy config should occur in the config block also.
Anchor['panko::config::begin']
-> Openstacklib::Policy::Base<||>
~> Anchor['panko::config::end']
# api paste ini config should occur in the config block also.
Anchor['panko::config::begin']
-> Panko_api_paste_ini<||>
~> Anchor['panko::config::end']
# On any uwsgi config change, we must restart Panko API.
Anchor['panko::config::begin']
-> Panko_api_uwsgi_config<||>
~> Anchor['panko::config::end']
# all db settings should be applied and all packages should be installed
# before dbsync starts
Oslo::Db<||> -> Anchor['panko::dbsync::begin']
# Installation or config changes will always restart services.
Anchor['panko::install::end'] ~> Anchor['panko::service::begin']
Anchor['panko::config::end'] ~> Anchor['panko::service::begin']
}

+ 0
- 96
manifests/expirer.pp View File

@ -1,96 +0,0 @@
#
# == Class: panko::expirer
#
# Setups Panko Expirer service to enable TTL feature.
#
# === Parameters
#
# [*ensure*]
# (optional) The state of cron job.
# Defaults to present.
#
# [*minute*]
# (optional) Defaults to '1'.
#
# [*hour*]
# (optional) Defaults to '0'.
#
# [*monthday*]
# (optional) Defaults to '*'.
#
# [*month*]
# (optional) Defaults to '*'.
#
# [*weekday*]
# (optional) Defaults to '*'.
#
# [*maxdelay*]
# (optional) In Seconds. Should be a positive integer.
# Induces a random delay before running the cronjob to avoid running
# all cron jobs at the same time on all hosts this job is configured.
# Defaults to 0.
#
# [*events_delete_batch_size*]
# (optional) Limit number of deleted events in single purge run.
# Defaults to $::os_service_default.
#
# DEPRECATED PARAMETERS
#
# [*enable_cron*]
# (optional) Whether to configure a crontab entry to run the expiry.
# When set to False, Puppet will try to remove the crontab.
# Defaults to undef,
#
class panko::expirer (
$ensure = 'present',
$minute = 1,
$hour = 0,
$monthday = '*',
$month = '*',
$weekday = '*',
$maxdelay = 0,
$events_delete_batch_size = $::os_service_default,
# DEPRECATED PARAMETERS
$enable_cron = undef,
) {
include panko::params
include panko::deps
if $enable_cron != undef {
warning('The panko::expirer::enable_cron is deprecated and will be removed \
in a future release. Use panko::expirer::ensure instead')
if $enable_cron {
$ensure_real = 'present'
} else {
$ensure_real = 'absent'
}
} else {
$ensure_real = $ensure
}
if $maxdelay == 0 {
$sleep = ''
} else {
$sleep = "sleep `expr \${RANDOM} \\% ${maxdelay}`; "
}
panko_config { 'database/events_delete_batch_size':
value => $events_delete_batch_size
}
cron { 'panko-expirer':
ensure => $ensure_real,
command => "${sleep}${panko::params::expirer_command}",
environment => 'PATH=/bin:/usr/bin:/usr/sbin SHELL=/bin/sh',
user => 'panko',
minute => $minute,
hour => $hour,
monthday => $monthday,
month => $month,
weekday => $weekday,
require => Anchor['panko::install::end'],
}
}

+ 0
- 41
manifests/healthcheck.pp View File

@ -1,41 +0,0 @@
# == Class: panko::healthcheck
#
# Configure oslo_middleware options in healthcheck section
#
# == Params
#
# [*detailed*]
# (Optional) Show more detailed information as part of the response.
# Defaults to $::os_service_default
#
# [*backends*]
# (Optional) Additional backends that can perform health checks and report
# that information back as part of a request.
# Defaults to $::os_service_default
#
# [*disable_by_file_path*]
# (Optional) Check the presense of a file to determine if an application
# is running on a port.
# Defaults to $::os_service_default
#
# [*disable_by_file_paths*]
# (Optional) Check the presense of a file to determine if an application
# is running on a port. Expects a "port:path" list of strings.
# Defaults to $::os_service_default
#
class panko::healthcheck (
$detailed = $::os_service_default,
$backends = $::os_service_default,
$disable_by_file_path = $::os_service_default,
$disable_by_file_paths = $::os_service_default,
) {
include panko::deps
oslo::healthcheck { 'panko_config':
detailed => $detailed,
backends => $backends,
disable_by_file_path => $disable_by_file_path,
disable_by_file_paths => $disable_by_file_paths,
}
}

+ 0
- 33
manifests/init.pp View File

@ -1,33 +0,0 @@
# == Class: panko
#
# Full description of class panko here.
#
# === Parameters
#
# [*package_ensure*]
# (optional) The state of panko packages
# Defaults to 'present'
#
# [*purge_config*]
# (optional) Whether to set only the specified config options
# in the panko config.
# Defaults to false.
#
class panko (
$package_ensure = 'present',
$purge_config = false,
) inherits panko::params {
include panko::deps
package { 'panko':
ensure => $package_ensure,
name => $::panko::params::common_package_name,
tag => ['openstack', 'panko-package'],
}
resources { 'panko_config':
purge => $purge_config,
}
}

+ 0
- 109
manifests/keystone/auth.pp View File

@ -1,109 +0,0 @@
# == Class: panko::keystone::auth
#
# Configures panko user, service and endpoint in Keystone.
#
# === Parameters
#
# [*password*]
# (Required) Password for panko user.
#
# [*auth_name*]
# (Optional) Username for panko service.
# Defaults to 'panko'.
#
# [*email*]
# (Optional) Email for panko user.
# Defaults to 'panko@localhost'.
#
# [*tenant*]
# (Optional) Tenant for panko user.
# Defaults to 'services'.
#
# [*configure_endpoint*]
# (Optional) Should panko endpoint be configured?
# Defaults to true.
#
# [*configure_user*]
# (Optional) Should the service user be configured?
# Defaults to true.
#
# [*configure_user_role*]
# (Optional) Should the admin role be configured for the service user?
# Defaults to true.
#
# [*service_type*]
# (Optional) Type of service.
# Defaults to 'event'.
#
# [*region*]
# (Optional) Region for endpoint.
# Defaults to 'RegionOne'.
#
# [*service_name*]
# (Optional) Name of the service.
# Defaults to the value of 'panko'.
#
# [*service_description*]
# (Optional) Description of the service.
# Default to 'OpenStack Event Service'
#
# [*public_url*]
# (0ptional) The endpoint's public url.
# This url should *not* contain any trailing '/'.
# Defaults to 'http://127.0.0.1:8977'
#
# [*admin_url*]
# (Optional) The endpoint's admin url.
# This url should *not* contain any trailing '/'.
# Defaults to 'http://127.0.0.1:8977'
#
# [*internal_url*]
# (Optional) The endpoint's internal url.
# This url should *not* contain any trailing '/'.
# Defaults to 'http://127.0.0.1:8977'
#
# === Examples:
#
# class { 'panko::keystone::auth':
# public_url => 'https://10.0.0.10:8977',
# internal_url => 'https://10.0.0.11:8977',
# admin_url => 'https://10.0.0.11:8977',
# }
#
class panko::keystone::auth (
$password,
$auth_name = 'panko',
$email = 'panko@localhost',
$tenant = 'services',
$configure_endpoint = true,
$configure_user = true,
$configure_user_role = true,
$service_name = 'panko',
$service_description = 'OpenStack Event Service',
$service_type = 'event',
$region = 'RegionOne',
$public_url = 'http://127.0.0.1:8977',
$admin_url = 'http://127.0.0.1:8977',
$internal_url = 'http://127.0.0.1:8977',
) {
include panko::deps
keystone::resource::service_identity { 'panko':
configure_user => $configure_user,
configure_user_role => $configure_user_role,
configure_endpoint => $configure_endpoint,
service_name => $service_name,
service_type => $service_type,
service_description => $service_description,
region => $region,
auth_name => $auth_name,
password => $password,
email => $email,
tenant => $tenant,
public_url => $public_url,
internal_url => $internal_url,
admin_url => $admin_url,
}
}

+ 0
- 274
manifests/keystone/authtoken.pp View File

@ -1,274 +0,0 @@
# class: panko::keystone::auth
#
# Configure the keystone_authtoken section in the configuration file
#
# === Parameters
#
# [*username*]
# (Optional) The name of the service user
# Defaults to 'panko'
#
# [*password*]
# (Required) Password to create for the service user
#
# [*auth_url*]
# (Optional) The URL to use for authentication.
# Defaults to 'http://localhost:5000'.
#
# [*project_name*]
# (Optional) Service project name
# Defaults to 'services'
#
# [*user_domain_name*]
# (Optional) Name of domain for $username
# Defaults to 'Default'
#
# [*project_domain_name*]
# (Optional) Name of domain for $project_name
# Defaults to 'Default'
#
# [*insecure*]
# (Optional) If true, explicitly allow TLS without checking server cert
# against any certificate authorities. WARNING: not recommended. Use with
# caution.
# Defaults to $::os_service_default
#
# [*auth_section*]
# (Optional) Config Section from which to load plugin specific options
# Defaults to $::os_service_default.
#
# [*auth_type*]
# (Optional) Authentication type to load
# Defaults to 'password'.
#
# [*www_authenticate_uri*]
# (Optional) Complete public Identity API endpoint.
# Defaults to 'http://localhost:5000'.
#
# [*auth_version*]
# (Optional) API version of the admin Identity API endpoint.
# Defaults to $::os_service_default.
#
# [*cache*]
# (Optional) Env key for the swift cache.
# Defaults to $::os_service_default.
#
# [*cafile*]
# (Optional) A PEM encoded Certificate Authority to use when verifying HTTPs
# connections.
# Defaults to $::os_service_default.
#
# [*certfile*]
# (Optional) Required if identity server requires client certificate
# Defaults to $::os_service_default.
#
# [*delay_auth_decision*]
# (Optional) Do not handle authorization requests within the middleware, but
# delegate the authorization decision to downstream WSGI components. Boolean
# value
# Defaults to $::os_service_default.
#
# [*enforce_token_bind*]
# (Optional) Used to control the use and type of token binding. Can be set
# to: "disabled" to not check token binding. "permissive" (default) to
# validate binding information if the bind type is of a form known to the
# server and ignore it if not. "strict" like "permissive" but if the bind
# type is unknown the token will be rejected. "required" any form of token
# binding is needed to be allowed. Finally the name of a binding method that
# must be present in tokens. String value.
# Defaults to $::os_service_default.
#
# [*http_connect_timeout*]
# (Optional) Request timeout value for communicating with Identity API
# server.
# Defaults to $::os_service_default.
#
# [*http_request_max_retries*]
# (Optional) How many times are we trying to reconnect when communicating
# with Identity API Server. Integer value
# Defaults to $::os_service_default.
#
# [*include_service_catalog*]
# (Optional) Indicate whether to set the X-Service-Catalog header. If False,
# middleware will not ask for service catalog on token validation and will
# not
# set the X-Service-Catalog header. Boolean value.
# Defaults to $::os_service_default.
#
# [*keyfile*]
# (Optional) Required if identity server requires client certificate
# Defaults to $::os_service_default.
#
# [*memcache_pool_conn_get_timeout*]
# (Optional) Number of seconds that an operation will wait to get a memcached
# client connection from the pool. Integer value
# Defaults to $::os_service_default.
#
# [*memcache_pool_dead_retry*]
# (Optional) Number of seconds memcached server is considered dead before it
# is tried again. Integer value
# Defaults to $::os_service_default.
#
# [*memcache_pool_maxsize*]
# (Optional) Maximum total number of open connections to every memcached
# server. Integer value
# Defaults to $::os_service_default.
#
# [*memcache_pool_socket_timeout*]
# (Optional) Number of seconds a connection to memcached is held unused in
# the
# pool before it is closed. Integer value
# Defaults to $::os_service_default.
#
# [*memcache_pool_unused_timeout*]
# (Optional) Number of seconds a connection to memcached is held unused in
# the
# pool before it is closed. Integer value
# Defaults to $::os_service_default.
#
# [*memcache_secret_key*]
# (Optional, mandatory if memcache_security_strategy is defined) This string
# is used for key derivation.
# Defaults to $::os_service_default.
#
# [*memcache_security_strategy*]
# (Optional) If defined, indicate whether token data should be authenticated
# or
# authenticated and encrypted. If MAC, token data is authenticated (with
# HMAC)
# in the cache. If ENCRYPT, token data is encrypted and authenticated in the
# cache. If the value is not one of these options or empty, auth_token will
# raise an exception on initialization.
# Defaults to $::os_service_default.
#
# [*memcache_use_advanced_pool*]
# (Optional) Use the advanced (eventlet safe) memcached client pool. The
# advanced pool will only work under python 2.x Boolean value
# Defaults to $::os_service_default.
#
# [*memcached_servers*]
# (Optional) Optionally specify a list of memcached server(s) to use for
# caching. If left undefined, tokens will instead be cached in-process.
# Defaults to $::os_service_default.
#
# [*manage_memcache_package*]
# (Optional) Whether to install the python-memcache package.
# Defaults to false.
#
# [*region_name*]
# (Optional) The region in which the identity server can be found.
# Defaults to $::os_service_default.
#
# [*token_cache_time*]
# (Optional) In order to prevent excessive effort spent validating tokens,
# the middleware caches previously-seen tokens for a configurable duration
# (in seconds). Set to -1 to disable caching completely. Integer value
# Defaults to $::os_service_default.
#
# [*service_token_roles*]
# (Optional) A choice of roles that must be present in a service token.
# Service tokens are allowed to request that an expired token
# can be used and so this check should tightly control that
# only actual services should be sending this token. Roles
# here are applied as an ANY check so any role in this list
# must be present. For backwards compatibility reasons this
# currently only affects the allow_expired check. (list value)
# Defaults to $::os_service_default.
#
# [*service_token_roles_required*]
# (optional) backwards compatibility to ensure that the service tokens are
# compared against a list of possible roles for validity
# true/false
# Defaults to $::os_service_default.
#
# [*service_type*]
# (Optional) The name or type of the service as it appears in the service
# catalog. This is used to validate tokens that have restricted access rules.
# Defaults to $::os_service_default.
#
# [*interface*]
# (Optional) Interface to use for the Identity API endpoint. Valid values are
# "public", "internal" or "admin".
# Defaults to $::os_service_default.
#
class panko::keystone::authtoken(
$password,
$username = 'panko',
$auth_url = 'http://localhost:5000',
$project_name = 'services',
$user_domain_name = 'Default',
$project_domain_name = 'Default',
$insecure = $::os_service_default,
$auth_section = $::os_service_default,
$auth_type = 'password',
$www_authenticate_uri = 'http://localhost:5000',
$auth_version = $::os_service_default,
$cache = $::os_service_default,
$cafile = $::os_service_default,
$certfile = $::os_service_default,
$delay_auth_decision = $::os_service_default,
$enforce_token_bind = $::os_service_default,
$http_connect_timeout = $::os_service_default,
$http_request_max_retries = $::os_service_default,
$include_service_catalog = $::os_service_default,
$keyfile = $::os_service_default,
$memcache_pool_conn_get_timeout = $::os_service_default,
$memcache_pool_dead_retry = $::os_service_default,
$memcache_pool_maxsize = $::os_service_default,
$memcache_pool_socket_timeout = $::os_service_default,
$memcache_pool_unused_timeout = $::os_service_default,
$memcache_secret_key = $::os_service_default,
$memcache_security_strategy = $::os_service_default,
$memcache_use_advanced_pool = $::os_service_default,
$memcached_servers = $::os_service_default,
$manage_memcache_package = false,
$region_name = $::os_service_default,
$token_cache_time = $::os_service_default,
$service_token_roles = $::os_service_default,
$service_token_roles_required = $::os_service_default,
$service_type = $::os_service_default,
$interface = $::os_service_default,
) {
include panko::deps
keystone::resource::authtoken { 'panko_config':
username => $username,
password => $password,
project_name => $project_name,
auth_url => $auth_url,
www_authenticate_uri => $www_authenticate_uri,
auth_version => $auth_version,
auth_type => $auth_type,
auth_section => $auth_section,
user_domain_name => $user_domain_name,
project_domain_name => $project_domain_name,
insecure => $insecure,
cache => $cache,
cafile => $cafile,
certfile => $certfile,
delay_auth_decision => $delay_auth_decision,
enforce_token_bind => $enforce_token_bind,
http_connect_timeout => $http_connect_timeout,
http_request_max_retries => $http_request_max_retries,
include_service_catalog => $include_service_catalog,
keyfile => $keyfile,
memcache_pool_conn_get_timeout => $memcache_pool_conn_get_timeout,
memcache_pool_dead_retry => $memcache_pool_dead_retry,
memcache_pool_maxsize => $memcache_pool_maxsize,
memcache_pool_socket_timeout => $memcache_pool_socket_timeout,
memcache_secret_key => $memcache_secret_key,
memcache_security_strategy => $memcache_security_strategy,
memcache_use_advanced_pool => $memcache_use_advanced_pool,
memcache_pool_unused_timeout => $memcache_pool_unused_timeout,
memcached_servers => $memcached_servers,
manage_memcache_package => $manage_memcache_package,
region_name => $region_name,
token_cache_time => $token_cache_time,
service_token_roles => $service_token_roles,
service_token_roles_required => $service_token_roles_required,
service_type => $service_type,
interface => $interface,
}
}

+ 0
- 149
manifests/logging.pp View File

@ -1,149 +0,0 @@
# Class panko::logging
#
# panko logging configuration
#
# == parameters
#
# [*debug*]
# (Optional) Should the daemons log debug messages
# Defaults to $::os_service_default
#
# [*use_syslog*]
# (Optional) Use syslog for logging.
# Defaults to $::os_service_default
#
# [*use_json*]
# (Optional) Use json for logging.
# Defaults to $::os_service_default
#
# [*use_journal*]
# (Optional) Use journal for logging.
# Defaults to $::os_service_default
#
# [*use_stderr*]
# (Optional) Use stderr for logging
# Defaults to $::os_service_default
#
# [*syslog_log_facility*]
# (Optional) Syslog facility to receive log lines.
# Defaults to $::os_service_default
#
# [*log_dir*]
# (Optional) Directory where logs should be stored.
# If set to $::os_service_default, it will not log to any directory.
# Defaults to '/var/log/panko'.
#