Move to pbr and align repo with OpenStack practice

Moving to pbr is essential part since it allows to integrate repo with
OpenStack CI. For instance, it's mandatory to have pbr to make release
on PyPI by pushing tags to repo.

Change-Id: I17e45a9fc1d11c2c8a3fe555153fe61edc5c887d
This commit is contained in:
Igor Kalnitsky 2016-03-01 16:14:09 +02:00
parent a0fab298f1
commit f188797266
11 changed files with 233 additions and 140 deletions

70
.gitignore vendored
View File

@ -1,12 +1,64 @@
*.egg-info
*.pyc
*.fp
.tox
.idea
.venv
.build
build
dist
# 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

17
CONTRIBUTING.rst Normal file
View File

@ -0,0 +1,17 @@
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

4
HACKING.rst Normal file
View File

@ -0,0 +1,4 @@
Fuel Plugins Style Commandments
===============================
Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/

View File

@ -1,2 +0,0 @@
include *.txt *.ini
recursive-include fuel_plugin_builder/templates *

View File

@ -1,80 +0,0 @@
Fuel Plugins
============
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](https://www.fuel-infra.org/plugins/catalog.html "Released Plugins Catalog")
For instructions on installing Fuel plugins, see
[Installing Plugins](https://wiki.openstack.org/wiki/Fuel/Plugins#Installation_procedure "Installing Plugins")
Finding documentation
=====================
You can find Fuel Plugins documentation in the following sources:
* Development issues - [ Plugins ](http://wiki.openstack.org/Fuel/Plugins "Plugins") wiki page
* Common installation instructions -
[ Install Fuel Plugins ](http://docs.mirantis.com/openstack/fuel/fuel-master/user-guide.html#install-fuel-plugins "Install Fuel Plugins")
and [ CLI command reference ](http://docs.mirantis.com/openstack/fuel/fuel-master/user-guide.html#fuel-plugins-cli "CLI command reference") sections in the User Guide
* Specific installation instructions -
[ Fuel Plugins Catalog ](https://software.mirantis.com/download-mirantis-openstack-fuel-plug-ins/ "Fuel Plugins Catalog").
StackForge 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](https://www.fuel-infra.org/plugins/catalog.html "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 ](http://wiki.openstack.org/Fuel/Plugins "Plugins") wiki page.
Plugins should be built using the
**[fuel_plugin_builder](fuel_plugin_builder)** (fpb) utility found in this
repoistory or via pip. fbp will ensure that build steps as well as validation
is performed prior to assembling a package.
Abbreviated instructions:
```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](https://github.com/openstack/?query=fuel-plugin "Community Plugins")

89
README.rst Normal file
View File

@ -0,0 +1,89 @@
Fuel Plugins
============
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``. ``fbp`` 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

View File

@ -1,3 +1,8 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr>=1.6
six>=1.5.2
Mako==0.9.1
PyYAML==3.10

View File

@ -123,7 +123,7 @@ function run_build {
source $FPB_VENV_PATH/bin/activate || return 1
fpb_path="${ROOT}"
pushd $fpb_path
python setup.py install
pip install .
popd
mkdir -p $BUILT_PLUGINS_PATH

32
setup.cfg Normal file
View File

@ -0,0 +1,32 @@
[metadata]
name = fuel-plugin-builder
description-file = README.rst
description = Helps to create and build fuel plugins
author = Mirantis Inc.
author_email = product@mirantis.com
home-page = http://mirantis.com
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
Intended Audience :: Developers
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Topic :: System :: Software Distribution
[files]
packages = fuel_plugin_builder
[entry_points]
console_scripts =
fpb = fuel_plugin_builder.cli:main
fuel-plugin-builder = fuel_plugin_builder.cli:main
[global]
setup-hooks =
pbr.hooks.setup_hook
[wheel]
python-tag = py2

View File

@ -1,52 +1,29 @@
# Copyright 2014 Mirantis, Inc.
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# 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
# 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
# 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.
# 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 os
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
import setuptools
from setuptools import find_packages
from setuptools import setup
# In python < 2.7.4, a lazy loading of package `pbr` will break
# setuptools if some other modules registered functions in `atexit`.
# solution from: http://bugs.python.org/issue15881#msg170215
try:
import multiprocessing # noqa
except ImportError:
pass
def find_requires():
prj_root = os.path.dirname(os.path.realpath(__file__))
requirements = []
with open(u'{0}/requirements.txt'.format(prj_root), 'r') as reqs:
requirements = reqs.readlines()
return requirements
setup(
name='fuel-plugin-builder',
version='4.0.0',
description='Helps to create and build fuel plugins',
long_description="""Helps to create and build fuel plugins""",
classifiers=[
"Development Status :: 4 - Beta",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Topic :: System :: Software Distribution"],
author='Mirantis Inc.',
author_email='product@mirantis.com',
url='http://mirantis.com',
keywords='fuel plugins plugin',
packages=find_packages(exclude=("examples",)),
zip_safe=False,
install_requires=find_requires(),
include_package_data=True,
entry_points={
'console_scripts': [
'fpb = fuel_plugin_builder.cli:main',
'fuel-plugin-builder = fuel_plugin_builder.cli:main']})
setuptools.setup(
setup_requires=['pbr>=1.8'],
pbr=True)

View File

@ -1,6 +1,5 @@
-r requirements.txt
hacking==0.7
mock==1.0
nose==1.1.2
nose2==0.4.1
nose-timer==0.2.0
nose-timer==0.2.0