aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuhail Syed <suhail.syed@gmail.com>2015-08-24 05:37:37 -0700
committerSuhail Syed <suhail.syed@gmail.com>2015-08-24 16:08:49 -0700
commitd3872aa9eeeb1b254c66c2de486d3815d1ca48ad (patch)
treef3a51d6a9dda18b48e6b4db8cfb5031d7e8c31d3
parent7c83b0e5b977ed66b1c66ed044b6baf80e4bd54d (diff)
downloadkolla-d3872aa9eeeb1b254c66c2de486d3815d1ca48ad.tar.gz
kolla-d3872aa9eeeb1b254c66c2de486d3815d1ca48ad.zip
Make Kolla installable via PIP
Install Ansible code, etc file examples, scripts, an open rc example, a tool to initialize the OpenStack deployment, and other various useful bits. Start the versioning at 0.1.0 as recommended by ttx. Change-Id: I35fa4042040957e7725c7fc3b146009e0135499a Partially-Implements: blueprint python-package
-rw-r--r--kolla/__init__.py22
-rw-r--r--kolla/cmd/__init__.py0
-rwxr-xr-xkolla/cmd/build.py (renamed from tools/build.py)0
-rwxr-xr-xrequirements.txt1
-rw-r--r--setup.cfg50
-rw-r--r--setup.py29
-rw-r--r--tests/test_build.py2
7 files changed, 103 insertions, 1 deletions
diff --git a/kolla/__init__.py b/kolla/__init__.py
new file mode 100644
index 000000000..8cc4759c0
--- /dev/null
+++ b/kolla/__init__.py
@@ -0,0 +1,22 @@
+# 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 threading
+
+import pbr.version
+
+
+__version__ = pbr.version.VersionInfo(
+ 'kolla').version_string()
+
+# Make a project global TLS trace storage repository
+TLS = threading.local()
diff --git a/kolla/cmd/__init__.py b/kolla/cmd/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/kolla/cmd/__init__.py
diff --git a/tools/build.py b/kolla/cmd/build.py
index 4f571c790..4f571c790 100755
--- a/tools/build.py
+++ b/kolla/cmd/build.py
diff --git a/requirements.txt b/requirements.txt
index 4c7ccfae1..194ddbbd1 100755
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,3 @@
+pbr<2.0,>=1.4
docker-py>=1.1.0 # Apache-2.0
Jinja2>=2.6 # BSD License (3 clause)
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 000000000..1e5d71305
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,50 @@
+[metadata]
+name = kolla
+version = 0.1.0
+summary = Kolla OpenStack Deployment
+description-file =
+ README.rst
+author = OpenStack
+author-email = openstack-dev@lists.openstack.org
+home-page = http://www.openstack.org/
+classifier =
+ Environment :: OpenStack
+ Intended Audience :: Information Technology
+ Intended Audience :: System Administrators
+ License :: OSI Approved :: Apache Software License
+ Operating System :: POSIX :: Linux
+ Programming Language :: Python
+ Programming Language :: Python :: 2
+ Programming Language :: Python :: 2.7
+
+[files]
+packages =
+ kolla
+data_files =
+ share/kolla/ansible = ansible/*
+ share/kolla/devenv = devenv/*
+ share/kolla/docker = docker/*
+ share/kolla/docker_templates = docker_templates/*
+ share/kolla/docs = docs/*
+ share/kolla/etc_examples = etc/*
+ share/kolla/vagrant = vagrant/*
+ share/kolla = tools/init-runonce
+ share/kolla = tools/openrc-example
+
+scripts =
+ tools/kolla-ansible
+
+[entry_points]
+console_scripts =
+ kolla-build = kolla.cmd.build:main
+
+[global]
+setup-hooks =
+ pbr.hooks.setup_hook
+
+[pbr]
+
+[build_sphinx]
+all_files = 1
+build-dir = doc/build
+source-dir = docs
diff --git a/setup.py b/setup.py
new file mode 100644
index 000000000..d8080d05c
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,29 @@
+# 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
+#
+# 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.
+
+# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
+import setuptools
+
+# 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
+
+setuptools.setup(
+ setup_requires=['pbr>=1.3'],
+ pbr=True)
diff --git a/tests/test_build.py b/tests/test_build.py
index e83698c2c..125c62540 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -19,7 +19,7 @@ from oslotest import base
import sys
sys.path.append(path.abspath(path.join(path.dirname(__file__), '../tools')))
-from tools import build
+from kolla.cmd import build
LOG = logging.getLogger(__name__)