跳转到: 导航, 搜索

Solum/Packaging

Solum 的打包

Solum 目前尚未被任何 Linux 发行版打包。但这不应阻止您自行打包和部署它。

使用 Giftwrap 打包

Giftwrap 是一个新项目,旨在打包 Openstack 项目。

它被设计在您想要构建软件包的操作系统上运行,通过创建所选软件包的 virtualenv,然后在当前平台包装格式中在当前工作目录中创建软件包。然后,该软件包可以安装在同一平台的任何系统上。

Giftwrap 还尝试通过查询 Gerrit 来确定要使用的最佳 Python 依赖项集合,以获取其构建时使用的依赖项。

安装 Giftwrap

Giftwrap 尚未上传到 Pypi,因此我们需要克隆其仓库进行安装。如果您使用的是 OSX 或 Windows,则可能需要使用仓库中包含的 Vagrantfile。

   $ git clone https://github.com/cloudcadre/giftwrap.git
   $ pip install ./giftwrap

创建 Manifest 文件

我们需要创建 manifest 文件 '/tmp/solum/manifest.yml'。 此示例使用最新的发布版本(撰写时)。您可以将 gitref 更改为任何有效的 git 引用(分支、发布版本或提交)。


   ---
   settings:
     package_name_format: 'giftwrap-openstack-{{project.name}}'
     version: '2014.2.1'
     base_path: '/opt/openstack'
   
   projects:
     - name: solum
       gitref: 2014.2.1
       stackforge: true
     - name: python-solumclient
       gitref: 1.2.1
       stackforge: true


创建软件包

   $ cd /tmp/solum
   $ giftwrap  build -m /tmp/solum/manifest.yml
   2014-08-30 20:44:34 INFO: Beginning to build 'solum'
   2014-08-30 20:44:34 INFO: Fetching source code for 'solum'
   2014-08-30 20:44:37 INFO: Creating the virtualenv for 'solum'
   2014-08-30 20:44:37 INFO: Running: 'virtualenv .venv'
   2014-08-30 20:44:38 INFO: Installing 'solum' pip dependencies to the virtualenv
   2014-08-30 20:44:39 INFO: Running: '.venv/bin/pip install --extra-index http://pypi.openstack.org/openstack/ Babel==1.3 Jinja2==2.7.3 Mako==1.0.0 MarkupSafe==0.23 PyYAML==3.11 Pygments==1.6 SQLAlchemy==0.9.7 Sphinx==1.2.2 Tempita==0.5.2 WSME==0.6.1 WebOb==1.4 WebTest==2.0.15 alembic==0.6.6 amqp==1.4.6 anyjson==0.3.3 argparse==1.2.1 beautifulsoup4==4.3.2 cffi==0.8.6 cliff==1.6.1 cmd2==0.6.7 coverage==3.7.1 cryptography==0.5.3 decorator==3.4.0 discover==0.4.0 docutils==0.9.1 eventlet==0.15.1 extras==0.0.3 fixtures==0.3.14 flake8==2.1.0 greenlet==0.4.3 hacking==0.9.2 httplib2==0.9 ipaddr==2.1.11 iso8601==0.1.10 jsonpatch==1.7 jsonpointer==1.4 jsonschema==2.3.0 kombu==3.0.21 lockfile==0.9.1 logutils==0.3.3 lxml==3.3.5 mccabe==0.2.1 mock==1.0.1 mox==0.5.3 netaddr==0.7.12 nose==1.3.3 oslosphinx==2.1.0 oslotest==1.0.0 pbr==0.10.0 pecan==0.6.1 pep8==1.5.6 prettytable==0.7.2 pyOpenSSL==0.14 pycparser==2.10 pyflakes==0.8.1 pyparsing==2.0.2 python-glanceclient==0.13.1 python-heatclient==0.2.10 python-keystoneclient==0.10.1 python-marconiclient==0.0.2 python-mimeparse==0.1.4 python-mistralclient==0.0.4 python-neutronclient==2.3.6 python-subunit==0.0.18 python-swiftclient==2.2.0 pytz==2014.4 requests==2.3.0 simplegeneric==0.8.1 simplejson==3.6.2 singledispatch==3.4.0.3 six==1.7.3 -e git://git.openstack.org/stackforge/solum@3b788ce907259afe5ce4091f1394f4faa9e33a8e#egg=solum-dev sphinxcontrib-httpdomain==1.3.0 sphinxcontrib-pecanwsme==0.8.0 sqlalchemy-migrate==0.9.1 stevedore==0.15 testrepository==0.0.18 testscenarios==0.4 testtools==0.9.35 waitress==0.8.9 warlock==1.1.0 wsgiref==0.1.2'
   INFO:giftwrap:Running: '.venv/bin/pip install --extra-index http://pypi.openstack.org/openstack/ Babel==1.3 Jinja2==2.7.3 Mako==1.0.0 MarkupSafe==0.23 PyYAML==3.11 Pygments==1.6 SQLAlchemy==0.9.7 Sphinx==1.2.2 Tempita==0.5.2 WSME==0.6.1 WebOb==1.4 WebTest==2.0.15 alembic==0.6.6 amqp==1.4.6 anyjson==0.3.3 argparse==1.2.1 beautifulsoup4==4.3.2 cffi==0.8.6 cliff==1.6.1 cmd2==0.6.7 coverage==3.7.1 cryptography==0.5.3 decorator==3.4.0 discover==0.4.0 docutils==0.9.1 eventlet==0.15.1 extras==0.0.3 fixtures==0.3.14 flake8==2.1.0 greenlet==0.4.3 hacking==0.9.2 httplib2==0.9 ipaddr==2.1.11 iso8601==0.1.10 jsonpatch==1.7 jsonpointer==1.4 jsonschema==2.3.0 kombu==3.0.21 lockfile==0.9.1 logutils==0.3.3 lxml==3.3.5 mccabe==0.2.1 mock==1.0.1 mox==0.5.3 netaddr==0.7.12 nose==1.3.3 oslosphinx==2.1.0 oslotest==1.0.0 pbr==0.10.0 pecan==0.6.1 pep8==1.5.6 prettytable==0.7.2 pyOpenSSL==0.14 pycparser==2.10 pyflakes==0.8.1 pyparsing==2.0.2 python-glanceclient==0.13.1 python-heatclient==0.2.10 python-keystoneclient==0.10.1 python-marconiclient==0.0.2 python-mimeparse==0.1.4 python-mistralclient==0.0.4 python-neutronclient==2.3.6 python-subunit==0.0.18 python-swiftclient==2.2.0 pytz==2014.4 requests==2.3.0 simplegeneric==0.8.1 simplejson==3.6.2 singledispatch==3.4.0.3 six==1.7.3 -e git://git.openstack.org/stackforge/solum@3b788ce907259afe5ce4091f1394f4faa9e33a8e#egg=solum-dev sphinxcontrib-httpdomain==1.3.0 sphinxcontrib-pecanwsme==0.8.0 sqlalchemy-migrate==0.9.1 stevedore==0.15 testrepository==0.0.18 testscenarios==0.4 testtools==0.9.35 waitress==0.8.9 warlock==1.1.0 wsgiref==0.1.2'
   2014-08-30 20:45:41 INFO: Installing 'solum' to the virtualenv
   INFO:giftwrap:Installing 'solum' to the virtualenv
   2014-08-30 20:45:41 INFO: Running: '.venv/bin/python setup.py install'
   INFO:giftwrap:Running: '.venv/bin/python setup.py install'
   2014-08-30 20:46:58 INFO: Running: 'fpm -s dir -t deb -n giftwrap-openstack-solum -v 2014.2.1 /opt/openstack/solum'
   INFO:giftwrap:Running: 'fpm -s dir -t deb -n giftwrap-openstack-solum -v 2014.2.1 /opt/openstack/solum'
   2014-08-30 20:46:59 INFO: Beginning to build 'python-solumclient'
   INFO:giftwrap:Beginning to build 'python-solumclient'
   2014-08-30 20:46:59 INFO: Fetching source code for 'python-solumclient'
   INFO:giftwrap:Fetching source code for 'python-solumclient'
   2014-08-30 20:47:00 INFO: Creating the virtualenv for 'python-solumclient'
   INFO:giftwrap:Creating the virtualenv for 'python-solumclient'
   2014-08-30 20:47:00 INFO: Running: 'virtualenv .venv'
   INFO:giftwrap:Running: 'virtualenv .venv'
   2014-08-30 20:47:01 INFO: Installing 'python-solumclient' pip dependencies to the virtualenv
   INFO:giftwrap:Installing 'python-solumclient' pip dependencies to the virtualenv
   2014-08-30 20:47:02 INFO: Running: '.venv/bin/pip install --extra-index http://pypi.openstack.org/openstack/ Babel==1.3 Jinja2==2.7.3 MarkupSafe==0.23 PyYAML==3.11 Pygments==1.6 Sphinx==1.2.2 argparse==1.2.1 coverage==3.7.1 discover==0.4.0 docutils==0.12 extras==0.0.3 fixtures==0.3.14 flake8==2.1.0 hacking==0.9.2 iso8601==0.1.10 lxml==3.3.5 mccabe==0.2.1 mock==1.0.1 netaddr==0.7.12 oslosphinx==2.1.0 pbr==0.10.0 pep8==1.5.6 prettytable==0.7.2 pyflakes==0.8.1 python-keystoneclient==0.10.1 python-mimeparse==0.1.4 -e git://git.openstack.org/stackforge/python-solumclient@a7c0ba416c1cf07fab8757971b996f71a39da043#egg=python_solumclient-dev python-subunit==0.0.18 pytz==2014.4 requests==2.3.0 six==1.7.3 stevedore==0.15 testrepository==0.0.18 testscenarios==0.4 testtools==0.9.35 wsgiref==0.1.2'
   INFO:giftwrap:Running: '.venv/bin/pip install --extra-index http://pypi.openstack.org/openstack/ Babel==1.3 Jinja2==2.7.3 MarkupSafe==0.23 PyYAML==3.11 Pygments==1.6 Sphinx==1.2.2 argparse==1.2.1 coverage==3.7.1 discover==0.4.0 docutils==0.12 extras==0.0.3 fixtures==0.3.14 flake8==2.1.0 hacking==0.9.2 iso8601==0.1.10 lxml==3.3.5 mccabe==0.2.1 mock==1.0.1 netaddr==0.7.12 oslosphinx==2.1.0 pbr==0.10.0 pep8==1.5.6 prettytable==0.7.2 pyflakes==0.8.1 python-keystoneclient==0.10.1 python-mimeparse==0.1.4 -e git://git.openstack.org/stackforge/python-solumclient@a7c0ba416c1cf07fab8757971b996f71a39da043#egg=python_solumclient-dev python-subunit==0.0.18 pytz==2014.4 requests==2.3.0 six==1.7.3 stevedore==0.15 testrepository==0.0.18 testscenarios==0.4 testtools==0.9.35 wsgiref==0.1.2'
   2014-08-30 20:48:27 INFO: Installing 'python-solumclient' to the virtualenv
   INFO:giftwrap:Installing 'python-solumclient' to the virtualenv
   2014-08-30 20:48:27 INFO: Running: '.venv/bin/python setup.py install'
   INFO:giftwrap:Running: '.venv/bin/python setup.py install'
   2014-08-30 20:48:45 INFO: Running: 'fpm -s dir -t deb -n giftwrap-openstack-python-solumclient -v 2014.2.1 /opt/openstack/python-solumclient'
   INFO:giftwrap:Running: 'fpm -s dir -t deb -n giftwrap-openstack-python-solumclient -v 2014.2.1 /opt/openstack/python-solumclient'
   $ ls /tmp/solum
   giftwrap-openstack-solum_2014.2.1_amd64.deb
   giftwrap-openstack-python-solumclient_2014.2.1_amd64.deb