Retire puppet-murano: Remove Project Content
Depends-on: https://review.opendev.org/c/openstack/project-config/+/913292 Change-Id: I594aeaafc4f4b40978b7a9c9676bd5d5ee6e373e
This commit is contained in:
parent
3afa562700
commit
04efdf7e67
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
|
||||
- release-notes-jobs-python3
|
||||
- puppet-openstack-litmus-jobs
|
@ -1,9 +0,0 @@
|
||||
## 8.0.0 and beyond
|
||||
|
||||
From 8.0.0 release and beyond, release notes are published on
|
||||
[docs.openstack.org](http://docs.openstack.org/releasenotes/puppet-murano/).
|
||||
|
||||
##2015-11-24 - 7.0.0
|
||||
###Summary
|
||||
|
||||
- Initial release of the puppet-murano module
|
@ -1,19 +0,0 @@
|
||||
The source repository for this project can be found at:
|
||||
|
||||
https://opendev.org/openstack/puppet-murano
|
||||
|
||||
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-murano
|
||||
|
||||
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
|
176
LICENSE
176
LICENSE
@ -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.
|
||||
|
84
README.md
84
README.md
@ -1,84 +0,0 @@
|
||||
Team and repository tags
|
||||
========================
|
||||
|
||||
[![Team and repository tags](https://governance.openstack.org/tc/badges/puppet-murano.svg)](https://governance.openstack.org/tc/reference/tags/index.html)
|
||||
|
||||
<!-- Change things from this point on -->
|
||||
|
||||
murano
|
||||
======
|
||||
|
||||
#### Table of Contents
|
||||
|
||||
1. [Overview - What is the murano module?](#overview)
|
||||
2. [Module Description - What does the module do?](#module-description)
|
||||
3. [Setup - The basics of getting started with murano](#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 - Notes on the most recent updates to the module](#release-notes)
|
||||
9. [Repository - The project source code repository](#repository)
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
The Murano 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 as part of the core software. The module itself is used to flexibly configure and manage the application catalog service for OpenStack.
|
||||
|
||||
Module Description
|
||||
------------------
|
||||
|
||||
The murano module is an attempt to make Puppet capable of managing the
|
||||
entirety of murano.
|
||||
|
||||
Setup
|
||||
-----
|
||||
|
||||
**What the murano module affects:**
|
||||
|
||||
* [Murano](https://docs.openstack.org/murano/latest/), the application catalog service for OpenStack.
|
||||
|
||||
### Installing murano
|
||||
|
||||
puppet module install openstack/murano
|
||||
|
||||
### Beginning with murano
|
||||
|
||||
To use the murano module's functionality you will need to declare multiple
|
||||
resources. This is not an exhaustive list of all the components needed; we
|
||||
recommend you consult and understand the
|
||||
[core of openstack](http://docs.openstack.org) documentation.
|
||||
|
||||
Implementation
|
||||
--------------
|
||||
|
||||
### murano
|
||||
|
||||
puppet-murano is a combination of Puppet manifests and ruby code to deliver
|
||||
configuration and extra functionality through types and providers.
|
||||
|
||||
Limitations
|
||||
-----------
|
||||
|
||||
None.
|
||||
|
||||
Development
|
||||
-----------
|
||||
|
||||
Developer documentation for the entire puppet-openstack project.
|
||||
|
||||
* https://docs.openstack.org/puppet-openstack-guide/latest/
|
||||
|
||||
Contributors
|
||||
------------
|
||||
The github [contributor graph](https://github.com/openstack/puppet-murano/graphs/contributors).
|
||||
|
||||
Release Notes
|
||||
-------------
|
||||
|
||||
* https://docs.openstack.org/releasenotes/puppet-murano/
|
||||
|
||||
Repository
|
||||
----------
|
||||
|
||||
* https://opendev.org/openstack/puppet-murano
|
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,9 +0,0 @@
|
||||
Puppet::Functions.create_function(:get_ext_net_name) do
|
||||
def get_ext_net_name(*args)
|
||||
networks = args.first
|
||||
raise(Puppet::ParseError, 'get_ext_net_name(): No network data provided!') unless networks.is_a? Hash
|
||||
ext_net_array = networks.find { |_, value| value.fetch('L2', {})['router_ext'] }
|
||||
return nil unless ext_net_array
|
||||
ext_net_array.first
|
||||
end
|
||||
end
|
@ -1,106 +0,0 @@
|
||||
require 'puppet/util/inifile'
|
||||
|
||||
class Puppet::Provider::Murano < Puppet::Provider
|
||||
|
||||
def self.conf_filename
|
||||
'/etc/murano/murano.conf'
|
||||
end
|
||||
|
||||
def self.withenv(hash, &block)
|
||||
saved = ENV.to_hash
|
||||
hash.each do |name, val|
|
||||
ENV[name.to_s] = val
|
||||
end
|
||||
|
||||
yield
|
||||
ensure
|
||||
ENV.clear
|
||||
saved.each do |name, val|
|
||||
ENV[name] = val
|
||||
end
|
||||
end
|
||||
|
||||
def self.murano_conf
|
||||
return @murano_conf if @murano_conf
|
||||
@murano_conf = Puppet::Util::IniConfig::File.new
|
||||
@murano_conf.read(conf_filename)
|
||||
@murano_conf
|
||||
end
|
||||
|
||||
def self.murano_credentials
|
||||
@murano_credentials ||= get_murano_credentials
|
||||
end
|
||||
|
||||
def murano_credentials
|
||||
self.class.murano_credentials
|
||||
end
|
||||
|
||||
def self.get_murano_credentials
|
||||
#needed keys for authentication
|
||||
auth_keys = ['auth_url', 'project_name', 'username', 'password']
|
||||
conf = murano_conf
|
||||
if conf and conf['keystone_authtoken'] and
|
||||
auth_keys.all?{|k| !conf['keystone_authtoken'][k].nil?}
|
||||
creds = Hash[ auth_keys.map { |k| [k, conf['keystone_authtoken'][k].strip] } ]
|
||||
if conf['engine'] and !conf['engine']['packages_service'].nil?
|
||||
creds['packages_service'] = conf['engine']['packages_service'].strip
|
||||
end
|
||||
if !conf['keystone_authtoken']['project_domain_name'].nil?
|
||||
creds['project_domain_name'] = conf['keystone_authtoken']['project_domain_name'].strip
|
||||
else
|
||||
creds['project_domain_name'] = 'Default'
|
||||
end
|
||||
if !conf['keystone_authtoken']['user_domain_name'].nil?
|
||||
creds['user_domain_name'] = conf['keystone_authtoken']['user_domain_name'].strip
|
||||
else
|
||||
creds['user_domain_name'] = 'Default'
|
||||
end
|
||||
return creds
|
||||
else
|
||||
raise(Puppet::Error, "File: #{conf_filename} does not contain all " +
|
||||
'required sections. Murano types will not work if murano is not ' +
|
||||
'correctly configured.')
|
||||
end
|
||||
end
|
||||
|
||||
def self.auth_murano(*args)
|
||||
m = murano_credentials
|
||||
authenv = {
|
||||
:OS_AUTH_URL => m['auth_url'],
|
||||
:OS_USERNAME => m['username'],
|
||||
:OS_TENANT_NAME => m['project_name'],
|
||||
:OS_PASSWORD => m['password'],
|
||||
:OS_ENDPOINT_TYPE => 'internalURL',
|
||||
:OS_PROJECT_DOMAIN_NAME => m['project_domain_name'],
|
||||
:OS_USER_DOMAIN_NAME => m['user_domain_name']
|
||||
}
|
||||
if m.key?('packages_service')
|
||||
authenv[:MURANO_PACKAGES_SERVICE] = m['packages_service']
|
||||
end
|
||||
begin
|
||||
withenv authenv do
|
||||
murano(args)
|
||||
end
|
||||
rescue Exception => e
|
||||
if (e.message =~ /\[Errno 111\] Connection refused/) or
|
||||
(e.message =~ /\(HTTP 400\)/)
|
||||
sleep 10
|
||||
withenv authenv do
|
||||
murano(args)
|
||||
end
|
||||
else
|
||||
raise(e)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def auth_murano(*args)
|
||||
self.class.auth_murano(args)
|
||||
end
|
||||
|
||||
def self.reset
|
||||
@murano_conf = nil
|
||||
@murano_credentials = nil
|
||||
end
|
||||
|
||||
end
|
@ -1,80 +0,0 @@
|
||||
require File.join(File.dirname(__FILE__), '..','..','..',
|
||||
'puppet/provider/murano')
|
||||
|
||||
Puppet::Type.type(:murano_application).provide(
|
||||
:murano,
|
||||
:parent => Puppet::Provider::Murano
|
||||
) do
|
||||
|
||||
desc 'Manage murano applications'
|
||||
|
||||
commands :murano => 'murano'
|
||||
|
||||
mk_resource_methods
|
||||
|
||||
def self.package_list_cleanup(text)
|
||||
return nil if text.nil?
|
||||
# The murano package-list valid output should only start by + or |
|
||||
text=text.split("\n").drop_while { |line| line !~ /^(\+|\|)/ }.join("\n")
|
||||
"#{text}\n"
|
||||
end
|
||||
|
||||
def package_list_cleanup(text)
|
||||
self.class.package_list_cleanup(text)
|
||||
end
|
||||
|
||||
def exists?
|
||||
packages = package_list_cleanup(auth_murano('package-list'))
|
||||
return packages.split("\n")[1..-1].detect do |n|
|
||||
n =~ /\s(#{resource[:name]})\s/
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
auth_murano('package-delete', resource[:name])
|
||||
end
|
||||
|
||||
def create
|
||||
opts = [ resource[:package_path] ]
|
||||
|
||||
unless resource[:category].nil?
|
||||
opts.push('-c').push(resource[:category])
|
||||
end
|
||||
opts.push('--is-public') if resource[:public]
|
||||
auth_murano('package-import', opts)
|
||||
end
|
||||
|
||||
def self.instances
|
||||
packages = package_list_cleanup(auth_murano('package-list'))
|
||||
packages.split("\n")[3..-2].collect do |n|
|
||||
new({
|
||||
:name => n.split("|")[3][/([^\s]+)/],
|
||||
:exists_action => 's',
|
||||
:package_path => '/var/cache/murano/meta/' + n.split("|")[3][/([^\s]+)/] + '.zip',
|
||||
:public => (n.split("|")[5][/([^\s]+)/] == 'True').to_s,
|
||||
:ensure => :present
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
def self.prefetch(resources)
|
||||
packages = instances
|
||||
resources.keys.each do |name|
|
||||
if provider = packages.find{ |package| package.name == name }
|
||||
resources[name].provider = provider
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def flush
|
||||
if [:present, :latest].include?(resource[:ensure])
|
||||
unless resource[:exists_action] == 's'
|
||||
opts = [ resource[:package_path] ]
|
||||
opts.push('-c').push(resource[:category]) unless resource[:category].nil?
|
||||
opts.push('--is-public') if resource[:public]
|
||||
opts.push('--exists-action').push(resource[:exists_action])
|
||||
auth_murano('package-import', opts)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -1,10 +0,0 @@
|
||||
Puppet::Type.type(:murano_cfapi_config).provide(
|
||||
:ini_setting,
|
||||
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
|
||||
) do
|
||||
|
||||
def self.file_path
|
||||
'/etc/murano/murano-cfapi.conf'
|
||||
end
|
||||
|
||||
end
|
@ -1,10 +0,0 @@
|
||||
Puppet::Type.type(:murano_cfapi_paste_ini_config).provide(
|
||||
:ini_setting,
|
||||
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
|
||||
) do
|
||||
|
||||
def self.file_path
|
||||
'/etc/murano/murano-cfapi-paste.ini'
|
||||
end
|
||||
|
||||
end
|
@ -1,10 +0,0 @@
|
||||
Puppet::Type.type(:murano_config).provide(
|
||||
:ini_setting,
|
||||
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
|
||||
) do
|
||||
|
||||
def self.file_path
|
||||
'/etc/murano/murano.conf'
|
||||
end
|
||||
|
||||
end
|
@ -1,10 +0,0 @@
|
||||
Puppet::Type.type(:murano_paste_ini_config).provide(
|
||||
:ini_setting,
|
||||
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
|
||||
) do
|
||||
|
||||
def self.file_path
|
||||
'/etc/murano/murano-paste.ini'
|
||||
end
|
||||
|
||||
end
|
@ -1,91 +0,0 @@
|
||||
# murano_application type
|
||||
#
|
||||
# == Parameters
|
||||
# [*name*]
|
||||
# Name for the new application
|
||||
# Required
|
||||
#
|
||||
# [*package_path*]
|
||||
# Path to package file
|
||||
# Required
|
||||
#
|
||||
# [*exists_action*]
|
||||
# Default action when a package
|
||||
# already exists
|
||||
# Optional
|
||||
#
|
||||
# [*public*]
|
||||
# Make the package available for users
|
||||
# from other tenants
|
||||
# Optional
|
||||
#
|
||||
# [*category*]
|
||||
# Category for the new application
|
||||
# Optional
|
||||
#
|
||||
|
||||
require 'puppet'
|
||||
|
||||
Puppet::Type.newtype(:murano_application) do
|
||||
|
||||
@doc = 'Manage creation of Murano applications.'
|
||||
|
||||
ensurable
|
||||
|
||||
newparam(:name, :namevar => true) do
|
||||
desc 'Name for the new application'
|
||||
validate do |value|
|
||||
unless value.is_a? String
|
||||
raise ArgumentError, 'name parameter must be a String'
|
||||
end
|
||||
unless value =~ /^[a-z0-9\.\-_]+$/
|
||||
raise ArgumentError, "#{value} is not a valid name"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
newproperty(:package_path) do
|
||||
desc 'Path to package file'
|
||||
validate do |value|
|
||||
unless value.is_a? String
|
||||
raise ArgumentError, 'package_path parameter must be a String'
|
||||
end
|
||||
end
|
||||
newvalues(/\S+/)
|
||||
end
|
||||
|
||||
newproperty(:exists_action) do
|
||||
desc 'Default action when a package already exists'
|
||||
defaultto('s')
|
||||
validate do |value|
|
||||
allowed_actions = ['s', 'a', 'u']
|
||||
raise ArgumentError, 'Unknown action is set' unless allowed_actions.include?(value)
|
||||
end
|
||||
end
|
||||
|
||||
newproperty(:public) do
|
||||
desc 'Make the package available for users from other tenants'
|
||||
defaultto('true')
|
||||
newvalues(/(t|T)rue/, /(f|F)alse/, true, false)
|
||||
munge do |value|
|
||||
value.to_s.downcase.to_sym
|
||||
end
|
||||
end
|
||||
|
||||
newproperty(:category) do
|
||||
desc 'Package category'
|
||||
validate do |value|
|
||||
unless value.is_a? String
|
||||
raise ArgumentError, 'category parameter must be a String'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
validate do
|
||||
raise ArgumentError, 'Name and package path must be set' unless self[:name] and self[:package_path]
|
||||
end
|
||||
|
||||
autorequire(:anchor) do
|
||||
['murano::service::end']
|
||||
end
|
||||
end
|
@ -1,51 +0,0 @@
|
||||
Puppet::Type.newtype(:murano_cfapi_config) do
|
||||
ensurable
|
||||
|
||||
newparam(:name, :namevar => true) do
|
||||
desc 'Section/setting name to manage from murano-cfapi.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
|
||||
['murano::install::end']
|
||||
end
|
||||
end
|
@ -1,51 +0,0 @@
|
||||
Puppet::Type.newtype(:murano_cfapi_paste_ini_config) do
|
||||
ensurable
|
||||
|
||||
newparam(:name, :namevar => true) do
|
||||
desc 'Section/setting name to manage from murano-cfapi-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
|
||||
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
|
||||
['murano::install::end']
|
||||
end
|
||||
end
|
@ -1,51 +0,0 @@
|
||||
Puppet::Type.newtype(:murano_config) do
|
||||
ensurable
|
||||
|
||||
newparam(:name, :namevar => true) do
|
||||
desc 'Section/setting name to manage from murano.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
|
||||
['murano::install::end']
|
||||
end
|
||||
end
|
@ -1,52 +0,0 @@
|
||||
Puppet::Type.newtype(:murano_paste_ini_config) do
|
||||
ensurable
|
||||
|
||||
newparam(:name, :namevar => true) do
|
||||
desc 'Section/setting name to manage from murano-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
|
||||
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
|
||||
['murano::install::end']
|
||||
end
|
||||
|
||||
end
|
@ -1,70 +0,0 @@
|
||||
# == Class: murano::api
|
||||
#
|
||||
# murano api package & service
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*manage_service*]
|
||||
# (Optional) Should the service be enabled
|
||||
# Defaults to true
|
||||
#
|
||||
# [*enabled*]
|
||||
# (Optional) Whether the service should be managed by Puppet
|
||||
# Defaults to true
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (Optional) Ensure state for package
|
||||
# Defaults to 'present'
|
||||
#
|
||||
# [*host*]
|
||||
# (Optional) Host on which murano api should listen
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*port*]
|
||||
# (Optional) Port on which murano api should listen
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*workers*]
|
||||
# (optional) number of workers for Murano Api
|
||||
# defaults to $facts['os_workers']
|
||||
#
|
||||
class murano::api(
|
||||
Boolean $manage_service = true,
|
||||
Boolean $enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$host = $facts['os_service_default'],
|
||||
$port = $facts['os_service_default'],
|
||||
$workers = $facts['os_workers'],
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
include murano::params
|
||||
include murano::policy
|
||||
|
||||
if $manage_service {
|
||||
if $enabled {
|
||||
$service_ensure = 'running'
|
||||
} else {
|
||||
$service_ensure = 'stopped'
|
||||
}
|
||||
|
||||
service { 'murano-api':
|
||||
ensure => $service_ensure,
|
||||
name => $::murano::params::api_service_name,
|
||||
enable => $enabled,
|
||||
tag => 'murano-service',
|
||||
}
|
||||
}
|
||||
|
||||
murano_config {
|
||||
'DEFAULT/bind_host': value => $host;
|
||||
'DEFAULT/bind_port': value => $port;
|
||||
'murano/api_workers': value => $workers;
|
||||
}
|
||||
|
||||
package { 'murano-api':
|
||||
ensure => $package_ensure,
|
||||
name => $::murano::params::api_package_name,
|
||||
tag => ['openstack', 'murano-package'],
|
||||
}
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
# == Resource: murano::application
|
||||
#
|
||||
# murano application importer
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (Optional) Ensure state for package
|
||||
# Defaults to 'present'
|
||||
#
|
||||
# [*package_name*]
|
||||
# (Optional) Application package name
|
||||
# Defaults to $title
|
||||
#
|
||||
# [*package_category*]
|
||||
# (Optional) Application category
|
||||
# Defaults to 'undef'
|
||||
#
|
||||
# [*exists_action*]
|
||||
# (Optional) Default action when a package
|
||||
# already exists: s - skip, a - abort,
|
||||
# u - update.
|
||||
# Defaults to 's'
|
||||
#
|
||||
# [*public*]
|
||||
# (Optional) Make the package available for users
|
||||
# from other tenants
|
||||
# Defaults to true
|
||||
#
|
||||
define murano::application (
|
||||
$package_ensure = 'present',
|
||||
$package_name = $title,
|
||||
$package_category = undef,
|
||||
$exists_action = 's',
|
||||
$public = true,
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
|
||||
warning("The murano::application defined type is deprecated. \
|
||||
Use the murano_application resource type instead.")
|
||||
|
||||
$package_path="/var/cache/murano/meta/${package_name}.zip"
|
||||
|
||||
murano_application { $package_name:
|
||||
ensure => $package_ensure,
|
||||
package_path => $package_path,
|
||||
exists_action => $exists_action,
|
||||
public => $public,
|
||||
category => $package_category,
|
||||
}
|
||||
}
|
@ -1,90 +0,0 @@
|
||||
# == Class: murano::cfapi
|
||||
#
|
||||
# murano service broker package & service
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*manage_service*]
|
||||
# (Optional) Whether the service should be managed by Puppet
|
||||
# Defaults to true
|
||||
#
|
||||
# [*enabled*]
|
||||
# (Optional) Should the service be enabled
|
||||
# Defaults to true
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (Optional) Ensure state for package
|
||||
# Defaults to 'present'
|
||||
#
|
||||
# [*tenant*]
|
||||
# (Optional) Tenant for cloudfoundry api
|
||||
# Defaults to 'admin'
|
||||
#
|
||||
# [*bind_host*]
|
||||
# (Optional) Host on which murano cloudfoundry api should listen
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*bind_port*]
|
||||
# (Optional) Port on which murano cloudfoundry api should listen
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*auth_url*]
|
||||
# (Optional) Public identity endpoint
|
||||
# Defaults to 'http://127.0.0.1:5000'.
|
||||
#
|
||||
# [*user_domain_name*]
|
||||
# (Optional) User Domain name for connecting to Murano CFAPI services in
|
||||
# admin context through the OpenStack Identity service.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*project_domain_name*]
|
||||
# (Optional) Project Domain name for connecting to Murano CFAPI services in
|
||||
# admin context through the OpenStack Identity service.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
class murano::cfapi(
|
||||
$tenant = 'admin',
|
||||
Boolean $manage_service = true,
|
||||
Boolean $enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$bind_host = $facts['os_service_default'],
|
||||
$bind_port = $facts['os_service_default'],
|
||||
$auth_url = 'http://127.0.0.1:5000',
|
||||
$user_domain_name = $facts['os_service_default'],
|
||||
$project_domain_name = $facts['os_service_default'],
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
include murano::params
|
||||
include murano::policy
|
||||
|
||||
if $manage_service {
|
||||
if $enabled {
|
||||
$service_ensure = 'running'
|
||||
} else {
|
||||
$service_ensure = 'stopped'
|
||||
}
|
||||
|
||||
service { 'murano-cfapi':
|
||||
ensure => $service_ensure,
|
||||
name => $::murano::params::cfapi_service_name,
|
||||
enable => $enabled,
|
||||
tag => 'murano-service',
|
||||
}
|
||||
}
|
||||
|
||||
murano_cfapi_config {
|
||||
'cfapi/tenant': value => $tenant;
|
||||
'cfapi/bind_host': value => $bind_host;
|
||||
'cfapi/bind_port': value => $bind_port;
|
||||
'cfapi/auth_url': value => $auth_url;
|
||||
'cfapi/user_domain_name': value => $user_domain_name;
|
||||
'cfapi/project_domain_name': value => $project_domain_name;
|
||||
}
|
||||
|
||||
package { 'murano-cfapi':
|
||||
ensure => $package_ensure,
|
||||
name => $::murano::params::cfapi_package_name,
|
||||
tag => ['openstack', 'murano-package'],
|
||||
}
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
# == Class: murano::client
|
||||
#
|
||||
# murano client package
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (Optional) Ensure state for package
|
||||
# Defaults to 'present'
|
||||
#
|
||||
class murano::client(
|
||||
$package_ensure = 'present',
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
include murano::params
|
||||
|
||||
# NOTE(tkajinam): murano-package tag is used because muranoclient is required
|
||||
# by murano
|
||||
package { 'python-muranoclient':
|
||||
ensure => $package_ensure,
|
||||
name => $::murano::params::pythonclient_package_name,
|
||||
tag => ['openstack', 'openstackclient', 'murano-package'],
|
||||
}
|
||||
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
# == Class: murano::config
|
||||
#
|
||||
# This class is used to manage arbitrary murano configurations.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*murano_config*]
|
||||
# (optional) Allow configuration of arbitrary murano configurations.
|
||||
# The value is an hash of murano_config resources. Example:
|
||||
# { 'DEFAULT/foo' => { value => 'fooValue'},
|
||||
# 'DEFAULT/bar' => { value => 'barValue'}
|
||||
# }
|
||||
# In yaml format, Example:
|
||||
# murano_config:
|
||||
# DEFAULT/foo:
|
||||
# value: fooValue
|
||||
# DEFAULT/bar:
|
||||
# value: barValue
|
||||
#
|
||||
# [*murano_cfapi_config*]
|
||||
# (optional) Allow configuration of CFAPI Murano service
|
||||
#
|
||||
# [*murano_paste_config*]
|
||||
# (optional) Allow configuration of arbitrary murano paste configurations.
|
||||
#
|
||||
# [*murano_cfapi_paste_config*]
|
||||
# (optional) Allow configuration of CFAPI Murano paste configurations.
|
||||
#
|
||||
# NOTE: The configuration MUST NOT be already handled by this module
|
||||
# or Puppet catalog compilation will fail with duplicate resources.
|
||||
#
|
||||
class murano::config (
|
||||
Hash $murano_config = {},
|
||||
Hash $murano_cfapi_config = {},
|
||||
Hash $murano_paste_config = {},
|
||||
Hash $murano_cfapi_paste_config = {}
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
|
||||
create_resources('murano_config', $murano_config)
|
||||
create_resources('murano_cfapi_config', $murano_cfapi_config)
|
||||
create_resources('murano_paste_ini_config', $murano_paste_config)
|
||||
create_resources('murano_cfapi_paste_ini_config', $murano_cfapi_paste_config)
|
||||
}
|
@ -1,150 +0,0 @@
|
||||
# == Class: murano::dashboard
|
||||
#
|
||||
# murano dashboard package
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (Optional) Ensure state for package
|
||||
# Defaults to 'present'
|
||||
#
|
||||
# [*dashboard_name*]
|
||||
# (Optional) Overrides the default dashboard name (Murano) that is displayed
|
||||
# in the main accordion navigation
|
||||
# Defaults to 'undef'
|
||||
#
|
||||
# [*repo_url*]
|
||||
# (Optional) Application repository URL for murano-dashboard
|
||||
# Defaults to 'undef'
|
||||
#
|
||||
# [*enable_glare*]
|
||||
# (Optional) Whether Murano to use Glare API (ex Glance v3 API)
|
||||
# Defaults to false
|
||||
#
|
||||
# [*collect_static_script*]
|
||||
# (Optional) Path to horizon manage utility
|
||||
# Defaults to '/usr/share/openstack-dashboard/manage.py'
|
||||
#
|
||||
# [*metadata_dir*]
|
||||
# (Optional) Directory to store murano dashboard metadata cache
|
||||
# Defaults to '/var/cache/murano-dashboard'
|
||||
#
|
||||
# [*max_file_size*]
|
||||
# (Optional) Maximum allowed filesize to upload
|
||||
# Defaults to '5'
|
||||
#
|
||||
# [*dashboard_debug_level*]
|
||||
# (Optional) Murano dashboard logging level
|
||||
# Defaults to 'DEBUG'
|
||||
#
|
||||
# [*client_debug_level*]
|
||||
# (Optional) Murano client logging level
|
||||
# Defaults to 'ERROR'
|
||||
#
|
||||
# [*sync_db*]
|
||||
# (Optional) Whether to sync database
|
||||
# Default to 'true'
|
||||
#
|
||||
# [*log_handler*]
|
||||
# (Optional) Log handler.
|
||||
# Defaults to 'file'
|
||||
#
|
||||
# [*image_filter_project_id*]
|
||||
# (Optional) Filter image list by project ID
|
||||
# Defaults to 'undef'
|
||||
#
|
||||
class murano::dashboard(
|
||||
$package_ensure = 'present',
|
||||
$dashboard_name = undef,
|
||||
$repo_url = undef,
|
||||
Boolean $enable_glare = false,
|
||||
$collect_static_script = '/usr/share/openstack-dashboard/manage.py',
|
||||
$metadata_dir = '/var/cache/murano-dashboard',
|
||||
$max_file_size = '5',
|
||||
$dashboard_debug_level = 'DEBUG',
|
||||
$client_debug_level = 'ERROR',
|
||||
$log_handler = 'file',
|
||||
Boolean $sync_db = true,
|
||||
$image_filter_project_id = undef,
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
include murano::params
|
||||
|
||||
include apache::params
|
||||
|
||||
package { 'murano-dashboard':
|
||||
ensure => $package_ensure,
|
||||
name => $::murano::params::dashboard_package_name,
|
||||
tag => ['openstack', 'murano-package'],
|
||||
}
|
||||
|
||||
concat { $::murano::params::local_settings_path: }
|
||||
|
||||
concat::fragment { 'original_config':
|
||||
target => $::murano::params::local_settings_path,
|
||||
source => $::murano::params::local_settings_path,
|
||||
order => 1,
|
||||
}
|
||||
|
||||
concat::fragment { 'murano_dashboard_section':
|
||||
target => $::murano::params::local_settings_path,
|
||||
content => template('murano/local_settings.py.erb'),
|
||||
order => 2,
|
||||
}
|
||||
|
||||
exec { 'clean_horizon_config':
|
||||
command => "sed -e '/^## MURANO_CONFIG_BEGIN/,/^## MURANO_CONFIG_END ##/ d' -i ${::murano::params::local_settings_path}",
|
||||
onlyif => "grep '^## MURANO_CONFIG_BEGIN' ${::murano::params::local_settings_path}",
|
||||
path => [ '/bin/', '/sbin/', '/usr/bin/', '/usr/sbin/' ],
|
||||
}
|
||||
|
||||
if $facts['os']['name'] == 'Ubuntu' {
|
||||
$collect_static_command = "${collect_static_script} collectstatic --noinput"
|
||||
} else {
|
||||
$collect_static_command = "${collect_static_script} collectstatic --noinput --clear"
|
||||
}
|
||||
|
||||
exec { 'django_collectstatic':
|
||||
command => $collect_static_command,
|
||||
environment => [
|
||||
"APACHE_USER=${::apache::params::user}",
|
||||
"APACHE_GROUP=${::apache::params::group}",
|
||||
],
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
exec { 'django_compressstatic':
|
||||
command => "${collect_static_script} compress --force",
|
||||
environment => [
|
||||
"APACHE_USER=${::apache::params::user}",
|
||||
"APACHE_GROUP=${::apache::params::group}",
|
||||
],
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
if $sync_db {
|
||||
exec { 'django_syncdb':
|
||||
command => "${collect_static_script} migrate --noinput",
|
||||
environment => [
|
||||
"APACHE_USER=${::apache::params::user}",
|
||||
"APACHE_GROUP=${::apache::params::group}",
|
||||
],
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
Exec['django_compressstatic']
|
||||
~> Exec['django_syncdb']
|
||||
~> Service <| title == 'httpd' |>
|
||||
}
|
||||
|
||||
Package['murano-dashboard']
|
||||
-> Exec['clean_horizon_config']
|
||||
-> Concat[$::murano::params::local_settings_path]
|
||||
-> Service <| title == 'httpd' |>
|
||||
|
||||
Package['murano-dashboard']
|
||||
~> Exec['django_collectstatic']
|
||||
~> Exec['django_compressstatic']
|
||||
~> Service <| title == 'httpd' |>
|
||||
}
|
@ -1,90 +0,0 @@
|
||||
# == Class: murano:db
|
||||
#
|
||||
# Configure the Murano database
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*database_connection*]
|
||||
# (Optional) Non-sqllite database for murano
|
||||
# Defaults to 'mysql+pymysql://murano:secrete@localhost:3306/murano'
|
||||
#
|
||||
# [*database_max_retries*]
|
||||
# (Optional) Maximum number of database connection retries during startup.
|
||||
# Set to -1 to specify an infinite retry count.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*database_connection_recycle_time*]
|
||||
# (Optional) Timeout before idle SQL connections are reaped.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*database_retry_interval*]
|
||||
# (optional) Interval between retries of opening a database connection.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*database_max_pool_size*]
|
||||
# (optional) Maximum number of SQL connections to keep open in a pool.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*database_max_overflow*]
|
||||
# (optional) If set, use this value for max_overflow with sqlalchemy.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*database_pool_timeout*]
|
||||
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*mysql_enable_ndb*]
|
||||
# (Optional) If True, transparently enables support for handling MySQL
|
||||
# Cluster (NDB).
|
||||
# Defaults to $facts['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 $facts['os_service_default']
|
||||
#
|
||||
class murano::db (
|
||||
$database_connection = 'mysql+pymysql://murano:secrete@localhost:3306/murano',
|
||||
$database_connection_recycle_time = $facts['os_service_default'],
|
||||
$database_max_pool_size = $facts['os_service_default'],
|
||||
$database_max_retries = $facts['os_service_default'],
|
||||
$database_retry_interval = $facts['os_service_default'],
|
||||
$database_max_overflow = $facts['os_service_default'],
|
||||
$database_pool_timeout = $facts['os_service_default'],
|
||||
$mysql_enable_ndb = $facts['os_service_default'],
|
||||
$database_db_max_retries = $facts['os_service_default'],
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
|
||||
if defined(Class['murano']) {
|
||||
# NOTE(aderyugin): In order to keep backward compatibility we rely on the pick function
|
||||
# to use murano::<myparam> if murano::db::<myparam> isn't specified.
|
||||
$database_connection_real = pick($::murano::database_connection, $database_connection)
|
||||
$database_connection_recycle_time_real = pick($::murano::database_idle_timeout, $database_connection_recycle_time)
|
||||
$database_max_pool_size_real = pick($::murano::database_max_pool_size, $database_max_pool_size)
|
||||
$database_max_retries_real = pick($::murano::database_max_retries, $database_max_retries)
|
||||
$database_retry_interval_real = pick($::murano::database_retry_interval, $database_retry_interval)
|
||||
$database_max_overflow_real = pick($::murano::database_max_overflow, $database_max_overflow)
|
||||
} else {
|
||||
$database_connection_real = $database_connection
|
||||
$database_connection_recycle_time_real = $database_connection_recycle_time
|
||||
$database_max_pool_size_real = $database_max_pool_size
|
||||
$database_max_retries_real = $database_max_retries
|
||||
$database_retry_interval_real = $database_retry_interval
|
||||
$database_max_overflow_real = $database_max_overflow
|
||||
}
|
||||
|
||||
oslo::db { 'murano_config':
|
||||
connection => $database_connection_real,
|
||||
connection_recycle_time => $database_connection_recycle_time_real,
|
||||
max_pool_size => $database_max_pool_size_real,
|
||||
max_retries => $database_max_retries_real,
|
||||
retry_interval => $database_retry_interval_real,
|
||||
max_overflow => $database_max_overflow_real,
|
||||
pool_timeout => $database_pool_timeout,
|
||||
mysql_enable_ndb => $mysql_enable_ndb,
|
||||
db_max_retries => $database_db_max_retries,
|
||||
}
|
||||
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
# == Class: murano::db::mysql
|
||||
#
|
||||
# The murano::db::mysql class creates a MySQL database for murano.
|
||||
# It must be used on the MySQL server.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*password*]
|
||||
# (Required) Password to connect to the database.
|
||||
#
|
||||
# [*dbname*]
|
||||
# (Optional) Name of the database.
|
||||
# Defaults to 'murano'.
|
||||
#
|
||||
# [*user*]
|
||||
# (Optional) User to connect to the database.
|
||||
# Defaults to 'murano'.
|
||||
#
|
||||
# [*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) Charset collate of murano database.
|
||||
# Defaults to 'utf8_general_ci'.
|
||||
#
|
||||
class murano::db::mysql(
|
||||
String[1] $password,
|
||||
$dbname = 'murano',
|
||||
$user = 'murano',
|
||||
$host = '127.0.0.1',
|
||||
$allowed_hosts = undef,
|
||||
$charset = 'utf8',
|
||||
$collate = 'utf8_general_ci',
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
|
||||
::openstacklib::db::mysql{ 'murano':
|
||||
user => $user,
|
||||
password => $password,
|
||||
dbname => $dbname,
|
||||
host => $host,
|
||||
charset => $charset,
|
||||
collate => $collate,
|
||||
allowed_hosts => $allowed_hosts,
|
||||
}
|
||||
|
||||
Anchor['murano::db::begin']
|
||||
~> Class['murano::db::mysql']
|
||||
~> Anchor['murano::db::end']
|
||||
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
# == Class: murano::db::mysql_cfapi
|
||||
#
|
||||
# The murano::db::mysql_cfapi class creates a MySQL database for murano_cfapi.
|
||||
# It must be used on the MySQL server.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*password*]
|
||||
# (Required) Password to connect to the database.
|
||||
#
|
||||
# [*dbname*]
|
||||
# (Optional) Name of the database.
|
||||
# Defaults to 'murano_cfapi'.
|
||||
#
|
||||
# [*user*]
|
||||
# (Optional) User to connect to the database.
|
||||
# Defaults to 'murano_cfapi'.
|
||||
#
|
||||
# [*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) Charset collate of murano_cfapi database.
|
||||
# Defaults to 'utf8_general_ci'.
|
||||
#
|
||||
class murano::db::mysql_cfapi(
|
||||
String[1] $password,
|
||||
$dbname = 'murano_cfapi',
|
||||
$user = 'murano_cfapi',
|
||||
$host = '127.0.0.1',
|
||||
$allowed_hosts = undef,
|
||||
$charset = 'utf8',
|
||||
$collate = 'utf8_general_ci',
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
|
||||
::openstacklib::db::mysql{ 'murano_cfapi':
|
||||
user => $user,
|
||||
password => $password,
|
||||
dbname => $dbname,
|
||||
host => $host,
|
||||
charset => $charset,
|
||||
collate => $collate,
|
||||
allowed_hosts => $allowed_hosts,
|
||||
}
|
||||
|
||||
Anchor['murano::db::begin']
|
||||
~> Class['murano::db::mysql_cfapi']
|
||||
~> Anchor['murano::db::end']
|
||||
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
# == Class: murano::db::postgresql
|
||||
#
|
||||
# The murano::db::postgresql creates a PostgreSQL database for murano.
|
||||
# It must be used on the PostgreSQL server.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*password*]
|
||||
# (Required) Password to connect to the database.
|
||||
#
|
||||
# [*dbname*]
|
||||
# (Optional) Name of the database.
|
||||
# Defaults to 'murano'.
|
||||
#
|
||||
# [*user*]
|
||||
# (Optional) User to connect to the database.
|
||||
# Defaults to 'murano'.
|
||||
#
|
||||
# [*encoding*]
|
||||
# (Optional) The charset to use for the database.
|
||||
# Default to undef.
|
||||
#
|
||||
# [*privileges*]
|
||||
# (Optional) Privileges given to the database user.
|
||||
# Default to 'ALL'
|
||||
#
|
||||
class murano::db::postgresql(
|
||||
String[1] $password,
|
||||
$dbname = 'murano',
|
||||
$user = 'murano',
|
||||
$encoding = undef,
|
||||
$privileges = 'ALL',
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
|
||||
::openstacklib::db::postgresql { 'murano':
|
||||
password => $password,
|
||||
dbname => $dbname,
|
||||
user => $user,
|
||||
encoding => $encoding,
|
||||
privileges => $privileges,
|
||||
}
|
||||
|
||||
Anchor['murano::db::begin']
|
||||
~> Class['murano::db::postgresql']
|
||||
~> Anchor['murano::db::end']
|
||||
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
# == Class: murano::db::postgresql_cfapi
|
||||
#
|
||||
# The murano::db::postgresql_cfapi creates a PostgreSQL database for murano_cfapi.
|
||||
# It must be used on the PostgreSQL server.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*password*]
|
||||
# (Required) Password to connect to the database.
|
||||
#
|
||||
# [*dbname*]
|
||||
# (Optional) Name of the database.
|
||||
# Defaults to 'murano_cfapi'.
|
||||
#
|
||||
# [*user*]
|
||||
# (Optional) User to connect to the database.
|
||||
# Defaults to 'murano_cfapi'.
|
||||
#
|
||||
# [*encoding*]
|
||||
# (Optional) The charset to use for the database.
|
||||
# Default to undef.
|
||||
#
|
||||
# [*privileges*]
|
||||
# (Optional) Privileges given to the database user.
|
||||
# Default to 'ALL'
|
||||
#
|
||||
class murano::db::postgresql_cfapi(
|
||||
String[1] $password,
|
||||
$dbname = 'murano_cfapi',
|
||||
$user = 'murano_cfapi',
|
||||
$encoding = undef,
|
||||
$privileges = 'ALL',
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
|
||||
::openstacklib::db::postgresql { 'murano_cfapi':
|
||||
password => $password,
|
||||
dbname => $dbname,
|
||||
user => $user,
|
||||
encoding => $encoding,
|
||||
privileges => $privileges,
|
||||
}
|
||||
|
||||
Anchor['murano::db::begin']
|
||||
~> Class['murano::db::postgresql_cfapi']
|
||||
~> Anchor['murano::db::end']
|
||||
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#
|
||||
# Class to execute murano dbsync
|
||||
#
|
||||
# ==Parameters
|
||||
#
|
||||
# [*db_sync_timeout*]
|
||||
# (Optional) Timeout for the execution of the db_sync
|
||||
# Defaults to 300
|
||||
#
|
||||
class murano::db::sync(
|
||||
$db_sync_timeout = 300,
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
include murano::params
|
||||
|
||||
exec { 'murano-dbmanage':
|
||||
command => $::murano::params::dbmanage_command,
|
||||
path => '/usr/bin',
|
||||
user => 'murano',
|
||||
refreshonly => true,
|
||||
try_sleep => 5,
|
||||
tries => 10,
|
||||
timeout => $db_sync_timeout,
|
||||
logoutput => on_failure,
|
||||
subscribe => [
|
||||
Anchor['murano::install::end'],
|
||||
Anchor['murano::config::end'],
|
||||
Anchor['murano::dbsync::begin']
|
||||
],
|
||||
notify => Anchor['murano::dbsync::end'],
|
||||
tag => 'openstack-db',
|
||||
}
|
||||
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#
|
||||
# Class to execute murano_cfapi dbsync
|
||||
#
|
||||
# ==Parameters
|
||||
#
|
||||
# [*db_sync_timeout*]
|
||||
# (Optional) Timeout for the execution of the db_sync
|
||||
# Defaults to 300
|
||||
#
|
||||
class murano::db::sync_cfapi(
|
||||
$db_sync_timeout = 300,
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
include murano::params
|
||||
|
||||
exec { 'murano-cfapi-dbmanage':
|
||||
command => $::murano::params::cfapi_dbmanage_command,
|
||||
path => '/usr/bin',
|
||||
user => 'murano_cfapi',
|
||||
refreshonly => true,
|
||||
try_sleep => 5,
|
||||
tries => 10,
|
||||
timeout => $db_sync_timeout,
|
||||
logoutput => on_failure,
|
||||
subscribe => [
|
||||
Anchor['murano::install::end'],
|
||||
Anchor['murano::config::end'],
|
||||
Anchor['murano::dbsync::begin']
|
||||
],
|
||||
notify => Anchor['murano::dbsync::end'],
|
||||
tag => 'openstack-db',
|
||||
}
|
||||
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
# == Class: murano:db_cfapi
|
||||
#
|
||||
# Configure the Murano CFAPI database
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*database_connection*]
|
||||
# (optional) Connection url to connect to CFAPI Murano database.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*database_max_retries*]
|
||||
# (Optional) Maximum number of database connection retries during startup.
|
||||
# Set to -1 to specify an infinite retry count.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*database_connection_recycle_time*]
|
||||
# (Optional) Timeout before idle SQL connections are reaped.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*database_retry_interval*]
|
||||
# (optional) Interval between retries of opening a database connection.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*database_max_pool_size*]
|
||||
# (optional) Maximum number of SQL connections to keep open in a pool.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*database_max_overflow*]
|
||||
# (optional) If set, use this value for max_overflow with sqlalchemy.
|
||||
# Defaults to $facts['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 $facts['os_service_default']
|
||||
#
|
||||
class murano::db_cfapi (
|
||||
$database_connection = $facts['os_service_default'],
|
||||
$database_connection_recycle_time = $facts['os_service_default'],
|
||||
$database_max_pool_size = $facts['os_service_default'],
|
||||
$database_max_retries = $facts['os_service_default'],
|
||||
$database_retry_interval = $facts['os_service_default'],
|
||||
$database_max_overflow = $facts['os_service_default'],
|
||||
$database_db_max_retries = $facts['os_service_default'],
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
|
||||
if !is_service_default($database_connection) {
|
||||
oslo::db { 'murano_cfapi_config':
|
||||
connection => $database_connection,
|
||||
connection_recycle_time => $database_connection_recycle_time,
|
||||
max_pool_size => $database_max_pool_size,
|
||||
max_retries => $database_max_retries,
|
||||
retry_interval => $database_retry_interval,
|
||||
max_overflow => $database_max_overflow,
|
||||
db_max_retries => $database_db_max_retries,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
# == Class: murano::deps
|
||||
#
|
||||
# Murano anchors and dependency management
|
||||
#
|
||||
class murano::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 { 'murano::install::begin': }
|
||||
-> Package<| tag == 'murano-package'|>
|
||||
~> anchor { 'murano::install::end': }
|
||||
-> anchor { 'murano::config::begin': }
|
||||
-> Murano_config<||>
|
||||
~> anchor { 'murano::config::end': }
|
||||
-> anchor { 'murano::db::begin': }
|
||||
-> anchor { 'murano::db::end': }
|
||||
~> anchor { 'murano::dbsync::begin': }
|
||||
-> anchor { 'murano::dbsync::end': }
|
||||
~> anchor { 'murano::service::begin': }
|
||||
~> Service<| tag == 'murano-service' |>
|
||||
~> anchor { 'murano::service::end': }
|
||||
|
||||
# all db settings should be applied and all packages should be installed
|
||||
# before dbsync starts
|
||||
Oslo::Db<||> -> Anchor['murano::dbsync::begin']
|
||||
|
||||
Anchor['murano::config::begin'] -> Murano_paste_ini_config<||> ~> Anchor['murano::config::end']
|
||||
Anchor['murano::config::begin'] -> Murano_cfapi_config<||> ~> Anchor['murano::config::end']
|
||||
Anchor['murano::config::begin'] -> Murano_cfapi_paste_ini_config<||> ~> Anchor['murano::config::end']
|
||||
|
||||
# policy config should occur in the config block also.
|
||||
Anchor['murano::config::begin']
|
||||
-> Openstacklib::Policy<| tag == 'murano' |>
|
||||
-> Anchor['murano::config::end']
|
||||
|
||||
# We need openstackclient installed before marking service end so that murano
|
||||
# will have clients available to create resources. This tag handles the
|
||||
# openstackclient but indirectly since the client is not available in
|
||||
# all catalogs that don't need the client class (like many spec tests).
|
||||
# Once the openstackclient is installed we will setup the datastores and
|
||||
# datastore_versions. Datastore_versions must come after datastores.
|
||||
Package<| tag == 'openstackclient'|>
|
||||
-> Anchor['murano::service::end']
|
||||
|
||||
# Installation or config changes will always restart services.
|
||||
Anchor['murano::install::end'] ~> Anchor['murano::service::begin']
|
||||
Anchor['murano::config::end'] ~> Anchor['murano::service::begin']
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
# == Class: murano::engine
|
||||
#
|
||||
# murano engine package & service
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*manage_service*]
|
||||
# (Optional) Should the service be enabled
|
||||
# Defaults to true
|
||||
#
|
||||
# [*enabled*]
|
||||
# (Optional) Whether the service should be managed by Puppet
|
||||
# Defaults to true
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (Optional) Ensure state for package
|
||||
# Defaults to 'present'
|
||||
#
|
||||
# [*workers*]
|
||||
# (Optional) Number of workers for Murano Engine
|
||||
# Defaults to $facts['os_workers']
|
||||
#
|
||||
class murano::engine(
|
||||
Boolean $manage_service = true,
|
||||
Boolean $enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$workers = $facts['os_workers'],
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
include murano::params
|
||||
include murano::policy
|
||||
|
||||
if $manage_service {
|
||||
if $enabled {
|
||||
$service_ensure = 'running'
|
||||
} else {
|
||||
$service_ensure = 'stopped'
|
||||
}
|
||||
|
||||
service { 'murano-engine':
|
||||
ensure => $service_ensure,
|
||||
name => $::murano::params::engine_service_name,
|
||||
enable => $enabled,
|
||||
tag => 'murano-service',
|
||||
}
|
||||
}
|
||||
|
||||
murano_config {
|
||||
'engine/engine_workers': value => $workers;
|
||||
}
|
||||
|
||||
package { 'murano-engine':
|
||||
ensure => $package_ensure,
|
||||
name => $::murano::params::engine_package_name,
|
||||
tag => ['openstack', 'murano-package'],
|
||||
}
|
||||
}
|
@ -1,382 +0,0 @@
|
||||
# == Class: murano
|
||||
#
|
||||
# murano base package & configuration
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (Optional) Ensure state for package
|
||||
# Defaults to 'present'
|
||||
#
|
||||
# [*data_dir*]
|
||||
# (Optional) Directory to store data
|
||||
# Defaults to '/var/cache/murano'
|
||||
#
|
||||
# [*notification_transport_url*]
|
||||
# (optional) A URL representing the messaging driver to use for notifications
|
||||
# and its full configuration. Transport URLs take the form:
|
||||
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*notification_topics*]
|
||||
# (optional) AMQP topics to publish to when using the RPC notification driver.
|
||||
# (list value)
|
||||
# Default to $facts['os_service_default']
|
||||
#
|
||||
# [*notification_driver*]
|
||||
# (Optional) Notification driver to use
|
||||
# Defaults to 'messagingv2'
|
||||
#
|
||||
# [*default_transport_url*]
|
||||
# (optional) A URL representing the messaging driver to use and its full
|
||||
# configuration. Transport URLs take the form:
|
||||
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*rpc_response_timeout*]
|
||||
# (Optional) Seconds to wait for a response from a call.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*control_exchange*]
|
||||
# (Optional) The default exchange under which topics are scoped. May be
|
||||
# overridden by an exchange name specified in the transport_url
|
||||
# option.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*rabbit_ha_queues*]
|
||||
# (Optional) Should murano api use ha queues
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*rabbit_os_use_ssl*]
|
||||
# (Optional) Connect over SSL for openstack RabbitMQ.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*kombu_ssl_ca_certs*]
|
||||
# (optional) SSL certification authority file (valid only if SSL enabled).
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*kombu_ssl_certfile*]
|
||||
# (optional) SSL cert file (valid only if SSL enabled).
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*kombu_ssl_keyfile*]
|
||||
# (optional) SSL key file (valid only if SSL enabled).
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*kombu_ssl_version*]
|
||||
# (optional) SSL version to use (valid only if SSL enabled).
|
||||
# Valid values are TLSv1, SSLv23 and SSLv3. SSLv2 may be
|
||||
# available on some distributions.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*kombu_reconnect_delay*]
|
||||
# (Optional) How long to wait before reconnecting in response
|
||||
# to an AMQP consumer cancel notification. (floating point value)
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*kombu_failover_strategy*]
|
||||
# (Optional) Determines how the next RabbitMQ node is chosen in case the one
|
||||
# we are currently connected to becomes unavailable. Takes effect only if
|
||||
# more than one RabbitMQ node is provided in config. (string value)
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*kombu_compression*]
|
||||
# (optional) Possible values are: gzip, bz2. If not set compression will not
|
||||
# be used. This option may notbe available in future versions. EXPERIMENTAL.
|
||||
# (string value)
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*rabbit_own_host*]
|
||||
# (Optional) Host for murano rabbit server
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*rabbit_own_port*]
|
||||
# (Optional) Port for murano rabbit server
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*rabbit_own_user*]
|
||||
# (Optional) Username for murano rabbit server
|
||||
# Defaults to 'guest'
|
||||
#
|
||||
# [*rabbit_own_password*]
|
||||
# (Optional) Password for murano rabbit server
|
||||
# Defaults to 'guest'
|
||||
#
|
||||
# [*rabbit_own_vhost*]
|
||||
# (Optional) Virtual host for murano rabbit server
|
||||
# Defaults to 'murano'
|
||||
#
|
||||
# [*rabbit_own_use_ssl*]
|
||||
# (Optional) Connect over SSL for Murano RabbitMQ.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*rabbit_own_ca_certs*]
|
||||
# (optional) SSL certification authority file (valid only if SSL enabled)
|
||||
# for murano rabbit server.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*service_url*]
|
||||
# (Optional) URL for the API service
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*service_host*]
|
||||
# (Optional) Host for murano to listen on
|
||||
# Defaults to '127.0.0.1'
|
||||
#
|
||||
# [*service_port*]
|
||||
# (Optional) Port for murano to listen on
|
||||
# Defaults to 8082
|
||||
#
|
||||
# [*use_ssl*]
|
||||
# (optional) Enable SSL on the API server
|
||||
# Defaults to false
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (optional) Certificate file to use when starting API server securely
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*key_file*]
|
||||
# (optional) Private key file to use when starting API server securely
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (optional) CA certificate file to use to verify connecting clients
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*use_neutron*]
|
||||
# (Optional) Whether to use neutron
|
||||
# Defaults to true
|
||||
#
|
||||
# [*external_network*]
|
||||
# (Optional) Name of the external Neutron network which will be used
|
||||
# Defaults to $::murano::params::default_external_network
|
||||
#
|
||||
# [*default_router*]
|
||||
# (Optional) Router name for Murano networks
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*default_nameservers*]
|
||||
# (Optional) Domain Name Servers to use in Murano networks
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*use_trusts*]
|
||||
# (Optional) Whether to use trust token instead of user token
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*packages_service*]
|
||||
# (Optional) The service to store murano packages.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*amqp_durable_queues*]
|
||||
# (optional) Whether to use durable queues in AMQP.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# == database configuration options
|
||||
#
|
||||
# [*sync_db*]
|
||||
# (Optional) Enable dbsync
|
||||
# Defaults to true.
|
||||
#
|
||||
# [*purge_config*]
|
||||
# (optional) Whether to set only the specified config options
|
||||
# in the murano config.
|
||||
# Defaults to false.
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*database_connection*]
|
||||
# (Optional) Database URI for murano
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*database_max_retries*]
|
||||
# (Optional) Maximum number of database connection retries during startup.
|
||||
# Set to -1 to specify an infinite retry count.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*database_idle_timeout*]
|
||||
# (Optional) Timeout before idle SQL connections are reaped.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*database_retry_interval*]
|
||||
# (optional) Interval between retries of opening a database connection.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*database_max_pool_size*]
|
||||
# (optional) Maximum number of SQL connections to keep open in a pool.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*database_max_overflow*]
|
||||
# (optional) If set, use this value for max_overflow with sqlalchemy.
|
||||
# Defaults to undef.
|
||||
#
|
||||
class murano(
|
||||
$package_ensure = 'present',
|
||||
$data_dir = '/var/cache/murano',
|
||||
$notification_transport_url = $facts['os_service_default'],
|
||||
$notification_topics = $facts['os_service_default'],
|
||||
$notification_driver = 'messagingv2',
|
||||
$default_transport_url = $facts['os_service_default'],
|
||||
$rpc_response_timeout = $facts['os_service_default'],
|
||||
$control_exchange = $facts['os_service_default'],
|
||||
$rabbit_os_use_ssl = $facts['os_service_default'],
|
||||
$kombu_ssl_ca_certs = $facts['os_service_default'],
|
||||
$kombu_ssl_certfile = $facts['os_service_default'],
|
||||
$kombu_ssl_keyfile = $facts['os_service_default'],
|
||||
$kombu_ssl_version = $facts['os_service_default'],
|
||||
$kombu_reconnect_delay = $facts['os_service_default'],
|
||||
$kombu_failover_strategy = $facts['os_service_default'],
|
||||
$kombu_compression = $facts['os_service_default'],
|
||||
$rabbit_ha_queues = $facts['os_service_default'],
|
||||
$amqp_durable_queues = $facts['os_service_default'],
|
||||
$rabbit_own_host = $facts['os_service_default'],
|
||||
$rabbit_own_port = $facts['os_service_default'],
|
||||
$rabbit_own_user = 'guest',
|
||||
$rabbit_own_password = 'guest',
|
||||
$rabbit_own_vhost = 'murano',
|
||||
$rabbit_own_use_ssl = $facts['os_service_default'],
|
||||
$rabbit_own_ca_certs = $facts['os_service_default'],
|
||||
$service_url = undef,
|
||||
$service_host = '127.0.0.1',
|
||||
$service_port = '8082',
|
||||
Boolean $use_ssl = false,
|
||||
$cert_file = $facts['os_service_default'],
|
||||
$key_file = $facts['os_service_default'],
|
||||
$ca_file = $facts['os_service_default'],
|
||||
Boolean $use_neutron = true,
|
||||
$external_network = $::murano::params::default_external_network,
|
||||
$default_router = $facts['os_service_default'],
|
||||
$default_nameservers = $facts['os_service_default'],
|
||||
$use_trusts = $facts['os_service_default'],
|
||||
$packages_service = $facts['os_service_default'],
|
||||
Boolean $sync_db = true,
|
||||
Boolean $purge_config = false,
|
||||
# DEPRECATED PARAMETERS
|
||||
$database_connection = undef,
|
||||
$database_idle_timeout = undef,
|
||||
$database_max_pool_size = undef,
|
||||
$database_max_retries = undef,
|
||||
$database_retry_interval = undef,
|
||||
$database_max_overflow = undef,
|
||||
) inherits murano::params {
|
||||
|
||||
include murano::deps
|
||||
include murano::policy
|
||||
include murano::db
|
||||
|
||||
[
|
||||
'database_connection',
|
||||
'database_idle_timeout',
|
||||
'database_max_pool_size',
|
||||
'database_max_retries',
|
||||
'database_retry_interval',
|
||||
'database_max_overflow'
|
||||
].each |$db_opt| {
|
||||
if getvar($db_opt) != undef {
|
||||
warning("The murano::${db_opt} parameter has been deprecated. Use \
|
||||
the murano::db class parameters.")
|
||||
}
|
||||
}
|
||||
|
||||
package { 'murano-common':
|
||||
ensure => $package_ensure,
|
||||
name => $::murano::params::common_package_name,
|
||||
tag => ['openstack', 'murano-package'],
|
||||
}
|
||||
|
||||
$service_protocol = $use_ssl ? {
|
||||
true => 'https',
|
||||
default => 'http',
|
||||
}
|
||||
|
||||
resources { 'murano_config':
|
||||
purge => $purge_config,
|
||||
}
|
||||
|
||||
murano_config {
|
||||
'networking/router_name': value => $default_router;
|
||||
'networking/create_router': value => $use_neutron;
|
||||
}
|
||||
|
||||
if $use_neutron {
|
||||
if !$default_router {
|
||||
fail('The default_router parameter is required when use_neutron is set to true')
|
||||
}
|
||||
murano_config {
|
||||
'networking/external_network': value => $external_network;
|
||||
'networking/driver': value => 'neutron';
|
||||
}
|
||||
} else {
|
||||
murano_config {
|
||||
'networking/external_network': ensure => 'absent';
|
||||
'networking/driver': value => 'nova';
|
||||
}
|
||||
}
|
||||
|
||||
if $use_ssl {
|
||||
if is_service_default($cert_file) {
|
||||
fail('The cert_file parameter is required when use_ssl is set to true')
|
||||
}
|
||||
if is_service_default($key_file) {
|
||||
fail('The key_file parameter is required when use_ssl is set to true')
|
||||
}
|
||||
murano_config {
|
||||
'ssl/cert_file' : value => $cert_file;
|
||||
'ssl/key_file' : value => $key_file;
|
||||
'ssl/ca_file' : value => $ca_file;
|
||||
}
|
||||
}
|
||||
|
||||
if $service_url {
|
||||
$url = $service_url
|
||||
}
|
||||
else {
|
||||
$url = "${service_protocol}://${service_host}:${service_port}"
|
||||
}
|
||||
|
||||
murano_config {
|
||||
'murano/url' : value => $url;
|
||||
|
||||
'engine/use_trusts' : value => $use_trusts;
|
||||
|
||||
'rabbitmq/login' : value => $rabbit_own_user;
|
||||
'rabbitmq/password' : value => $rabbit_own_password, secret => true;
|
||||
'rabbitmq/host' : value => $rabbit_own_host;
|
||||
'rabbitmq/port' : value => $rabbit_own_port;
|
||||
'rabbitmq/virtual_host' : value => $rabbit_own_vhost;
|
||||
'rabbitmq/ssl' : value => $rabbit_own_use_ssl;
|
||||
'rabbitmq/ca_certs' : value => $rabbit_own_ca_certs;
|
||||
|
||||
'networking/default_dns': value => $default_nameservers;
|
||||
|
||||
'engine/packages_service': value => $packages_service,
|
||||
}
|
||||
|
||||
oslo::messaging::rabbit { 'murano_config':
|
||||
kombu_ssl_version => $kombu_ssl_version,
|
||||
kombu_ssl_keyfile => $kombu_ssl_keyfile,
|
||||
kombu_ssl_certfile => $kombu_ssl_certfile,
|
||||
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
|
||||
kombu_reconnect_delay => $kombu_reconnect_delay,
|
||||
kombu_failover_strategy => $kombu_failover_strategy,
|
||||
kombu_compression => $kombu_compression,
|
||||
rabbit_use_ssl => $rabbit_os_use_ssl,
|
||||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
amqp_durable_queues => $amqp_durable_queues,
|
||||
}
|
||||
|
||||
oslo::messaging::default { 'murano_config':
|
||||
transport_url => $default_transport_url,
|
||||
rpc_response_timeout => $rpc_response_timeout,
|
||||
control_exchange => $control_exchange,
|
||||
}
|
||||
|
||||
oslo::messaging::notifications { 'murano_config':
|
||||
transport_url => $notification_transport_url,
|
||||
driver => $notification_driver,
|
||||
topics => $notification_topics,
|
||||
}
|
||||
|
||||
if $sync_db {
|
||||
include murano::db::sync
|
||||
}
|
||||
}
|
@ -1,129 +0,0 @@
|
||||
# == Class: murano::keystone::auth
|
||||
#
|
||||
# Configures murano service and endpoint in Keystone.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*password*]
|
||||
# (Required) Password for murano user.
|
||||
#
|
||||
# [*service_name*]
|
||||
# (Optional) Name of the service.
|
||||
# Defaults to 'murano'.
|
||||
#
|
||||
# [*auth_name*]
|
||||
# (Optional) Username for murano service.
|
||||
# Defaults to 'murano'.
|
||||
#
|
||||
# [*email*]
|
||||
# (Optional) Email for murano user.
|
||||
# Defaults to 'murano@localhost'.
|
||||
#
|
||||
# [*tenant*]
|
||||
# (Optional) Tenant for murano user.
|
||||
# Defaults to 'services'.
|
||||
#
|
||||
# [*roles*]
|
||||
# (Optional) List of roles assigned to aodh user.
|
||||
# Defaults to ['admin']
|
||||
#
|
||||
# [*system_scope*]
|
||||
# (Optional) Scope for system operations.
|
||||
# Defaults to 'all'
|
||||
#
|
||||
# [*system_roles*]
|
||||
# (Optional) List of system roles assigned to aodh user.
|
||||
# Defaults to []
|
||||
#
|
||||
# [*configure_endpoint*]
|
||||
# (Optional) Should murano endpoint be configured?
|
||||
# Defaults to true.
|
||||
#
|
||||
# [*configure_user*]
|
||||
# (Optional) Should murano user be configured?
|
||||
# Defaults to true.
|
||||
#
|
||||
# [*configure_user_role*]
|
||||
# (Optional) Should murano user role be configured?
|
||||
# Defaults to 'true'.
|
||||
#
|
||||
# [*service_type*]
|
||||
# (Optional) Type of service.
|
||||
# Defaults to 'application-catalog'.
|
||||
#
|
||||
# [*service_description*]
|
||||
# (Optional) Description of service.
|
||||
# Defaults to 'Murano Application Catalog'.
|
||||
#
|
||||
# [*region*]
|
||||
# (Optional) Region for endpoint.
|
||||
# Defaults to 'RegionOne'.
|
||||
#
|
||||
# [*public_url*]
|
||||
# (Optional) The endpoint's public url.
|
||||
# This url should *not* contain any trailing '/'.
|
||||
# Defaults to 'http://127.0.0.1:8082
|
||||
#
|
||||
# [*admin_url*]
|
||||
# (Optional) The endpoint's admin url.
|
||||
# This url should *not* contain any trailing '/'.
|
||||
# Defaults to 'http://127.0.0.1:8082
|
||||
#
|
||||
# [*internal_url*]
|
||||
# (Optional) The endpoint's internal url.
|
||||
# This url should *not* contain any trailing '/'.
|
||||
# Defaults to 'http://127.0.0.1:8082
|
||||
#
|
||||
# === Examples
|
||||
#
|
||||
# class { 'murano::keystone::auth':
|
||||
# password => 'secret',
|
||||
# public_url => 'https://10.0.0.10:8082',
|
||||
# internal_url => 'https://10.0.0.11:8082',
|
||||
# admin_url => 'https://10.0.0.11:8082',
|
||||
# }
|
||||
#
|
||||
class murano::keystone::auth(
|
||||
$password,
|
||||
$service_name = 'murano',
|
||||
$auth_name = 'murano',
|
||||
$email = 'murano@localhost',
|
||||
$tenant = 'services',
|
||||
$roles = ['admin'],
|
||||
$system_scope = 'all',
|
||||
$system_roles = [],
|
||||
$service_type = 'application-catalog',
|
||||
$service_description = 'Murano Application Catalog',
|
||||
$configure_endpoint = true,
|
||||
$configure_user = true,
|
||||
$configure_user_role = true,
|
||||
$region = 'RegionOne',
|
||||
$public_url = 'http://127.0.0.1:8082',
|
||||
$admin_url = 'http://127.0.0.1:8082',
|
||||
$internal_url = 'http://127.0.0.1:8082',
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
|
||||
Keystone::Resource::Service_identity['murano'] -> Anchor['murano::service::end']
|
||||
|
||||
keystone::resource::service_identity { 'murano':
|
||||
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,
|
||||
roles => $roles,
|
||||
system_scope => $system_scope,
|
||||
system_roles => $system_roles,
|
||||
public_url => $public_url,
|
||||
admin_url => $admin_url,
|
||||
internal_url => $internal_url,
|
||||
}
|
||||
}
|
@ -1,274 +0,0 @@
|
||||
# class: murano::keystone::authtoken
|
||||
#
|
||||
# Configure the keystone_authtoken section in the configuration file
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*password*]
|
||||
# (Required) Password to create for the service user
|
||||
#
|
||||
# [*username*]
|
||||
# (Optional) The name of the service user
|
||||
# Defaults to 'murano'
|
||||
#
|
||||
# [*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'
|
||||
#
|
||||
# [*system_scope*]
|
||||
# (Optional) Scope for system operations
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If true, explicitly allow TLS without checking server cert
|
||||
# against any certificate authorities. WARNING: not recommended. Use with
|
||||
# caution.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*auth_section*]
|
||||
# (Optional) Config Section from which to load plugin specific options
|
||||
# Defaults to $facts['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 $facts['os_service_default'].
|
||||
#
|
||||
# [*cache*]
|
||||
# (Optional) Env key for the swift cache.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*cafile*]
|
||||
# (Optional) A PEM encoded Certificate Authority to use when verifying HTTPs
|
||||
# connections.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*certfile*]
|
||||
# (Optional) Required if identity server requires client certificate
|
||||
# Defaults to $facts['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 $facts['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 $facts['os_service_default'].
|
||||
#
|
||||
# [*http_connect_timeout*]
|
||||
# (Optional) Request timeout value for communicating with Identity API
|
||||
# server.
|
||||
# Defaults to $facts['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 $facts['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 $facts['os_service_default'].
|
||||
#
|
||||
# [*keyfile*]
|
||||
# (Optional) Required if identity server requires client certificate
|
||||
# Defaults to $facts['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 $facts['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 $facts['os_service_default'].
|
||||
#
|
||||
# [*memcache_pool_maxsize*]
|
||||
# (Optional) Maximum total number of open connections to every memcached
|
||||
# server. Integer value
|
||||
# Defaults to $facts['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 $facts['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 $facts['os_service_default'].
|
||||
#
|
||||
# [*memcache_secret_key*]
|
||||
# (Optional, mandatory if memcache_security_strategy is defined) This string
|
||||
# is used for key derivation.
|
||||
# Defaults to $facts['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 $facts['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 $facts['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 $facts['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 $facts['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 $facts['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 $facts['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 $facts['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 $facts['os_service_default'].
|
||||
#
|
||||
# [*interface*]
|
||||
# (Optional) Interface to use for the Identity API endpoint. Valid values are
|
||||
# "public", "internal" or "admin".
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
class murano::keystone::authtoken(
|
||||
String[1] $password,
|
||||
$username = 'murano',
|
||||
$auth_url = 'http://localhost:5000',
|
||||
$project_name = 'services',
|
||||
$user_domain_name = 'Default',
|
||||
$project_domain_name = 'Default',
|
||||
$system_scope = $facts['os_service_default'],
|
||||
$insecure = $facts['os_service_default'],
|
||||
$auth_section = $facts['os_service_default'],
|
||||
$auth_type = 'password',
|
||||
$www_authenticate_uri = 'http://localhost:5000',
|
||||
$auth_version = $facts['os_service_default'],
|
||||
$cache = $facts['os_service_default'],
|
||||
$cafile = $facts['os_service_default'],
|
||||
$certfile = $facts['os_service_default'],
|
||||
$delay_auth_decision = $facts['os_service_default'],
|
||||
$enforce_token_bind = $facts['os_service_default'],
|
||||
$http_connect_timeout = $facts['os_service_default'],
|
||||
$http_request_max_retries = $facts['os_service_default'],
|
||||
$include_service_catalog = $facts['os_service_default'],
|
||||
$keyfile = $facts['os_service_default'],
|
||||
$memcache_pool_conn_get_timeout = $facts['os_service_default'],
|
||||
$memcache_pool_dead_retry = $facts['os_service_default'],
|
||||
$memcache_pool_maxsize = $facts['os_service_default'],
|
||||
$memcache_pool_socket_timeout = $facts['os_service_default'],
|
||||
$memcache_pool_unused_timeout = $facts['os_service_default'],
|
||||
$memcache_secret_key = $facts['os_service_default'],
|
||||
$memcache_security_strategy = $facts['os_service_default'],
|
||||
$memcache_use_advanced_pool = $facts['os_service_default'],
|
||||
$memcached_servers = $facts['os_service_default'],
|
||||
$manage_memcache_package = false,
|
||||
$region_name = $facts['os_service_default'],
|
||||
$token_cache_time = $facts['os_service_default'],
|
||||
$service_token_roles = $facts['os_service_default'],
|
||||
$service_token_roles_required = $facts['os_service_default'],
|
||||
$service_type = $facts['os_service_default'],
|
||||
$interface = $facts['os_service_default'],
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
|
||||
keystone::resource::authtoken { 'murano_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,
|
||||
system_scope => $system_scope,
|
||||
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,
|
||||
}
|
||||
}
|
@ -1,129 +0,0 @@
|
||||
# == Class: murano::keystone::cfapi_auth
|
||||
#
|
||||
# Configures murano cfapi service and endpoint in Keystone.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*password*]
|
||||
# (Required) Password for murano cfapi user.
|
||||
#
|
||||
# [*service_name*]
|
||||
# (Optional) Name of the service.
|
||||
# Defaults to 'murano-cfapi'.
|
||||
#
|
||||
# [*auth_name*]
|
||||
# (Optional) Username for murano service.
|
||||
# Defaults to 'murano-cfapi'.
|
||||
#
|
||||
# [*email*]
|
||||
# (Optional) Email for murano user.
|
||||
# Defaults to 'murano@localhost'.
|
||||
#
|
||||
# [*tenant*]
|
||||
# (Optional) Tenant for murano user.
|
||||
# Defaults to 'services'.
|
||||
#
|
||||
# [*roles*]
|
||||
# (Optional) List of roles assigned to aodh user.
|
||||
# Defaults to ['admin']
|
||||
#
|
||||
# [*system_scope*]
|
||||
# (Optional) Scope for system operations.
|
||||
# Defaults to 'all'
|
||||
#
|
||||
# [*system_roles*]
|
||||
# (Optional) List of system roles assigned to aodh user.
|
||||
# Defaults to []
|
||||
#
|
||||
# [*configure_endpoint*]
|
||||
# (Optional) Should murano endpoint be configured?
|
||||
# Defaults to true.
|
||||
#
|
||||
# [*configure_user*]
|
||||
# (Optional) Should murano user be configured?
|
||||
# Defaults to false.
|
||||
#
|
||||
# [*configure_user_role*]
|
||||
# (Optional) Should murano user_role be configured?
|
||||
# Defaults to false.
|
||||
#
|
||||
# [*service_type*]
|
||||
# (Optional) Type of service.
|
||||
# Defaults to 'service-broker'.
|
||||
#
|
||||
# [*service_description*]
|
||||
# (Optional) Description of service.
|
||||
# Defaults to 'Murano Service Broker API'.
|
||||
#
|
||||
# [*region*]
|
||||
# (Optional) Region for endpoint.
|
||||
# Defaults to 'RegionOne'.
|
||||
#
|
||||
# [*public_url*]
|
||||
# (Optional) The endpoint's public url.
|
||||
# This url should *not* contain any trailing '/'.
|
||||
# Defaults to 'http://127.0.0.1:8083
|
||||
#
|
||||
# [*admin_url*]
|
||||
# (Optional) The endpoint's admin url.
|
||||
# This url should *not* contain any trailing '/'.
|
||||
# Defaults to 'http://127.0.0.1:8083
|
||||
#
|
||||
# [*internal_url*]
|
||||
# (Optional) The endpoint's internal url.
|
||||
# This url should *not* contain any trailing '/'.
|
||||
# Defaults to 'http://127.0.0.1:8083
|
||||
#
|
||||
# === Examples
|
||||
#
|
||||
# class { 'murano::keystone::cfapi_auth':
|
||||
# password => 'secret',
|
||||
# public_url => 'https://10.0.0.10:8083',
|
||||
# internal_url => 'https://10.0.0.11:8083',
|
||||
# admin_url => 'https://10.0.0.11:8083',
|
||||
# }
|
||||
#
|
||||
class murano::keystone::cfapi_auth(
|
||||
$password,
|
||||
$service_name = 'murano-cfapi',
|
||||
$auth_name = 'murano-cfapi',
|
||||
$email = 'murano@localhost',
|
||||
$tenant = 'services',
|
||||
$roles = ['admin'],
|
||||
$system_scope = 'all',
|
||||
$system_roles = [],
|
||||
$service_type = 'service-broker',
|
||||
$service_description = 'Murano Service Broker API',
|
||||
$configure_endpoint = true,
|
||||
$configure_user = false,
|
||||
$configure_user_role = false,
|
||||
$region = 'RegionOne',
|
||||
$public_url = 'http://127.0.0.1:8083',
|
||||
$admin_url = 'http://127.0.0.1:8083',
|
||||
$internal_url = 'http://127.0.0.1:8083',
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
|
||||
Keystone::Resource::Service_identity['murano-cfapi'] -> Anchor['murano::service::end']
|
||||
|
||||
keystone::resource::service_identity { 'murano-cfapi':
|
||||
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,
|
||||
roles => $roles,
|
||||
system_scope => $system_scope,
|
||||
system_roles => $system_roles,
|
||||
public_url => $public_url,
|
||||
admin_url => $admin_url,
|
||||
internal_url => $internal_url,
|
||||
}
|
||||
}
|
@ -1,274 +0,0 @@
|
||||
# class: murano::keystone::cfapi_authtoken
|
||||
#
|
||||
# Configure the keystone_authtoken section in the configuration file
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*password*]
|
||||
# (Required) Password to create for the service user
|
||||
#
|
||||
# [*username*]
|
||||
# (Optional) The name of the service user
|
||||
# Defaults to 'murano-cfapi'
|
||||
#
|
||||
# [*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'
|
||||
#
|
||||
# [*system_scope*]
|
||||
# (Optional) Scope for system operations
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*insecure*]
|
||||
# (Optional) If true, explicitly allow TLS without checking server cert
|
||||
# against any certificate authorities. WARNING: not recommended. Use with
|
||||
# caution.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*auth_section*]
|
||||
# (Optional) Config Section from which to load plugin specific options
|
||||
# Defaults to $facts['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 $facts['os_service_default'].
|
||||
#
|
||||
# [*cache*]
|
||||
# (Optional) Env key for the swift cache.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*cafile*]
|
||||
# (Optional) A PEM encoded Certificate Authority to use when verifying HTTPs
|
||||
# connections.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*certfile*]
|
||||
# (Optional) Required if identity server requires client certificate
|
||||
# Defaults to $facts['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 $facts['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 $facts['os_service_default'].
|
||||
#
|
||||
# [*http_connect_timeout*]
|
||||
# (Optional) Request timeout value for communicating with Identity API
|
||||
# server.
|
||||
# Defaults to $facts['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 $facts['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 $facts['os_service_default'].
|
||||
#
|
||||
# [*keyfile*]
|
||||
# (Optional) Required if identity server requires client certificate
|
||||
# Defaults to $facts['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 $facts['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 $facts['os_service_default'].
|
||||
#
|
||||
# [*memcache_pool_maxsize*]
|
||||
# (Optional) Maximum total number of open connections to every memcached
|
||||
# server. Integer value
|
||||
# Defaults to $facts['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 $facts['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 $facts['os_service_default'].
|
||||
#
|
||||
# [*memcache_secret_key*]
|
||||
# (Optional, mandatory if memcache_security_strategy is defined) This string
|
||||
# is used for key derivation.
|
||||
# Defaults to $facts['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 $facts['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 $facts['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 $facts['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 $facts['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 $facts['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 $facts['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 $facts['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 $facts['os_service_default'].
|
||||
#
|
||||
# [*interface*]
|
||||
# (Optional) Interface to use for the Identity API endpoint. Valid values are
|
||||
# "public", "internal" or "admin".
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
class murano::keystone::cfapi_authtoken(
|
||||
String[1] $password,
|
||||
$username = 'murano-cfapi',
|
||||
$auth_url = 'http://localhost:5000',
|
||||
$project_name = 'services',
|
||||
$user_domain_name = 'Default',
|
||||
$project_domain_name = 'Default',
|
||||
$system_scope = $facts['os_service_default'],
|
||||
$insecure = $facts['os_service_default'],
|
||||
$auth_section = $facts['os_service_default'],
|
||||
$auth_type = 'password',
|
||||
$www_authenticate_uri = 'http://localhost:5000',
|
||||
$auth_version = $facts['os_service_default'],
|
||||
$cache = $facts['os_service_default'],
|
||||
$cafile = $facts['os_service_default'],
|
||||
$certfile = $facts['os_service_default'],
|
||||
$delay_auth_decision = $facts['os_service_default'],
|
||||
$enforce_token_bind = $facts['os_service_default'],
|
||||
$http_connect_timeout = $facts['os_service_default'],
|
||||
$http_request_max_retries = $facts['os_service_default'],
|
||||
$include_service_catalog = $facts['os_service_default'],
|
||||
$keyfile = $facts['os_service_default'],
|
||||
$memcache_pool_conn_get_timeout = $facts['os_service_default'],
|
||||
$memcache_pool_dead_retry = $facts['os_service_default'],
|
||||
$memcache_pool_maxsize = $facts['os_service_default'],
|
||||
$memcache_pool_socket_timeout = $facts['os_service_default'],
|
||||
$memcache_pool_unused_timeout = $facts['os_service_default'],
|
||||
$memcache_secret_key = $facts['os_service_default'],
|
||||
$memcache_security_strategy = $facts['os_service_default'],
|
||||
$memcache_use_advanced_pool = $facts['os_service_default'],
|
||||
$memcached_servers = $facts['os_service_default'],
|
||||
$manage_memcache_package = false,
|
||||
$region_name = $facts['os_service_default'],
|
||||
$token_cache_time = $facts['os_service_default'],
|
||||
$service_token_roles = $facts['os_service_default'],
|
||||
$service_token_roles_required = $facts['os_service_default'],
|
||||
$service_type = $facts['os_service_default'],
|
||||
$interface = $facts['os_service_default'],
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
|
||||
keystone::resource::authtoken { 'murano_cfapi_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,
|
||||
system_scope => $system_scope,
|
||||
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,
|
||||
}
|
||||
}
|
@ -1,152 +0,0 @@
|
||||
# == Class murano::logging
|
||||
#
|
||||
# murano extended logging configuration
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*debug*]
|
||||
# (Optional) Should the daemons log debug messages
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*use_syslog*]
|
||||
# (Optional) Use syslog for logging.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*use_json*]
|
||||
# (Optional) Use json for logging
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*use_journal*]
|
||||
# (Optional) Use journal for logging
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*use_stderr*]
|
||||
# (Optional) Use stderr for logging
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*log_facility*]
|
||||
# (Optional) Syslog facility to receive log lines.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*log_dir*]
|
||||
# (Optional) Directory where logs should be stored.
|
||||
# If set to $facts['os_service_default'], it will not log to any directory.
|
||||
# Defaults to '/var/log/murano'
|
||||
#
|
||||
# [*log_file*]
|
||||
# (Optional) File where logs should be stored.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*watch_log_file*]
|
||||
# (Optional) Uses logging handler designed to watch file system (boolean value).
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*logging_context_format_string*]
|
||||
# (Optional) Format string to use for log messages with context.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s\
|
||||
# [%(request_id)s %(user_identity)s] %(instance)s%(message)s'
|
||||
#
|
||||
# [*logging_default_format_string*]
|
||||
# (Optional) Format string to use for log messages without context.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s\
|
||||
# [-] %(instance)s%(message)s'
|
||||
#
|
||||
# [*logging_debug_format_suffix*]
|
||||
# (Optional) Formatted data to append to log format when level is DEBUG.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# Example: '%(funcName)s %(pathname)s:%(lineno)d'
|
||||
#
|
||||
# [*logging_exception_prefix*]
|
||||
# (Optional) Prefix each line of exception output with this format.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# Example: '%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s'
|
||||
#
|
||||
# [*log_config_append*]
|
||||
# (Optional) The name of an additional logging configuration file.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# See https://docs.python.org/2/howto/logging.html
|
||||
#
|
||||
# [*default_log_levels*]
|
||||
# (Optional) Hash of logger (keys) and level (values) pairs.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# Example:
|
||||
# {'amqp' => 'WARN', 'amqplib' => 'WARN', 'boto' => 'WARN',
|
||||
# 'sqlalchemy' => 'WARN', 'suds' => 'INFO', 'iso8601' => 'WARN',
|
||||
# 'requests.packages.urllib3.connectionpool' => 'WARN' }
|
||||
#
|
||||
# [*publish_errors*]
|
||||
# (Optional) Publish error events (boolean value).
|
||||
# Defaults to $facts['os_service_default'] (false if unconfigured).
|
||||
#
|
||||
# [*fatal_deprecations*]
|
||||
# (Optional) Make deprecations fatal (boolean value)
|
||||
# Defaults to $facts['os_service_default'] (false if unconfigured).
|
||||
#
|
||||
# [*instance_format*]
|
||||
# (Optional) If an instance is passed with the log message, format it
|
||||
# like this (string value).
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# Example: '[instance: %(uuid)s] '
|
||||
#
|
||||
# [*instance_uuid_format*]
|
||||
# (Optional) If an instance UUID is passed with the log message, format
|
||||
# It like this (string value).
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# Example: instance_uuid_format='[instance: %(uuid)s] '
|
||||
|
||||
# [*log_date_format*]
|
||||
# (Optional) Format string for %%(asctime)s in log records.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# Example: 'Y-%m-%d %H:%M:%S'
|
||||
#
|
||||
class murano::logging(
|
||||
$debug = $facts['os_service_default'],
|
||||
$use_syslog = $facts['os_service_default'],
|
||||
$use_json = $facts['os_service_default'],
|
||||
$use_journal = $facts['os_service_default'],
|
||||
$use_stderr = $facts['os_service_default'],
|
||||
$log_facility = $facts['os_service_default'],
|
||||
$log_dir = '/var/log/murano',
|
||||
$log_file = $facts['os_service_default'],
|
||||
$watch_log_file = $facts['os_service_default'],
|
||||
$logging_context_format_string = $facts['os_service_default'],
|
||||
$logging_default_format_string = $facts['os_service_default'],
|
||||
$logging_debug_format_suffix = $facts['os_service_default'],
|
||||
$logging_exception_prefix = $facts['os_service_default'],
|
||||
$log_config_append = $facts['os_service_default'],
|
||||
$default_log_levels = $facts['os_service_default'],
|
||||
$publish_errors = $facts['os_service_default'],
|
||||
$fatal_deprecations = $facts['os_service_default'],
|
||||
$instance_format = $facts['os_service_default'],
|
||||
$instance_uuid_format = $facts['os_service_default'],
|
||||
$log_date_format = $facts['os_service_default'],
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
|
||||
oslo::log { 'murano_config':
|
||||
debug => $debug,
|
||||
use_syslog => $use_syslog,
|
||||
use_json => $use_json,
|
||||
use_journal => $use_journal,
|
||||
use_stderr => $use_stderr,
|
||||
log_dir => $log_dir,
|
||||
log_file => $log_file,
|
||||
watch_log_file => $watch_log_file,
|
||||
syslog_log_facility => $log_facility,
|
||||
logging_context_format_string => $logging_context_format_string,
|
||||
logging_default_format_string => $logging_default_format_string,
|
||||
logging_debug_format_suffix => $logging_debug_format_suffix,
|
||||
logging_exception_prefix => $logging_exception_prefix,
|
||||
log_config_append => $log_config_append,
|
||||
default_log_levels => $default_log_levels,
|
||||
publish_errors => $publish_errors,
|
||||
fatal_deprecations => $fatal_deprecations,
|
||||
log_date_format => $log_date_format,
|
||||
instance_format => $instance_format,
|
||||
instance_uuid_format => $instance_uuid_format,
|
||||
}
|
||||
|
||||
}
|
@ -1,145 +0,0 @@
|
||||
# == Class murano::logging_cfapi
|
||||
#
|
||||
# murano_cfapi extended logging configuration
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*debug*]
|
||||
# (Optional) Should the daemons log debug messages
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*use_syslog*]
|
||||
# (Optional) Use syslog for logging.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*use_json*]
|
||||
# (Optional) Use json for logging
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*use_journal*]
|
||||
# (Optional) Use journal for logging
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*use_stderr*]
|
||||
# (Optional) Use stderr for logging
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*log_facility*]
|
||||
# (Optional) Syslog facility to receive log lines.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*log_dir*]
|
||||
# (Optional) Directory where logs should be stored.
|
||||
# If set to $facts['os_service_default'], it will not log to any directory.
|
||||
# Defaults to '/var/log/murano_cfapi'
|
||||
#
|
||||
# [*log_file*]
|
||||
# (Optional) File where logs should be stored.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*logging_context_format_string*]
|
||||
# (Optional) Format string to use for log messages with context.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s\
|
||||
# [%(request_id)s %(user_identity)s] %(instance)s%(message)s'
|
||||
#
|
||||
# [*logging_default_format_string*]
|
||||
# (Optional) Format string to use for log messages without context.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s\
|
||||
# [-] %(instance)s%(message)s'
|
||||
#
|
||||
# [*logging_debug_format_suffix*]
|
||||
# (Optional) Formatted data to append to log format when level is DEBUG.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# Example: '%(funcName)s %(pathname)s:%(lineno)d'
|
||||
#
|
||||
# [*logging_exception_prefix*]
|
||||
# (Optional) Prefix each line of exception output with this format.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# Example: '%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s'
|
||||
#
|
||||
# [*log_config_append*]
|
||||
# (Optional) The name of an additional logging configuration file.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# See https://docs.python.org/2/howto/logging.html
|
||||
#
|
||||
# [*default_log_levels*]
|
||||
# (Optional) Hash of logger (keys) and level (values) pairs.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# Example:
|
||||
# {'amqp' => 'WARN', 'amqplib' => 'WARN', 'boto' => 'WARN',
|
||||
# 'sqlalchemy' => 'WARN', 'suds' => 'INFO', 'iso8601' => 'WARN',
|
||||
# 'requests.packages.urllib3.connectionpool' => 'WARN' }
|
||||
#
|
||||
# [*publish_errors*]
|
||||
# (Optional) Publish error events (boolean value).
|
||||
# Defaults to $facts['os_service_default'] (false if unconfigured).
|
||||
#
|
||||
# [*fatal_deprecations*]
|
||||
# (Optional) Make deprecations fatal (boolean value)
|
||||
# Defaults to $facts['os_service_default'] (false if unconfigured).
|
||||
#
|
||||
# [*instance_format*]
|
||||
# (Optional) If an instance is passed with the log message, format it
|
||||
# like this (string value).
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# Example: '[instance: %(uuid)s] '
|
||||
#
|
||||
# [*instance_uuid_format*]
|
||||
# (Optional) If an instance UUID is passed with the log message, format
|
||||
# It like this (string value).
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# Example: instance_uuid_format='[instance: %(uuid)s] '
|
||||
|
||||
# [*log_date_format*]
|
||||
# (Optional) Format string for %%(asctime)s in log records.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# Example: 'Y-%m-%d %H:%M:%S'
|
||||
#
|
||||
class murano::logging_cfapi(
|
||||
$debug = $facts['os_service_default'],
|
||||
$use_syslog = $facts['os_service_default'],
|
||||
$use_json = $facts['os_service_default'],
|
||||
$use_journal = $facts['os_service_default'],
|
||||
$use_stderr = $facts['os_service_default'],
|
||||
$log_facility = $facts['os_service_default'],
|
||||
$log_dir = '/var/log/murano_cfapi',
|
||||
$log_file = $facts['os_service_default'],
|
||||
$logging_context_format_string = $facts['os_service_default'],
|
||||
$logging_default_format_string = $facts['os_service_default'],
|
||||
$logging_debug_format_suffix = $facts['os_service_default'],
|
||||
$logging_exception_prefix = $facts['os_service_default'],
|
||||
$log_config_append = $facts['os_service_default'],
|
||||
$default_log_levels = $facts['os_service_default'],
|
||||
$publish_errors = $facts['os_service_default'],
|
||||
$fatal_deprecations = $facts['os_service_default'],
|
||||
$instance_format = $facts['os_service_default'],
|
||||
$instance_uuid_format = $facts['os_service_default'],
|
||||
$log_date_format = $facts['os_service_default'],
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
|
||||
oslo::log { 'murano_cfapi_config':
|
||||
debug => $debug,
|
||||
use_syslog => $use_syslog,
|
||||
use_json => $use_json,
|
||||
use_journal => $use_journal,
|
||||
use_stderr => $use_stderr,
|
||||
log_dir => $log_dir,
|
||||
log_file => $log_file,
|
||||
syslog_log_facility => $log_facility,
|
||||
logging_context_format_string => $logging_context_format_string,
|
||||
logging_default_format_string => $logging_default_format_string,
|
||||
logging_debug_format_suffix => $logging_debug_format_suffix,
|
||||
logging_exception_prefix => $logging_exception_prefix,
|
||||
log_config_append => $log_config_append,
|
||||
default_log_levels => $default_log_levels,
|
||||
publish_errors => $publish_errors,
|
||||
fatal_deprecations => $fatal_deprecations,
|
||||
log_date_format => $log_date_format,
|
||||
instance_format => $instance_format,
|
||||
instance_uuid_format => $instance_uuid_format,
|
||||
}
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
# == Class: murano::params
|
||||
#
|
||||
# Parameters for puppet-murano
|
||||
#
|
||||
class murano::params {
|
||||
include openstacklib::defaults
|
||||
|
||||
$dbmanage_command = 'murano-db-manage --config-file /etc/murano/murano.conf upgrade'
|
||||
$cfapi_dbmanage_command = 'murano-cfapi-db-manage --config-file /etc/murano/murano-cfapi.conf upgrade'
|
||||
$default_external_network = 'public'
|
||||
# service names
|
||||
$api_service_name = 'murano-api'
|
||||
$engine_service_name = 'murano-engine'
|
||||
$pythonclient_package_name = 'python3-muranoclient'
|
||||
$group = 'murano'
|
||||
|
||||
case $facts['os']['family'] {
|
||||
'RedHat': {
|
||||
# package names
|
||||
$api_package_name = 'openstack-murano-api'
|
||||
$cfapi_package_name = 'openstack-murano-cf-api'
|
||||
$common_package_name = 'openstack-murano-common'
|
||||
$engine_package_name = 'openstack-murano-engine'
|
||||
$dashboard_package_name = 'openstack-murano-ui'
|
||||
# service names
|
||||
$cfapi_service_name = 'murano-cf-api'
|
||||
# dashboard config file
|
||||
$local_settings_path = '/etc/openstack-dashboard/local_settings'
|
||||
}
|
||||
'Debian': {
|
||||
# package names
|
||||
$api_package_name = 'murano-api'
|
||||
$cfapi_package_name = 'murano-cfapi'
|
||||
$common_package_name = 'murano-common'
|
||||
$engine_package_name = 'murano-engine'
|
||||
$dashboard_package_name = 'python3-murano-dashboard'
|
||||
# service names
|
||||
$cfapi_service_name = 'murano-cfapi'
|
||||
# dashboard config file
|
||||
$local_settings_path = '/etc/openstack-dashboard/local_settings.py'
|
||||
}
|
||||
default: {
|
||||
fail("Unsupported osfamily: ${facts['os']['family']}")
|
||||
}
|
||||
}
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
# == Class: murano::policy
|
||||
#
|
||||
# Configure the murano policies
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*enforce_scope*]
|
||||
# (Optional) Whether or not to enforce scope when evaluating policies.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*enforce_new_defaults*]
|
||||
# (Optional) Whether or not to use old deprecated defaults when evaluating
|
||||
# policies.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*policies*]
|
||||
# (Optional) Set of policies to configure for murano
|
||||
# Example :
|
||||
# {
|
||||
# 'murano-context_is_admin' => {
|
||||
# 'key' => 'context_is_admin',
|
||||
# 'value' => 'true'
|
||||
# },
|
||||
# 'murano-default' => {
|
||||
# 'key' => 'default',
|
||||
# 'value' => 'rule:admin_or_owner'
|
||||
# }
|
||||
# }
|
||||
# Defaults to empty hash.
|
||||
#
|
||||
# [*policy_path*]
|
||||
# (Optional) Path to the murano policy.yaml file
|
||||
# Defaults to /etc/murano/policy.yaml
|
||||
#
|
||||
# [*policy_default_rule*]
|
||||
# (Optional) Default rule. Enforced when a requested rule is not found.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*policy_dirs*]
|
||||
# (Optional) Path to the murano policy folder
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*purge_config*]
|
||||
# (optional) Whether to set only the specified policy rules in the policy
|
||||
# file.
|
||||
# Defaults to false.
|
||||
#
|
||||
class murano::policy (
|
||||
$enforce_scope = $facts['os_service_default'],
|
||||
$enforce_new_defaults = $facts['os_service_default'],
|
||||
Hash $policies = {},
|
||||
$policy_path = '/etc/murano/policy.yaml',
|
||||
$policy_default_rule = $facts['os_service_default'],
|
||||
$policy_dirs = $facts['os_service_default'],
|
||||
Boolean $purge_config = false,
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
include murano::params
|
||||
|
||||
$policy_parameters = {
|
||||
policies => $policies,
|
||||
policy_path => $policy_path,
|
||||
file_user => 'root',
|
||||
file_group => $::murano::params::group,
|
||||
file_format => 'yaml',
|
||||
purge_config => $purge_config,
|
||||
tag => 'murano',
|
||||
}
|
||||
|
||||
create_resources('openstacklib::policy', { $policy_path => $policy_parameters })
|
||||
|
||||
oslo::policy { 'murano_config':
|
||||
enforce_scope => $enforce_scope,
|
||||
enforce_new_defaults => $enforce_new_defaults,
|
||||
policy_file => $policy_path,
|
||||
policy_default_rule => $policy_default_rule,
|
||||
policy_dirs => $policy_dirs,
|
||||
}
|
||||
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
{
|
||||
"author": "Red Hat and OpenStack Contributors",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "puppetlabs/inifile",
|
||||
"version_requirement": ">=2.0.0 <7.0.0"
|
||||
},
|
||||
{
|
||||
"name": "openstack/keystone",
|
||||
"version_requirement": ">=23.0.0 <24.0.0"
|
||||
},
|
||||
{
|
||||
"name": "puppetlabs/stdlib",
|
||||
"version_requirement": ">=5.0.0 <10.0.0"
|
||||
},
|
||||
{
|
||||
"name": "openstack/openstacklib",
|
||||
"version_requirement": ">=23.0.0 <24.0.0"
|
||||
},
|
||||
{
|
||||
"name": "openstack/oslo",
|
||||
"version_requirement": ">=23.0.0 <24.0.0"
|
||||
}
|
||||
],
|
||||
"description": "Installs and configures OpenStack Murano (Application Catalog).",
|
||||
"issues_url": "https://bugs.launchpad.net/puppet-murano",
|
||||
"license": "Apache-2.0",
|
||||
"name": "openstack-murano",
|
||||
"operatingsystem_support": [
|
||||
{
|
||||
"operatingsystem": "Debian",
|
||||
"operatingsystemrelease": [
|
||||
"12"
|
||||
]
|
||||
},
|
||||
{
|
||||
"operatingsystem": "RedHat",
|
||||
"operatingsystemrelease": [
|
||||
"9"
|
||||
]
|
||||
},
|
||||
{
|
||||
"operatingsystem": "CentOS",
|
||||
"operatingsystemrelease": [
|
||||
"9"
|
||||
]
|
||||
},
|
||||
{
|
||||
"operatingsystem": "Ubuntu",
|
||||
"operatingsystemrelease": [
|
||||
"22.04"
|
||||
]
|
||||
}
|
||||
],
|
||||
"project_page": "https://launchpad.net/puppet-murano",
|
||||
"requirements": [
|
||||
{
|
||||
"name": "puppet",
|
||||
"version_requirement": ">= 7.0.0 < 8.0.0"
|
||||
}
|
||||
],
|
||||
"source": "https://opendev.org/openstack/puppet-murano.git",
|
||||
"summary": "Puppet module for OpenStack Murano",
|
||||
"version": "23.0.0"
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Add the log_file option for logging.
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Keystone API v2.0 has been removed and we need to add domain parameters to
|
||||
keystone_authtoken section so that it works with API v3. New parameters have
|
||||
been added to murano class, user_domain_name and project_domain_name.
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adds the pool_timeout option for configuring oslo.db. This will
|
||||
configure this value for pool_timeout with SQLAlchemy.
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adds the use_journal option for configuring oslo.log. This will enable
|
||||
passing the logs to journald.
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- Add new parameter "workers" for api, the number of murano-api workers.
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- Adds db_sync_timeout parameter to db sync.
|
@ -1,7 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- Add new parameter "control_exchange", the default exchange under
|
||||
which topics are scoped. May be overridden by an exchange name
|
||||
specified in the transport_url option.
|
||||
- Add new parameter "rpc_response_timeout", seconds to wait for a
|
||||
response from a call
|
@ -1,7 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- Add new parameter "notification_transport_url", A URL
|
||||
representing the messaging driver to use for notifications
|
||||
and its full configuration.
|
||||
- Add new parameter "notification_topics", AMQP topic used for
|
||||
OpenStack notifications.
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Add mysql_enable_ndb parameter to select mysql storage engine.
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- Add new parameter "service_url" to override the murano-api url setting.
|
||||
Because when loadbalancer in front of murano-api terminates SSL, the murano
|
||||
api url should be with https while use_ssl is false.
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``murano::logging::watch_log_file`` parameter has been added.
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
fixes:
|
||||
- Change default admin_user and admin_tenant_name.
|
||||
To match with other modules change admin_user to murano and admin_tenant_name to
|
||||
service.
|
@ -1,19 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``murano::keystone::authtoken`` class has been added.
|
||||
|
||||
deprecations:
|
||||
- |
|
||||
The following parameters of the ``murano`` class have been deprecated and
|
||||
will be removed in a future release. The ``murano::keystone::authtoken``
|
||||
should be used instead.
|
||||
|
||||
- ``www_authenticate_uri``
|
||||
- ``identity_uri``
|
||||
- ``admin_user``
|
||||
- ``admin_password``
|
||||
- ``admin_tenant_name``
|
||||
- ``user_domain_name``
|
||||
- ``project_domain_name``
|
||||
- ``memcached_servers``
|
@ -1,14 +0,0 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
The following parameters of the ``murano`` class have been removed.
|
||||
|
||||
- ``www_authenticate_uri``
|
||||
- ``identity_uri``
|
||||
- ``admin_user``
|
||||
- ``admin_password``
|
||||
- ``admin_tenant_name``
|
||||
- ``user_domain_name``
|
||||
- ``project_domain_name``
|
||||
- ``memcached_servers``
|
||||
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Now this module supports CentOS 9 and Red Hat Enterprise Linux 9.
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``murano::keystone::cfapi_authtoken`` class has been added.
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- Add ability to deploy Murano CloudFoundry service broker API.
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- Add ability to configure dashboard log handler
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- Add ability to set configure_user and configure_user_role
|
||||
parameters in murano::keystone::auth and murano::keystone::cfapi_auth
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- Add ability to configure dashboard label
|
@ -1,12 +0,0 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The following parameters of the ``murano`` class have been deprecate. Use
|
||||
the ``murano::db`` class parameters.
|
||||
|
||||
- ``database_connection``
|
||||
- ``database_idle_timeout``
|
||||
- ``database_max_pool_size``
|
||||
- ``database_max_retries``
|
||||
- ``database_retry_interval``
|
||||
- ``database_max_overflow``
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``murano::application`` defined resource type has been deprecated and
|
||||
will be removed in a future release. Use the ``murano_application``
|
||||
resource type instead.
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``murano::db_cfapi::connection_recycle_time`` parameter has been
|
||||
added.
|
||||
|
||||
deprecations:
|
||||
- |
|
||||
The ``murano::db_cfapi::database_idle_timeout`` parameter has been
|
||||
deprecated. The parameter has had no effect since the same parameter
|
||||
in puppet-oslo was deprecated.
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
murano::auth_uri is deprecated and will be removed in a future release.
|
||||
Please use www_authenticate_uri instead.
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
deprecations:
|
||||
- database_min_pool_size option is now deprecated for removal, the
|
||||
parameter has no effect.
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
deprecations:
|
||||
- database_idle_timeout is deprecated and will be removed in a future
|
||||
release. Please use database_connection_recycle_time instead.
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
deprecations:
|
||||
- signing_dir option is now deprecated for removal, the
|
||||
parameter has no effect.
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Fedora is no longer supported.
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
other:
|
||||
- Drop all Qpid support, it was removed from Oslo in Mitaka.
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
prelude: >
|
||||
Add hooks for external install & svc management.
|
||||
features:
|
||||
- This adds defined anchor points for external modules to
|
||||
hook into the software install, config and service dependency
|
||||
chain. This allows external modules to manage software
|
||||
installation (virtualenv, containers, etc) and service management
|
||||
(pacemaker) without needing rely on resources that may change or
|
||||
be renamed.
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
fixes:
|
||||
- Fixes `bug 1644699
|
||||
<https://bugs.launchpad.net/puppet-murano/+bug/1644699>`__ so
|
||||
we're able to correctly install murano client package in RedHat
|
||||
platforms.
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
fixes:
|
||||
- Fixed documentation for log_dir parameter
|
@ -1,8 +0,0 @@
|
||||
---
|
||||
fixes:
|
||||
- Murano application provider has problem with
|
||||
updating murano package importing, when new version
|
||||
is released. That was because of incorrect handling of
|
||||
'exists-action' option. Now, it has been moved into
|
||||
separate property, that will allow properly handle update
|
||||
if needed.
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
fixes:
|
||||
- Change 'use_neutron' to true. Use Neutron as Nova network is
|
||||
deprecated.
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- Add new options to communicate with Glare API.
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- Add dashboard parameter for filtering images by a given project ID.
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
fixes:
|
||||
- The keystone auth class has been updated to provide a default service_name
|
||||
to allow a user to specify a custom auth_name that may not contain the
|
||||
name of the service.
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
fixes:
|
||||
- Added the ability to manage the memcached servers
|
||||
for keystone_authtoken in murano
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- Use Keystone endpoint with version-less, to use Keystone v3 when available.
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Expose use_json logging parameter, which enables JSON formatted logging.
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Now policy.yaml is used by default instead of policy.json.
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- Murano CFAPI service configuration has been moved into
|
||||
separate config files (as main config file as paste ini).
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- Add separate db for Murano Service Broker, so we can use
|
||||
murano service broker independently.
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- Networking driver now explicitly set based on $use_neutron setting.
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- Add openstack-db tag to Exec that run db-sync.
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``murano::policy::enforce_scope`` parameter has been added to
|
||||
support the corresponding parameter in oslo.policy library.
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
There is now a new policy_dirs parameter in the murano::policy class,
|
||||
so one can set a custom path.
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``murano::policy::enforce_new_defaults`` parameter has been
|
||||
added.
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``murano::policy::policy_default_rule`` parameter has been added.
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adds new purge_config parameter. When set to true, the policy file is
|
||||
cleared during configuration process. This allows to remove any existing
|
||||
rules before applying them or clean the file when all policies got removed.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user