Restructuring project for python's setuptools
This commit is contained in:
parent
c072b5c4ef
commit
29a82333a6
84
.gitmodules
vendored
84
.gitmodules
vendored
@ -1,63 +1,63 @@
|
||||
[submodule "puppet/modules/glance"]
|
||||
path = puppet/modules/glance
|
||||
[submodule "packstack/puppet/modules/glance"]
|
||||
path = packstack/puppet/modules/glance
|
||||
url = https://github.com/puppetlabs/puppetlabs-glance.git
|
||||
[submodule "puppet/modules/horizon"]
|
||||
path = puppet/modules/horizon
|
||||
[submodule "packstack/puppet/modules/horizon"]
|
||||
path = packstack/puppet/modules/horizon
|
||||
url = https://github.com/puppetlabs/puppetlabs-horizon.git
|
||||
[submodule "puppet/modules/keystone"]
|
||||
path = puppet/modules/keystone
|
||||
[submodule "packstack/puppet/modules/keystone"]
|
||||
path = packstack/puppet/modules/keystone
|
||||
url = https://github.com/puppetlabs/puppetlabs-keystone.git
|
||||
[submodule "puppet/modules/nova"]
|
||||
path = puppet/modules/nova
|
||||
[submodule "packstack/puppet/modules/nova"]
|
||||
path = packstack/puppet/modules/nova
|
||||
url = https://github.com/puppetlabs/puppetlabs-nova.git
|
||||
[submodule "puppet/modules/openstack"]
|
||||
path = puppet/modules/openstack
|
||||
[submodule "packstack/puppet/modules/openstack"]
|
||||
path = packstack/puppet/modules/openstack
|
||||
url = https://github.com/puppetlabs/puppetlabs-openstack.git
|
||||
[submodule "puppet/modules/swift"]
|
||||
path = puppet/modules/swift
|
||||
[submodule "packstack/puppet/modules/swift"]
|
||||
path = packstack/puppet/modules/swift
|
||||
url = https://github.com/puppetlabs/puppetlabs-swift.git
|
||||
[submodule "puppet/modules/cinder"]
|
||||
path = puppet/modules/cinder
|
||||
[submodule "packstack/puppet/modules/cinder"]
|
||||
path = packstack/puppet/modules/cinder
|
||||
url = https://github.com/puppetlabs/puppetlabs-cinder.git
|
||||
[submodule "puppet/modules/stdlib"]
|
||||
path = puppet/modules/stdlib
|
||||
[submodule "packstack/puppet/modules/stdlib"]
|
||||
path = packstack/puppet/modules/stdlib
|
||||
url = https://github.com/puppetlabs/puppetlabs-stdlib.git
|
||||
[submodule "puppet/modules/sysctl"]
|
||||
path = puppet/modules/sysctl
|
||||
[submodule "packstack/puppet/modules/sysctl"]
|
||||
path = packstack/puppet/modules/sysctl
|
||||
url = https://github.com/puppetlabs/puppetlabs-sysctl.git
|
||||
[submodule "puppet/modules/mysql"]
|
||||
path = puppet/modules/mysql
|
||||
[submodule "packstack/puppet/modules/mysql"]
|
||||
path = packstack/puppet/modules/mysql
|
||||
url = https://github.com/puppetlabs/puppetlabs-mysql.git
|
||||
[submodule "puppet/modules/concat"]
|
||||
path = puppet/modules/concat
|
||||
[submodule "packstack/puppet/modules/concat"]
|
||||
path = packstack/puppet/modules/concat
|
||||
url = https://github.com/puppetlabs/puppetlabs-concat.git
|
||||
[submodule "puppet/modules/create_resources"]
|
||||
path = puppet/modules/create_resources
|
||||
[submodule "packstack/puppet/modules/create_resources"]
|
||||
path = packstack/puppet/modules/create_resources
|
||||
url = https://github.com/puppetlabs/puppetlabs-create_resources.git
|
||||
[submodule "puppet/modules/rsync"]
|
||||
path = puppet/modules/rsync
|
||||
[submodule "packstack/puppet/modules/rsync"]
|
||||
path = packstack/puppet/modules/rsync
|
||||
url = https://github.com/puppetlabs/puppetlabs-rsync.git
|
||||
[submodule "puppet/modules/xinetd"]
|
||||
path = puppet/modules/xinetd
|
||||
[submodule "packstack/puppet/modules/xinetd"]
|
||||
path = packstack/puppet/modules/xinetd
|
||||
url = https://github.com/puppetlabs/puppetlabs-xinetd.git
|
||||
[submodule "puppet/modules/apache"]
|
||||
path = puppet/modules/apache
|
||||
[submodule "packstack/puppet/modules/apache"]
|
||||
path = packstack/puppet/modules/apache
|
||||
url = https://github.com/puppetlabs/puppetlabs-apache.git
|
||||
[submodule "puppet/modules/firewall"]
|
||||
path = puppet/modules/firewall
|
||||
[submodule "packstack/puppet/modules/firewall"]
|
||||
path = packstack/puppet/modules/firewall
|
||||
url = https://github.com/lstanden/puppetlabs-firewall.git
|
||||
[submodule "puppet/modules/memcached"]
|
||||
path = puppet/modules/memcached
|
||||
[submodule "packstack/puppet/modules/memcached"]
|
||||
path = packstack/puppet/modules/memcached
|
||||
url = https://github.com/saz/puppet-memcached.git
|
||||
[submodule "puppet/modules/ssh"]
|
||||
path = puppet/modules/ssh
|
||||
[submodule "packstack/puppet/modules/ssh"]
|
||||
path = packstack/puppet/modules/ssh
|
||||
url = https://github.com/saz/puppet-ssh.git
|
||||
[submodule "puppet/modules/inifile"]
|
||||
path = puppet/modules/inifile
|
||||
[submodule "packstack/puppet/modules/inifile"]
|
||||
path = packstack/puppet/modules/inifile
|
||||
url = https://github.com/cprice-puppet/puppetlabs-inifile.git
|
||||
[submodule "puppet/modules/qpid"]
|
||||
path = puppet/modules/qpid
|
||||
[submodule "packstack/puppet/modules/qpid"]
|
||||
path = packstack/puppet/modules/qpid
|
||||
url = https://github.com/derekhiggins/puppet-qpid.git
|
||||
[submodule "puppet/modules/vlan"]
|
||||
path = puppet/modules/vlan
|
||||
[submodule "packstack/puppet/modules/vlan"]
|
||||
path = packstack/puppet/modules/vlan
|
||||
url = https://github.com/derekhiggins/puppet-vlan.git
|
||||
|
5
MANIFEST.in
Normal file
5
MANIFEST.in
Normal file
@ -0,0 +1,5 @@
|
||||
include docs/*
|
||||
recursive-include packstack/puppet *
|
||||
recursive-include packstack/templates *
|
||||
prune packstack/puppet/modules/*/.git
|
||||
|
6
README
6
README
@ -13,7 +13,7 @@ $ git clone --recursive git://github.com/fedora-openstack/packstack.git
|
||||
$ cd packstack
|
||||
|
||||
Option 1 (using answer file)
|
||||
$ ./packstack --gen-answer-file=ans.txt
|
||||
$ ./bin/packstack --gen-answer-file=ans.txt
|
||||
|
||||
# then edit answers.txt as appropriate e.g.
|
||||
o set CONFIG_SSH_KEY to a public ssh key to be installed to remote machines
|
||||
@ -21,10 +21,10 @@ o Edit 127.0.0.1 to anywhere you want to install a piece of openstack on another
|
||||
o Edit the 3 network interfaces to whatever makes sense in your setup
|
||||
o If your testing on a vm then set CONFIG_LIBVIRT_TYPE=qemu
|
||||
|
||||
$ ./packstack --answer-file=ans.txt
|
||||
$ ./bin/packstack --answer-file=ans.txt
|
||||
|
||||
Option 2 (prompts for configuration options)
|
||||
$ ./packstack
|
||||
$ ./bin/packstack
|
||||
|
||||
thats it, if everything went well you can now start using openstack
|
||||
$ cd
|
||||
|
15
bin/packstack
Executable file
15
bin/packstack
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os, sys
|
||||
|
||||
try:
|
||||
import packstack
|
||||
except:
|
||||
# packstack isn't installed, running from source checkout
|
||||
sys.path.append(os.path.join(os.path.split(sys.argv[0])[0], ".."))
|
||||
import packstack
|
||||
|
||||
os.environ["INSTALLER_PROJECT_DIR"] = os.path.abspath(os.path.split(packstack.__file__)[0])
|
||||
|
||||
from packstack.installer import run_setup
|
||||
run_setup.main()
|
12
bin/release.sh
Executable file
12
bin/release.sh
Executable file
@ -0,0 +1,12 @@
|
||||
|
||||
#
|
||||
if [ "$1" = "release" ] ; then
|
||||
sed -i -e 's/FINAL=False/FINAL=True/g' packstack/version.py
|
||||
SNAPTAG=""
|
||||
else
|
||||
SNAPTAG=$(git log --oneline | wc -l)
|
||||
fi
|
||||
|
||||
python setup.py setopt -o tag_build -s "$SNAPTAG" -c egg_info
|
||||
python setup.py sdist
|
||||
git checkout packstack/version.py
|
@ -1,6 +0,0 @@
|
||||
|
||||
export INSTALLER_PROJECT_DIR=$(dirname "${BASH_SOURCE[0]}")
|
||||
|
||||
python $INSTALLER_PROJECT_DIR/installer/run_setup.py $@
|
||||
|
||||
|
0
packstack/__init__.py
Normal file
0
packstack/__init__.py
Normal file
0
packstack/installer/__init__.py
Normal file
0
packstack/installer/__init__.py
Normal file
@ -11,9 +11,7 @@ import traceback
|
||||
import os
|
||||
import basedefs
|
||||
import datetime
|
||||
import libxml2
|
||||
import types
|
||||
import shutil
|
||||
import time
|
||||
import tempfile
|
||||
|
@ -548,7 +548,7 @@ def _summaryParamsToLog():
|
||||
def runSequences():
|
||||
controller.runAllSequences()
|
||||
|
||||
def main(configFile=None):
|
||||
def _main(configFile=None):
|
||||
try:
|
||||
logging.debug("Entered main(configFile='%s')"%(configFile))
|
||||
print output_messages.INFO_HEADER
|
||||
@ -669,7 +669,9 @@ def loadPlugins():
|
||||
"""
|
||||
sys.path.append(basedefs.DIR_PLUGINS)
|
||||
sys.path.append(basedefs.DIR_MODULES)
|
||||
fileList = sorted(os.listdir(basedefs.DIR_PLUGINS), cmp=plugin_compare)
|
||||
|
||||
fileList = [f for f in os.listdir(basedefs.DIR_PLUGINS) if f[0] != "_"]
|
||||
fileList = sorted(fileList, cmp=plugin_compare)
|
||||
for item in fileList:
|
||||
# Looking for files that end with ###.py, example: a_plugin_100.py
|
||||
match = re.search("^(.+\_\d\d\d)\.py$", item)
|
||||
@ -740,7 +742,7 @@ def initMain():
|
||||
initPluginsConfig()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def main():
|
||||
try:
|
||||
initMain()
|
||||
|
||||
@ -778,7 +780,7 @@ if __name__ == "__main__":
|
||||
if len(param) > 0 and value:
|
||||
commandLineValues[param[0].getKey("CONF_NAME")] = value
|
||||
|
||||
main(confFile)
|
||||
_main(confFile)
|
||||
|
||||
except SystemExit:
|
||||
raise
|
||||
@ -789,3 +791,5 @@ if __name__ == "__main__":
|
||||
print output_messages.ERR_CHECK_LOG_FILE_FOR_MORE_INFO%(logFile)
|
||||
sys.exit(1)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
0
packstack/modules/__init__.py
Normal file
0
packstack/modules/__init__.py
Normal file
@ -1,8 +1,8 @@
|
||||
|
||||
import os
|
||||
|
||||
import basedefs
|
||||
from setup_controller import Controller
|
||||
from packstack.installer import basedefs
|
||||
from packstack.installer.setup_controller import Controller
|
||||
|
||||
controller = Controller()
|
||||
|
0
packstack/plugins/__init__.py
Normal file
0
packstack/plugins/__init__.py
Normal file
@ -6,11 +6,11 @@ import logging
|
||||
import os
|
||||
import uuid
|
||||
|
||||
import packstack.installer.engine_validators as validate
|
||||
from packstack.installer import basedefs
|
||||
import packstack.installer.common_utils as utils
|
||||
|
||||
import engine_validators as validate
|
||||
import basedefs
|
||||
import common_utils as utils
|
||||
from ospluginutils import getManifestTemplate, appendManifestFile
|
||||
from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile
|
||||
|
||||
# Controller object will be initialized from main flow
|
||||
controller = None
|
@ -6,10 +6,11 @@ import logging
|
||||
import os
|
||||
import uuid
|
||||
|
||||
import engine_validators as validate
|
||||
import basedefs
|
||||
import common_utils as utils
|
||||
from ospluginutils import NovaConfig, getManifestTemplate, appendManifestFile
|
||||
import packstack.installer.engine_validators as validate
|
||||
from packstack.installer import basedefs
|
||||
import packstack.installer.common_utils as utils
|
||||
|
||||
from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile
|
||||
|
||||
# Controller object will be initialized from main flow
|
||||
controller = None
|
@ -7,10 +7,11 @@ import os
|
||||
import uuid
|
||||
|
||||
|
||||
import engine_validators as validate
|
||||
import basedefs
|
||||
import common_utils as utils
|
||||
from ospluginutils import getManifestTemplate, appendManifestFile
|
||||
import packstack.installer.engine_validators as validate
|
||||
from packstack.installer import basedefs
|
||||
import packstack.installer.common_utils as utils
|
||||
|
||||
from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile
|
||||
|
||||
# Controller object will be initialized from main flow
|
||||
controller = None
|
@ -4,8 +4,8 @@ Plugin responsible for setting Openstack global options
|
||||
|
||||
import logging
|
||||
|
||||
import engine_validators as validate
|
||||
import common_utils as utils
|
||||
import packstack.installer.engine_validators as validate
|
||||
import packstack.installer.common_utils as utils
|
||||
|
||||
# Controller object will be initialized from main flow
|
||||
controller = None
|
@ -7,9 +7,9 @@ import os
|
||||
import uuid
|
||||
|
||||
|
||||
import engine_validators as validate
|
||||
import basedefs
|
||||
import common_utils as utils
|
||||
import packstack.installer.engine_validators as validate
|
||||
from packstack.installer import basedefs
|
||||
import packstack.installer.common_utils as utils
|
||||
|
||||
# Controller object will be initialized from main flow
|
||||
controller = None
|
@ -5,9 +5,11 @@ Installs and configures MySQL
|
||||
import logging
|
||||
import os
|
||||
|
||||
import engine_validators as validate
|
||||
import basedefs
|
||||
import common_utils as utils
|
||||
import packstack.installer.engine_validators as validate
|
||||
from packstack.installer import basedefs
|
||||
import packstack.installer.common_utils as utils
|
||||
|
||||
from packstack.modules.ospluginutils import gethostlist
|
||||
|
||||
# Controller object will be initialized from main flow
|
||||
controller = None
|
@ -5,9 +5,11 @@ Installs and configures nova
|
||||
import logging
|
||||
import os
|
||||
|
||||
import engine_validators as validate
|
||||
import common_utils as utils
|
||||
from ospluginutils import NovaConfig, getManifestTemplate, appendManifestFile
|
||||
import packstack.installer.engine_validators as validate
|
||||
from packstack.installer import basedefs
|
||||
import packstack.installer.common_utils as utils
|
||||
|
||||
from packstack.modules.ospluginutils import NovaConfig, getManifestTemplate, appendManifestFile
|
||||
|
||||
# Controller object will be initialized from main flow
|
||||
controller = None
|
@ -7,9 +7,9 @@ import os
|
||||
import uuid
|
||||
|
||||
|
||||
import engine_validators as validate
|
||||
import basedefs
|
||||
import common_utils as utils
|
||||
import packstack.installer.engine_validators as validate
|
||||
from packstack.installer import basedefs
|
||||
import packstack.installer.common_utils as utils
|
||||
|
||||
# Controller object will be initialized from main flow
|
||||
controller = None
|
@ -5,12 +5,11 @@ import logging
|
||||
import os
|
||||
import uuid
|
||||
|
||||
import engine_validators as validate
|
||||
import basedefs
|
||||
import common_utils as utils
|
||||
|
||||
from ospluginutils import gethostlist
|
||||
import packstack.installer.engine_validators as validate
|
||||
from packstack.installer import basedefs
|
||||
import packstack.installer.common_utils as utils
|
||||
|
||||
from packstack.modules.ospluginutils import gethostlist
|
||||
|
||||
# Controller object will be initialized from main flow
|
||||
controller = None
|
@ -6,10 +6,9 @@ import logging
|
||||
import os
|
||||
import uuid
|
||||
|
||||
|
||||
import engine_validators as validate
|
||||
import basedefs
|
||||
import common_utils as utils
|
||||
import packstack.installer.engine_validators as validate
|
||||
from packstack.installer import basedefs
|
||||
import packstack.installer.common_utils as utils
|
||||
|
||||
# Controller object will be initialized from main flow
|
||||
controller = None
|
@ -6,11 +6,11 @@ import glob
|
||||
import logging
|
||||
import os
|
||||
|
||||
import engine_validators as validate
|
||||
import basedefs
|
||||
import common_utils as utils
|
||||
import packstack.installer.engine_validators as validate
|
||||
from packstack.installer import basedefs
|
||||
import packstack.installer.common_utils as utils
|
||||
|
||||
from ospluginutils import gethostlist
|
||||
from packstack.modules.ospluginutils import gethostlist
|
||||
|
||||
# Controller object will be initialized from main flow
|
||||
controller = None
|
@ -6,11 +6,11 @@ import glob
|
||||
import logging
|
||||
import os
|
||||
|
||||
import engine_validators as validate
|
||||
import basedefs
|
||||
import common_utils as utils
|
||||
import packstack.installer.engine_validators as validate
|
||||
from packstack.installer import basedefs
|
||||
import packstack.installer.common_utils as utils
|
||||
|
||||
from ospluginutils import gethostlist
|
||||
from packstack.modules.ospluginutils import gethostlist
|
||||
|
||||
# Controller object will be initialized from main flow
|
||||
controller = None
|
@ -6,10 +6,11 @@ import logging
|
||||
import os
|
||||
import uuid
|
||||
|
||||
import engine_validators as validate
|
||||
import basedefs
|
||||
import common_utils as utils
|
||||
from ospluginutils import NovaConfig, getManifestTemplate, appendManifestFile
|
||||
import packstack.installer.engine_validators as validate
|
||||
from packstack.installer import basedefs
|
||||
import packstack.installer.common_utils as utils
|
||||
|
||||
from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile
|
||||
|
||||
# Controller object will be initialized from main flow
|
||||
controller = None
|
1
packstack/puppet/modules/ssh
Submodule
1
packstack/puppet/modules/ssh
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit d6571f8c43ac55d20a6afd8a8ce3f86ac4b0d7a4
|
11
packstack/version.py
Normal file
11
packstack/version.py
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
VERSION = ['2013', '2', '1']
|
||||
FINAL=False
|
||||
|
||||
def version_string():
|
||||
if FINAL:
|
||||
return '.'.join(filter(None, VERSION))
|
||||
else:
|
||||
return '.'.join(filter(None, VERSION))+"dev"
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
Subproject commit c6fe1c360374c8fc5b664091a828d9dab0a6a515
|
33
setup.py
Normal file
33
setup.py
Normal file
@ -0,0 +1,33 @@
|
||||
import os
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
from packstack import version
|
||||
|
||||
# Utility function to read the README file.
|
||||
# Used for the long_description. It's nice, because now 1) we have a top level
|
||||
# README file and 2) it's easier to type in the README file than to put a raw
|
||||
# string in below ...
|
||||
def read(fname):
|
||||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||
|
||||
setup(
|
||||
name = "packstack",
|
||||
version = version.version_string(),
|
||||
author = "Derek Higgins",
|
||||
author_email = "derekh@redhat.com",
|
||||
description = ("A utility to install openstack"),
|
||||
license = "ASL 2.0",
|
||||
keywords = "openstack",
|
||||
url = "https://github.com/fedora-openstack/packstack",
|
||||
packages=find_packages('.'),
|
||||
include_package_data=True,
|
||||
long_description=read('README'),
|
||||
zip_safe=False,
|
||||
classifiers=[
|
||||
"Development Status :: 3 - Alpha",
|
||||
"Topic :: Utilities",
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
],
|
||||
scripts=["bin/packstack"]
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user