StarlingX open source release updates

Signed-off-by: Dean Troyer <dtroyer@gmail.com>
This commit is contained in:
Dean Troyer 2018-05-30 16:17:02 -07:00
parent 301e310b67
commit b975e477c9
242 changed files with 20066 additions and 0 deletions

View File

@ -0,0 +1,2 @@
Name: puppet-dcmanager
Version: 1.0.0

View File

@ -0,0 +1,3 @@
SRC_DIR="src"
COPY_LIST="$SRC_DIR/LICENSE"
TIS_PATCH_VER=1

View File

@ -0,0 +1,35 @@
%global module_dir dcmanager
Name: puppet-%{module_dir}
Version: 1.0.0
Release: %{tis_patch_ver}%{?_tis_dist}
Summary: Puppet dcmanager module
License: Apache
Packager: Wind River <info@windriver.com>
URL: unknown
Source0: %{name}-%{version}.tar.gz
Source1: LICENSE
BuildArch: noarch
BuildRequires: python2-devel
%description
A puppet module for dcmanager
%prep
%autosetup -c %{module_dir}
#
# The src for this puppet module needs to be staged to puppet/modules
#
%install
install -d -m 0755 %{buildroot}%{_datadir}/puppet/modules/%{module_dir}
cp -R %{name}-%{version}/%{module_dir} %{buildroot}%{_datadir}/puppet/modules
%files
%license %{name}-%{version}/LICENSE
%{_datadir}/puppet/modules/%{module_dir}

View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,19 @@
fixtures:
repositories:
"apt": "git://github.com/puppetlabs/puppetlabs-apt.git"
"keystone": "git://github.com/stackforge/puppet-keystone.git"
"mysql":
repo: "git://github.com/puppetlabs/puppetlabs-mysql.git"
ref: 'origin/0.x'
"stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git"
"sysctl": "git://github.com/duritong/puppet-sysctl.git"
"rabbitmq":
repo: "git://github.com/puppetlabs/puppetlabs-rabbitmq"
ref: 'origin/2.x'
"inifile": "git://github.com/puppetlabs/puppetlabs-inifile"
"qpid": "git://github.com/dprince/puppet-qpid.git"
'postgresql':
repo: "git://github.com/puppetlabs/puppet-postgresql.git"
ref: 'origin/4.1.x'
symlinks:
"dcmanager": "#{source_dir}"

View File

@ -0,0 +1,14 @@
source 'https://rubygems.org'
group :development, :test do
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', '~> 0.3.2'
end
if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false
else
gem 'puppet', :require => false
end
# vim:ft=ruby

View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,14 @@
name 'puppetlabs-dcmanager'
version '2.1.0'
source 'https://github.com/stackforge/puppet-dcmanager'
author 'Puppet Labs'
license 'Apache License 2.0'
summary 'Puppet Labs dcmanager Module'
description 'Puppet module to install and configure the dcmanager platform service'
project_page 'https://launchpad.net/puppet-openstack'
dependency 'puppetlabs/inifile', '>=1.0.0 <2.0.0'
dependency 'puppetlabs/mysql', '>=0.6.1 <1.0.0'
dependency 'puppetlabs/stdlib', '>=2.5.0'
dependency 'puppetlabs/rabbitmq', '>=2.0.2 <3.0.0'
dependency 'dprince/qpid', '>=1.0.0 <2.0.0'

View File

@ -0,0 +1,6 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_parameter_defaults')

View File

@ -0,0 +1,37 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Dec 2017 Creation based off puppet-sysinv
#
Puppet::Type.type(:dcmanager_config).provide(
:ini_setting,
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
) do
def section
resource[:name].split('/', 2).first
end
def setting
resource[:name].split('/', 2).last
end
def separator
'='
end
def self.file_path
'/etc/dcmanager/dcmanager.conf'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -0,0 +1,52 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Dec 2017 Creation based off puppet-sysinv
#
Puppet::Type.newtype(:dcmanager_config) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from /etc/dcmanager/dcmanager.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
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
end

View File

@ -0,0 +1,208 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# == Class: dcmanager::api
#
# Setup and configure the dcmanager API endpoint
#
# === Parameters
#
# [*keystone_password*]
# The password to use for authentication (keystone)
#
# [*keystone_enabled*]
# (optional) Use keystone for authentification
# Defaults to true
#
# [*keystone_tenant*]
# (optional) The tenant of the auth user
# Defaults to services
#
# [*keystone_user*]
# (optional) The name of the auth user
# Defaults to dcmanager
#
# [*keystone_auth_host*]
# (optional) The keystone host
# Defaults to localhost
#
# [*keystone_auth_port*]
# (optional) The keystone auth port
# Defaults to 5000
#
# [*keystone_auth_protocol*]
# (optional) The protocol used to access the auth host
# Defaults to http.
#
# [*keystone_auth_admin_prefix*]
# (optional) The admin_prefix used to admin endpoint of the auth host
# This allow admin auth URIs like http://auth_host:5000/keystone.
# (where '/keystone' is the admin prefix)
# Defaults to false for empty. If defined, should be a string with a
# leading '/' and no trailing '/'.
#
# [*keystone_user_domain*]
# (Optional) domain name for auth user.
# Defaults to 'Default'.
#
# [*keystone_project_domain*]
# (Optional) domain name for auth project.
# Defaults to 'Default'.
#
# [*auth_type*]
# (Optional) Authentication type to load.
# Defaults to 'password'.
#
# [*service_port*]
# (optional) The dcmanager api port
# Defaults to 5000
#
# [*package_ensure*]
# (optional) The state of the package
# Defaults to present
#
# [*bind_host*]
# (optional) The dcmanager api bind address
# Defaults to 0.0.0.0
#
# [*pxeboot_host*]
# (optional) The dcmanager api pxeboot address
# Defaults to undef
#
# [*enabled*]
# (optional) The state of the service
# Defaults to true
#
class dcmanager::api (
$keystone_password,
$keystone_admin_password,
$keystone_admin_user = 'admin',
$keystone_admin_tenant = 'admin',
$keystone_enabled = true,
$keystone_tenant = 'services',
$keystone_user = 'dcmanager',
$keystone_auth_host = 'localhost',
$keystone_auth_port = '5000',
$keystone_auth_protocol = 'http',
$keystone_auth_admin_prefix = false,
$keystone_auth_uri = false,
$keystone_auth_version = false,
$keystone_identity_uri = false,
$keystone_user_domain = 'Default',
$keystone_project_domain = 'Default',
$auth_type = 'password',
$service_port = '5000',
$package_ensure = 'latest',
$bind_host = '0.0.0.0',
$enabled = false
) {
include dcmanager::params
Dcmanager_config<||> ~> Service['dcmanager-api']
Dcmanager_config<||> ~> Exec['dcmanager-dbsync']
if $::dcmanager::params::api_package {
Package['dcmanager'] -> Dcmanager_config<||>
Package['dcmanager'] -> Service['dcmanager-api']
package { 'dcmanager':
ensure => $package_ensure,
name => $::dcmanager::params::api_package,
}
}
dcmanager_config {
"DEFAULT/bind_host": value => $bind_host;
}
if $keystone_identity_uri {
dcmanager_config { 'keystone_authtoken/auth_url': value => $keystone_identity_uri; }
dcmanager_config { 'cache/auth_uri': value => "${keystone_identity_uri}/v3"; }
} else {
dcmanager_config { 'keystone_authtoken/auth_url': value => "${keystone_auth_protocol}://${keystone_auth_host}:5000/v3"; }
}
if $keystone_auth_uri {
dcmanager_config { 'keystone_authtoken/auth_uri': value => $keystone_auth_uri; }
} else {
dcmanager_config {
'keystone_authtoken/auth_uri': value => "${keystone_auth_protocol}://${keystone_auth_host}:5000/v3";
}
}
if $keystone_auth_version {
dcmanager_config { 'keystone_authtoken/auth_version': value => $keystone_auth_version; }
} else {
dcmanager_config { 'keystone_authtoken/auth_version': ensure => absent; }
}
if $keystone_enabled {
dcmanager_config {
'DEFAULT/auth_strategy': value => 'keystone' ;
}
dcmanager_config {
'keystone_authtoken/auth_type': value => $auth_type;
'keystone_authtoken/project_name': value => $keystone_tenant;
'keystone_authtoken/username': value => $keystone_user;
'keystone_authtoken/password': value => $keystone_password, secret=> true;
'keystone_authtoken/user_domain_name': value => $keystone_user_domain;
'keystone_authtoken/project_domain_name': value => $keystone_project_domain;
}
dcmanager_config {
'cache/admin_tenant': value => $keystone_admin_tenant;
'cache/admin_username': value => $keystone_admin_user;
'cache/admin_password': value => $keystone_admin_password, secret=> true;
}
if $keystone_auth_admin_prefix {
validate_re($keystone_auth_admin_prefix, '^(/.+[^/])?$')
dcmanager_config {
'keystone_authtoken/auth_admin_prefix': value => $keystone_auth_admin_prefix;
}
} else {
dcmanager_config {
'keystone_authtoken/auth_admin_prefix': ensure => absent;
}
}
}
else
{
dcmanager_config {
'DEFAULT/auth_strategy': value => 'noauth' ;
}
}
if $enabled {
$ensure = 'running'
} else {
$ensure = 'stopped'
}
service { 'dcmanager-api':
ensure => $ensure,
name => $::dcmanager::params::api_service,
enable => $enabled,
hasstatus => true,
hasrestart => true,
tag => 'dcmanager-service',
}
Keystone_endpoint<||> -> Service['dcmanager-api']
exec { 'dcmanager-dbsync':
command => $::dcmanager::params::db_sync_command,
path => '/usr/bin',
refreshonly => true,
logoutput => 'on_failure',
require => Package['dcmanager'],
# Only do the db sync if both controllers are running the same software
# version. Avoids impacting mate controller during an upgrade.
onlyif => "test $::controller_sw_versions_match = true",
}
}

View File

@ -0,0 +1,30 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Dec 2017 Creation based off puppet-sysinv
#
# == Class: dcmanager::client
#
# Installs Dcmanager python client.
#
# === Parameters
#
# [*ensure*]
# Ensure state for package. Defaults to 'present'.
#
class dcmanager::client(
$package_ensure = 'present'
) {
include dcmanager::params
package { 'dcmanagerclient':
ensure => $package_ensure,
name => $::dcmanager::params::client_package,
}
}

View File

@ -0,0 +1,54 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Dec 2017 Creation based off puppet-sysinv
#
# Class that configures postgresql for dcmanager
#
# Requires the Puppetlabs postgresql module.
# === Parameters
#
# [*password*]
# (Required) Password to connect to the database.
#
# [*dbname*]
# (Optional) Name of the database.
# Defaults to 'dcmanager'.
#
# [*user*]
# (Optional) User to connect to the database.
# Defaults to 'dcmanager'.
#
# [*encoding*]
# (Optional) The charset to use for the database.
# Default to undef.
#
# [*privileges*]
# (Optional) Privileges given to the database user.
# Default to 'ALL'
#
class dcmanager::db::postgresql(
$password,
$dbname = 'dcmanager',
$user = 'dcmanager',
$encoding = undef,
$privileges = 'ALL',
) {
::openstacklib::db::postgresql { 'dcmanager':
password_hash => postgresql_password($user, $password),
dbname => $dbname,
user => $user,
encoding => $encoding,
privileges => $privileges,
}
::Openstacklib::Db::Postgresql['dcmanager'] ~> Service <| title == 'dcmanager-api' |>
::Openstacklib::Db::Postgresql['dcmanager'] ~> Service <| title == 'dcmanager-manager' |>
::Openstacklib::Db::Postgresql['dcmanager'] ~> Exec <| title == 'dcmanager-dbsync' |>
}

View File

@ -0,0 +1,21 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
#
class dcmanager::db::sync {
include dcmanager::params
exec { 'dcmanager-dbsync':
command => $::dcmanager::params::db_sync_command,
path => '/usr/bin',
refreshonly => true,
require => [File[$::dcmanager::params::dcmanager_conf], Class['dcmanager']],
logoutput => 'on_failure',
}
}

View File

@ -0,0 +1,110 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Dec 2017 Creation based off puppet-sysinv
#
#
# == Parameters
#
# [use_syslog]
# Use syslog for logging.
# (Optional) Defaults to false.
#
# [log_facility]
# Syslog facility to receive log lines.
# (Optional) Defaults to LOG_USER.
class dcmanager (
$database_connection = '',
$database_idle_timeout = 3600,
$database_max_pool_size = 5,
$database_max_overflow = 10,
$control_exchange = 'openstack',
$rabbit_host = '127.0.0.1',
$rabbit_port = 5672,
$rabbit_hosts = false,
$rabbit_virtual_host = '/',
$rabbit_userid = 'guest',
$rabbit_password = false,
$package_ensure = 'present',
$use_stderr = false,
$log_file = 'dcmanager.log',
$log_dir = '/var/log/dcmanager',
$use_syslog = false,
$log_facility = 'LOG_USER',
$verbose = false,
$debug = false,
$dcmanager_api_port = 8119,
$dcmanager_mtc_inv_label = '/v1/',
$region_name = 'RegionOne',
) {
include dcmanager::params
Package['dcmanager'] -> Dcmanager_config<||>
# this anchor is used to simplify the graph between dcmanager components by
# allowing a resource to serve as a point where the configuration of dcmanager begins
anchor { 'dcmanager-start': }
package { 'dcmanager':
ensure => $package_ensure,
name => $::dcmanager::params::package_name,
require => Anchor['dcmanager-start'],
}
file { $::dcmanager::params::dcmanager_conf:
ensure => present,
mode => '0600',
require => Package['dcmanager'],
}
dcmanager_config {
'DEFAULT/transport_url': value => $::platform::amqp::params::transport_url;
}
dcmanager_config {
'DEFAULT/verbose': value => $verbose;
'DEFAULT/debug': value => $debug;
}
# Automatically add psycopg2 driver to postgresql (only does this if it is missing)
$real_connection = regsubst($database_connection,'^postgresql:','postgresql+psycopg2:')
dcmanager_config {
'database/connection': value => $real_connection, secret => true;
'database/idle_timeout': value => $database_idle_timeout;
'database/max_pool_size': value => $database_max_pool_size;
'database/max_overflow': value => $database_max_overflow;
}
if $use_syslog {
dcmanager_config {
'DEFAULT/use_syslog': value => true;
'DEFAULT/syslog_log_facility': value => $log_facility;
}
} else {
dcmanager_config {
'DEFAULT/use_syslog': value => false;
'DEFAULT/use_stderr': value => false;
'DEFAULT/log_file' : value => $log_file;
'DEFAULT/log_dir' : value => $log_dir;
}
}
dcmanager_config {
'keystone_authtoken/region_name': value => $region_name;
}
file {"/etc/bash_completion.d/dcmanager.bash_completion":
ensure => present,
mode => '0644',
content => generate('/bin/dcmanager', 'complete'),
}
}

View File

@ -0,0 +1,61 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# DEC 2017: creation
#
# == Class: dcmanager::keystone::auth
#
# Configures dcmanager user, service and endpoint in Keystone.
#
class dcmanager::keystone::auth (
$password,
$auth_name = 'dcmanager',
$auth_domain,
$email = 'dcmanager@localhost',
$tenant = 'services',
$region = 'SystemController',
$service_description = 'DCManagerService',
$service_name = undef,
$service_type = 'dcmanager',
$configure_endpoint = true,
$configure_user = true,
$configure_user_role = true,
$public_url = 'http://127.0.0.1:8119/v1',
$admin_url = 'http://127.0.0.1:8119/v1',
$internal_url = 'http://127.0.0.1:8119/v1',
$admin_project_name,
$admin_project_domain,
) {
$real_service_name = pick($service_name, $auth_name)
keystone::resource::service_identity { 'dcmanager':
configure_user => $configure_user,
configure_user_role => $configure_user_role,
configure_endpoint => $configure_endpoint,
service_type => $service_type,
service_description => $service_description,
service_name => $real_service_name,
region => $region,
auth_name => $auth_name,
password => $password,
email => $email,
tenant => $tenant,
public_url => $public_url,
admin_url => $admin_url,
internal_url => $internal_url,
} ->
keystone_user_role { "${auth_name}@${admin_project_name}":
ensure => present,
user_domain => $auth_domain,
project_domain => $admin_project_domain,
roles => ['admin'],
}
}

View File

@ -0,0 +1,44 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Dec 2017 Creation based off puppet-sysinv
#
class dcmanager::manager (
$package_ensure = 'latest',
$enabled = false
) {
include dcmanager::params
Dcmanager_config<||> ~> Service['dcmanager-manager']
if $::dcmanager::params::manager_package {
Package['dcmanager-manager'] -> Dcmanager_config<||>
Package['dcmanager-manager'] -> Service['dcmanager-manager']
package { 'dcmanager-manager':
ensure => $package_ensure,
name => $::dcmanager::params::manager_package,
}
}
if $enabled {
$ensure = 'running'
} else {
$ensure = 'stopped'
}
service { 'dcmanager-manager':
ensure => $ensure,
name => $::dcmanager::params::manager_service,
enable => $enabled,
hasstatus => false,
require => Package['dcmanager'],
}
Exec<| title == 'dcmanager-dbsync' |> -> Service['dcmanager-manager']
}

View File

@ -0,0 +1,47 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
#
class dcmanager::params {
$dcmanager_dir = '/etc/dcmanager'
$dcmanager_conf = '/etc/dcmanager/dcmanager.conf'
if $::osfamily == 'Debian' {
$package_name = 'distributedcloud-dcmanager'
$client_package = 'distributedcloud-client-dcmanagerclient'
$api_package = 'distributedcloud-dcmanager'
$api_service = 'dcmanager-api'
$manager_package = 'distributedcloud-dcmanager'
$manager_service = 'dcmanager-manager'
$db_sync_command = 'dcmanager-manage db_sync'
} elsif($::osfamily == 'RedHat') {
$package_name = 'distributedcloud-dcmanager'
$client_package = 'distributedcloud-client-dcmanagerclient'
$api_package = false
$api_service = 'dcmanager-api'
$manager_package = false
$manager_service = 'dcmanager-manager'
$db_sync_command = 'dcmanager-manage db_sync'
} elsif($::osfamily == 'WRLinux') {
$package_name = 'dcmanager'
$client_package = 'distributedcloud-client-dcmanagerclient'
$api_package = false
$api_service = 'dcmanager-api'
$manager_package = false
$manager_service = 'dcmanager-manager'
$db_sync_command = 'dcmanager-manage db_sync'
} else {
fail("unsuported osfamily ${::osfamily}, currently WindRiver, Debian, Redhat are the only supported platforms")
}
}

View File

@ -0,0 +1,60 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Dec 2018: creation -lplant
#
# class for installing rabbitmq server for dcorch
#
#
class dcmanager::rabbitmq(
$userid = 'guest',
$password = 'guest',
$port = '5672',
$virtual_host = '/',
$enabled = true
) {
# only configure dcmanager after the queue is up
Class['rabbitmq::service'] -> Anchor<| title == 'dcmanager-start' |>
if ($enabled) {
if $userid == 'guest' {
$delete_guest_user = false
} else {
$delete_guest_user = true
rabbitmq_user { $userid:
admin => true,
password => $password,
provider => 'rabbitmqctl',
require => Class['rabbitmq::server'],
}
# I need to figure out the appropriate permissions
rabbitmq_user_permissions { "${userid}@${virtual_host}":
configure_permission => '.*',
write_permission => '.*',
read_permission => '.*',
provider => 'rabbitmqctl',
}->Anchor<| title == 'dcmanager-start' |>
}
$service_ensure = 'running'
} else {
$service_ensure = 'stopped'
}
class { '::rabbitmq::server':
service_ensure => $service_ensure,
port => $port,
delete_guest_user => $delete_guest_user,
}
if ($enabled) {
rabbitmq_vhost { $virtual_host:
provider => 'rabbitmqctl',
require => Class['rabbitmq::server'],
}
}
}

View File

@ -0,0 +1,2 @@
Name: puppet-dcorch
Version: 1.0.0

View File

@ -0,0 +1,3 @@
SRC_DIR="src"
COPY_LIST="$SRC_DIR/LICENSE"
TIS_PATCH_VER=1

View File

@ -0,0 +1,35 @@
%global module_dir dcorch
Name: puppet-%{module_dir}
Version: 1.0.0
Release: %{tis_patch_ver}%{?_tis_dist}
Summary: Puppet dcorch module
License: Apache
Packager: Wind River <info@windriver.com>
URL: unknown
Source0: %{name}-%{version}.tar.gz
Source1: LICENSE
BuildArch: noarch
BuildRequires: python2-devel
%description
A puppet module for dcorch
%prep
%autosetup -c %{module_dir}
#
# The src for this puppet module needs to be staged to puppet/modules
#
%install
install -d -m 0755 %{buildroot}%{_datadir}/puppet/modules/%{module_dir}
cp -R %{name}-%{version}/%{module_dir} %{buildroot}%{_datadir}/puppet/modules
%files
%license %{name}-%{version}/LICENSE
%{_datadir}/puppet/modules/%{module_dir}

View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,19 @@
fixtures:
repositories:
"apt": "git://github.com/puppetlabs/puppetlabs-apt.git"
"keystone": "git://github.com/stackforge/puppet-keystone.git"
"mysql":
repo: "git://github.com/puppetlabs/puppetlabs-mysql.git"
ref: 'origin/0.x'
"stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git"
"sysctl": "git://github.com/duritong/puppet-sysctl.git"
"rabbitmq":
repo: "git://github.com/puppetlabs/puppetlabs-rabbitmq"
ref: 'origin/2.x'
"inifile": "git://github.com/puppetlabs/puppetlabs-inifile"
"qpid": "git://github.com/dprince/puppet-qpid.git"
'postgresql':
repo: "git://github.com/puppetlabs/puppet-postgresql.git"
ref: 'origin/4.1.x'
symlinks:
"dcorch": "#{source_dir}"

View File

@ -0,0 +1,14 @@
source 'https://rubygems.org'
group :development, :test do
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', '~> 0.3.2'
end
if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false
else
gem 'puppet', :require => false
end
# vim:ft=ruby

View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,14 @@
name 'puppetlabs-dcorch'
version '2.1.0'
source 'https://github.com/stackforge/puppet-dcorch'
author 'Puppet Labs'
license 'Apache License 2.0'
summary 'Puppet Labs dcorch Module'
description 'Puppet module to install and configure the dcorch platform service'
project_page 'https://launchpad.net/puppet-openstack'
dependency 'puppetlabs/inifile', '>=1.0.0 <2.0.0'
dependency 'puppetlabs/mysql', '>=0.6.1 <1.0.0'
dependency 'puppetlabs/stdlib', '>=2.5.0'
dependency 'puppetlabs/rabbitmq', '>=2.0.2 <3.0.0'
dependency 'dprince/qpid', '>=1.0.0 <2.0.0'

View File

@ -0,0 +1,6 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_parameter_defaults')

View File

@ -0,0 +1,37 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Dec 2017 Creation based off puppet-sysinv
#
Puppet::Type.type(:dcorch_api_paste_ini).provide(
:ini_setting,
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
) do
def section
resource[:name].split('/', 2).first
end
def setting
resource[:name].split('/', 2).last
end
def separator
'='
end
def self.file_path
'/etc/dcorch/api-paste.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -0,0 +1,37 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Dec 2017 Creation based off puppet-sysinv
#
Puppet::Type.type(:dcorch_config).provide(
:ini_setting,
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
) do
def section
resource[:name].split('/', 2).first
end
def setting
resource[:name].split('/', 2).last
end
def separator
'='
end
def self.file_path
'/etc/dcorch/dcorch.conf'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -0,0 +1,52 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Dec 2017 Creation based off puppet-sysinv
#
Puppet::Type.newtype(:dcorch_api_paste_ini) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from /etc/dcorch/api-paste.ini'
newvalues(/\S+\/\S+/)
end
newproperty(:value) do
desc 'The value of the setting to be defined.'
munge do |value|
value = value.to_s.strip
value.capitalize! if value =~ /^(true|false)$/i
value
end
def is_to_s( currentvalue )
if resource.secret?
return '[old secret redacted]'
else
return currentvalue
end
end
def should_to_s( newvalue )
if resource.secret?
return '[new secret redacted]'
else
return newvalue
end
end
end
newparam(:secret, :boolean => true) do
desc 'Whether to hide the value from Puppet logs. Defaults to `false`.'
newvalues(:true, :false)
defaultto false
end
end

View File

@ -0,0 +1,52 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Dec 2017 Creation based off puppet-sysinv
#
Puppet::Type.newtype(:dcorch_config) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from /etc/dcorch/dcorch.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
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
end

View File

@ -0,0 +1,210 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# == Class: dcorch::api_proxy
#
# Setup and configure the dcorch API endpoint
#
# === Parameters
#
# [*keystone_password*]
# The password to use for authentication (keystone)
#
# [*keystone_enabled*]
# (optional) Use keystone for authentification
# Defaults to true
#
# [*keystone_tenant*]
# (optional) The tenant of the auth user
# Defaults to services
#
# [*keystone_user*]
# (optional) The name of the auth user
# Defaults to dcorch
#
# [*keystone_auth_host*]
# (optional) The keystone host
# Defaults to localhost
#
# [*keystone_auth_port*]
# (optional) The keystone auth port
# Defaults to 5000
#
# [*keystone_auth_protocol*]
# (optional) The protocol used to access the auth host
# Defaults to http.
#
# [*keystone_auth_admin_prefix*]
# (optional) The admin_prefix used to admin endpoint of the auth host
# This allow admin auth URIs like http://auth_host:5000/keystone.
# (where '/keystone' is the admin prefix)
# Defaults to false for empty. If defined, should be a string with a
# leading '/' and no trailing '/'.
#
# [*keystone_user_domain*]
# (Optional) domain name for auth user.
# Defaults to 'Default'.
#
# [*keystone_project_domain*]
# (Optional) domain name for auth project.
# Defaults to 'Default'.
#
# [*auth_type*]
# (Optional) Authentication type to load.
# Defaults to 'password'.
#
# [*service_port*]
# (optional) The dcorch api port
# Defaults to 5000
#
# [*package_ensure*]
# (optional) The state of the package
# Defaults to present
#
# [*bind_host*]
# (optional) The dcorch api bind address
# Defaults to 0.0.0.0
#
# [*pxeboot_host*]
# (optional) The dcorch api pxeboot address
# Defaults to undef
#
# [*enabled*]
# (optional) The state of the service
# Defaults to true
#
class dcorch::api_proxy (
$keystone_password,
$keystone_admin_password,
$keystone_admin_user = 'admin',
$keystone_admin_tenant = 'admin',
$keystone_enabled = true,
$keystone_tenant = 'services',
$keystone_user = 'dcorch',
$keystone_auth_host = 'localhost',
$keystone_auth_port = '5000',
$keystone_auth_protocol = 'http',
$keystone_auth_admin_prefix = false,
$keystone_auth_uri = false,
$keystone_auth_version = false,
$keystone_identity_uri = false,
$keystone_user_domain = 'Default',
$keystone_project_domain = 'Default',
$auth_type = 'password',
$service_port = '5000',
$package_ensure = 'latest',
$bind_host = '0.0.0.0',
$enabled = false
) {
include dcorch::params
Dcorch_config<||> ~> Service['dcorch-api-proxy']
Dcorch_config<||> ~> Exec['dcorch-dbsync']
Dcorch_api_paste_ini<||> ~> Service['dcorch-api-proxy']
if $::dcorch::params::api_package {
Package['dcorch'] -> Dcorch_config<||>
Package['dcorch'] -> Dcorch_api_paste_ini<||>
Package['dcorch'] -> Service['dcorch-api-proxy']
package { 'dcorch':
ensure => $package_ensure,
name => $::dcorch::params::api_proxy_package,
}
}
dcorch_config {
"DEFAULT/bind_host": value => $bind_host;
}
if $keystone_identity_uri {
dcorch_config { 'keystone_authtoken/auth_url': value => $keystone_identity_uri; }
dcorch_config { 'cache/auth_uri': value => "${keystone_identity_uri}/v3"; }
} else {
dcorch_config { 'keystone_authtoken/auth_url': value => "${keystone_auth_protocol}://${keystone_auth_host}:5000/"; }
}
if $keystone_auth_uri {
dcorch_config { 'keystone_authtoken/auth_uri': value => $keystone_auth_uri; }
} else {
dcorch_config {
'keystone_authtoken/auth_uri': value => "${keystone_auth_protocol}://${keystone_auth_host}:5000/";
}
}
if $keystone_auth_version {
dcorch_config { 'keystone_authtoken/auth_version': value => $keystone_auth_version; }
} else {
dcorch_config { 'keystone_authtoken/auth_version': ensure => absent; }
}
if $keystone_enabled {
dcorch_config {
'DEFAULT/auth_strategy': value => 'keystone' ;
}
dcorch_config {
'keystone_authtoken/auth_type': value => $auth_type;
'keystone_authtoken/project_name': value => $keystone_tenant;
'keystone_authtoken/username': value => $keystone_user;
'keystone_authtoken/password': value => $keystone_password, secret=> true;
'keystone_authtoken/user_domain_name': value => $keystone_user_domain;
'keystone_authtoken/project_domain_name': value => $keystone_project_domain;
}
dcorch_config {
'cache/admin_tenant': value => $keystone_admin_tenant;
'cache/admin_username': value => $keystone_admin_user;
'cache/admin_password': value => $keystone_admin_password, secret=> true;
}
if $keystone_auth_admin_prefix {
validate_re($keystone_auth_admin_prefix, '^(/.+[^/])?$')
dcorch_config {
'keystone_authtoken/auth_admin_prefix': value => $keystone_auth_admin_prefix;
}
} else {
dcorch_config {
'keystone_authtoken/auth_admin_prefix': ensure => absent;
}
}
}
else
{
dcorch_config {
'DEFAULT/auth_strategy': value => 'noauth' ;
}
}
if $enabled {
$ensure = 'running'
} else {
$ensure = 'stopped'
}
service { 'dcorch-api-proxy':
ensure => $ensure,
name => $::dcorch::params::api_proxy_service,
enable => $enabled,
hasstatus => true,
hasrestart => true,
tag => 'dcorch-service',
}
Keystone_endpoint<||> -> Service['dcorch-api-proxy']
exec { 'dcorch-dbsync':
command => $::dcorch::params::db_sync_command,
path => '/usr/bin',
refreshonly => true,
logoutput => 'on_failure',
require => Package['dcorch'],
# Only do the db sync if both controllers are running the same software
# version. Avoids impacting mate controller during an upgrade.
onlyif => "test $::controller_sw_versions_match = true",
}
}

View File

@ -0,0 +1,31 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Dec 2017 Creation based off puppet-sysinv
#
#
# == Class: dcorch::client
#
# Installs dcorch python client.
#
# === Parameters
#
# [*ensure*]
# Ensure state for package. Defaults to 'present'.
#
class dcorch::client(
$package_ensure = 'present'
) {
include dcorch::params
package { 'dcorchclient':
ensure => $package_ensure,
name => $::dcorch::params::client_package,
}
}

View File

@ -0,0 +1,54 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Dec 2017 Creation based off puppet-sysinv
#
# Class that configures postgresql for dcorch
#
# Requires the Puppetlabs postgresql module.
# === Parameters
#
# [*password*]
# (Required) Password to connect to the database.
#
# [*dbname*]
# (Optional) Name of the database.
# Defaults to 'dcorch'.
#
# [*user*]
# (Optional) User to connect to the database.
# Defaults to 'dcorch'.
#
# [*encoding*]
# (Optional) The charset to use for the database.
# Default to undef.
#
# [*privileges*]
# (Optional) Privileges given to the database user.
# Default to 'ALL'
#
class dcorch::db::postgresql(
$password,
$dbname = 'dcorch',
$user = 'dcorch',
$encoding = undef,
$privileges = 'ALL',
) {
::openstacklib::db::postgresql { 'dcorch':
password_hash => postgresql_password($user, $password),
dbname => $dbname,
user => $user,
encoding => $encoding,
privileges => $privileges,
}
::Openstacklib::Db::Postgresql['dcorch'] ~> Service <| title == 'dcorch-api-proxy' |>
::Openstacklib::Db::Postgresql['dcorch'] ~> Service <| title == 'dcorch-engine' |>
::Openstacklib::Db::Postgresql['dcorch'] ~> Exec <| title == 'dcorch-dbsync' |>
}

View File

@ -0,0 +1,21 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
#
class dcorch::db::sync {
include dcorch::params
exec { 'dcorch-dbsync':
command => $::dcorch::params::db_sync_command,
path => '/usr/bin',
refreshonly => true,
require => [File[$::dcorch::params::dcorch_conf], Class['dcorch']],
logoutput => 'on_failure',
}
}

View File

@ -0,0 +1,44 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Dec 2017 Creation based off puppet-sysinv
#
class dcorch::engine (
$package_ensure = 'latest',
$enabled = false
) {
include dcorch::params
Dcorch_config<||> ~> Service['dcorch-engine']
if $::dcorch::params::engine_package {
Package['dcorch-engine'] -> Dcorch_config<||>
Package['dcorch-engine'] -> Service['dcorch-engine']
package { 'dcorch-engine':
ensure => $package_ensure,
name => $::dcorch::params::engine_package,
}
}
if $enabled {
$ensure = 'running'
} else {
$ensure = 'stopped'
}
service { 'dcorch-engine':
ensure => $ensure,
name => $::dcorch::params::engine_service,
enable => $enabled,
hasstatus => false,
require => Package['dcorch'],
}
Exec<| title == 'dcorch-dbsync' |> -> Service['dcorch-engine']
}

View File

@ -0,0 +1,158 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Dec 2017 Creation based off puppet-sysinv
#
#
# == Parameters
#
# [use_syslog]
# Use syslog for logging.
# (Optional) Defaults to false.
#
# [log_facility]
# Syslog facility to receive log lines.
# (Optional) Defaults to LOG_USER.
class dcorch (
$database_connection = '',
$database_idle_timeout = 3600,
$database_max_pool_size = 5,
$database_max_overflow = 10,
$control_exchange = 'openstack',
$rabbit_host = '127.0.0.1',
$rabbit_port = 5672,
$rabbit_hosts = false,
$rabbit_virtual_host = '/',
$rabbit_userid = 'guest',
$rabbit_password = false,
$package_ensure = 'present',
$api_paste_config = '/etc/dcorch/api-paste.ini',
$use_stderr = false,
$log_file = 'dcorch.log',
$log_dir = '/var/log/dcorch',
$use_syslog = false,
$log_facility = 'LOG_USER',
$verbose = false,
$debug = false,
$dcorch_api_port = 8118,
$dcorch_mtc_inv_label = '/v1/',
$region_name = 'RegionOne',
$proxy_bind_host = '0.0.0.0',
$proxy_remote_host = '127.0.0.1',
$compute_bind_port = 28774,
$compute_remote_port = 18774,
$platform_bind_port = 26385,
$platform_remote_port = 6385,
$volumev2_bind_port = 28776,
$volumev2_remote_port = 8776,
$network_bind_port = 29696,
$network_remote_port = 9696,
$patching_bind_port = 25491,
$patching_remote_port = 5491,
) {
include dcorch::params
Package['dcorch'] -> Dcorch_config<||>
Package['dcorch'] -> Dcorch_api_paste_ini<||>
# this anchor is used to simplify the graph between dcorch components by
# allowing a resource to serve as a point where the configuration of dcorch begins
anchor { 'dcorch-start': }
package { 'dcorch':
ensure => $package_ensure,
name => $::dcorch::params::package_name,
require => Anchor['dcorch-start'],
}
file { $::dcorch::params::dcorch_conf:
ensure => present,
mode => '0600',
require => Package['dcorch'],
}
file { $::dcorch::params::dcorch_paste_api_ini:
ensure => present,
mode => '0600',
require => Package['dcorch'],
}
dcorch_config {
'DEFAULT/transport_url': value => $::platform::amqp::params::transport_url;
}
dcorch_config {
'DEFAULT/verbose': value => $verbose;
'DEFAULT/debug': value => $debug;
'DEFAULT/api_paste_config': value => $api_paste_config;
}
# Automatically add psycopg2 driver to postgresql (only does this if it is missing)
$real_connection = regsubst($database_connection,'^postgresql:','postgresql+psycopg2:')
dcorch_config {
'database/connection': value => $real_connection, secret => true;
'database/idle_timeout': value => $database_idle_timeout;
'database/max_pool_size': value => $database_max_pool_size;
'database/max_overflow': value => $database_max_overflow;
}
if $use_syslog {
dcorch_config {
'DEFAULT/use_syslog': value => true;
'DEFAULT/syslog_log_facility': value => $log_facility;
}
} else {
dcorch_config {
'DEFAULT/use_syslog': value => false;
'DEFAULT/use_stderr': value => false;
'DEFAULT/log_file' : value => $log_file;
'DEFAULT/log_dir' : value => $log_dir;
}
}
dcorch_config {
'keystone_authtoken/region_name': value => $region_name;
}
dcorch_config {
'compute/bind_host' : value => $proxy_bind_host;
'compute/bind_port' : value => $compute_bind_port;
'compute/remote_host' : value => $proxy_remote_host;
'compute/remote_port' : value => $compute_remote_port;
'platform/bind_host' : value => $proxy_bind_host;
'platform/bind_port' : value => $platform_bind_port;
'platform/remote_host' : value => $proxy_remote_host;
'platform/remote_port' : value => $platform_remote_port;
'volume/bind_host' : value => $proxy_bind_host;
'volume/bind_port' : value => $volumev2_bind_port;
'volume/remote_host' : value => $proxy_remote_host;
'volume/remote_port' : value => $volumev2_remote_port;
'network/bind_host' : value => $proxy_bind_host;
'network/bind_port' : value => $network_bind_port;
'network/remote_host' : value => $proxy_remote_host;
'network/remote_port' : value => $network_remote_port;
'patching/bind_host' : value => $proxy_bind_host;
'patching/bind_port' : value => $patching_bind_port;
'patching/remote_host' : value => '0.0.0.0';
'patching/remote_port' : value => $patching_remote_port;
}
dcorch_api_paste_ini {
'pipeline:dcorch-api-proxy/pipeline': value => 'filter authtoken acceptor proxyapp';
'filter:filter/paste.filter_factory': value => 'dcorch.api.proxy.apps.filter:ApiFiller.factory';
'filter:authtoken/paste.filter_factory': value => 'keystonemiddleware.auth_token:filter_factory';
'filter:acceptor/paste.filter_factory': value => 'dcorch.api.proxy.apps.acceptor:Acceptor.factory';
'app:proxyapp/paste.app_factory': value => 'dcorch.api.proxy.apps.proxy:Proxy.factory';
}
}

View File

@ -0,0 +1,119 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# DEC 2017: creation (sysinv base)
#
# == Class: dcorch::keystone::auth
#
# Configures dcorch user, service and endpoint in Keystone.
#
class dcorch::keystone::auth (
$password,
$auth_name = 'dcorch',
$email = 'dcorch@localhost',
$tenant = 'services',
$region = 'SystemController',
$service_description = 'DcOrchService',
$service_name = 'dcorch',
$service_type = 'dcorch',
$configure_endpoint = true,
$configure_user = true,
$configure_user_role = true,
$public_url = 'http://127.0.0.1:8118/v1.0',
$admin_url = 'http://127.0.0.1:8118/v1.0',
$internal_url = 'http://127.0.0.1:8118/v1.0',
$neutron_proxy_internal_url = 'http://127.0.0.1:29696',
$nova_proxy_internal_url = 'http://127.0.0.1:28774/v2.1',
$sysinv_proxy_internal_url = 'http://127.0.0.1:26385/v1',
$cinder_proxy_internal_url_v2 = 'http://127.0.0.1:28776/v2/%(tenant_id)s',
$cinder_proxy_internal_url_v3 = 'http://127.0.0.1:28776/v3/%(tenant_id)s',
$patching_proxy_internal_url = 'http://127.0.0.1:25491',
$neutron_proxy_public_url = 'http://127.0.0.1:29696',
$nova_proxy_public_url = 'http://127.0.0.1:28774/v2.1',
$sysinv_proxy_public_url = 'http://127.0.0.1:26385/v1',
$cinder_proxy_public_url_v2 = 'http://127.0.0.1:28776/v2/%(tenant_id)s',
$cinder_proxy_public_url_v3 = 'http://127.0.0.1:28776/v3/%(tenant_id)s',
$patching_proxy_public_url = 'http://127.0.0.1:25491',
) {
if $::platform::params::distributed_cloud_role =='systemcontroller' {
keystone::resource::service_identity { 'dcorch':
configure_user => $configure_user,
configure_user_role => $configure_user_role,
configure_endpoint => false,
service_type => $service_type,
service_description => $service_description,
service_name => $service_name,
region => $region,
auth_name => $auth_name,
password => $password,
email => $email,
tenant => $tenant,
public_url => $public_url,
admin_url => $admin_url,
internal_url => $internal_url,
}
keystone_endpoint { "${region}/nova::compute" :
ensure => "present",
name => "nova",
type => "compute",
region => $region,
public_url => $nova_proxy_public_url,
admin_url => $nova_proxy_internal_url,
internal_url => $nova_proxy_internal_url
}
keystone_endpoint { "${region}/sysinv::platform" :
ensure => "present",
name => "sysinv",
type => "platform",
region => $region,
public_url => $sysinv_proxy_public_url,
admin_url => $sysinv_proxy_internal_url,
internal_url => $sysinv_proxy_internal_url
}
keystone_endpoint { "${region}/neutron::network" :
ensure => "present",
name => "neutron",
type => "network",
region => $region,
public_url => $neutron_proxy_public_url,
admin_url => $neutron_proxy_internal_url,
internal_url => $neutron_proxy_internal_url
}
if $::openstack::cinder::params::service_enabled {
keystone_endpoint { "${region}/cinderv2::volumev2" :
ensure => "present",
name => "cinderv2",
type => "volumev2",
region => $region,
public_url => $cinder_proxy_public_url_v2,
admin_url => $cinder_proxy_internal_url_v2,
internal_url => $cinder_proxy_internal_url_v2
}
keystone_endpoint { "${region}/cinderv3::volumev3" :
ensure => "present",
name => "cinderv3",
type => "volumev3",
region => $region,
public_url => $cinder_proxy_public_url_v3,
admin_url => $cinder_proxy_internal_url_v3,
internal_url => $cinder_proxy_internal_url_v3
}
}
keystone_endpoint { "${region}/patching::patching" :
ensure => "present",
name => "patching",
type => "patching",
region => $region,
public_url => $patching_proxy_public_url,
admin_url => $patching_proxy_internal_url,
internal_url => $patching_proxy_internal_url
}
}
}

View File

@ -0,0 +1,62 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
#
class dcorch::params {
$dcorch_dir = '/etc/dcorch'
$dcorch_conf = '/etc/dcorch/dcorch.conf'
$dcorch_paste_api_ini = '/etc/dcorch/api-paste.ini'
if $::osfamily == 'Debian' {
$package_name = 'distributedcloud-dcorch'
$client_package = 'distributedcloud-client-dcorchclient'
$api_package = 'distributedcloud-dcorch'
$api_service = 'dcorch-api'
$engine_package = 'distributedcloud-dcorch'
$engine_service = 'dcorch-engine'
$snmp_package = 'distributedcloud-dcorch'
$snmp_service = 'dcorch-snmp'
$api_proxy_package = 'distributedcloud-dcorch'
$api_proxy_service = 'dcorch-api-proxy'
$db_sync_command = 'dcorch-manage db_sync'
} elsif($::osfamily == 'RedHat') {
$package_name = 'distributedcloud-dcorch'
$client_package = 'distributedcloud-client-dcorchclient'
$api_package = false
$api_service = 'dcorch-api'
$engine_package = false
$engine_service = 'dcorch-engine'
$snmp_package = false
$snmp_service = 'dcorch-snmp'
$api_proxy_package = false
$api_proxy_service = 'dcorch-api-proxy'
$db_sync_command = 'dcorch-manage db_sync'
} elsif($::osfamily == 'WRLinux') {
$package_name = 'dcorch'
$client_package = 'distributedcloud-client-dcorchclient'
$api_package = false
$api_service = 'dcorch-api'
$snmp_package = false
$snmp_service = 'dcorch-snmp'
$engine_package = false
$engine_service = 'dcorch-engine'
$api_proxy_package = false
$api_proxy_service = 'dcorch-api-proxy'
$db_sync_command = 'dcorch-manage db_sync'
} else {
fail("unsuported osfamily ${::osfamily}, currently WindRiver, Debian, Redhat are the only supported platforms")
}
}

View File

@ -0,0 +1,60 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Dec 2017: creation -lplant
#
# class for installing rabbitmq server for dcorch
#
#
class dcorch::rabbitmq(
$userid = 'guest',
$password = 'guest',
$port = '5672',
$virtual_host = '/',
$enabled = true
) {
# only configure dcorch after the queue is up
Class['rabbitmq::service'] -> Anchor<| title == 'dcorch-start' |>
if ($enabled) {
if $userid == 'guest' {
$delete_guest_user = false
} else {
$delete_guest_user = true
rabbitmq_user { $userid:
admin => true,
password => $password,
provider => 'rabbitmqctl',
require => Class['rabbitmq::server'],
}
# I need to figure out the appropriate permissions
rabbitmq_user_permissions { "${userid}@${virtual_host}":
configure_permission => '.*',
write_permission => '.*',
read_permission => '.*',
provider => 'rabbitmqctl',
}->Anchor<| title == 'dcorch-start' |>
}
$service_ensure = 'running'
} else {
$service_ensure = 'stopped'
}
class { '::rabbitmq::server':
service_ensure => $service_ensure,
port => $port,
delete_guest_user => $delete_guest_user,
}
if ($enabled) {
rabbitmq_vhost { $virtual_host:
provider => 'rabbitmqctl',
require => Class['rabbitmq::server'],
}
}
}

View File

@ -0,0 +1,50 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Dec 2017 Creation based off puppet-sysinv
#
class dcorch::snmp (
$package_ensure = 'latest',
$enabled = false,
$bind_host = '0.0.0.0',
$com_str = 'dcorchAlarmAggregator'
) {
include dcorch::params
Dcorch_config<||> ~> Service['dcorch-snmp']
if $::dcorch::params::snmp_package {
Package['dcorch-snmp'] -> Dcorch_config<||>
Package['dcorch-snmp'] -> Service['dcorch-snmp']
package { 'dcorch-snmp':
ensure => $package_ensure,
name => $::dcorch::params::snmp_package,
}
}
dcorch_config {
'snmp/snmp_ip': value => $bind_host;
'snmp/snmp_comm_str': value => $com_str;
}
if $enabled {
$ensure = 'running'
} else {
$ensure = 'stopped'
}
service { 'dcorch-snmp':
ensure => $ensure,
name => $::dcorch::params::snmp_service,
enable => $enabled,
hasstatus => false,
require => Package['dcorch'],
}
Exec<| title == 'dcorch-dbsync' |> -> Service['dcorch-snmp']
}

View File

@ -0,0 +1,2 @@
Name: puppet-mtce
Version: 1.0.0

View File

@ -0,0 +1,3 @@
SRC_DIR="src"
COPY_LIST="$SRC_DIR/LICENSE"
TIS_PATCH_VER=6

View File

@ -0,0 +1,35 @@
%global module_dir mtce
Name: puppet-%{module_dir}
Version: 1.0.0
Release: %{tis_patch_ver}%{?_tis_dist}
Summary: Puppet mtce module
License: Apache-2.0
Packager: Wind River <info@windriver.com>
URL: unknown
Source0: %{name}-%{version}.tar.gz
Source1: LICENSE
BuildArch: noarch
BuildRequires: python2-devel
%description
A puppet module for mtce
%prep
%autosetup -c %{module_dir}
#
# The src for this puppet module needs to be staged to puppet/modules
#
%install
install -d -m 0755 %{buildroot}%{_datadir}/puppet/modules/%{module_dir}
cp -R %{name}-%{version}/%{module_dir} %{buildroot}%{_datadir}/puppet/modules
%files
%license %{name}-%{version}/LICENSE
%{_datadir}/puppet/modules/%{module_dir}

View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,8 @@
#
# Copyright (c) 2015-2017 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
class mtce () {
}

View File

@ -0,0 +1,23 @@
; Packstack managed Maintenance Configuration
[agent] ; Agent Configuration
keystone_auth_username = <%= @auth_username %> ; mtce auth username
keystone_auth_pw = <%= @auth_pw %> ; mtce auth password
keystone_auth_project = <%= @auth_project %> ; mtce auth project
keystone_user_domain = <%= @auth_user_domain %> ; mtce user domain
keystone_project_domain = <%= @auth_project_domain %> ; mtce project domain
keystone_auth_host = <%= @auth_host %> ; keystone auth url
keystone_auth_uri = <%= @auth_uri %> ; keystone auth uri
keystone_auth_port = <%= @auth_port %> ; keystone auth port
keystone_region_name = <%= @auth_region %> ; keystone region
keyring_directory = <%= @keyring_directory %> ; keyring directory
ceilometer_port = <%= @ceilometer_port %> ; ceilometer rest api port
multicast = <%= @mtce_multicast %> ; Heartbeat Multicast Address
heartbeat_period = <%= @heartbeat_period %> ; Heartbeat period in milliseconds
heartbeat_failure_threshold = <%= @heartbeat_failure_threshold %> ; Heartbeat failure threshold count.
heartbeat_degrade_threshold = <%= @heartbeat_degrade_threshold %> ; Heartbeat degrade threshold count.
[timeouts]
compute_boot_timeout = <%= @compute_boot_timeout %> ; The max time (seconds) that Mtce waits for the mtcAlive
controller_boot_timeout = <%= @controller_boot_timeout %> ; message after which it will time out and fail the host.

View File

@ -0,0 +1,8 @@
/var/lock tmpfs tmpfs 4 2 1
/var/run tmpfs tmpfs 30 15 5
/dev/shm tmpfs tmpfs 512 307 102
/ rootfs rootfs 512 307 102
/dev devtmpfs devtmpfs 512 307 102
/boot <%= @boot_device %> boot 100 70 50
/scratch /dev/mapper/cgts--vg-scratch--lv dev 512 307 102
/var/log /dev/mapper/cgts--vg-log--lv dev 512 307 102

View File

@ -0,0 +1,2 @@
Name: puppet-nfv
Version: 1.0.0

View File

@ -0,0 +1,2 @@
SRC_DIR="src"
TIS_PATCH_VER=5

View File

@ -0,0 +1,34 @@
%global module_dir nfv
Name: puppet-%{module_dir}
Version: 1.0.0
Release: %{tis_patch_ver}%{?_tis_dist}
Summary: Puppet nfv module
License: Apache-2.0
Packager: Wind River <info@windriver.com>
URL: unknown
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
%description
A puppet module for nfv
%prep
%autosetup -c %{module_dir}
#
# The src for this puppet module needs to be staged to puppet/modules
#
%install
install -d -m 0755 %{buildroot}%{_datadir}/puppet/modules/%{module_dir}
cp -R %{name}-%{version}/%{module_dir} %{buildroot}%{_datadir}/puppet/modules
%files
%license %{name}-%{version}/LICENSE
%{_datadir}/puppet/modules/%{module_dir}

View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,31 @@
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
Puppet::Type.type(:nfv_plugin_alarm_config).provide(
:ini_setting,
# set ini_setting as the parent provider
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
) do
def section
# implemented section as the first part of the namevar
resource[:name].split('/', 2).first
end
def setting
# implemented setting as the second part of the namevar
resource[:name].split('/', 2).last
end
def separator
'='
end
# hard code the file path (this allows purging)
def self.file_path
'/etc/nfv/nfv_plugins/alarm_handlers/config.ini'
end
end

View File

@ -0,0 +1,31 @@
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
Puppet::Type.type(:nfv_plugin_event_log_config).provide(
:ini_setting,
# set ini_setting as the parent provider
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
) do
def section
# implemented section as the first part of the namevar
resource[:name].split('/', 2).first
end
def setting
# implemented setting as the second part of the namevar
resource[:name].split('/', 2).last
end
def separator
'='
end
# hard code the file path (this allows purging)
def self.file_path
'/etc/nfv/nfv_plugins/event_log_handlers/config.ini'
end
end

View File

@ -0,0 +1,31 @@
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
Puppet::Type.type(:nfv_plugin_nfvi_config).provide(
:ini_setting,
# set ini_setting as the parent provider
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
) do
def section
# implemented section as the first part of the namevar
resource[:name].split('/', 2).first
end
def setting
# implemented setting as the second part of the namevar
resource[:name].split('/', 2).last
end
def separator
'='
end
# hard code the file path (this allows purging)
def self.file_path
'/etc/nfv/nfv_plugins/nfvi_plugins/config.ini'
end
end

View File

@ -0,0 +1,31 @@
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
Puppet::Type.type(:nfv_vim_config).provide(
:ini_setting,
# set ini_setting as the parent provider
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
) do
def section
# implemented section as the first part of the namevar
resource[:name].split('/', 2).first
end
def setting
# implemented setting as the second part of the namevar
resource[:name].split('/', 2).last
end
def separator
'='
end
# hard code the file path (this allows purging)
def self.file_path
'/etc/nfv/vim/config.ini'
end
end

View File

@ -0,0 +1,47 @@
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
Puppet::Type.newtype(:nfv_plugin_alarm_config) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from /etc/nfv/nfv_plugins/alarm_handlers/config.ini'
newvalues(/\S+\/\S+/)
end
newproperty(:value) do
desc 'The value of the setting to be defined.'
munge do |value|
value = value.to_s.strip
value.capitalize! if value =~ /^(true|false)$/i
value
end
def is_to_s( currentvalue )
if resource.secret?
return '[old secret redacted]'
else
return currentvalue
end
end
def should_to_s( newvalue )
if resource.secret?
return '[new secret redacted]'
else
return newvalue
end
end
end
newparam(:secret, :boolean => true) do
desc 'Whether to hide the value from Puppet logs. Defaults to `false`.'
newvalues(:true, :false)
defaultto false
end
end

View File

@ -0,0 +1,47 @@
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
Puppet::Type.newtype(:nfv_plugin_event_log_config) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from /etc/nfv/nfv_plugins/event_log_handlers/config.ini'
newvalues(/\S+\/\S+/)
end
newproperty(:value) do
desc 'The value of the setting to be defined.'
munge do |value|
value = value.to_s.strip
value.capitalize! if value =~ /^(true|false)$/i
value
end
def is_to_s( currentvalue )
if resource.secret?
return '[old secret redacted]'
else
return currentvalue
end
end
def should_to_s( newvalue )
if resource.secret?
return '[new secret redacted]'
else
return newvalue
end
end
end
newparam(:secret, :boolean => true) do
desc 'Whether to hide the value from Puppet logs. Defaults to `false`.'
newvalues(:true, :false)
defaultto false
end
end

View File

@ -0,0 +1,47 @@
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
Puppet::Type.newtype(:nfv_plugin_nfvi_config) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from /etc/nfv/nfv_plugins/nfvi_plugins/config.ini'
newvalues(/\S+\/\S+/)
end
newproperty(:value) do
desc 'The value of the setting to be defined.'
munge do |value|
value = value.to_s.strip
value.capitalize! if value =~ /^(true|false)$/i
value
end
def is_to_s( currentvalue )
if resource.secret?
return '[old secret redacted]'
else
return currentvalue
end
end
def should_to_s( newvalue )
if resource.secret?
return '[new secret redacted]'
else
return newvalue
end
end
end
newparam(:secret, :boolean => true) do
desc 'Whether to hide the value from Puppet logs. Defaults to `false`.'
newvalues(:true, :false)
defaultto false
end
end

View File

@ -0,0 +1,47 @@
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
Puppet::Type.newtype(:nfv_vim_config) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from /etc/nfv/vim/config.ini'
newvalues(/\S+\/\S+/)
end
newproperty(:value) do
desc 'The value of the setting to be defined.'
munge do |value|
value = value.to_s.strip
value.capitalize! if value =~ /^(true|false)$/i
value
end
def is_to_s( currentvalue )
if resource.secret?
return '[old secret redacted]'
else
return currentvalue
end
end
def should_to_s( newvalue )
if resource.secret?
return '[new secret redacted]'
else
return newvalue
end
end
end
newparam(:secret, :boolean => true) do
desc 'Whether to hide the value from Puppet logs. Defaults to `false`.'
newvalues(:true, :false)
defaultto false
end
end

View File

@ -0,0 +1,24 @@
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
class nfv::alarm (
$enabled = false,
$storage_file = '/var/log/nfv-vim-alarms.log',
) {
include nfv::params
nfv_plugin_alarm_config {
/* File-Storage Information */
'File-Storage/file': value => $storage_file;
}
if $enabled {
$ensure = 'running'
} else {
$ensure = 'stopped'
}
}

View File

@ -0,0 +1,24 @@
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
class nfv::event_log (
$enabled = false,
$storage_file = '/var/log/nfv-vim-events.log',
) {
include nfv::params
nfv_plugin_event_log_config {
/* File-Storage Information */
'File-Storage/file': value => $storage_file;
}
if $enabled {
$ensure = 'running'
} else {
$ensure = 'stopped'
}
}

View File

@ -0,0 +1,52 @@
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
class nfv (
) {
include nfv::params
Package['nfv'] -> Nfv_vim_config<||>
Package['nfv-plugins'] -> Nfv_plugin_alarm_config<||>
Package['nfv-plugins'] -> Nfv_plugin_event_log_config<||>
Package['nfv-plugins'] -> Nfv_plugin_nfvi_config<||>
# This anchor is used to simplify the graph between nfv components
# by allowing a resource to serve as a point where the configuration of
# nfv begins
anchor { 'nfv-start': }
package { 'nfv':
ensure => 'present',
name => $::nfv::params::package_name,
require => Anchor['nfv-start'],
}
file { $::nfv::params::nfv_vim_conf:
ensure => 'present',
require => Package['nfv'],
}
package { 'nfv-plugins':
ensure => 'present',
name => $::nfv::params::nfv_plugin_package_name,
require => Anchor['nfv-start'],
}
file { $::nfv::params::nfv_plugin_alarm_conf:
ensure => 'present',
require => Package['nfv-plugins'],
}
file { $::nfv::params::nfv_plugin_event_log_conf:
ensure => 'present',
require => Package['nfv-plugins'],
}
file { $::nfv::params::nfv_plugin_nfvi_conf:
ensure => 'present',
require => Package['nfv-plugins'],
}
}

View File

@ -0,0 +1,43 @@
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
class nfv::keystone::auth (
$auth_name = 'vim',
$password,
$tenant = 'services',
$email = 'vim@localhost',
$region = 'RegionOne',
$service_description = 'Virtual Infrastructure Manager',
$service_name = 'vim',
$service_type = 'nfv',
$configure_endpoint = true,
$configure_user = true,
$configure_user_role = true,
$public_url = 'http://127.0.0.1:4545',
$admin_url = 'http://127.0.0.1:4545',
$internal_url = 'http://127.0.0.1:4545',
) {
$real_service_name = pick($service_name, $auth_name)
keystone::resource::service_identity { $auth_name:
configure_user => $configure_user,
configure_user_role => $configure_user_role,
configure_endpoint => $configure_endpoint,
service_type => $service_type,
service_description => $service_description,
service_name => $real_service_name,
region => $region,
auth_name => $auth_name,
password => $password,
email => $email,
tenant => $tenant,
public_url => $public_url,
admin_url => $admin_url,
internal_url => $internal_url,
}
}

View File

@ -0,0 +1,172 @@
#
# Copyright (c) 2016-2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
class nfv::nfvi (
$enabled = false,
$openstack_username = 'admin',
$openstack_tenant = 'admin',
$openstack_user_domain = 'Default',
$openstack_project_domain = 'Default',
$openstack_auth_protocol = 'http',
$openstack_auth_host = '127.0.0.1',
$openstack_auth_port = 5000,
$openstack_nova_api_host = '127.0.0.1',
$keystone_region_name = 'RegionOne',
$keystone_service_name = 'keystone',
$keystone_service_type = 'identity',
$keystone_endpoint_type = 'internal',
$ceilometer_region_name = 'RegionOne',
$ceilometer_service_name = 'ceilometer',
$ceilometer_service_type = 'metering',
$ceilometer_endpoint_type = 'admin',
$cinder_region_name = 'RegionOne',
$cinder_service_name = 'cinderv2',
$cinder_service_type = 'volumev2',
$cinder_endpoint_type = 'admin',
$cinder_endpoint_disabled = false,
$glance_region_name = 'RegionOne',
$glance_service_name = 'glance',
$glance_service_type = 'image',
$glance_endpoint_type = 'admin',
$neutron_region_name = 'RegionOne',
$neutron_service_name = 'neutron',
$neutron_service_type = 'network',
$neutron_endpoint_type = 'admin',
$neutron_endpoint_disabled = false,
$nova_region_name = 'RegionOne',
$nova_service_name = 'nova',
$nova_service_type = 'compute',
$nova_endpoint_type = 'admin',
$nova_endpoint_override = "http://localhost:18774",
$sysinv_region_name = 'RegionOne',
$sysinv_service_name = 'sysinv',
$sysinv_service_type = 'platform',
$sysinv_endpoint_type = 'admin',
$heat_region_name = 'RegionOne',
$mtc_endpoint_override = 'http://localhost:2112',
$guest_endpoint_override = 'http://localhost:2410',
$patching_region_name = 'RegionOne',
$patching_service_name = 'patching',
$patching_service_type = 'patching',
$patching_endpoint_type = 'admin',
$rabbit_host = '127.0.0.1',
$rabbit_port = 5672,
$rabbit_userid = 'guest',
$rabbit_password = 'guest',
$rabbit_virtual_host = '/',
$infrastructure_rest_api_host = '127.0.0.1',
$infrastructure_rest_api_port = 30001,
$infrastructure_rest_api_data_port_fault_handling_enabled = true,
$guest_rest_api_host = '127.0.0.1',
$guest_rest_api_port = 30002,
$compute_rest_api_host = '127.0.0.1',
$compute_rest_api_port = 30003,
$compute_rest_api_max_concurrent_requests = 128,
$compute_rest_api_max_request_wait_in_secs = 120,
$host_listener_host = '127.0.0.1',
$host_listener_port = 30004,
$identity_uri = undef,
) {
include nfv::params
nfv_plugin_nfvi_config {
/* OpenStack Information */
'openstack/username': value => $openstack_username;
'openstack/tenant': value => $openstack_tenant;
'openstack/user_domain_name': value => $openstack_user_domain;
'openstack/project_domain_name': value => $openstack_project_domain;
'openstack/authorization_protocol': value => $openstack_auth_protocol;
'openstack/authorization_ip': value => $openstack_auth_host;
'openstack/authorization_port': value => $openstack_auth_port;
'keystone/region_name': value => $keystone_region_name;
'keystone/service_name': value => $keystone_service_name;
'keystone/service_type': value => $keystone_service_type;
'keystone/endpoint_type': value => $keystone_endpoint_type;
'ceilometer/region_name': value => $ceilometer_region_name;
'ceilometer/service_name': value => $ceilometer_service_name;
'ceilometer/service_type': value => $ceilometer_service_type;
'ceilometer/endpoint_type': value => $ceilometer_endpoint_type;
'cinder/region_name': value => $cinder_region_name;
'cinder/service_name': value => $cinder_service_name;
'cinder/service_type': value => $cinder_service_type;
'cinder/endpoint_type': value => $cinder_endpoint_type;
'cinder/endpoint_disabled': value => $cinder_endpoint_disabled;
'glance/region_name': value => $glance_region_name;
'glance/service_name': value => $glance_service_name;
'glance/service_type': value => $glance_service_type;
'glance/endpoint_type': value => $glance_endpoint_type;
'neutron/region_name': value => $neutron_region_name;
'neutron/service_name': value => $neutron_service_name;
'neutron/service_type': value => $neutron_service_type;
'neutron/endpoint_type': value => $neutron_endpoint_type;
'neutron/endpoint_disabled': value => $neutron_endpoint_disabled;
'nova/region_name': value => $nova_region_name;
'nova/service_name': value => $nova_service_name;
'nova/service_type': value => $nova_service_type;
'nova/endpoint_type': value => $nova_endpoint_type;
'nova/endpoint_override': value => $nova_endpoint_override;
'sysinv/region_name': value => $sysinv_region_name;
'sysinv/service_name': value => $sysinv_service_name;
'sysinv/service_type': value => $sysinv_service_type;
'sysinv/endpoint_type': value => $sysinv_endpoint_type;
'heat/region_name': value => $heat_region_name;
'mtc/endpoint_override': value => $mtc_endpoint_override;
'guest/endpoint_override': value => $guest_endpoint_override;
'patching/region_name': value => $patching_region_name;
'patching/service_name': value => $patching_service_name;
'patching/service_type': value => $patching_service_type;
'patching/endpoint_type': value => $patching_endpoint_type;
/* AMQP */
'amqp/host': value => $rabbit_host;
'amqp/port': value => $rabbit_port;
'amqp/user_id': value => $rabbit_userid;
'amqp/password': value => $rabbit_password, secret => true;
'amqp/virt_host': value => $rabbit_virtual_host;
/* Infrastructure Rest-API */
'infrastructure-rest-api/host': value => $infrastructure_rest_api_host;
'infrastructure-rest-api/port': value => $infrastructure_rest_api_port;
'infrastructure-rest-api/data_port_fault_handling_enabled': value => $infrastructure_rest_api_data_port_fault_handling_enabled;
/* Guest-Services Rest-API */
'guest-rest-api/host': value => $guest_rest_api_host;
'guest-rest-api/port': value => $guest_rest_api_port;
/* Compute Rest-API */
'compute-rest-api/host': value => $compute_rest_api_host;
'compute-rest-api/port': value => $compute_rest_api_port;
'compute-rest-api/max_concurrent_requests': value => $compute_rest_api_max_concurrent_requests;
'compute-rest-api/max_request_wait_in_secs': value => $compute_rest_api_max_request_wait_in_secs;
/* Host Listener */
'host-listener/host': value => $host_listener_host;
'host-listener/port': value => $host_listener_port;
}
if $identity_uri {
nfv_plugin_nfvi_config { 'openstack/authorization_uri': value => $identity_uri; }
}
if $enabled {
$ensure = 'running'
} else {
$ensure = 'stopped'
}
}

View File

@ -0,0 +1,36 @@
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
class nfv::params {
$nfv_conf_dir = '/etc/nfv'
$nfv_plugin_conf_dir = '/etc/nfv/nfv_plugins'
$nfv_vim_conf = '/etc/nfv/vim/config.ini'
$nfv_plugin_alarm_conf = '/etc/nfv/nfv_plugins/alarm_handlers/config.ini'
$nfv_plugin_event_log_conf = '/etc/nfv/nfv_plugins/event_log_handlers/config.ini'
$nfv_plugin_nfvi_conf = '/etc/nfv/nfv_plugins/nfvi_plugins/config.ini'
if $::osfamily == 'Debian' {
$package_name = 'nfv-vim'
$nfv_plugin_package_name = 'nfv-plugins'
$nfv_common_package_name = 'nfv-common'
} elsif($::osfamily == 'RedHat') {
$package_name = 'nfv-vim'
$nfv_plugin_package_name = 'nfv-plugins'
$nfv_common_package_name = 'nfv-common'
} elsif($::osfamily == 'WRLinux') {
$package_name = 'nfv-vim'
$nfv_plugin_package_name = 'nfv-plugins'
$nfv_common_package_name = 'nfv-common'
} else {
fail("unsuported osfamily ${::osfamily}, currently WindRiver, Debian, Redhat are the only supported platforms")
}
}

View File

@ -0,0 +1,92 @@
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
class nfv::vim (
$enabled = false,
$debug_config_file = '/etc/nfv/vim/debug.ini',
$debug_handlers = 'syslog, stdout',
$debug_syslog_address = '/dev/log',
$debug_syslog_facility = 'user',
$database_dir = '/opt/platform/nfv/vim',
$alarm_namespace = 'nfv_vim.alarm.handlers.v1',
$alarm_handlers = 'File-Storage, Fault-Management',
$alarm_audit_interval = 30,
$alarm_config_file = '/etc/nfv/nfv_plugins/alarm_handlers/config.ini',
$event_log_namespace = 'nfv_vim.event_log.handlers.v1',
$event_log_handlers = 'File-Storage, Event-Log-Management',
$event_log_config_file ='/etc/nfv/nfv_plugins/event_log_handlers/config.ini',
$nfvi_namespace = 'nfv_vim.nfvi.plugins.v1',
$nfvi_config_file = '/etc/nfv/nfv_plugins/nfvi_plugins/config.ini',
$vim_rpc_ip = '127.0.0.1',
$vim_rpc_port = 4343,
$vim_api_ip = '0.0.0.0',
$vim_api_port = 4545,
$vim_api_rpc_ip = '127.0.0.1',
$vim_api_rpc_port = 0,
$vim_webserver_ip = '0.0.0.0',
$vim_webserver_port = 32323,
$vim_webserver_source_dir = '/usr/lib64/python2.7/site-packages/nfv_vim/webserver',
$instance_max_live_migrate_wait_in_secs = 180,
$instance_single_hypervisor = false,
$sw_mgmt_single_controller = false,
) {
include nfv::params
nfv_vim_config {
/* Debug Information */
'debug/config_file': value => $debug_config_file;
'debug/handlers': value => $debug_handlers;
'debug/syslog_address': value => $debug_syslog_address;
'debug/syslog_facility': value => $debug_syslog_facility;
/* Database */
'database/database_dir': value => $database_dir;
/* Alarm */
'alarm/namespace': value => $alarm_namespace;
'alarm/handlers': value => $alarm_handlers;
'alarm/audit_interval': value => $alarm_audit_interval;
'alarm/config_file': value => $alarm_config_file;
/* Event Log */
'event-log/namespace': value => $event_log_namespace;
'event-log/handlers': value => $event_log_handlers;
'event-log/config_file': value => $event_log_config_file;
/* NFVI */
'nfvi/namespace': value => $nfvi_namespace;
'nfvi/config_file': value => $nfvi_config_file;
/* INSTANCE CONFIGURATION */
'instance-configuration/max_live_migrate_wait_in_secs': value => $instance_max_live_migrate_wait_in_secs;
'instance-configuration/single_hypervisor': value => $instance_single_hypervisor;
/* VIM */
'vim/rpc_host': value => $vim_rpc_ip;
'vim/rpc_port': value => $vim_rpc_port;
/* VIM-API */
'vim-api/host': value => $vim_api_ip;
'vim-api/port': value => $vim_api_port;
'vim-api/rpc_host': value => $vim_api_rpc_ip;
'vim-api/rpc_port': value => $vim_api_rpc_port;
/* VIM-Webserver */
'vim-webserver/host': value => $vim_webserver_ip;
'vim-webserver/port': value => $vim_webserver_port;
'vim-webserver/source_dir': value => $vim_webserver_source_dir;
/* SW-MGMT CONFIGURATION */
'sw-mgmt-configuration/single_controller': value => $sw_mgmt_single_controller;
}
if $enabled {
$ensure = 'running'
} else {
$ensure = 'stopped'
}
}

View File

@ -0,0 +1,2 @@
Name: puppet-patching
Version: 1.0.0

View File

@ -0,0 +1,2 @@
SRC_DIR="src"
TIS_PATCH_VER=2

View File

@ -0,0 +1,34 @@
%global module_dir patching
Name: puppet-%{module_dir}
Version: 1.0.0
Release: %{tis_patch_ver}%{?_tis_dist}
Summary: Puppet patching module
License: Apache-2.0
Packager: Wind River <info@windriver.com>
URL: unknown
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
%description
A puppet module for patching
%prep
%autosetup -c %{module_dir}
#
# The src for this puppet module needs to be staged to packstack/puppet/modules
#
%install
install -d -m 0755 %{buildroot}%{_datadir}/puppet/modules/%{module_dir}
cp -R %{name}-%{version}/%{module_dir} %{buildroot}%{_datadir}/puppet/modules
%files
%license %{name}-%{version}/LICENSE
%{_datadir}/puppet/modules/%{module_dir}

View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,13 @@
name 'patching'
version '2.1.0'
source 'https://github.com/stackforge/patching'
author 'Wind River'
license 'Apache-2.0'
summary 'Patching Module'
description 'Puppet module to install and configure the Patching service'
project_page 'https://launchpad.net/puppet'
dependency 'puppetlabs/inifile', '>=1.0.0 <2.0.0'
dependency 'puppetlabs/mysql', '>=0.6.1 <1.0.0'
dependency 'puppetlabs/stdlib', '>=2.5.0'
dependency 'puppetlabs/rabbitmq', '>=2.0.2 <3.0.0'

View File

@ -0,0 +1,33 @@
#
# Copyright (c) 2014-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
Puppet::Type.type(:patching_config).provide(
:ini_setting,
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
) do
def section
resource[:name].split('/', 2).first
end
def setting
resource[:name].split('/', 2).last
end
def separator
'='
end
def self.file_path
'/etc/patching/patching.conf'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -0,0 +1,48 @@
#
# Copyright (c) 2014-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
Puppet::Type.newtype(:patching_config) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from /etc/patching/patching.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
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
end

View File

@ -0,0 +1,79 @@
#
# Copyright (c) 2014-2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
class patching::api (
$keystone_password,
$keystone_enabled = true,
$keystone_tenant = 'services',
$keystone_user = 'patching',
$keystone_user_domain = 'Default',
$keystone_project_domain = 'Default',
$keystone_auth_host = 'localhost',
$keystone_auth_port = '5000',
$keystone_auth_protocol = 'http',
$keystone_auth_admin_prefix = false,
$keystone_auth_uri = false,
$keystone_auth_version = false,
$keystone_identity_uri = false,
$auth_type = 'password',
$service_port = '5000',
$package_ensure = 'latest',
$bind_host = '0.0.0.0',
$enabled = true
) {
include patching::params
if $keystone_identity_uri {
patching_config { 'keystone_authtoken/auth_url': value => $keystone_identity_uri; }
} else {
patching_config { 'keystone_authtoken/auth_url': value => "${keystone_auth_protocol}://${keystone_auth_host}:5000/"; }
}
if $keystone_auth_uri {
patching_config { 'keystone_authtoken/auth_uri': value => $keystone_auth_uri; }
} else {
patching_config {
'keystone_authtoken/auth_uri': value => "${keystone_auth_protocol}://${keystone_auth_host}:5000/";
}
}
if $keystone_auth_version {
patching_config { 'keystone_authtoken/auth_version': value => $keystone_auth_version; }
} else {
patching_config { 'keystone_authtoken/auth_version': ensure => absent; }
}
if $keystone_enabled {
patching_config {
'DEFAULT/auth_strategy': value => 'keystone' ;
}
patching_config {
'keystone_authtoken/auth_type': value => $auth_type;
'keystone_authtoken/project_name': value => $keystone_tenant;
'keystone_authtoken/username': value => $keystone_user;
'keystone_authtoken/user_domain_name': value => $keystone_user_domain;
'keystone_authtoken/project_domain_name': value => $keystone_project_domain;
'keystone_authtoken/password': value => $keystone_password, secret => true;
}
if $keystone_auth_admin_prefix {
validate_re($keystone_auth_admin_prefix, '^(/.+[^/])?$')
patching_config {
'keystone_authtoken/auth_admin_prefix': value => $keystone_auth_admin_prefix;
}
} else {
patching_config {
'keystone_authtoken/auth_admin_prefix': ensure => absent;
}
}
}
else
{
patching_config {
'DEFAULT/auth_strategy': value => 'noauth' ;
}
}
}

View File

@ -0,0 +1,44 @@
#
# Copyright (c) 2014-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
class patching (
$controller_multicast = '239.1.1.3',
$agent_multicast = '239.1.1.4',
$api_port = 5487,
$controller_port = 5488,
$agent_port = 5489,
) {
include patching::params
file { $::patching::params::patching_conf:
ensure => present,
owner => 'patching',
group => 'patching',
mode => '0600',
}
patching_config {
'runtime/controller_multicast': value => $controller_multicast;
'runtime/agent_multicast': value => $agent_multicast;
'runtime/api_port': value => $api_port;
'runtime/controller_port': value => $controller_port;
'runtime/agent_port': value => $agent_port;
}
~>
service { 'sw-patch-agent.service':
ensure => 'running',
enable => true,
subscribe => File[$::patching::params::patching_conf],
}
if $::personality == "controller" {
service { 'sw-patch-controller-daemon.service':
ensure => 'running',
enable => true,
subscribe => Service['sw-patch-agent.service'],
}
}
}

View File

@ -0,0 +1,49 @@
#
# Copyright (c) 2014-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
class patching::keystone::auth (
$auth_name = 'patching',
$password,
$tenant = 'services',
$email = 'patching@localhost',
$region = 'RegionOne',
$service_description = 'Patching Service',
$service_name = undef,
$service_type = 'patching',
$configure_endpoint = true,
$configure_user = true,
$configure_user_role = true,
$public_url = 'http://127.0.0.1:15491/v1',
$admin_url = 'http://127.0.0.1:5491/v1',
$internal_url = 'http://127.0.0.1:5491/v1',
) {
$real_service_name = pick($service_name, $auth_name)
keystone::resource::service_identity { 'patching':
configure_user => $configure_user,
configure_user_role => $configure_user_role,
configure_endpoint => $configure_endpoint,
service_type => $service_type,
service_description => $service_description,
service_name => $real_service_name,
region => $region,
auth_name => $auth_name,
password => $password,
email => $email,
tenant => $tenant,
public_url => $public_url,
admin_url => $admin_url,
internal_url => $internal_url,
}
# Assume we dont need backwards compatability
# if $configure_endpoint {
# Keystone_endpoint["${region}/${real_service_name}::${service_type}"] ~> Service <| title == 'patch-server' |>
# }
}

View File

@ -0,0 +1,10 @@
#
# Copyright (c) 2014-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
class patching::params {
$patching_dir = '/etc/patching'
$patching_conf = '/etc/patching/patching.conf'
}

View File

@ -0,0 +1,3 @@
SRC_DIR="src"
COPY_LIST="$SRC_DIR/LICENSE"
TIS_PATCH_VER=1

View File

@ -0,0 +1,34 @@
%global module_dir sshd
Name: puppet-%{module_dir}
Version: 1.0.0
Release: %{tis_patch_ver}%{?_tis_dist}
Summary: Puppet sshd module
License: Apache-2.0
Packager: Wind River <info@windriver.com>
URL: unknown
Source0: %{name}-%{version}.tar.gz
Source1: LICENSE
BuildArch: noarch
BuildRequires: python2-devel
%description
A puppet module for sshd
%prep
%autosetup -c %{module_dir}
#
# The src for this puppet module needs to be staged to puppet/modules
#
%install
install -d -m 0755 %{buildroot}%{_datadir}/puppet/modules/%{module_dir}
cp -R %{name}-%{version}/%{module_dir} %{buildroot}%{_datadir}/puppet/modules
%files
%license %{name}-%{version}/LICENSE
%{_datadir}/puppet/modules/%{module_dir}

View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,8 @@
#
# Copyright (c) 2015-2017 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
class sshd () {
}

View File

@ -0,0 +1,139 @@
# This file is being maintained by Puppet.
# DO NOT EDIT
# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
# Disable legacy (protocol version 1) support in the server for new
# installations. In future the default will change to require explicit
# activation of protocol 1
Protocol 2
# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_ed25519_key
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
LogLevel INFO
# Authentication:
LoginGraceTime 1m
PermitRootLogin no
#StrictModes yes
MaxAuthTries 4
#MaxSessions 10
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
PermitEmptyPasswords no
# Change to no to disable s/key passwords
ChallengeResponseAuthentication no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
AllowAgentForwarding no
AllowTcpForwarding no
#GatewayPorts no
X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
UsePrivilegeSeparation yes
PermitUserEnvironment no
Compression no
ClientAliveInterval 15
ClientAliveCountMax 4
# Make SSH connect faster on bootup
UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
#ChrootDirectory none
# default banner path
Banner /etc/issue.net
# override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# ForceCommand cvs server
DenyUsers admin secadmin operator
# Filtered cipher and MAC list, defaults can be obtained by ssh -Q cipher and ssh -Q mac
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com
MACs hmac-sha1,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com
# This Match block prevents Password Authentication for root user
Match User root
PasswordAuthentication no
<% if @nova_migration_subnet -%>
# This Match Block is used to allow Root Login exceptions over the
# internal subnet used by Nova Migrations
Match Address <%= @nova_migration_subnet %>
PermitRootLogin without-password
<% end -%>

View File

@ -0,0 +1,2 @@
Name: puppet-sysinv
Version: 1.0.0

View File

@ -0,0 +1,3 @@
SRC_DIR="src"
COPY_LIST="$SRC_DIR/LICENSE"
TIS_PATCH_VER=3

View File

@ -0,0 +1,35 @@
%global module_dir sysinv
Name: puppet-%{module_dir}
Version: 1.0.0
Release: %{tis_patch_ver}%{?_tis_dist}
Summary: Puppet sysinv module
License: Apache
Packager: Wind River <info@windriver.com>
URL: unknown
Source0: %{name}-%{version}.tar.gz
Source1: LICENSE
BuildArch: noarch
BuildRequires: python2-devel
%description
A puppet module for sysinv
%prep
%autosetup -c %{module_dir}
#
# The src for this puppet module needs to be staged to puppet/modules
#
%install
install -d -m 0755 %{buildroot}%{_datadir}/puppet/modules/%{module_dir}
cp -R %{name}-%{version}/%{module_dir} %{buildroot}%{_datadir}/puppet/modules
%files
%license %{name}-%{version}/LICENSE
%{_datadir}/puppet/modules/%{module_dir}

View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,19 @@
fixtures:
repositories:
"apt": "git://github.com/puppetlabs/puppetlabs-apt.git"
"keystone": "git://github.com/stackforge/puppet-keystone.git"
"mysql":
repo: "git://github.com/puppetlabs/puppetlabs-mysql.git"
ref: 'origin/0.x'
"stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git"
"sysctl": "git://github.com/duritong/puppet-sysctl.git"
"rabbitmq":
repo: "git://github.com/puppetlabs/puppetlabs-rabbitmq"
ref: 'origin/2.x'
"inifile": "git://github.com/puppetlabs/puppetlabs-inifile"
"qpid": "git://github.com/dprince/puppet-qpid.git"
'postgresql':
repo: "git://github.com/puppetlabs/puppet-postgresql.git"
ref: 'origin/4.1.x'
symlinks:
"sysinv": "#{source_dir}"

View File

@ -0,0 +1,14 @@
source 'https://rubygems.org'
group :development, :test do
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', '~> 0.3.2'
end
if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false
else
gem 'puppet', :require => false
end
# vim:ft=ruby

View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,14 @@
name 'puppetlabs-sysinv'
version '2.1.0'
source 'https://github.com/stackforge/puppet-sysinv'
author 'Puppet Labs'
license 'Apache License 2.0'
summary 'Puppet Labs Sysinv Module'
description 'Puppet module to install and configure the Sysinv platform service'
project_page 'https://launchpad.net/puppet-openstack'
dependency 'puppetlabs/inifile', '>=1.0.0 <2.0.0'
dependency 'puppetlabs/mysql', '>=0.6.1 <1.0.0'
dependency 'puppetlabs/stdlib', '>=2.5.0'
dependency 'puppetlabs/rabbitmq', '>=2.0.2 <3.0.0'
dependency 'dprince/qpid', '>=1.0.0 <2.0.0'

View File

@ -0,0 +1,130 @@
sysinv
=======
#### Table of Contents
1. [Overview - What is the sysinv module?](#overview)
2. [Module Description - What does the module do?](#module-description)
3. [Setup - The basics of getting started with sysinv](#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)
Overview
--------
The sysinv module is a part of [Stackforge](https://github.com/stackfoge), an effort by the Openstack infrastructure team to provide continuous integration testing and code review for Openstack and Openstack community projects not part of the core software. The module its self is used to flexibly configure and manage the block storage service for Openstack.
Module Description
------------------
The sysinv module is a thorough attempt to make Puppet capable of managing the entirety of sysinv. This includes manifests to provision such things as keystone endpoints, RPC configurations specific to sysinv, and database connections. Types are shipped as part of the sysinv module to assist in manipulation of configuration files.
This module is tested in combination with other modules needed to build and leverage an entire Openstack software stack. These modules can be found, all pulled together in the [openstack module](https://github.com/stackfoge/puppet-openstack).
Setup
-----
**What the sysinv module affects**
* sysinv, the block storage service for Openstack.
### Installing sysinv
example% puppet module install puppetlabs/sysinv
### Beginning with sysinv
To utilize the sysinv module's functionality you will need to declare multiple resources. The following is a modified excerpt from the [openstack module](https://github.com/stackfoge/puppet-openstack). This is not an exhaustive list of all the components needed, we recommend you consult and understand the [openstack module](https://github.com/stackforge/puppet-openstack) and the [core openstack](http://docs.openstack.org) documentation.
**Define a sysinv control node**
```puppet
class { '::sysinv':
sql_connection => 'mysql://sysinv:secret_block_password@openstack-controller.example.com/sysinv',
rabbit_password => 'secret_rpc_password_for_blocks',,
rabbit_host => 'openstack-controller.example.com',
verbose => true,
}
class { '::sysinv::api':
keystone_password => $keystone_password,
keystone_enabled => $keystone_enabled,
keystone_user => $keystone_user,
keystone_auth_host => $keystone_auth_host,
keystone_auth_port => $keystone_auth_port,
keystone_auth_protocol => $keystone_auth_protocol,
service_port => $keystone_service_port,
package_ensure => $sysinv_api_package_ensure,
bind_host => $sysinv_bind_host,
enabled => $sysinv_api_enabled,
}
class { '::sysinv::scheduler': scheduler_driver => 'sysinv.scheduler.simple.SimpleScheduler', }
```
**Define a sysinv storage node**
```puppet
class { '::sysinv':
sql_connection => 'mysql://sysinv:secret_block_password@openstack-controller.example.com/sysinv',
rabbit_password => 'secret_rpc_password_for_blocks',,
rabbit_host => 'openstack-controller.example.com',
verbose => true,
}
class { '::sysinv::volume': }
class { '::sysinv::volume::iscsi': iscsi_ip_address => '10.0.0.2', }
```
Implementation
--------------
### sysinv
sysinv is a combination of Puppet manifest and ruby code to delivery configuration and extra functionality through types and providers.
Limitations
------------
* Setup of storage nodes is limited to Linux and LVM, i.e. Puppet won't configure a Nexenta appliacne but nova can be configured to use the Nexenta driver with Class['sysinv::volume::nexenta'].
Development
-----------
Developer documentation for the entire puppet-openstack project.
* https://wiki.openstack.org/wiki/Puppet-openstack#Developer_documentation
Contributors
------------
* https://github.com/stackforge/puppet-sysinv/graphs/contributors
Release Notes
-------------
**2.1.0**
* Added configuration of Sysinv quotas.
* Added support for NetApp direct driver backend.
* Added support for ceph backend.
* Added support for SQL idle timeout.
* Added support for RabbitMQ clustering with single IP.
* Fixed allowed_hosts/database connection bug.
* Fixed lvm2 setup failure for Ubuntu.
* Removed unnecessary mysql::server dependency.
* Pinned RabbitMQ and database module versions.
* Various lint and bug fixes.
**2.0.0**
* Upstream is now part of stackfoge.
* Nexenta, NFS, and SAN support added as sysinv volume drivers.
* Postgres support added.
* The Apache Qpid and the RabbitMQ message brokers available as RPC backends.
* Configurability of scheduler_driver.
* Various cleanups and bug fixes.

View File

@ -0,0 +1,6 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_parameter_defaults')

View File

@ -0,0 +1,43 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Aug 2016: rebase mitaka
# Jun 2016: rebase centos
# Jun 2015: uprev kilo
# Dec 2014: uprev juno
# Jul 2014: rename ironic
# Dec 2013: uprev grizzly, havana
# Nov 2013: integrate source from https://github.com/stackforge/puppet-sysinv
#
Puppet::Type.type(:sysinv_api_paste_ini).provide(
:ini_setting,
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
) do
def section
resource[:name].split('/', 2).first
end
def setting
resource[:name].split('/', 2).last
end
def separator
'='
end
def self.file_path
'/etc/sysinv/api-paste.ini'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -0,0 +1,43 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Aug 2016: rebase mitaka
# Jun 2016: rebase centos
# Jun 2015: uprev kilo
# Dec 2014: uprev juno
# Jul 2014: rename ironic
# Dec 2013: uprev grizzly, havana
# Nov 2013: integrate source from https://github.com/stackforge/puppet-sysinv
#
Puppet::Type.type(:sysinv_config).provide(
:ini_setting,
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
) do
def section
resource[:name].split('/', 2).first
end
def setting
resource[:name].split('/', 2).last
end
def separator
'='
end
def self.file_path
'/etc/sysinv/sysinv.conf'
end
# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end
end

View File

@ -0,0 +1,58 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Aug 2016: rebase mitaka
# Jun 2016: rebase centos
# Jun 2015: uprev kilo
# Dec 2014: uprev juno
# Jul 2014: rename ironic
# Dec 2013: uprev grizzly, havana
# Nov 2013: integrate source from https://github.com/stackforge/puppet-sysinv
#
Puppet::Type.newtype(:sysinv_api_paste_ini) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from /etc/sysinv/api-paste.ini'
newvalues(/\S+\/\S+/)
end
newproperty(:value) do
desc 'The value of the setting to be defined.'
munge do |value|
value = value.to_s.strip
value.capitalize! if value =~ /^(true|false)$/i
value
end
def is_to_s( currentvalue )
if resource.secret?
return '[old secret redacted]'
else
return currentvalue
end
end
def should_to_s( newvalue )
if resource.secret?
return '[new secret redacted]'
else
return newvalue
end
end
end
newparam(:secret, :boolean => true) do
desc 'Whether to hide the value from Puppet logs. Defaults to `false`.'
newvalues(:true, :false)
defaultto false
end
end

View File

@ -0,0 +1,58 @@
#
# Files in this package are licensed under Apache; see LICENSE file.
#
# Copyright (c) 2013-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Aug 2016: rebase mitaka
# Jun 2016: rebase centos
# Jun 2015: uprev kilo
# Dec 2014: uprev juno
# Jul 2014: rename ironic
# Dec 2013: uprev grizzly, havana
# Nov 2013: integrate source from https://github.com/stackforge/puppet-sysinv
#
Puppet::Type.newtype(:sysinv_config) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from /etc/sysinv/sysinv.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
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
end

Some files were not shown because too many files have changed in this diff Show More