示例#1
0
            print 'Copying module %(module)s to %(dest)s' % locals()
            shutil.rmtree(dest, ignore_errors=True)
            shutil.copytree(source, dest)


# 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="*****@*****.**",
    description=("A utility to install openstack"),
    license="ASL 2.0",
    keywords="openstack",
    url="https://github.com/stackforge/packstack",
    packages=find_packages('.'),
    include_package_data=True,
    long_description=read('README'),
    zip_safe=False,
    install_requires=['netaddr'],
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Topic :: Utilities",
        "License :: OSI Approved :: Apache Software License",
示例#2
0
def initCmdLineParser():
    """
    Initiate the optparse object, add all the groups and general command line flags
    and returns the optparse object
    """

    # Init parser and all general flags
    usage = "usage: %prog [options] [--help]"
    parser = OptionParser(usage=usage,version="%prog {0} {1}".format(version.release_string(), version.version_string()))
    parser.add_option("--gen-answer-file", help="Generate a template of an answer file, using this option excludes all other options")
    parser.add_option("--answer-file", help="Runs the configuration in non-interactive mode, extracting all information from the \
                                            configuration file. using this option excludes all other options")
    parser.add_option("--install-hosts", help="Install on a set of hosts in a single step. The format should be a comma separated list "
                                          "of hosts, the first is setup as a controller, and the others are setup as compute nodes."
                                          "if only a single host is supplied then it is setup as an all in one installation. An answerfile "
                                          "will also be generated and should be used if Packstack needs to be run a second time ")
    parser.add_option("--allinone", action="store_true", help="Shorthand for --install-hosts=<local ipaddr> --novanetwork-pubif=<dev> "
                                          "--novacompute-privif=lo --novanetwork-privif=lo --os-swift-install=y --nagios-install=y "
                                          ", this option can be used to install an all in one OpenStack on this host")

    parser.add_option("-t", "--timeout", default=300, help="The timeout for puppet Exec calls")
    parser.add_option("-o", "--options", action="store_true", dest="options", help="Print details on options available in answer file(rst format)")
    parser.add_option("-d", "--debug", action="store_true", default=False, help="Enable debug in logging")
    parser.add_option("-y", "--dry-run", action="store_true", default=False, help="Don't execute, just generate manifests")

    # For each group, create a group option
    for group in controller.getAllGroups():
        groupParser = OptionGroup(parser, group.DESCRIPTION)

        for param in group.parameters.itervalues():
            cmdOption = param.CMD_OPTION
            paramUsage = param.USAGE
            optionsList = param.OPTION_LIST
            useDefault = param.USE_DEFAULT

            if not useDefault:
                groupParser.add_option("--%s" % cmdOption, help=paramUsage)

        # Add group parser to main parser
        parser.add_option_group(groupParser)

    return parser
示例#3
0
def initCmdLineParser():
    """
    Initiate the optparse object, add all the groups and general command line flags
    and returns the optparse object
    """

    # Init parser and all general flags
    usage = "usage: %prog [options] [--help]"
    parser = OptionParser(usage=usage,
                          version="%prog {0} {1}".format(
                              version.release_string(),
                              version.version_string()))
    parser.add_option(
        "--gen-answer-file",
        help=
        "Generate a template of an answer file, using this option excludes all other options"
    )
    parser.add_option(
        "--answer-file",
        help=
        "Runs the configuration in non-interactive mode, extracting all information from the \
                                            configuration file. using this option excludes all other options"
    )
    parser.add_option(
        "--install-hosts",
        help=
        "Install on a set of hosts in a single step. The format should be a comma separated list "
        "of hosts, the first is setup as a controller, and the others are setup as compute nodes."
        "if only a single host is supplied then it is setup as an all in one installation. An answerfile "
        "will also be generated and should be used if Packstack needs to be run a second time "
    )
    parser.add_option(
        "--allinone",
        action="store_true",
        help=
        "Shorthand for --install-hosts=<local ipaddr> --novanetwork-pubif=<dev> "
        "--novacompute-privif=lo --novanetwork-privif=lo --os-swift-install=y --nagios-install=y "
        ", this option can be used to install an all in one OpenStack on this host"
    )

    parser.add_option("-t",
                      "--timeout",
                      default=300,
                      help="The timeout for puppet Exec calls")
    parser.add_option(
        "-o",
        "--options",
        action="store_true",
        dest="options",
        help="Print details on options available in answer file(rst format)")
    parser.add_option("-d",
                      "--debug",
                      action="store_true",
                      default=False,
                      help="Enable debug in logging")
    parser.add_option("-y",
                      "--dry-run",
                      action="store_true",
                      default=False,
                      help="Don't execute, just generate manifests")

    # For each group, create a group option
    for group in controller.getAllGroups():
        groupParser = OptionGroup(parser, group.DESCRIPTION)

        for param in group.parameters.itervalues():
            cmdOption = param.CMD_OPTION
            paramUsage = param.USAGE
            optionsList = param.OPTION_LIST
            useDefault = param.USE_DEFAULT

            if not useDefault:
                groupParser.add_option("--%s" % cmdOption, help=paramUsage)

        # Add group parser to main parser
        parser.add_option_group(groupParser)

    return parser
示例#4
0
from setuptools import setup
from setuptools import 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="*****@*****.**",
      description=("A utility to install OpenStack"),
      license="ASL 2.0",
      keywords="openstack",
      url="https://github.com/openstack/packstack",
      packages=find_packages('.') + ['docs'],
      package_data={'docs': ['docs/packstack.rst']},
      include_package_data=True,
      long_description=read('README.md'),
      zip_safe=False,
      install_requires=[
          'netaddr>=0.7.6', 'pyOpenSSL<15.0.0', 'PyYAML>=3.10',
          'docutils>=0.11', 'cryptography!=1.3.0,>=1.0'
      ],
示例#5
0
# The encoding of source files.
# source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'packstack'
copyright = u'2012, Red Hat'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = packstackversion.version_string()
# The full version, including alpha/beta/rc tags.
release = version

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# language = None

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
# today = ''
# Else, today_fmt is used as the format for a strftime call.
# today_fmt = '%B %d, %Y'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
示例#6
0
# The encoding of source files.
#source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'packstack'
copyright = u'2012, Red Hat'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = packstackversion.version_string()
# The full version, including alpha/beta/rc tags.
release = version

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
示例#7
0
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="openstack-packstack",
    #version=version.version_string(),
    version=version.version_string()[:-1],
    author="Derek Higgins",
    author_email="*****@*****.**",
    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",
    ],