Retire repository
Fuel (from openstack namespace) and fuel-ccp (in x namespace) repositories are unused and ready to retire. This change removes all content from the repository and adds the usual README file to point out that the repository is retired following the process from https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project See also http://lists.openstack.org/pipermail/openstack-discuss/2019-December/011647.html Depends-On: https://review.opendev.org/699362 Change-Id: Ice4cf064434d2d4bd4b089fc06e9aa8ad96d9a64
This commit is contained in:
parent
794a56969c
commit
91aa182bec
|
@ -1,64 +0,0 @@
|
||||||
# Fuel Plugins
|
|
||||||
fpb_venv
|
|
||||||
*.rpm
|
|
||||||
*.deb
|
|
||||||
built_plugins/
|
|
||||||
.build/
|
|
||||||
*.fp
|
|
||||||
|
|
||||||
*.py[cod]
|
|
||||||
|
|
||||||
# C extensions
|
|
||||||
*.so
|
|
||||||
|
|
||||||
# Packages
|
|
||||||
*.egg*
|
|
||||||
*.egg-info
|
|
||||||
dist
|
|
||||||
build
|
|
||||||
eggs
|
|
||||||
parts
|
|
||||||
bin
|
|
||||||
var
|
|
||||||
sdist
|
|
||||||
develop-eggs
|
|
||||||
.installed.cfg
|
|
||||||
lib
|
|
||||||
lib64
|
|
||||||
|
|
||||||
# Installer logs
|
|
||||||
pip-log.txt
|
|
||||||
|
|
||||||
# Unit test / coverage reports
|
|
||||||
cover/
|
|
||||||
.coverage*
|
|
||||||
!.coveragerc
|
|
||||||
.tox
|
|
||||||
nosetests.xml
|
|
||||||
.testrepository
|
|
||||||
.venv
|
|
||||||
|
|
||||||
# Translations
|
|
||||||
*.mo
|
|
||||||
|
|
||||||
# Mr Developer
|
|
||||||
.mr.developer.cfg
|
|
||||||
.project
|
|
||||||
.pydevproject
|
|
||||||
|
|
||||||
# Complexity
|
|
||||||
output/*.html
|
|
||||||
output/*/index.html
|
|
||||||
|
|
||||||
# Sphinx
|
|
||||||
doc/build
|
|
||||||
|
|
||||||
# pbr generates these
|
|
||||||
AUTHORS
|
|
||||||
ChangeLog
|
|
||||||
|
|
||||||
# Editors
|
|
||||||
*~
|
|
||||||
.*.swp
|
|
||||||
.*sw?
|
|
||||||
.idea
|
|
182
CHANGELOG.md
182
CHANGELOG.md
|
@ -1,182 +0,0 @@
|
||||||
# Changelog
|
|
||||||
|
|
||||||
## 4.2.0 (2017-01-02)
|
|
||||||
|
|
||||||
New package version "4.2.0" includes the following features:
|
|
||||||
|
|
||||||
- Added new plugin version with node & nic attributes support
|
|
||||||
|
|
||||||
Bugfixes:
|
|
||||||
|
|
||||||
- Move Release.mako into v1 template dir
|
|
||||||
[LP1655289](https://bugs.launchpad.net/fuel/+bug/1655289)
|
|
||||||
- Make ubuntu repo similar for all plugin versions
|
|
||||||
[LP1650551](https://bugs.launchpad.net/fuel/+bug/1650551)
|
|
||||||
- Show team and repo badges on `README`
|
|
||||||
- Remove reboot task from plugin example version "3.0.0"
|
|
||||||
[LP1625244](https://bugs.launchpad.net/fuel/+bug/1625244)
|
|
||||||
- Files with no code must be left completely empty
|
|
||||||
- Legacy deployment tasks are turned back for plugin example version "3.0.0"
|
|
||||||
[LP1625244](https://bugs.launchpad.net/fuel/+bug/1625244)
|
|
||||||
- `tasks.yaml` was commented for plugin example version "3.0.0"
|
|
||||||
[LP1625244](https://bugs.launchpad.net/fuel/+bug/1625244)
|
|
||||||
- Allow unauthenticated packages in the deployment scripts
|
|
||||||
[LP1622506](https://bugs.launchpad.net/fuel/+bug/1622506)
|
|
||||||
- Allow arrays in 'value' in environment_config.yaml
|
|
||||||
[LP1616466](https://bugs.launchpad.net/fuel/+bug/1616466)
|
|
||||||
- Old `tasks.yaml` content is commented for plugins packages version "4.0.0"
|
|
||||||
[LP1619255](https://bugs.launchpad.net/fuel/+bug/1619255)
|
|
||||||
- Allow possibility to provide rpm `Release` version
|
|
||||||
[LP1616929](https://bugs.launchpad.net/fuel/+bug/1616929)
|
|
||||||
- Rename existing BaseValidator to LegacyBaseValidator
|
|
||||||
[LP1534126](https://bugs.launchpad.net/fuel/+bug/1534126)
|
|
||||||
- Fix a word spell error in `README.rst`
|
|
||||||
- Support multi versions of package in fuel plugin
|
|
||||||
[LP1599896](https://bugs.launchpad.net/fuel/+bug/1599896)
|
|
||||||
|
|
||||||
## 4.1.0 (2016-06-29)
|
|
||||||
|
|
||||||
Bugfixes:
|
|
||||||
|
|
||||||
- `tasks.yaml` is now optional for package version "4.0.0"
|
|
||||||
[LP1552248](https://bugs.launchpad.net/fuel/+bug/1552248)
|
|
||||||
- Fuel Mitaka (9.0) is supported by default in package version "4.0.0"
|
|
||||||
[LP1549276](https://bugs.launchpad.net/fuel/+bug/1549276)
|
|
||||||
- Use more reliable way to check for `fpm` Ruby GEM
|
|
||||||
[LP1561069](https://bugs.launchpad.net/fuel/+bug/1561069)
|
|
||||||
- Add ability for role to conflict with all roles by using `*` sign
|
|
||||||
[LP1547590](https://bugs.launchpad.net/fuel/+bug/1547590)
|
|
||||||
- Do not execute `uninstall.sh` on plugin upgrade
|
|
||||||
[LP1564123](https://bugs.launchpad.net/fuel/+bug/1564123)
|
|
||||||
- Add possiblity to use generators in `environment_config.yaml`
|
|
||||||
[LP1557562](https://bugs.launchpad.net/fuel/+bug/1557562)
|
|
||||||
- Don't put any code to PREUN section if `uninstall.sh` doesn't exist or empty
|
|
||||||
[LP1574478](https://bugs.launchpad.net/fuel/+bug/1574478)
|
|
||||||
- Allow a user to specify any arbitrary string as role name for cross-deps
|
|
||||||
[LP1557997](https://bugs.launchpad.net/fuel/+bug/1557997)
|
|
||||||
- Add deployment tasks v2.1 validation support
|
|
||||||
[LP1590389](https://bugs.launchpad.net/fuel/+bug/1590389)
|
|
||||||
|
|
||||||
## 4.0.0 (2016-02-26)
|
|
||||||
|
|
||||||
New package version "4.0.0" includes the following features:
|
|
||||||
|
|
||||||
- New flag `is_hotpluggable` in `metadata.yaml` that allows to install and use
|
|
||||||
plugin on previously deployed environments.
|
|
||||||
- Plugin can specify settings group using "group" field in metadata in
|
|
||||||
environment_config.yaml file.
|
|
||||||
- New group `equipment` added to groups list in `metadata.yaml`.
|
|
||||||
- New `components.yaml` file that allows to declare new components.
|
|
||||||
|
|
||||||
Bugfixes:
|
|
||||||
|
|
||||||
- Fix of missing strategy parameter in V3 and V4 deployment tasks
|
|
||||||
[LP1522785](https://bugs.launchpad.net/fuel/+bug/1522785)
|
|
||||||
|
|
||||||
## 3.0.0 (2014-09-16)
|
|
||||||
|
|
||||||
New package version "3.0.0" includes the following features:
|
|
||||||
|
|
||||||
- New `node_roles.yaml` file that allows to add new node roles.
|
|
||||||
- New `volumes.yaml` file that allows to add new volumes and/or define
|
|
||||||
"node roles <-> volumes" mapping.
|
|
||||||
- New `deployment_tasks.yaml` file that allows to declare pre/post- and
|
|
||||||
regular deployment tasks for any node role. Unlike `tasks.yaml`, the
|
|
||||||
tasks go through global deployment graph and that provides ability
|
|
||||||
to execute task at any place during deployment, or overwrite/skip
|
|
||||||
already existing ones.
|
|
||||||
- New `network_roles.yaml` file that allows to add new network roles
|
|
||||||
and reserve some VIPs, to be proceed by plugin.
|
|
||||||
|
|
||||||
Bugfixes:
|
|
||||||
|
|
||||||
- Fix executing of `deploy.sh` deployment script
|
|
||||||
[LP1463441](https://bugs.launchpad.net/fuel/+bug/1463441)
|
|
||||||
- Remove "Origin" field from Ubuntu's `Release` file in order to reduce
|
|
||||||
probability of broken apt pinning
|
|
||||||
[LP1475665](https://bugs.launchpad.net/fuel/+bug/1475665)
|
|
||||||
|
|
||||||
## 2.0.4 (2014-06-23)
|
|
||||||
|
|
||||||
- Fix, remove plugin package from previous build
|
|
||||||
https://bugs.launchpad.net/fuel/+bug/1464143
|
|
||||||
|
|
||||||
## 2.0.3 (2014-06-08)
|
|
||||||
|
|
||||||
- New "monitoring" group
|
|
||||||
https://bugs.launchpad.net/fuel/+bug/1458592
|
|
||||||
- Fix, fail build, if there are invalid deb packages for ubuntu repository
|
|
||||||
https://bugs.launchpad.net/fuel/+bug/1447981
|
|
||||||
- Fix dependency package name for newer CentOS
|
|
||||||
https://bugs.launchpad.net/fuel/+bug/1455882
|
|
||||||
|
|
||||||
## 2.0.2 (2014-05-15)
|
|
||||||
|
|
||||||
- Reverted fix for https://bugs.launchpad.net/fuel/+bug/1447981
|
|
||||||
because it caused creation of broken ubuntu repository
|
|
||||||
https://bugs.launchpad.net/fuel-plugins/+bug/1455130
|
|
||||||
|
|
||||||
## 2.0.1 (2014-05-08)
|
|
||||||
|
|
||||||
- Fix, fail build, if there are invalid deb packages for ubuntu repository
|
|
||||||
https://bugs.launchpad.net/fuel/+bug/1447981
|
|
||||||
- Fix validation for UI restrictions
|
|
||||||
https://bugs.launchpad.net/fuel/+bug/1448147
|
|
||||||
- Fix packages duplication after plugin build
|
|
||||||
https://bugs.launchpad.net/fuel/+bug/1451751
|
|
||||||
- Fix plugin name validation
|
|
||||||
https://bugs.launchpad.net/fuel/+bug/1439760
|
|
||||||
|
|
||||||
## 2.0.0 (2014-04-30)
|
|
||||||
|
|
||||||
- New package version "2.0.0", which is generated by default
|
|
||||||
- For plugins with 2.0.0 package version, fpb builds rpm packages
|
|
||||||
instead of *.fp archives. It was required for plugins updates
|
|
||||||
https://github.com/stackforge/fuel-specs/blob/master/specs/6.1/plugins-security-fixes.rst
|
|
||||||
- New "reboot" task for 2.0.0 plugins, which can reboot the node
|
|
||||||
and wait until reboot process is finished, see more details in the specification
|
|
||||||
https://github.com/stackforge/fuel-specs/blob/master/specs/6.1/reboot-task-type-for-plugin-developers.rst
|
|
||||||
- New required field groups, now you can specify a list of groups
|
|
||||||
which your plugin implements, see more details in the specification
|
|
||||||
https://github.com/stackforge/fuel-specs/blob/master/specs/6.1/plugin-groups.rst
|
|
||||||
- New required field authors (for plugins with 2.0.0 package version)
|
|
||||||
- New required field licenses (for plugins with 2.0.0 package version)
|
|
||||||
- New required field homepage (for plugins with 2.0.0 package version)
|
|
||||||
- New parameter "--package-version", to generate the plugins in old
|
|
||||||
format (e.g. package version 1.0.0)
|
|
||||||
- Fixed, plugins with package version 2.0.0, generate Release file
|
|
||||||
for Ubuntu repositories
|
|
||||||
https://bugs.launchpad.net/fuel/+bug/1435892
|
|
||||||
- New format of stages for plugins with package version 2.0.0,
|
|
||||||
added numerical postfixes
|
|
||||||
https://github.com/stackforge/fuel-specs/blob/master/specs/6.1/plugins-deployment-order.rst
|
|
||||||
|
|
||||||
## 1.0.2 (2014-12-19)
|
|
||||||
|
|
||||||
- Show correct message, if 'timeout' field is not specified for
|
|
||||||
task in tasks.yaml
|
|
||||||
https://bugs.launchpad.net/fuel/+bug/1396234
|
|
||||||
- Print error messages to stderr instead of stdout
|
|
||||||
- Fixed validation for environment_config.yaml file, "attributes"
|
|
||||||
field is optional
|
|
||||||
https://bugs.launchpad.net/fuel/+bug/1396491
|
|
||||||
- Improved validation for environment_config.yaml file, added
|
|
||||||
required fields for attributes
|
|
||||||
- Generate file with SHA1 checksums for each file in the plugin
|
|
||||||
https://bugs.launchpad.net/fuel/+bug/1403960
|
|
||||||
|
|
||||||
## 1.0.1 (2014-11-20)
|
|
||||||
|
|
||||||
- Show instruction for CentOS if not all requirements are installed
|
|
||||||
- Fixed bug, deploy.sh doesn't have execution permission
|
|
||||||
https://bugs.launchpad.net/fuel/+bug/1392736
|
|
||||||
- Fixed bug, don't fail validation if environment_config.yaml file has checkbox
|
|
||||||
https://bugs.launchpad.net/fuel/+bug/1392807
|
|
||||||
|
|
||||||
## 1.0.0 (2014-11-13)
|
|
||||||
|
|
||||||
Initial public release
|
|
||||||
|
|
||||||
- Plugin create
|
|
||||||
- Plugin build
|
|
||||||
- Plugin check
|
|
|
@ -1,17 +0,0 @@
|
||||||
If you would like to contribute to the development of OpenStack, you must
|
|
||||||
follow the steps in this page:
|
|
||||||
|
|
||||||
http://docs.openstack.org/infra/manual/developers.html
|
|
||||||
|
|
||||||
If you already have a good understanding of how the system works and your
|
|
||||||
OpenStack accounts are set up, you can skip to the development workflow
|
|
||||||
section of this documentation to learn how changes to OpenStack should be
|
|
||||||
submitted for review via the Gerrit tool:
|
|
||||||
|
|
||||||
http://docs.openstack.org/infra/manual/developers.html#development-workflow
|
|
||||||
|
|
||||||
Pull requests submitted through GitHub will be ignored.
|
|
||||||
|
|
||||||
Bugs should be filed on Launchpad, not GitHub:
|
|
||||||
|
|
||||||
https://bugs.launchpad.net/fuel
|
|
|
@ -1,4 +0,0 @@
|
||||||
Fuel Plugins Style Commandments
|
|
||||||
===============================
|
|
||||||
|
|
||||||
Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
|
|
202
LICENSE
202
LICENSE
|
@ -1,202 +0,0 @@
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright {yyyy} {name of copyright owner}
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
37
MAINTAINERS
37
MAINTAINERS
|
@ -1,37 +0,0 @@
|
||||||
---
|
|
||||||
description:
|
|
||||||
For Fuel team structure and contribution policy, see [1].
|
|
||||||
|
|
||||||
This is repository level MAINTAINERS file. All contributions to this
|
|
||||||
repository must be approved by one or more Core Reviewers [2].
|
|
||||||
If you are contributing to files (or create new directories) in
|
|
||||||
root folder of this repository, please contact Core Reviewers for
|
|
||||||
review and merge requests.
|
|
||||||
|
|
||||||
If you are contributing to subfolders of this repository, please
|
|
||||||
check 'maintainers' section of this file in order to find maintainers
|
|
||||||
for those specific modules.
|
|
||||||
|
|
||||||
It is mandatory to get +1 from one or more maintainers before asking
|
|
||||||
Core Reviewers for review/merge in order to decrease a load on Core Reviewers [3].
|
|
||||||
Exceptions are when maintainers are actually cores, or when maintainers
|
|
||||||
are not available for some reason (e.g. on vacation).
|
|
||||||
|
|
||||||
[1] http://specs.fuel-infra.org/fuel-specs-master/policy/team-structure.html
|
|
||||||
[2] https://review.openstack.org/#/admin/groups/661,members
|
|
||||||
[3] http://lists.openstack.org/pipermail/openstack-dev/2015-August/072406.html
|
|
||||||
|
|
||||||
Please keep this file in YAML format in order to allow helper scripts
|
|
||||||
to read this as a configuration data.
|
|
||||||
|
|
||||||
maintainers:
|
|
||||||
|
|
||||||
- ./:
|
|
||||||
|
|
||||||
- name: Andrii Popovych
|
|
||||||
email: apopovych@mirantis.com
|
|
||||||
IRC: apopovych
|
|
||||||
|
|
||||||
- name: Ilya Kutukov
|
|
||||||
email: ikutukov@mirantis.com
|
|
||||||
IRC: ikutukov
|
|
104
README.rst
104
README.rst
|
@ -1,98 +1,10 @@
|
||||||
========================
|
This project is no longer maintained.
|
||||||
Team and repository tags
|
|
||||||
========================
|
|
||||||
|
|
||||||
.. image:: http://governance.openstack.org/badges/fuel-plugins.svg
|
The contents of this repository are still available in the Git
|
||||||
:target: http://governance.openstack.org/reference/tags/index.html
|
source code management system. To see the contents of this
|
||||||
|
repository before it reached its end of life, please check out the
|
||||||
|
previous commit with "git checkout HEAD^1".
|
||||||
|
|
||||||
.. Change things from this point on
|
For any further questions, please email
|
||||||
|
openstack-discuss@lists.openstack.org or join #openstack-dev on
|
||||||
Fuel Plugins
|
Freenode.
|
||||||
============
|
|
||||||
|
|
||||||
Starting with version 6.0, Fuel supports a Pluggable architecture.
|
|
||||||
|
|
||||||
Fuel plugins allow you to install and configure additional capabilities for
|
|
||||||
your cloud, such as additional storage types and networking functionality.
|
|
||||||
For example, a Load Balancing as a Service (LBaaS) plugin allows you to add
|
|
||||||
network load balancing functionality to your cloud so that incoming traffic
|
|
||||||
can be spread across multiple nodes. Or you might want to use a GlusterFS
|
|
||||||
plugin so that you can use a Gluster file system as backend for Cinder
|
|
||||||
volumes.
|
|
||||||
|
|
||||||
|
|
||||||
Finding Plugins
|
|
||||||
---------------
|
|
||||||
|
|
||||||
For production versions of plugins, including certified plugins, see
|
|
||||||
`Released Plugins Catalog`_.
|
|
||||||
|
|
||||||
For instructions on installing Fuel plugins, see `Installing Plugins`_.
|
|
||||||
|
|
||||||
|
|
||||||
Finding documentation
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
You can find Fuel Plugins documentation in the following sources:
|
|
||||||
|
|
||||||
* Development issues - `Plugins Wiki`_ page.
|
|
||||||
* Common installation instructions - `Install Fuel Plugins`_ and
|
|
||||||
`CLI command reference`_ sections in the User Guide.
|
|
||||||
* Specific installation instructions - `Fuel Plugins Catalog`_.
|
|
||||||
|
|
||||||
|
|
||||||
OpenStack Fuel-plugins Repository
|
|
||||||
---------------------------------
|
|
||||||
|
|
||||||
This repository contains plugin example, and the Fuel plugin builder tool
|
|
||||||
(fpb). The plugin code here might not be suitable for production use please
|
|
||||||
see `Released Plugins Catalog`_ to download release versions of these and
|
|
||||||
other Fuel plugins.
|
|
||||||
|
|
||||||
|
|
||||||
Creating your own plugins
|
|
||||||
-------------------------
|
|
||||||
|
|
||||||
Detailed instructions can be found in the `Plugins Wiki`_ page.
|
|
||||||
|
|
||||||
Plugins should be built using the ``fuel-plugin-builder`` (fpb) utility
|
|
||||||
found in this repoistory or via ``pip``. ``fpb`` will ensure that build
|
|
||||||
steps as well as validation is performed prior to assembling a package.
|
|
||||||
|
|
||||||
Abbreviated instructions:
|
|
||||||
|
|
||||||
.. code:: bash
|
|
||||||
|
|
||||||
pip install fuel-plugin-builder
|
|
||||||
fpb --create fuel_plugin_name
|
|
||||||
fpb --build <path to plugin>
|
|
||||||
|
|
||||||
This will:
|
|
||||||
|
|
||||||
* install fuel-plugin-builder
|
|
||||||
* clone the fuel_plugin_example plugin with the name fuel_plugin_name
|
|
||||||
* build the plugin ``.rpm`` package.
|
|
||||||
|
|
||||||
Examples
|
|
||||||
````````
|
|
||||||
|
|
||||||
Simple Fuel plugin examples you can find here:
|
|
||||||
|
|
||||||
https://github.com/openstack/fuel-plugins/tree/master/examples
|
|
||||||
|
|
||||||
Other Plugin repositories
|
|
||||||
`````````````````````````
|
|
||||||
|
|
||||||
Other locations known to have Fuel plugins. *Note, these may not be supported
|
|
||||||
by the Fuel team*
|
|
||||||
|
|
||||||
* `Community Plugins`_
|
|
||||||
|
|
||||||
|
|
||||||
.. _Released Plugins Catalog: https://www.fuel-infra.org/plugins/catalog.html
|
|
||||||
.. _Installing Plugins: https://wiki.openstack.org/wiki/Fuel/Plugins#Installation_procedure
|
|
||||||
.. _Plugins Wiki: http://wiki.openstack.org/Fuel/Plugins
|
|
||||||
.. _Install Fuel Plugins: http://docs.mirantis.com/openstack/fuel/fuel-master/user-guide.html#install-fuel-plugins
|
|
||||||
.. _CLI command reference: http://docs.mirantis.com/openstack/fuel/fuel-master/user-guide.html#fuel-plugins-cli
|
|
||||||
.. _Fuel Plugins Catalog: https://software.mirantis.com/download-mirantis-openstack-fuel-plug-ins/
|
|
||||||
.. _Community Plugins: https://github.com/openstack/?query=fuel-plugin
|
|
||||||
|
|
|
@ -1,202 +0,0 @@
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright {yyyy} {name of copyright owner}
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
fuel_plugin_example
|
|
||||||
============
|
|
||||||
|
|
||||||
Plugin description
|
|
|
@ -1,23 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -eux
|
|
||||||
|
|
||||||
# It's a script which deploys your plugin
|
|
||||||
echo fuel_plugin_example > /tmp/fuel_plugin_example
|
|
||||||
|
|
||||||
OS_NAME=''
|
|
||||||
if grep -i CentOS /etc/issue.net >/dev/null; then
|
|
||||||
OS_NAME='centos';
|
|
||||||
elif grep -i Ubuntu /etc/issue.net >/dev/null; then
|
|
||||||
OS_NAME='ubuntu';
|
|
||||||
fi
|
|
||||||
|
|
||||||
function install_package {
|
|
||||||
if [ $OS_NAME == 'ubuntu' ]; then
|
|
||||||
apt-get install -y --force-yes -o 'APT::Get::AllowUnauthenticated=1' fuel-simple-service
|
|
||||||
elif [ $OS_NAME == 'centos' ]; then
|
|
||||||
yum install -y fuel-simple-service
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
install_package
|
|
||||||
fuel-simple-service.py &
|
|
|
@ -1,48 +0,0 @@
|
||||||
attributes:
|
|
||||||
|
|
||||||
fuel_plugin_example_text:
|
|
||||||
type: "text"
|
|
||||||
weight: 10
|
|
||||||
value: "Default text"
|
|
||||||
label: "Text field label"
|
|
||||||
description: "Field description"
|
|
||||||
regex:
|
|
||||||
source: '\S'
|
|
||||||
error: "Error field cannot be empty"
|
|
||||||
|
|
||||||
fuel_plugin_example_select:
|
|
||||||
type: "select"
|
|
||||||
weight: 20
|
|
||||||
value: "value2"
|
|
||||||
label: "Select label"
|
|
||||||
description: "Select description"
|
|
||||||
values:
|
|
||||||
- data: "value1"
|
|
||||||
label: "Value 1 label"
|
|
||||||
- data: "value2"
|
|
||||||
label: "Value 2 label"
|
|
||||||
- data: "value3"
|
|
||||||
label: "Value 3 label"
|
|
||||||
|
|
||||||
fuel_plugin_example_checkbox:
|
|
||||||
type: "checkbox"
|
|
||||||
weight: 30
|
|
||||||
value: false
|
|
||||||
label: "Checkbox label"
|
|
||||||
description: "Checkbox description"
|
|
||||||
|
|
||||||
fuel_plugin_example_radio:
|
|
||||||
type: "radio"
|
|
||||||
weight: 40
|
|
||||||
value: "disabled"
|
|
||||||
label: "Radio buttons label"
|
|
||||||
values:
|
|
||||||
- data: "data1"
|
|
||||||
label: "Label data1"
|
|
||||||
description: "Description data1"
|
|
||||||
- data: "data2"
|
|
||||||
label: "Label data2"
|
|
||||||
description: "Description data2"
|
|
||||||
- data: "data3"
|
|
||||||
label: "Label data3"
|
|
||||||
description: "Description data3"
|
|
|
@ -1,26 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# -*- encoding: utf-8 -*-
|
|
||||||
|
|
||||||
from wsgiref.simple_server import make_server
|
|
||||||
|
|
||||||
def web_app(environ, start_response):
|
|
||||||
status = '200 OK'
|
|
||||||
headers = [('Content-type', 'text/plain')]
|
|
||||||
|
|
||||||
start_response(status, headers)
|
|
||||||
|
|
||||||
return open('/etc/astute.yaml').read()
|
|
||||||
|
|
||||||
|
|
||||||
def start_server(host, port):
|
|
||||||
httpd = make_server(host, port, web_app)
|
|
||||||
print 'Started server 8234'
|
|
||||||
httpd.serve_forever()
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
start_server('', 8234)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -1,56 +0,0 @@
|
||||||
# Plugin name
|
|
||||||
name: fuel_plugin_example
|
|
||||||
title: Fuel plugin example
|
|
||||||
# Plugin version
|
|
||||||
version: '1.0.0'
|
|
||||||
# Description
|
|
||||||
description: Plugin example which installs simple service on controllers
|
|
||||||
# Minimum required fuel version
|
|
||||||
fuel_version: ['6.0']
|
|
||||||
|
|
||||||
# The plugin is compatible with releases in the list
|
|
||||||
releases:
|
|
||||||
- os: ubuntu
|
|
||||||
version: 2014.2-6.0
|
|
||||||
mode: ['ha', 'multinode']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: centos
|
|
||||||
version: 2014.2-6.0
|
|
||||||
mode: ['ha', 'multinode']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/centos
|
|
||||||
- os: ubuntu
|
|
||||||
version: 2014.2-6.1
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: centos
|
|
||||||
version: 2014.2-6.1
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/centos
|
|
||||||
- os: ubuntu
|
|
||||||
version: 2015.1.0-7.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: ubuntu
|
|
||||||
version: liberty-8.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: ubuntu
|
|
||||||
version: mitaka-9.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: ubuntu
|
|
||||||
version: newton-10.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
|
|
||||||
|
|
||||||
# Version of plugin package
|
|
||||||
package_version: '1.0.0'
|
|
|
@ -1,21 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -eux
|
|
||||||
|
|
||||||
command -v fpm >/dev/null 2>&1 || {
|
|
||||||
echo >&2 "Install 'fpm' to build this plugin. Aborting."; exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ruby -e "require 'fpm'" 2>&1 || {
|
|
||||||
echo >&2 "'Fpm' binary file is present, but gem seems to be broken! Aborting."; exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ROOT=$(dirname `readlink -f $0`)
|
|
||||||
|
|
||||||
UBUNTU_REPO_PATH=$ROOT/repositories/ubuntu
|
|
||||||
CENTOS_REPO_PATH=$ROOT/repositories/centos
|
|
||||||
|
|
||||||
rm -f $UBUNTU_REPO_PATH/*.deb
|
|
||||||
rm -f $CENTOS_REPO_PATH/*.rpm
|
|
||||||
|
|
||||||
fpm -t deb -p $UBUNTU_REPO_PATH -n fuel-simple-service -v 1.0.0 -s dir $ROOT/fuel-simple-service.py=/usr/bin/fuel-simple-service.py
|
|
||||||
fpm -t rpm -p $CENTOS_REPO_PATH -n fuel-simple-service -v 1.0.0 -s dir $ROOT/fuel-simple-service.py=/usr/bin/fuel-simple-service.py
|
|
|
@ -1,14 +0,0 @@
|
||||||
# This tasks will be applied on controller nodes
|
|
||||||
- role: ['controller']
|
|
||||||
stage: post_deployment
|
|
||||||
type: shell
|
|
||||||
parameters:
|
|
||||||
cmd: bash deploy.sh
|
|
||||||
timeout: 42
|
|
||||||
# Task is applied for all roles
|
|
||||||
- role: '*'
|
|
||||||
stage: pre_deployment
|
|
||||||
type: shell
|
|
||||||
parameters:
|
|
||||||
cmd: echo all > /tmp/plugin.all
|
|
||||||
timeout: 42
|
|
|
@ -1,3 +0,0 @@
|
||||||
.tox
|
|
||||||
.build
|
|
||||||
*.pyc
|
|
|
@ -1,202 +0,0 @@
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright {yyyy} {name of copyright owner}
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
fuel_plugin_example
|
|
||||||
===================
|
|
||||||
|
|
||||||
Plugin description
|
|
|
@ -1,23 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -eux
|
|
||||||
|
|
||||||
# It's a script which deploys your plugin
|
|
||||||
echo fuel_plugin_example > /tmp/fuel_plugin_example
|
|
||||||
|
|
||||||
OS_NAME=''
|
|
||||||
if grep -i CentOS /etc/issue.net >/dev/null; then
|
|
||||||
OS_NAME='centos';
|
|
||||||
elif grep -i Ubuntu /etc/issue.net >/dev/null; then
|
|
||||||
OS_NAME='ubuntu';
|
|
||||||
fi
|
|
||||||
|
|
||||||
function install_package {
|
|
||||||
if [ $OS_NAME == 'ubuntu' ]; then
|
|
||||||
apt-get install -y --force-yes -o 'APT::Get::AllowUnauthenticated=1' fuel-simple-service
|
|
||||||
elif [ $OS_NAME == 'centos' ]; then
|
|
||||||
yum install -y fuel-simple-service
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
install_package
|
|
||||||
fuel-simple-service.py &
|
|
|
@ -1,7 +0,0 @@
|
||||||
attributes:
|
|
||||||
fuel_plugin_example:
|
|
||||||
value: 'Set default value'
|
|
||||||
label: 'Text field'
|
|
||||||
description: 'Description for text field'
|
|
||||||
weight: 25
|
|
||||||
type: "text"
|
|
|
@ -1,26 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# -*- encoding: utf-8 -*-
|
|
||||||
|
|
||||||
from wsgiref.simple_server import make_server
|
|
||||||
|
|
||||||
def web_app(environ, start_response):
|
|
||||||
status = '200 OK'
|
|
||||||
headers = [('Content-type', 'text/plain')]
|
|
||||||
|
|
||||||
start_response(status, headers)
|
|
||||||
|
|
||||||
return open('/etc/astute.yaml').read()
|
|
||||||
|
|
||||||
|
|
||||||
def start_server(host, port):
|
|
||||||
httpd = make_server(host, port, web_app)
|
|
||||||
print 'Started server 8234'
|
|
||||||
httpd.serve_forever()
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
start_server('', 8234)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -1,54 +0,0 @@
|
||||||
# Plugin name
|
|
||||||
name: fuel_plugin_example
|
|
||||||
# Human-readable name for your plugin
|
|
||||||
title: Title for fuel_plugin_example plugin
|
|
||||||
# Plugin version
|
|
||||||
version: '2.0.0'
|
|
||||||
# Description
|
|
||||||
description: Please describe your plugin here
|
|
||||||
# Minimum required fuel version
|
|
||||||
fuel_version: ['6.1']
|
|
||||||
# Specify license of your plugin
|
|
||||||
licenses: ['Apache License Version 2.0']
|
|
||||||
# Specify author or company name
|
|
||||||
authors: ['Specify author or company name']
|
|
||||||
# A link to the plugin's page
|
|
||||||
homepage: 'https://github.com/stackforge/fuel-plugins'
|
|
||||||
groups: []
|
|
||||||
|
|
||||||
# The plugin is compatible with releases in the list
|
|
||||||
releases:
|
|
||||||
- os: ubuntu
|
|
||||||
version: 2014.2-6.1
|
|
||||||
mode: ['ha', 'multinode']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: centos
|
|
||||||
version: 2014.2-6.1
|
|
||||||
mode: ['ha', 'multinode']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/centos
|
|
||||||
- os: ubuntu
|
|
||||||
version: 2015.1.0-7.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: ubuntu
|
|
||||||
version: liberty-8.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: ubuntu
|
|
||||||
version: mitaka-9.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: ubuntu
|
|
||||||
version: newton-10.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
|
|
||||||
|
|
||||||
# Version of plugin package
|
|
||||||
package_version: '2.0.0'
|
|
|
@ -1,21 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -eux
|
|
||||||
|
|
||||||
command -v fpm >/dev/null 2>&1 || {
|
|
||||||
echo >&2 "Install 'fpm' to build this plugin. Aborting."; exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ruby -e "require 'fpm'" 2>&1 || {
|
|
||||||
echo >&2 "'Fpm' binary file is present, but gem seems to be broken! Aborting."; exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ROOT=$(dirname `readlink -f $0`)
|
|
||||||
|
|
||||||
UBUNTU_REPO_PATH=$ROOT/repositories/ubuntu
|
|
||||||
CENTOS_REPO_PATH=$ROOT/repositories/centos
|
|
||||||
|
|
||||||
rm -f $UBUNTU_REPO_PATH/*.deb
|
|
||||||
rm -f $CENTOS_REPO_PATH/*.rpm
|
|
||||||
|
|
||||||
fpm -t deb -p $UBUNTU_REPO_PATH -n fuel-simple-service -v 2.0.0 -s dir $ROOT/fuel-simple-service.py=/usr/bin/fuel-simple-service.py
|
|
||||||
fpm -t rpm -p $CENTOS_REPO_PATH -n fuel-simple-service -v 2.0.0 -s dir $ROOT/fuel-simple-service.py=/usr/bin/fuel-simple-service.py
|
|
|
@ -1,20 +0,0 @@
|
||||||
# This tasks will be applied on controller nodes
|
|
||||||
- role: ['primary-controller', 'controller']
|
|
||||||
stage: post_deployment
|
|
||||||
type: shell
|
|
||||||
parameters:
|
|
||||||
cmd: bash deploy.sh
|
|
||||||
timeout: 42
|
|
||||||
# Task is applied for all roles
|
|
||||||
- role: '*'
|
|
||||||
stage: pre_deployment
|
|
||||||
type: shell
|
|
||||||
parameters:
|
|
||||||
cmd: echo all > /tmp/plugin.all
|
|
||||||
timeout: 42
|
|
||||||
# "reboot" task reboots the nodes and waits until they get back online
|
|
||||||
# - role: '*'
|
|
||||||
# stage: pre_deployment
|
|
||||||
# type: reboot
|
|
||||||
# parameters:
|
|
||||||
# timeout: 600
|
|
|
@ -1,3 +0,0 @@
|
||||||
.tox
|
|
||||||
.build
|
|
||||||
*.pyc
|
|
|
@ -1,202 +0,0 @@
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright {yyyy} {name of copyright owner}
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
fuel_plugin_example
|
|
||||||
===================
|
|
||||||
|
|
||||||
Plugin description
|
|
|
@ -1,23 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -eux
|
|
||||||
|
|
||||||
# It's a script which deploys your plugin
|
|
||||||
echo fuel_plugin_example > /tmp/fuel_plugin_example
|
|
||||||
|
|
||||||
OS_NAME=''
|
|
||||||
if grep -i CentOS /etc/issue.net >/dev/null; then
|
|
||||||
OS_NAME='centos';
|
|
||||||
elif grep -i Ubuntu /etc/issue.net >/dev/null; then
|
|
||||||
OS_NAME='ubuntu';
|
|
||||||
fi
|
|
||||||
|
|
||||||
function install_package {
|
|
||||||
if [ $OS_NAME == 'ubuntu' ]; then
|
|
||||||
apt-get install -y --force-yes -o 'APT::Get::AllowUnauthenticated=1' fuel-simple-service
|
|
||||||
elif [ $OS_NAME == 'centos' ]; then
|
|
||||||
yum install -y fuel-simple-service
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
install_package
|
|
||||||
fuel-simple-service.py &
|
|
|
@ -1,7 +0,0 @@
|
||||||
attributes:
|
|
||||||
fuel_plugin_example:
|
|
||||||
value: 'Set default value'
|
|
||||||
label: 'Text field'
|
|
||||||
description: 'Description for text field'
|
|
||||||
weight: 25
|
|
||||||
type: "text"
|
|
|
@ -1,26 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# -*- encoding: utf-8 -*-
|
|
||||||
|
|
||||||
from wsgiref.simple_server import make_server
|
|
||||||
|
|
||||||
def web_app(environ, start_response):
|
|
||||||
status = '200 OK'
|
|
||||||
headers = [('Content-type', 'text/plain')]
|
|
||||||
|
|
||||||
start_response(status, headers)
|
|
||||||
|
|
||||||
return open('/etc/astute.yaml').read()
|
|
||||||
|
|
||||||
|
|
||||||
def start_server(host, port):
|
|
||||||
httpd = make_server(host, port, web_app)
|
|
||||||
print 'Started server 8234'
|
|
||||||
httpd.serve_forever()
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
start_server('', 8234)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -1,54 +0,0 @@
|
||||||
# Plugin name
|
|
||||||
name: fuel_plugin_example
|
|
||||||
# Human-readable name for your plugin
|
|
||||||
title: Title for fuel_plugin_example plugin
|
|
||||||
# Plugin version
|
|
||||||
version: '2.0.2'
|
|
||||||
# Description
|
|
||||||
description: Please describe your plugin here
|
|
||||||
# Minimum required fuel version
|
|
||||||
fuel_version: ['6.1']
|
|
||||||
# Specify license of your plugin
|
|
||||||
licenses: ['Apache License Version 2.0']
|
|
||||||
# Specify author or company name
|
|
||||||
authors: ['Specify author or company name']
|
|
||||||
# A link to the plugin's page
|
|
||||||
homepage: 'https://github.com/stackforge/fuel-plugins'
|
|
||||||
groups: []
|
|
||||||
|
|
||||||
# The plugin is compatible with releases in the list
|
|
||||||
releases:
|
|
||||||
- os: ubuntu
|
|
||||||
version: 2014.2-6.1
|
|
||||||
mode: ['ha', 'multinode']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: centos
|
|
||||||
version: 2014.2-6.1
|
|
||||||
mode: ['ha', 'multinode']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/centos
|
|
||||||
- os: ubuntu
|
|
||||||
version: 2015.1.0-7.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: ubuntu
|
|
||||||
version: liberty-8.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: ubuntu
|
|
||||||
version: mitaka-9.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: ubuntu
|
|
||||||
version: newton-10.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
|
|
||||||
|
|
||||||
# Version of plugin package
|
|
||||||
package_version: '2.0.0'
|
|
|
@ -1,21 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -eux
|
|
||||||
|
|
||||||
command -v fpm >/dev/null 2>&1 || {
|
|
||||||
echo >&2 "Install 'fpm' to build this plugin. Aborting."; exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ruby -e "require 'fpm'" 2>&1 || {
|
|
||||||
echo >&2 "'Fpm' binary file is present, but gem seems to be broken! Aborting."; exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ROOT=$(dirname `readlink -f $0`)
|
|
||||||
|
|
||||||
UBUNTU_REPO_PATH=$ROOT/repositories/ubuntu
|
|
||||||
CENTOS_REPO_PATH=$ROOT/repositories/centos
|
|
||||||
|
|
||||||
rm -f $UBUNTU_REPO_PATH/*.deb
|
|
||||||
rm -f $CENTOS_REPO_PATH/*.rpm
|
|
||||||
|
|
||||||
fpm -t deb -p $UBUNTU_REPO_PATH -n fuel-simple-service -v 2.0.2 -s dir $ROOT/fuel-simple-service.py=/usr/bin/fuel-simple-service.py
|
|
||||||
fpm -t rpm -p $CENTOS_REPO_PATH -n fuel-simple-service -v 2.0.2 -s dir $ROOT/fuel-simple-service.py=/usr/bin/fuel-simple-service.py
|
|
|
@ -1,34 +0,0 @@
|
||||||
# This tasks will be applied on controller nodes
|
|
||||||
- role: ['primary-controller', 'controller']
|
|
||||||
stage: post_deployment
|
|
||||||
type: shell
|
|
||||||
parameters:
|
|
||||||
cmd: bash deploy.sh
|
|
||||||
timeout: 42
|
|
||||||
|
|
||||||
- role: '*'
|
|
||||||
stage: pre_deployment/100
|
|
||||||
type: shell
|
|
||||||
parameters:
|
|
||||||
cmd: echo all > /tmp/plugin+100.all
|
|
||||||
timeout: 42
|
|
||||||
|
|
||||||
- role: '*'
|
|
||||||
stage: pre_deployment/+101.0
|
|
||||||
type: shell
|
|
||||||
parameters:
|
|
||||||
cmd: echo all > /tmp/plugin+100.0.all
|
|
||||||
timeout: 42
|
|
||||||
|
|
||||||
- role: '*'
|
|
||||||
stage: pre_deployment/-100
|
|
||||||
type: shell
|
|
||||||
parameters:
|
|
||||||
cmd: echo all > /tmp/plugin-100.all
|
|
||||||
timeout: 42
|
|
||||||
|
|
||||||
- role: '*'
|
|
||||||
stage: pre_deployment
|
|
||||||
type: reboot
|
|
||||||
parameters:
|
|
||||||
timeout: 600
|
|
|
@ -1,3 +0,0 @@
|
||||||
.tox
|
|
||||||
.build
|
|
||||||
*.pyc
|
|
|
@ -1,202 +0,0 @@
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright {yyyy} {name of copyright owner}
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
fuel_plugin_example_v3
|
|
||||||
============
|
|
||||||
|
|
||||||
Plugin description
|
|
|
@ -1,12 +0,0 @@
|
||||||
notice('PLUGIN: fuel_plugin_example_v3 - deploy.pp')
|
|
||||||
|
|
||||||
class fuel_plugin_example_v3 {
|
|
||||||
file { '/tmp/fuel_plugin_example_v3_puppet':
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => 0644,
|
|
||||||
content => "fuel_plugin_example_v3\n",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class {'fuel_plugin_example_v3': }
|
|
|
@ -1,23 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -eux
|
|
||||||
|
|
||||||
# It's a script which deploys your plugin
|
|
||||||
echo fuel_plugin_example_v3 > /tmp/fuel_plugin_example_v3_sh
|
|
||||||
|
|
||||||
OS_NAME=''
|
|
||||||
if grep -i CentOS /etc/issue.net >/dev/null; then
|
|
||||||
OS_NAME='centos';
|
|
||||||
elif grep -i Ubuntu /etc/issue.net >/dev/null; then
|
|
||||||
OS_NAME='ubuntu';
|
|
||||||
fi
|
|
||||||
|
|
||||||
function install_package {
|
|
||||||
if [ $OS_NAME == 'ubuntu' ]; then
|
|
||||||
apt-get install -y --force-yes -o 'APT::Get::AllowUnauthenticated=1' fuel-simple-service
|
|
||||||
elif [ $OS_NAME == 'centos' ]; then
|
|
||||||
yum install -y fuel-simple-service
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
install_package
|
|
||||||
fuel-simple-service.py &
|
|
|
@ -1,86 +0,0 @@
|
||||||
- id: fuel_plugin_example_v3
|
|
||||||
type: group
|
|
||||||
role: [fuel_plugin_example_v3]
|
|
||||||
tasks:
|
|
||||||
- hiera
|
|
||||||
- globals
|
|
||||||
required_for: [deploy_end]
|
|
||||||
requires: [deploy_start]
|
|
||||||
parameters:
|
|
||||||
strategy:
|
|
||||||
type: parallel
|
|
||||||
|
|
||||||
- id: fuel_plugin_example_v3-controller-deployment
|
|
||||||
type: puppet
|
|
||||||
groups: [primary-controller, controller]
|
|
||||||
required_for: [connectivity_tests, deploy_end]
|
|
||||||
requires: [netconfig, deploy_start]
|
|
||||||
parameters:
|
|
||||||
puppet_manifest: "deploy.pp"
|
|
||||||
puppet_modules: "."
|
|
||||||
timeout: 3600
|
|
||||||
|
|
||||||
- id: fuel_plugin_example_v3-deployment
|
|
||||||
type: puppet
|
|
||||||
groups: [fuel_plugin_example_v3]
|
|
||||||
required_for: [deploy_end]
|
|
||||||
requires: [deploy_start]
|
|
||||||
parameters:
|
|
||||||
puppet_manifest: "deploy.pp"
|
|
||||||
puppet_modules: "."
|
|
||||||
timeout: 3600
|
|
||||||
retries: 10
|
|
||||||
|
|
||||||
- id: fuel_plugin_example_v3-post-deployment-sh
|
|
||||||
type: shell
|
|
||||||
role: [fuel_plugin_example_v3]
|
|
||||||
required_for: [post_deployment_end]
|
|
||||||
requires: [post_deployment_start]
|
|
||||||
parameters:
|
|
||||||
cmd: bash deploy.sh
|
|
||||||
retries: 3
|
|
||||||
interval: 20
|
|
||||||
timeout: 180
|
|
||||||
|
|
||||||
# This legacy tasks will be applied on controller nodes
|
|
||||||
- id: fuel_plugin_example_v3-legacy-1
|
|
||||||
role: ['primary-controller', 'controller']
|
|
||||||
stage: post_deployment
|
|
||||||
type: shell
|
|
||||||
parameters:
|
|
||||||
cmd: bash deploy.sh
|
|
||||||
timeout: 42
|
|
||||||
|
|
||||||
- id: fuel_plugin_example_v3-legacy-2
|
|
||||||
role: '*'
|
|
||||||
stage: pre_deployment/100
|
|
||||||
type: shell
|
|
||||||
parameters:
|
|
||||||
cmd: echo all > /tmp/plugin+100.all
|
|
||||||
timeout: 42
|
|
||||||
|
|
||||||
- id: fuel_plugin_example_v3-legacy-3
|
|
||||||
role: '*'
|
|
||||||
stage: pre_deployment/+101.0
|
|
||||||
type: shell
|
|
||||||
parameters:
|
|
||||||
cmd: echo all > /tmp/plugin+100.0.all
|
|
||||||
timeout: 42
|
|
||||||
|
|
||||||
- id: fuel_plugin_example_v3-legacy-4
|
|
||||||
role: '*'
|
|
||||||
stage: pre_deployment/-100
|
|
||||||
type: shell
|
|
||||||
parameters:
|
|
||||||
cmd: echo all > /tmp/plugin-100.all
|
|
||||||
timeout: 42
|
|
||||||
|
|
||||||
- id: fuel_plugin_example_v3-legacy-5
|
|
||||||
role: [compute]
|
|
||||||
stage: pre_deployment/-101
|
|
||||||
type: puppet
|
|
||||||
parameters:
|
|
||||||
puppet_manifest: "deploy.pp"
|
|
||||||
puppet_modules: "."
|
|
||||||
timeout: 3600
|
|
||||||
retries: 2
|
|
|
@ -1,7 +0,0 @@
|
||||||
attributes:
|
|
||||||
fuel_plugin_example_v3_text:
|
|
||||||
value: 'Set default value'
|
|
||||||
label: 'Text field'
|
|
||||||
description: 'Description for text field'
|
|
||||||
weight: 25
|
|
||||||
type: "text"
|
|
|
@ -1,26 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# -*- encoding: utf-8 -*-
|
|
||||||
|
|
||||||
from wsgiref.simple_server import make_server
|
|
||||||
|
|
||||||
def web_app(environ, start_response):
|
|
||||||
status = '200 OK'
|
|
||||||
headers = [('Content-type', 'text/plain')]
|
|
||||||
|
|
||||||
start_response(status, headers)
|
|
||||||
|
|
||||||
return open('/etc/astute.yaml').read()
|
|
||||||
|
|
||||||
|
|
||||||
def start_server(host, port):
|
|
||||||
httpd = make_server(host, port, web_app)
|
|
||||||
print 'Started server 8234'
|
|
||||||
httpd.serve_forever()
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
start_server('', 8234)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -1,46 +0,0 @@
|
||||||
# Plugin name
|
|
||||||
name: fuel_plugin_example_v3
|
|
||||||
# Human-readable name for your plugin
|
|
||||||
title: Title for fuel_plugin_example_v3 plugin
|
|
||||||
# Plugin version
|
|
||||||
version: '3.0.0'
|
|
||||||
# Description
|
|
||||||
description: Please describe your plugin here
|
|
||||||
# Minimum required fuel version
|
|
||||||
fuel_version: ['7.0']
|
|
||||||
# Specify license of your plugin
|
|
||||||
licenses: ['Apache License Version 2.0']
|
|
||||||
# Specify author or company name
|
|
||||||
authors: ['Specify author or company name']
|
|
||||||
# A link to the plugin's page
|
|
||||||
homepage: 'https://github.com/stackforge/fuel-plugins'
|
|
||||||
# Specify a group which your plugin implements, possible options:
|
|
||||||
# network, storage, storage::cinder, storage::glance, hypervisor
|
|
||||||
groups: []
|
|
||||||
|
|
||||||
# The plugin is compatible with releases in the list
|
|
||||||
releases:
|
|
||||||
- os: ubuntu
|
|
||||||
version: 2015.1.0-7.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: ubuntu
|
|
||||||
version: liberty-8.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: ubuntu
|
|
||||||
version: mitaka-9.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: ubuntu
|
|
||||||
version: newton-10.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
|
|
||||||
|
|
||||||
# Version of plugin package
|
|
||||||
package_version: '3.0.0'
|
|
|
@ -1,21 +0,0 @@
|
||||||
# Unique network role name
|
|
||||||
- id: "fuel_plugin_example_v3"
|
|
||||||
# Role mapping to network
|
|
||||||
default_mapping: "public"
|
|
||||||
properties:
|
|
||||||
# Should be true if network role requires subnet being set
|
|
||||||
subnet: true
|
|
||||||
# Should be true if network role requires gateway being set
|
|
||||||
gateway: false
|
|
||||||
# List of VIPs to be allocated
|
|
||||||
vip:
|
|
||||||
# Unique VIP name
|
|
||||||
- name: "vip_name"
|
|
||||||
# Optional linux namespace for VIP
|
|
||||||
namespace: "haproxy"
|
|
||||||
# Optional alias so VIP can be queried via API
|
|
||||||
alias: "vip_name"
|
|
||||||
# Optional node role list to map VIP to (defaults to
|
|
||||||
# primary-controller and controller)
|
|
||||||
node_roles:
|
|
||||||
- "fuel_plugin_example_v3"
|
|
|
@ -1,6 +0,0 @@
|
||||||
fuel_plugin_example_v3:
|
|
||||||
name: "Set here the name for the role. This name will be displayed in the Fuel web UI."
|
|
||||||
description: "Write description for your role"
|
|
||||||
has_primary: false # whether has primary role or not
|
|
||||||
public_ip_required: false # whether requires public net or not
|
|
||||||
weight: 100 # weight that will be used for ordering on fuel ui
|
|
|
@ -1,21 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -eux
|
|
||||||
|
|
||||||
command -v fpm >/dev/null 2>&1 || {
|
|
||||||
echo >&2 "Install 'fpm' to build this plugin. Aborting."; exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ruby -e "require 'fpm'" 2>&1 || {
|
|
||||||
echo >&2 "'Fpm' binary file is present, but gem seems to be broken! Aborting."; exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ROOT=$(dirname `readlink -f $0`)
|
|
||||||
|
|
||||||
UBUNTU_REPO_PATH=$ROOT/repositories/ubuntu
|
|
||||||
CENTOS_REPO_PATH=$ROOT/repositories/centos
|
|
||||||
|
|
||||||
rm -f $UBUNTU_REPO_PATH/*.deb
|
|
||||||
rm -f $CENTOS_REPO_PATH/*.rpm
|
|
||||||
|
|
||||||
fpm -t deb -p $UBUNTU_REPO_PATH -n fuel-simple-service -v 3.0.0 -s dir $ROOT/fuel-simple-service.py=/usr/bin/fuel-simple-service.py
|
|
||||||
fpm -t rpm -p $CENTOS_REPO_PATH -n fuel-simple-service -v 3.0.0 -s dir $ROOT/fuel-simple-service.py=/usr/bin/fuel-simple-service.py
|
|
|
@ -1,7 +0,0 @@
|
||||||
# WARNING: `tasks.yaml` will be deprecated in further releases.
|
|
||||||
# Please, use `deployment_tasks.yaml` to describe tasks instead.
|
|
||||||
|
|
||||||
# This file is left only as an example of what you could
|
|
||||||
# meet during plugins development and support.
|
|
||||||
|
|
||||||
[]
|
|
|
@ -1,6 +0,0 @@
|
||||||
# Set here new volumes for your role
|
|
||||||
volumes: []
|
|
||||||
volumes_roles_mapping:
|
|
||||||
fuel_plugin_example_v3:
|
|
||||||
# Default role mapping
|
|
||||||
- {allocate_size: "min", id: "os"}
|
|
|
@ -1,202 +0,0 @@
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright {yyyy} {name of copyright owner}
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
fuel_plugin_example_v4
|
|
||||||
======================
|
|
||||||
|
|
||||||
Plugin description
|
|
|
@ -1,17 +0,0 @@
|
||||||
# This file contains wizard components descriptions that are pretty similar to
|
|
||||||
# the `environment_config.yaml`.
|
|
||||||
# Please, take a look at following link for the details:
|
|
||||||
# - https://blueprints.launchpad.net/fuel/+spec/component-registry
|
|
||||||
# - https://specs.openstack.org/openstack/fuel-specs/specs/8.0/component-registry.html
|
|
||||||
|
|
||||||
- name: additional_service:service_plugin_v4_component
|
|
||||||
label: "Title for service_plugin_v4_component component."
|
|
||||||
description: "Description for service_plugin_v4_component component."
|
|
||||||
compatible:
|
|
||||||
- name: "hypervisor:xxx"
|
|
||||||
requires:
|
|
||||||
- name: "hypervisor:xxx"
|
|
||||||
message: "service_plugin_v4_component requires XXX compute."
|
|
||||||
incompatible:
|
|
||||||
- name: "network:neutron:*"
|
|
||||||
message: "service_plugin_v4_component incompatible with Neutron network."
|
|
|
@ -1,14 +0,0 @@
|
||||||
# This puppet manifest creates example file in /tmp folder.
|
|
||||||
|
|
||||||
notice('PLUGIN: fuel_plugin_example_v4 - deploy.pp')
|
|
||||||
|
|
||||||
class fuel_plugin_example_v4 {
|
|
||||||
file { '/tmp/fuel_plugin_example_v4_puppet':
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => 0644,
|
|
||||||
content => "fuel_plugin_example_v4\n",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class {'fuel_plugin_example_v4': }
|
|
|
@ -1,23 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -eux
|
|
||||||
|
|
||||||
# It's a script which deploys your plugin
|
|
||||||
echo fuel_plugin_example_v4 > /tmp/fuel_plugin_example_v4_sh
|
|
||||||
|
|
||||||
OS_NAME=''
|
|
||||||
if grep -i CentOS /etc/issue.net >/dev/null; then
|
|
||||||
OS_NAME='centos';
|
|
||||||
elif grep -i Ubuntu /etc/issue.net >/dev/null; then
|
|
||||||
OS_NAME='ubuntu';
|
|
||||||
fi
|
|
||||||
|
|
||||||
function install_package {
|
|
||||||
if [ $OS_NAME == 'ubuntu' ]; then
|
|
||||||
apt-get install -y --force-yes -o 'APT::Get::AllowUnauthenticated=1' fuel-simple-service
|
|
||||||
elif [ $OS_NAME == 'centos' ]; then
|
|
||||||
yum install -y fuel-simple-service
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
install_package
|
|
||||||
fuel-simple-service.py &
|
|
|
@ -1,46 +0,0 @@
|
||||||
- id: fuel_plugin_example_v4
|
|
||||||
type: group
|
|
||||||
role: [fuel_plugin_example_v4]
|
|
||||||
tasks:
|
|
||||||
- hiera
|
|
||||||
- globals
|
|
||||||
required_for: [deploy_end]
|
|
||||||
requires: [deploy_start]
|
|
||||||
parameters:
|
|
||||||
strategy:
|
|
||||||
type: parallel
|
|
||||||
|
|
||||||
- id: fuel_plugin_example_v4-controller-deployment
|
|
||||||
type: puppet
|
|
||||||
version: 2.0.0
|
|
||||||
groups: [primary-controller, controller]
|
|
||||||
required_for: [connectivity_tests, deploy_end]
|
|
||||||
requires: [netconfig, deploy_start]
|
|
||||||
parameters:
|
|
||||||
puppet_manifest: "deploy.pp"
|
|
||||||
puppet_modules: "."
|
|
||||||
timeout: 3600
|
|
||||||
|
|
||||||
- id: fuel_plugin_example_v4-deployment
|
|
||||||
type: puppet
|
|
||||||
version: 2.0.0
|
|
||||||
groups: [fuel_plugin_example_v4]
|
|
||||||
required_for: [deploy_end]
|
|
||||||
requires: [deploy_start]
|
|
||||||
parameters:
|
|
||||||
puppet_manifest: "deploy.pp"
|
|
||||||
puppet_modules: "."
|
|
||||||
timeout: 3600
|
|
||||||
retries: 10
|
|
||||||
|
|
||||||
- id: fuel_plugin_example_v4-post-deployment-sh
|
|
||||||
type: shell
|
|
||||||
version: 2.0.0
|
|
||||||
role: [fuel_plugin_example_v4]
|
|
||||||
required_for: [post_deployment_end]
|
|
||||||
requires: [post_deployment_start]
|
|
||||||
parameters:
|
|
||||||
cmd: bash deploy.sh
|
|
||||||
retries: 3
|
|
||||||
interval: 20
|
|
||||||
timeout: 180
|
|
|
@ -1,15 +0,0 @@
|
||||||
# This file describes additional attributes that will appear on the Settings
|
|
||||||
# tab of the Fuel web UI. When the environment is deployed, these attributes
|
|
||||||
# are passed to the task executor so that the data is available
|
|
||||||
# in the /etc/astute.yaml file on each target node and can be accessed from
|
|
||||||
# your bash or puppet scripts.
|
|
||||||
|
|
||||||
attributes:
|
|
||||||
metadata:
|
|
||||||
group: 'other'
|
|
||||||
fuel_plugin_example_v4_text:
|
|
||||||
value: 'Set default value'
|
|
||||||
label: 'Text field'
|
|
||||||
description: 'Description for text field'
|
|
||||||
weight: 25
|
|
||||||
type: "text"
|
|
|
@ -1,26 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# -*- encoding: utf-8 -*-
|
|
||||||
|
|
||||||
from wsgiref.simple_server import make_server
|
|
||||||
|
|
||||||
def web_app(environ, start_response):
|
|
||||||
status = '200 OK'
|
|
||||||
headers = [('Content-type', 'text/plain')]
|
|
||||||
|
|
||||||
start_response(status, headers)
|
|
||||||
|
|
||||||
return open('/etc/astute.yaml').read()
|
|
||||||
|
|
||||||
|
|
||||||
def start_server(host, port):
|
|
||||||
httpd = make_server(host, port, web_app)
|
|
||||||
print 'Started server 8234'
|
|
||||||
httpd.serve_forever()
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
start_server('', 8234)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -1,45 +0,0 @@
|
||||||
# Plugin name
|
|
||||||
name: fuel_plugin_example_v4
|
|
||||||
# Human-readable name for your plugin
|
|
||||||
title: Title for fuel_plugin_example_v4 plugin
|
|
||||||
# Plugin version
|
|
||||||
version: '4.0.0'
|
|
||||||
# Description
|
|
||||||
description: Please describe your plugin here
|
|
||||||
# Minimum required fuel version
|
|
||||||
fuel_version: ['8.0']
|
|
||||||
# Specify license of your plugin
|
|
||||||
licenses: ['Apache License Version 2.0']
|
|
||||||
# Specify author or company name
|
|
||||||
authors: ['Specify author or company name']
|
|
||||||
# A link to the plugin's page
|
|
||||||
homepage: 'https://github.com/openstack/fuel-plugins'
|
|
||||||
# Specify a group which your plugin implements, possible options:
|
|
||||||
# network, storage, storage::cinder, storage::glance, hypervisor,
|
|
||||||
# equipment
|
|
||||||
groups: []
|
|
||||||
# Change `false` to `true` if the plugin can be installed in the environment
|
|
||||||
# after the deployment.
|
|
||||||
is_hotpluggable: false
|
|
||||||
|
|
||||||
# The plugin is compatible with releases in the list
|
|
||||||
releases:
|
|
||||||
- os: ubuntu
|
|
||||||
version: liberty-8.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: ubuntu
|
|
||||||
version: mitaka-9.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: ubuntu
|
|
||||||
version: newton-10.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
|
|
||||||
|
|
||||||
# Version of plugin package
|
|
||||||
package_version: '4.0.0'
|
|
|
@ -1,24 +0,0 @@
|
||||||
# `network_roles.yaml` file is used to declare VIP addresses and link
|
|
||||||
# them with networks and nodes.
|
|
||||||
|
|
||||||
# Unique network role name
|
|
||||||
- id: "fuel_plugin_example_v4_network_role"
|
|
||||||
# Role mapping to network
|
|
||||||
default_mapping: "public"
|
|
||||||
properties:
|
|
||||||
# Should be true if network role requires subnet being set
|
|
||||||
subnet: true
|
|
||||||
# Should be true if network role requires gateway being set
|
|
||||||
gateway: false
|
|
||||||
# List of VIPs to be allocated
|
|
||||||
vip:
|
|
||||||
# Unique VIP name
|
|
||||||
- name: "vip_name"
|
|
||||||
# Optional linux namespace for VIP
|
|
||||||
namespace: "haproxy"
|
|
||||||
# Optional alias so VIP can be queried via API
|
|
||||||
alias: "vip_name"
|
|
||||||
# Optional node role list to map VIP to (defaults to
|
|
||||||
# primary-controller and controller)
|
|
||||||
node_roles:
|
|
||||||
- "fuel_plugin_example_v4_role"
|
|
|
@ -1,6 +0,0 @@
|
||||||
fuel_plugin_example_v4:
|
|
||||||
name: "Set here the name for the role. This name will be displayed in the Fuel web UI."
|
|
||||||
description: "Write description for your role"
|
|
||||||
has_primary: false # whether has primary role or not
|
|
||||||
public_ip_required: false # whether requires public net or not
|
|
||||||
weight: 100 # weight that will be used for ordering on fuel ui
|
|
|
@ -1,21 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -eux
|
|
||||||
|
|
||||||
command -v fpm >/dev/null 2>&1 || {
|
|
||||||
echo >&2 "Install 'fpm' to build this plugin. Aborting."; exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ruby -e "require 'fpm'" 2>&1 || {
|
|
||||||
echo >&2 "'Fpm' binary file is present, but gem seems to be broken! Aborting."; exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ROOT=$(dirname `readlink -f $0`)
|
|
||||||
|
|
||||||
UBUNTU_REPO_PATH=$ROOT/repositories/ubuntu
|
|
||||||
CENTOS_REPO_PATH=$ROOT/repositories/centos
|
|
||||||
|
|
||||||
rm -f $UBUNTU_REPO_PATH/*.deb
|
|
||||||
rm -f $CENTOS_REPO_PATH/*.rpm
|
|
||||||
|
|
||||||
fpm -t deb -p $UBUNTU_REPO_PATH -n fuel-simple-service -v 4.0.0 -s dir $ROOT/fuel-simple-service.py=/usr/bin/fuel-simple-service.py
|
|
||||||
fpm -t rpm -p $CENTOS_REPO_PATH -n fuel-simple-service -v 4.0.0 -s dir $ROOT/fuel-simple-service.py=/usr/bin/fuel-simple-service.py
|
|
|
@ -1,5 +0,0 @@
|
||||||
# WARNING: `tasks.yaml` will be deprecated in further releases.
|
|
||||||
# Please, use `deployment_tasks.yaml` to describe tasks instead.
|
|
||||||
|
|
||||||
# This file is left only as an example of what you could
|
|
||||||
# meet during plugins development and support.
|
|
|
@ -1,6 +0,0 @@
|
||||||
# Set here new volumes for your role
|
|
||||||
volumes: []
|
|
||||||
volumes_roles_mapping:
|
|
||||||
fuel_plugin_example_v4_role:
|
|
||||||
# Default role mapping
|
|
||||||
- {allocate_size: "min", id: "os"}
|
|
|
@ -1,202 +0,0 @@
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright {yyyy} {name of copyright owner}
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
fuel_plugin_example_v5
|
|
||||||
======================
|
|
||||||
|
|
||||||
Plugin description
|
|
|
@ -1,18 +0,0 @@
|
||||||
# This file contains additional bond attributes provided by plugin.
|
|
||||||
# Please, take a look at following link for the details:
|
|
||||||
# - https://blueprints.launchpad.net/fuel/+spec/nics-and-nodes-attributes-via-plugin
|
|
||||||
# - https://specs.openstack.org/openstack/fuel-specs/specs/10.0/nics-and-nodes-attributes-via-plugin.html
|
|
||||||
|
|
||||||
attribute_a:
|
|
||||||
label: "Bond attribute A"
|
|
||||||
description: "Some description"
|
|
||||||
type: "text"
|
|
||||||
value: ""
|
|
||||||
restrictions:
|
|
||||||
- condition: "settings:common.libvirt_type.value != 'kvm'"
|
|
||||||
action: "hide"
|
|
||||||
attribute_b:
|
|
||||||
label: "Bond attribute B"
|
|
||||||
description: "Some description"
|
|
||||||
type: "checkbox"
|
|
||||||
value: false
|
|
|
@ -1,17 +0,0 @@
|
||||||
# This file contains wizard components descriptions that are pretty similar to
|
|
||||||
# the `environment_config.yaml`.
|
|
||||||
# Please, take a look at following link for the details:
|
|
||||||
# - https://blueprints.launchpad.net/fuel/+spec/component-registry
|
|
||||||
# - https://specs.openstack.org/openstack/fuel-specs/specs/8.0/component-registry.html
|
|
||||||
|
|
||||||
- name: additional_service:service_plugin_v5_component
|
|
||||||
label: "Title for service_plugin_v5_component component."
|
|
||||||
description: "Description for service_plugin_v5_component component."
|
|
||||||
compatible:
|
|
||||||
- name: "hypervisor:xxx"
|
|
||||||
requires:
|
|
||||||
- name: "hypervisor:xxx"
|
|
||||||
message: "service_plugin_v5_component requires XXX compute."
|
|
||||||
incompatible:
|
|
||||||
- name: "network:neutron:*"
|
|
||||||
message: "service_plugin_v5_component incompatible with Neutron network."
|
|
|
@ -1,14 +0,0 @@
|
||||||
# This puppet manifest creates example file in /tmp folder.
|
|
||||||
|
|
||||||
notice('PLUGIN: fuel_plugin_example_v5 - deploy.pp')
|
|
||||||
|
|
||||||
class fuel_plugin_example_v5 {
|
|
||||||
file { '/tmp/fuel_plugin_example_v5_puppet':
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => 0644,
|
|
||||||
content => "fuel_plugin_example_v5\n",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class {'fuel_plugin_example_v5': }
|
|
|
@ -1,23 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -eux
|
|
||||||
|
|
||||||
# It's a script which deploys your plugin
|
|
||||||
echo fuel_plugin_example_v5 > /tmp/fuel_plugin_example_v5_sh
|
|
||||||
|
|
||||||
OS_NAME=''
|
|
||||||
if grep -i CentOS /etc/issue.net >/dev/null; then
|
|
||||||
OS_NAME='centos';
|
|
||||||
elif grep -i Ubuntu /etc/issue.net >/dev/null; then
|
|
||||||
OS_NAME='ubuntu';
|
|
||||||
fi
|
|
||||||
|
|
||||||
function install_package {
|
|
||||||
if [ $OS_NAME == 'ubuntu' ]; then
|
|
||||||
apt-get install -y --force-yes -o 'APT::Get::AllowUnauthenticated=1' fuel-simple-service
|
|
||||||
elif [ $OS_NAME == 'centos' ]; then
|
|
||||||
yum install -y fuel-simple-service
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
install_package
|
|
||||||
fuel-simple-service.py &
|
|
|
@ -1,46 +0,0 @@
|
||||||
- id: fuel_plugin_example_v5
|
|
||||||
type: group
|
|
||||||
role: [fuel_plugin_example_v5]
|
|
||||||
tasks:
|
|
||||||
- hiera
|
|
||||||
- globals
|
|
||||||
required_for: [deploy_end]
|
|
||||||
requires: [deploy_start]
|
|
||||||
parameters:
|
|
||||||
strategy:
|
|
||||||
type: parallel
|
|
||||||
|
|
||||||
- id: fuel_plugin_example_v5-controller-deployment
|
|
||||||
type: puppet
|
|
||||||
version: 2.0.0
|
|
||||||
groups: [primary-controller, controller]
|
|
||||||
required_for: [connectivity_tests, deploy_end]
|
|
||||||
requires: [netconfig, deploy_start]
|
|
||||||
parameters:
|
|
||||||
puppet_manifest: "deploy.pp"
|
|
||||||
puppet_modules: "."
|
|
||||||
timeout: 3600
|
|
||||||
|
|
||||||
- id: fuel_plugin_example_v5-deployment
|
|
||||||
type: puppet
|
|
||||||
version: 2.0.0
|
|
||||||
groups: [fuel_plugin_example_v5]
|
|
||||||
required_for: [deploy_end]
|
|
||||||
requires: [deploy_start]
|
|
||||||
parameters:
|
|
||||||
puppet_manifest: "deploy.pp"
|
|
||||||
puppet_modules: "."
|
|
||||||
timeout: 3600
|
|
||||||
retries: 10
|
|
||||||
|
|
||||||
- id: fuel_plugin_example_v5-post-deployment-sh
|
|
||||||
type: shell
|
|
||||||
version: 2.0.0
|
|
||||||
role: [fuel_plugin_example_v5]
|
|
||||||
required_for: [post_deployment_end]
|
|
||||||
requires: [post_deployment_start]
|
|
||||||
parameters:
|
|
||||||
cmd: bash deploy.sh
|
|
||||||
retries: 3
|
|
||||||
interval: 20
|
|
||||||
timeout: 180
|
|
|
@ -1,15 +0,0 @@
|
||||||
# This file describes additional attributes that will appear on the Settings
|
|
||||||
# tab of the Fuel web UI. When the environment is deployed, these attributes
|
|
||||||
# are passed to the task executor so that the data is available
|
|
||||||
# in the /etc/astute.yaml file on each target node and can be accessed from
|
|
||||||
# your bash or puppet scripts.
|
|
||||||
|
|
||||||
attributes:
|
|
||||||
metadata:
|
|
||||||
group: 'other'
|
|
||||||
fuel_plugin_example_v5_text:
|
|
||||||
value: 'Set default value'
|
|
||||||
label: 'Text field'
|
|
||||||
description: 'Description for text field'
|
|
||||||
weight: 25
|
|
||||||
type: "text"
|
|
|
@ -1,26 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# -*- encoding: utf-8 -*-
|
|
||||||
|
|
||||||
from wsgiref.simple_server import make_server
|
|
||||||
|
|
||||||
def web_app(environ, start_response):
|
|
||||||
status = '200 OK'
|
|
||||||
headers = [('Content-type', 'text/plain')]
|
|
||||||
|
|
||||||
start_response(status, headers)
|
|
||||||
|
|
||||||
return open('/etc/astute.yaml').read()
|
|
||||||
|
|
||||||
|
|
||||||
def start_server(host, port):
|
|
||||||
httpd = make_server(host, port, web_app)
|
|
||||||
print 'Started server 8234'
|
|
||||||
httpd.serve_forever()
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
start_server('', 8234)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -1,40 +0,0 @@
|
||||||
# Plugin name
|
|
||||||
name: fuel_plugin_example_v5
|
|
||||||
# Human-readable name for your plugin
|
|
||||||
title: Title for fuel_plugin_example_v5 plugin
|
|
||||||
# Plugin version
|
|
||||||
version: '1.0.0'
|
|
||||||
# Description
|
|
||||||
description: Please describe your plugin here
|
|
||||||
# Minimum required fuel version
|
|
||||||
fuel_version: ['9.0', '10.0']
|
|
||||||
# Specify license of your plugin
|
|
||||||
licenses: ['Apache License Version 2.0']
|
|
||||||
# Specify author or company name
|
|
||||||
authors: ['Specify author or company name']
|
|
||||||
# A link to the plugin's page
|
|
||||||
homepage: 'https://github.com/openstack/fuel-plugins'
|
|
||||||
# Specify a group which your plugin implements, possible options:
|
|
||||||
# network, storage, storage::cinder, storage::glance, hypervisor,
|
|
||||||
# equipment
|
|
||||||
groups: []
|
|
||||||
# Change `false` to `true` if the plugin can be installed in the environment
|
|
||||||
# after the deployment.
|
|
||||||
is_hotpluggable: false
|
|
||||||
|
|
||||||
# The plugin is compatible with releases in the list
|
|
||||||
releases:
|
|
||||||
- os: ubuntu
|
|
||||||
version: mitaka-9.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
- os: ubuntu
|
|
||||||
version: newton-10.0
|
|
||||||
mode: ['ha']
|
|
||||||
deployment_scripts_path: deployment_scripts/
|
|
||||||
repository_path: repositories/ubuntu
|
|
||||||
|
|
||||||
|
|
||||||
# Version of plugin package
|
|
||||||
package_version: '5.0.0'
|
|
|
@ -1,24 +0,0 @@
|
||||||
# `network_roles.yaml` file is used to declare VIP addresses and link
|
|
||||||
# them with networks and nodes.
|
|
||||||
|
|
||||||
# Unique network role name
|
|
||||||
- id: "fuel_plugin_example_v5_network_role"
|
|
||||||
# Role mapping to network
|
|
||||||
default_mapping: "public"
|
|
||||||
properties:
|
|
||||||
# Should be true if network role requires subnet being set
|
|
||||||
subnet: true
|
|
||||||
# Should be true if network role requires gateway being set
|
|
||||||
gateway: false
|
|
||||||
# List of VIPs to be allocated
|
|
||||||
vip:
|
|
||||||
# Unique VIP name
|
|
||||||
- name: "vip_name"
|
|
||||||
# Optional linux namespace for VIP
|
|
||||||
namespace: "haproxy"
|
|
||||||
# Optional alias so VIP can be queried via API
|
|
||||||
alias: "vip_name"
|
|
||||||
# Optional node role list to map VIP to (defaults to
|
|
||||||
# primary-controller and controller)
|
|
||||||
node_roles:
|
|
||||||
- "fuel_plugin_example_v5_role"
|
|
|
@ -1,18 +0,0 @@
|
||||||
# This file contains additional nic attributes provided by plugin.
|
|
||||||
# Please, take a look at following link for the details:
|
|
||||||
# - https://blueprints.launchpad.net/fuel/+spec/nics-and-nodes-attributes-via-plugin
|
|
||||||
# - https://specs.openstack.org/openstack/fuel-specs/specs/10.0/nics-and-nodes-attributes-via-plugin.html
|
|
||||||
|
|
||||||
attribute_a:
|
|
||||||
label: "NIC attribute A"
|
|
||||||
description: "Some description"
|
|
||||||
type: "text"
|
|
||||||
value: ""
|
|
||||||
restrictions:
|
|
||||||
- condition: "settings:common.libvirt_type.value != 'kvm'"
|
|
||||||
action: "hide"
|
|
||||||
attribute_b:
|
|
||||||
label: "NIC attribute B"
|
|
||||||
description: "Some description"
|
|
||||||
type: "checkbox"
|
|
||||||
value: false
|
|
|
@ -1,25 +0,0 @@
|
||||||
# This file contains additional node's attributes provided by plugin.
|
|
||||||
# Please, take a look at following link for the details:
|
|
||||||
# - https://blueprints.launchpad.net/fuel/+spec/nics-and-nodes-attributes-via-plugin
|
|
||||||
# - https://specs.openstack.org/openstack/fuel-specs/specs/10.0/nics-and-nodes-attributes-via-plugin.html
|
|
||||||
|
|
||||||
plugin_section_a:
|
|
||||||
metadata:
|
|
||||||
group: "some_new_section"
|
|
||||||
label: "Section A"
|
|
||||||
restrictions:
|
|
||||||
- condition: "settings:common.libvirt_type.value != 'kvm'"
|
|
||||||
action: "hide"
|
|
||||||
attribute_a:
|
|
||||||
label: "Node attribute A for section A"
|
|
||||||
description: "Some description"
|
|
||||||
type: "text"
|
|
||||||
value: ""
|
|
||||||
restrictions:
|
|
||||||
- condition: "false"
|
|
||||||
action: "hide"
|
|
||||||
attribute_b:
|
|
||||||
label: "Node attribute B for section A"
|
|
||||||
description: "Some description"
|
|
||||||
type: "checkbox"
|
|
||||||
value: ""
|
|
|
@ -1,6 +0,0 @@
|
||||||
fuel_plugin_example_v5:
|
|
||||||
name: "Set here the name for the role. This name will be displayed in the Fuel web UI."
|
|
||||||
description: "Write description for your role"
|
|
||||||
has_primary: false # whether has primary role or not
|
|
||||||
public_ip_required: false # whether requires public net or not
|
|
||||||
weight: 100 # weight that will be used for ordering on fuel ui
|
|
|
@ -1,21 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -eux
|
|
||||||
|
|
||||||
command -v fpm >/dev/null 2>&1 || {
|
|
||||||
echo >&2 "Install 'fpm' to build this plugin. Aborting."; exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ruby -e "require 'fpm'" 2>&1 || {
|
|
||||||
echo >&2 "'Fpm' binary file is present, but gem seems to be broken! Aborting."; exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ROOT=$(dirname `readlink -f $0`)
|
|
||||||
|
|
||||||
UBUNTU_REPO_PATH=$ROOT/repositories/ubuntu
|
|
||||||
CENTOS_REPO_PATH=$ROOT/repositories/centos
|
|
||||||
|
|
||||||
rm -f $UBUNTU_REPO_PATH/*.deb
|
|
||||||
rm -f $CENTOS_REPO_PATH/*.rpm
|
|
||||||
|
|
||||||
fpm -t deb -p $UBUNTU_REPO_PATH -n fuel-simple-service -v 5.0.0 -s dir $ROOT/fuel-simple-service.py=/usr/bin/fuel-simple-service.py
|
|
||||||
fpm -t rpm -p $CENTOS_REPO_PATH -n fuel-simple-service -v 5.0.0 -s dir $ROOT/fuel-simple-service.py=/usr/bin/fuel-simple-service.py
|
|
|
@ -1,6 +0,0 @@
|
||||||
# Set here new volumes for your role
|
|
||||||
volumes: []
|
|
||||||
volumes_roles_mapping:
|
|
||||||
fuel_plugin_example_v5_role:
|
|
||||||
# Default role mapping
|
|
||||||
- {allocate_size: "min", id: "os"}
|
|
|
@ -1,23 +0,0 @@
|
||||||
# Copyright 2014 Mirantis, Inc.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
|
|
||||||
from fuel_plugin_builder.actions.base import BaseAction
|
|
||||||
from fuel_plugin_builder.actions.create import CreatePlugin
|
|
||||||
from fuel_plugin_builder.actions.build import BuildPluginV1
|
|
||||||
from fuel_plugin_builder.actions.build import BuildPluginV2
|
|
||||||
from fuel_plugin_builder.actions.build import BuildPluginV3
|
|
||||||
from fuel_plugin_builder.actions.build import BuildPluginV4
|
|
||||||
from fuel_plugin_builder.actions.build import BuildPluginV5
|
|
||||||
from fuel_plugin_builder.actions.build import make_builder
|
|
|
@ -1,32 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Copyright 2014 Mirantis, Inc.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
import abc
|
|
||||||
import six
|
|
||||||
|
|
||||||
|
|
||||||
@six.add_metaclass(abc.ABCMeta)
|
|
||||||
class BaseAction(object):
|
|
||||||
|
|
||||||
@abc.abstractmethod
|
|
||||||
def check(self):
|
|
||||||
"""Check if it's possible to perform an action.
|
|
||||||
"""
|
|
||||||
|
|
||||||
@abc.abstractmethod
|
|
||||||
def run(self):
|
|
||||||
"""Run an action.
|
|
||||||
"""
|
|
|
@ -1,276 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Copyright 2014 Mirantis, Inc.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
import abc
|
|
||||||
import logging
|
|
||||||
import os
|
|
||||||
|
|
||||||
from os.path import join as join_path
|
|
||||||
|
|
||||||
from fuel_plugin_builder.actions import BaseAction
|
|
||||||
from fuel_plugin_builder import errors
|
|
||||||
from fuel_plugin_builder import utils
|
|
||||||
from fuel_plugin_builder.validators import ValidatorManager
|
|
||||||
from fuel_plugin_builder import version_mapping
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
def get_template_path(file_name):
|
|
||||||
return os.path.abspath(join_path(
|
|
||||||
os.path.dirname(__file__), '..', 'templates', file_name))
|
|
||||||
|
|
||||||
|
|
||||||
class BaseBuildPlugin(BaseAction):
|
|
||||||
|
|
||||||
release_tmpl_src_path = get_template_path('base/build/Release.mako')
|
|
||||||
|
|
||||||
@abc.abstractproperty
|
|
||||||
def requires(self):
|
|
||||||
"""Should return a list of commands which
|
|
||||||
are required for the builder
|
|
||||||
"""
|
|
||||||
|
|
||||||
@abc.abstractproperty
|
|
||||||
def result_package_mask(self):
|
|
||||||
"""Should return mask for built package
|
|
||||||
"""
|
|
||||||
|
|
||||||
@abc.abstractmethod
|
|
||||||
def make_package(self):
|
|
||||||
"""Method should be implemented in child classes
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(self, plugin_path):
|
|
||||||
self.plugin_path = plugin_path
|
|
||||||
|
|
||||||
self.pre_build_hook_cmd = './pre_build_hook'
|
|
||||||
self.meta = utils.parse_yaml(
|
|
||||||
join_path(self.plugin_path, 'metadata.yaml')
|
|
||||||
)
|
|
||||||
self.build_dir = join_path(self.plugin_path, '.build')
|
|
||||||
self.build_src_dir = join_path(self.build_dir, 'src')
|
|
||||||
self.checksums_path = join_path(self.build_src_dir, 'checksums.sha1')
|
|
||||||
self.name = self.meta['name']
|
|
||||||
|
|
||||||
self.plugin_version, self.full_version = utils.version_split_name_rpm(
|
|
||||||
self.meta['version'])
|
|
||||||
|
|
||||||
def run(self):
|
|
||||||
logger.debug('Start plugin building "%s"', self.plugin_path)
|
|
||||||
self.clean()
|
|
||||||
self.run_pre_build_hook()
|
|
||||||
self.check()
|
|
||||||
self.build_repos()
|
|
||||||
self.add_checksums_file()
|
|
||||||
self.make_package()
|
|
||||||
|
|
||||||
def clean(self):
|
|
||||||
utils.remove(self.build_dir)
|
|
||||||
utils.create_dir(self.build_dir)
|
|
||||||
utils.remove_by_mask(self.result_package_mask)
|
|
||||||
|
|
||||||
def run_pre_build_hook(self):
|
|
||||||
if utils.which(join_path(self.plugin_path, self.pre_build_hook_cmd)):
|
|
||||||
utils.exec_cmd(self.pre_build_hook_cmd, self.plugin_path)
|
|
||||||
|
|
||||||
def add_checksums_file(self):
|
|
||||||
utils.create_checksums_file(self.build_src_dir, self.checksums_path)
|
|
||||||
|
|
||||||
def build_repos(self):
|
|
||||||
utils.create_dir(self.build_src_dir)
|
|
||||||
|
|
||||||
utils.copy_files_in_dir(
|
|
||||||
join_path(self.plugin_path, '*'),
|
|
||||||
self.build_src_dir)
|
|
||||||
|
|
||||||
releases_paths = {}
|
|
||||||
for release in self.meta['releases']:
|
|
||||||
releases_paths.setdefault(release['os'], [])
|
|
||||||
releases_paths[release['os']].append(
|
|
||||||
join_path(self.build_src_dir, release['repository_path']))
|
|
||||||
|
|
||||||
self.build_ubuntu_repos(releases_paths.get('ubuntu', []))
|
|
||||||
self.build_centos_repos(releases_paths.get('centos', []))
|
|
||||||
|
|
||||||
def build_ubuntu_repos(self, releases_paths):
|
|
||||||
for repo_path in releases_paths:
|
|
||||||
utils.exec_piped_cmds(
|
|
||||||
['dpkg-scanpackages -m .', 'gzip -c9 > Packages.gz'],
|
|
||||||
cwd=repo_path)
|
|
||||||
release_path = join_path(repo_path, 'Release')
|
|
||||||
utils.render_to_file(
|
|
||||||
self.release_tmpl_src_path,
|
|
||||||
release_path,
|
|
||||||
{'plugin_name': self.meta['name'],
|
|
||||||
'major_version': self.plugin_version})
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def build_centos_repos(cls, releases_paths):
|
|
||||||
for repo_path in releases_paths:
|
|
||||||
repo_packages = join_path(repo_path, 'Packages')
|
|
||||||
utils.create_dir(repo_packages)
|
|
||||||
utils.move_files_in_dir(
|
|
||||||
join_path(repo_path, '*.rpm'),
|
|
||||||
repo_packages)
|
|
||||||
utils.exec_cmd('createrepo -o {0} {0}'.format(repo_path))
|
|
||||||
|
|
||||||
def check(self):
|
|
||||||
self._check_requirements()
|
|
||||||
self._check_structure()
|
|
||||||
|
|
||||||
def _check_requirements(self):
|
|
||||||
not_found = filter(lambda r: not utils.which(r), self.requires)
|
|
||||||
|
|
||||||
if not_found:
|
|
||||||
raise errors.FuelCannotFindCommandError(
|
|
||||||
'Cannot find commands "{0}", '
|
|
||||||
'install required commands and try again'.format(
|
|
||||||
', '.join(not_found)))
|
|
||||||
|
|
||||||
def _check_structure(self):
|
|
||||||
ValidatorManager(self.plugin_path).get_validator().validate()
|
|
||||||
|
|
||||||
|
|
||||||
class BuildPluginV1(BaseBuildPlugin):
|
|
||||||
|
|
||||||
requires = ['rpm', 'createrepo', 'dpkg-scanpackages']
|
|
||||||
|
|
||||||
@property
|
|
||||||
def result_package_mask(self):
|
|
||||||
return join_path(self.plugin_path, '{0}-*.fp'.format(self.name))
|
|
||||||
|
|
||||||
def make_package(self):
|
|
||||||
full_name = '{0}-{1}'.format(self.meta['name'],
|
|
||||||
self.meta['version'])
|
|
||||||
tar_name = '{0}.fp'.format(full_name)
|
|
||||||
tar_path = join_path(
|
|
||||||
self.plugin_path,
|
|
||||||
tar_name)
|
|
||||||
|
|
||||||
utils.make_tar_gz(self.build_src_dir, tar_path, full_name)
|
|
||||||
|
|
||||||
|
|
||||||
class BuildPluginV2(BuildPluginV1):
|
|
||||||
|
|
||||||
requires = ['rpmbuild', 'rpm', 'createrepo', 'dpkg-scanpackages']
|
|
||||||
|
|
||||||
rpm_spec_src_path = get_template_path('v2/build/plugin_rpm.spec.mako')
|
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
super(BuildPluginV2, self).__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
self.rpm_path = os.path.abspath(
|
|
||||||
join_path(self.plugin_path, '.build', 'rpm'))
|
|
||||||
|
|
||||||
self.rpm_src_path = join_path(self.rpm_path, 'SOURCES')
|
|
||||||
self.full_name = '{0}-{1}'.format(
|
|
||||||
self.meta['name'], self.plugin_version)
|
|
||||||
|
|
||||||
tar_name = '{0}.fp'.format(self.full_name)
|
|
||||||
self.tar_path = join_path(self.rpm_src_path, tar_name)
|
|
||||||
|
|
||||||
self.spec_dst = join_path(self.rpm_path, 'plugin_rpm.spec')
|
|
||||||
|
|
||||||
self.rpm_packages_mask = join_path(
|
|
||||||
self.rpm_path, 'RPMS', 'noarch', '*.rpm')
|
|
||||||
|
|
||||||
@property
|
|
||||||
def result_package_mask(self):
|
|
||||||
return join_path(
|
|
||||||
self.plugin_path, '{0}-*.noarch.rpm'.format(self.name))
|
|
||||||
|
|
||||||
def make_package(self):
|
|
||||||
"""Builds rpm package
|
|
||||||
"""
|
|
||||||
utils.create_dir(self.rpm_src_path)
|
|
||||||
|
|
||||||
utils.make_tar_gz(self.build_src_dir, self.tar_path, self.full_name)
|
|
||||||
utils.render_to_file(
|
|
||||||
self.rpm_spec_src_path,
|
|
||||||
self.spec_dst,
|
|
||||||
self._make_data_for_template())
|
|
||||||
|
|
||||||
utils.exec_cmd(
|
|
||||||
'rpmbuild -vv --nodeps --define "_topdir {0}" '
|
|
||||||
'-bb {1}'.format(self.rpm_path, self.spec_dst))
|
|
||||||
utils.copy_files_in_dir(self.rpm_packages_mask, self.plugin_path)
|
|
||||||
|
|
||||||
def _make_data_for_template(self):
|
|
||||||
"""Generates data for spec template
|
|
||||||
|
|
||||||
:returns: dictionary with required data
|
|
||||||
"""
|
|
||||||
return {
|
|
||||||
'name': self.full_name,
|
|
||||||
'version': self.full_version,
|
|
||||||
'summary': self.meta['title'],
|
|
||||||
'description': self.meta['description'],
|
|
||||||
'license': ' and '.join(self.meta.get('licenses', [])),
|
|
||||||
'homepage': self.meta.get('homepage'),
|
|
||||||
'vendor': ', '.join(self.meta.get('authors', [])),
|
|
||||||
'year': utils.get_current_year()}
|
|
||||||
|
|
||||||
|
|
||||||
class BuildPluginV3(BuildPluginV2):
|
|
||||||
|
|
||||||
rpm_spec_src_path = get_template_path('v3/build/plugin_rpm.spec.mako')
|
|
||||||
|
|
||||||
def _make_data_for_template(self):
|
|
||||||
data = super(BuildPluginV3, self)._make_data_for_template()
|
|
||||||
|
|
||||||
uninst = utils.read_if_exist(
|
|
||||||
join_path(self.plugin_path, "uninstall.sh"))
|
|
||||||
|
|
||||||
preinst = utils.read_if_exist(
|
|
||||||
join_path(self.plugin_path, "pre_install.sh"))
|
|
||||||
|
|
||||||
postinst = utils.read_if_exist(
|
|
||||||
join_path(self.plugin_path, "post_install.sh"))
|
|
||||||
|
|
||||||
plugin_build_version = str(self.meta.get('build_version', '1'))
|
|
||||||
|
|
||||||
data.update(
|
|
||||||
{'postinstall_hook': postinst,
|
|
||||||
'preinstall_hook': preinst,
|
|
||||||
'uninstall_hook': uninst,
|
|
||||||
'build_version': plugin_build_version}
|
|
||||||
)
|
|
||||||
|
|
||||||
return data
|
|
||||||
|
|
||||||
|
|
||||||
class BuildPluginV4(BuildPluginV3):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class BuildPluginV5(BuildPluginV4):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def make_builder(plugin_path):
|
|
||||||
"""Creates build object.
|
|
||||||
|
|
||||||
:param str plugin_path: path to the plugin
|
|
||||||
:returns: specific version of builder object
|
|
||||||
"""
|
|
||||||
builder = version_mapping.get_version_mapping_from_plugin(
|
|
||||||
plugin_path)['builder']
|
|
||||||
|
|
||||||
return builder(plugin_path)
|
|
|
@ -1,65 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Copyright 2014 Mirantis, Inc.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
import logging
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
|
|
||||||
from fuel_plugin_builder.actions import BaseAction
|
|
||||||
from fuel_plugin_builder import consts
|
|
||||||
from fuel_plugin_builder import errors
|
|
||||||
from fuel_plugin_builder import messages
|
|
||||||
from fuel_plugin_builder import utils
|
|
||||||
from fuel_plugin_builder import version_mapping
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class CreatePlugin(BaseAction):
|
|
||||||
|
|
||||||
plugin_name_pattern = re.compile(consts.PLUGIN_NAME_PATTERN)
|
|
||||||
|
|
||||||
def __init__(self, plugin_path, package_version=None):
|
|
||||||
self.plugin_name = utils.basename(plugin_path.rstrip('/'))
|
|
||||||
self.plugin_path = plugin_path
|
|
||||||
self.package_version = (package_version or
|
|
||||||
version_mapping.latest_version)
|
|
||||||
|
|
||||||
self.render_ctx = {'plugin_name': self.plugin_name}
|
|
||||||
self.template_paths = version_mapping.get_plugin_for_version(
|
|
||||||
self.package_version)['templates']
|
|
||||||
|
|
||||||
def check(self):
|
|
||||||
if utils.exists(self.plugin_path):
|
|
||||||
raise errors.PluginDirectoryExistsError(
|
|
||||||
'Plugins directory {0} already exists, '
|
|
||||||
'choose another name'.format(self.plugin_path))
|
|
||||||
|
|
||||||
if not self.plugin_name_pattern.match(self.plugin_name):
|
|
||||||
raise errors.ValidationError(
|
|
||||||
messages.PLUGIN_WRONG_NAME_EXCEPTION_MESSAGE)
|
|
||||||
|
|
||||||
def run(self):
|
|
||||||
logger.debug('Start plugin creation "%s"', self.plugin_path)
|
|
||||||
self.check()
|
|
||||||
|
|
||||||
for template_path in self.template_paths:
|
|
||||||
|
|
||||||
template_dir = os.path.join(
|
|
||||||
os.path.dirname(__file__), '..', template_path)
|
|
||||||
|
|
||||||
utils.copy(template_dir, self.plugin_path)
|
|
||||||
utils.render_files_in_dir(self.plugin_path, self.render_ctx)
|
|
|
@ -1,128 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Copyright 2014 Mirantis, Inc.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import logging
|
|
||||||
import six
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from fuel_plugin_builder import actions
|
|
||||||
from fuel_plugin_builder import errors
|
|
||||||
from fuel_plugin_builder import messages
|
|
||||||
from fuel_plugin_builder.validators import ValidatorManager
|
|
||||||
|
|
||||||
from fuel_plugin_builder.logger import configure_logger
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
def print_err(line):
|
|
||||||
sys.stderr.write(six.text_type(line))
|
|
||||||
sys.stderr.write('\n')
|
|
||||||
|
|
||||||
|
|
||||||
def handle_exception(exc):
|
|
||||||
logger.exception(exc)
|
|
||||||
|
|
||||||
if isinstance(exc, errors.FuelCannotFindCommandError):
|
|
||||||
print_err(messages.HEADER)
|
|
||||||
print_err(messages.INSTALL_REQUIRED_PACKAGES)
|
|
||||||
|
|
||||||
elif isinstance(exc, errors.ValidationError):
|
|
||||||
print_err('Validation failed')
|
|
||||||
print_err(exc)
|
|
||||||
|
|
||||||
else:
|
|
||||||
print_err('Unexpected error')
|
|
||||||
print_err(exc)
|
|
||||||
|
|
||||||
sys.exit(-1)
|
|
||||||
|
|
||||||
|
|
||||||
def decode_string(string):
|
|
||||||
"""Custom type for add_argument method
|
|
||||||
"""
|
|
||||||
return unicode(string, 'utf-8')
|
|
||||||
|
|
||||||
|
|
||||||
def parse_args():
|
|
||||||
"""Parse arguments and return them
|
|
||||||
"""
|
|
||||||
parser = argparse.ArgumentParser(
|
|
||||||
description='fpb is a fuel plugin builder which '
|
|
||||||
'helps you create plugin for Fuel')
|
|
||||||
|
|
||||||
# TODO(vsharshov): we should move to subcommands instead of
|
|
||||||
# exclusive group, because in this case we could not
|
|
||||||
# support such behavior [-a xxx | [-b yyy -c zzz]]
|
|
||||||
group = parser.add_mutually_exclusive_group(required=True)
|
|
||||||
|
|
||||||
group.add_argument(
|
|
||||||
'--create', help='create a plugin skeleton',
|
|
||||||
type=decode_string, metavar='plugin_name')
|
|
||||||
group.add_argument(
|
|
||||||
'--build', help='build a plugin',
|
|
||||||
type=decode_string, metavar='path_to_directory')
|
|
||||||
group.add_argument(
|
|
||||||
'--check', help='check that plugin is valid',
|
|
||||||
type=decode_string, metavar='path_to_directory')
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'--debug', help='enable debug mode',
|
|
||||||
action="store_true")
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
'--package-version', help='which package version to use',
|
|
||||||
type=decode_string)
|
|
||||||
|
|
||||||
result = parser.parse_args()
|
|
||||||
package_version_check(result, parser)
|
|
||||||
|
|
||||||
return result
|
|
||||||
|
|
||||||
|
|
||||||
def perform_action(args):
|
|
||||||
"""Performs an action
|
|
||||||
|
|
||||||
:param args: argparse object
|
|
||||||
"""
|
|
||||||
if args.create:
|
|
||||||
actions.CreatePlugin(args.create, args.package_version).run()
|
|
||||||
print('Plugin is created')
|
|
||||||
elif args.build:
|
|
||||||
actions.make_builder(args.build).run()
|
|
||||||
print('Plugin is built')
|
|
||||||
elif args.check:
|
|
||||||
ValidatorManager(args.check).get_validator().validate()
|
|
||||||
print('Plugin is valid')
|
|
||||||
|
|
||||||
|
|
||||||
def package_version_check(args, parser):
|
|
||||||
"""Check exclusive nature of --package-version argument
|
|
||||||
"""
|
|
||||||
if (args.build or args.check) and args.package_version:
|
|
||||||
parser.error('--package-version works only with --create')
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
"""Entry point
|
|
||||||
"""
|
|
||||||
try:
|
|
||||||
args = parse_args()
|
|
||||||
configure_logger(debug=args.debug)
|
|
||||||
perform_action(args)
|
|
||||||
except Exception as exc:
|
|
||||||
handle_exception(exc)
|
|
|
@ -1,18 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Copyright 2015 Mirantis, Inc.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
# Only lower case letters, numbers, '_', '-' symbols
|
|
||||||
PLUGIN_NAME_PATTERN = '^[a-z0-9_-]+$'
|
|
|
@ -1,63 +0,0 @@
|
||||||
# Copyright 2014 Mirantis, Inc.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
|
|
||||||
class FuelPluginException(Exception):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class FuelCannotFindCommandError(FuelPluginException):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class ExecutedErrorNonZeroExitCode(FuelPluginException):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class PluginDirectoryExistsError(FuelPluginException):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class ValidationError(FuelPluginException):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class TaskFieldError(ValidationError):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class FileIsEmpty(ValidationError):
|
|
||||||
def __init__(self, file_path):
|
|
||||||
super(FileIsEmpty, self).__init__(
|
|
||||||
"File '{0}' is empty".format(file_path)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class FileDoesNotExist(ValidationError):
|
|
||||||
def __init__(self, file_path):
|
|
||||||
super(FileDoesNotExist, self).__init__(
|
|
||||||
"File '{0}' does not exist".format(file_path)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class WrongPackageVersionError(FuelPluginException):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class ReleasesDirectoriesError(FuelPluginException):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class WrongPluginDirectoryError(FuelPluginException):
|
|
||||||
pass
|
|
|
@ -1,36 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Copyright 2014 Mirantis, Inc.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
import logging
|
|
||||||
|
|
||||||
|
|
||||||
def configure_logger(debug=False):
|
|
||||||
logger = logging.getLogger('fuel_plugin_builder')
|
|
||||||
|
|
||||||
logger.setLevel(logging.INFO)
|
|
||||||
if debug:
|
|
||||||
logger.setLevel(logging.DEBUG)
|
|
||||||
|
|
||||||
formatter = logging.Formatter(
|
|
||||||
'%(asctime)s %(levelname)s %(process)d (%(module)s) %(message)s',
|
|
||||||
"%Y-%m-%d %H:%M:%S")
|
|
||||||
|
|
||||||
stream_handler = logging.StreamHandler()
|
|
||||||
stream_handler.setLevel(logging.DEBUG)
|
|
||||||
stream_handler.setFormatter(formatter)
|
|
||||||
logger.addHandler(stream_handler)
|
|
||||||
|
|
||||||
return logger
|
|
|
@ -1,33 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Copyright 2014 Mirantis, Inc.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
|
|
||||||
HEADER = '=' * 50
|
|
||||||
INSTALL_REQUIRED_PACKAGES = """
|
|
||||||
Was not able to find required packages.
|
|
||||||
|
|
||||||
If you use Ubuntu, run:
|
|
||||||
|
|
||||||
# sudo apt-get install createrepo rpm dpkg-dev
|
|
||||||
|
|
||||||
If you use CentOS, run:
|
|
||||||
|
|
||||||
# yum install createrepo dpkg-devel dpkg-dev rpm rpm-build
|
|
||||||
|
|
||||||
"""
|
|
||||||
PLUGIN_WRONG_NAME_EXCEPTION_MESSAGE = ("Plugin name is invalid, use only "
|
|
||||||
"lower case letters, numbers, '_', '-' "
|
|
||||||
"symbols")
|
|
|
@ -1,3 +0,0 @@
|
||||||
.tox
|
|
||||||
.build
|
|
||||||
*.pyc
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue