Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to setup Cinder development environment for full integration testing or production usage

I am new to open source and OpenStack so I apologize if my questions does not make sense.

Instead of using apt-get install cinder-api cinder-scheduler I am trying to install Cinder directly from the source code in develop mode using python setup.py develop or pip install -e /root/testCinder I am using Ubuntu Server 16.04 and I cloned the cinder code from https://github.com/openstack/cinder.git to /root/testCinder. I am aware of the Virtualenv, but I need to modify Cinder in a full integration environment. I have below questions:

  1. I was wondering what is the best practice to setup up such a development environment that allows rapid modifications and integrated with git as well.
  2. If the pip installation successfully finish, does it create the daemon services (cinder-api and cinder-scheduler) or they need to be registered manually ?
  3. In general, is there any documentation to describe how to manually install OpenStack components?

Below is the STDERR output for pip install -e /root/testCinder/cinder/ 2> pip_stderr.txt :

01  Failed building wheel for cffi
02  Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-wnpEs1/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-hRFhMM-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-wnpEs1/cffi/

Below is the STDERR output for python setup.py develop 2> setup_stderr.txt :

01  warning: no previously-included files matching '*.pyc' found anywhere in distribution
02  ERROR:root:Error parsing
03  Traceback (most recent call last):
04    File "/usr/lib/python2.7/dist-packages/pbr/core.py", line 109, in pbr
05      attrs = util.cfg_to_args(path)
06    File "/usr/lib/python2.7/dist-packages/pbr/util.py", line 245, in cfg_to_args
07      kwargs = setup_cfg_to_setup_kwargs(config)
08    File "/usr/lib/python2.7/dist-packages/pbr/util.py", line 379, in setup_cfg_to_setup_kwargs
09      cmd = cls(dist)
10    File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 132, in __init__
11      _Command.__init__(self, dist)
12    File "/usr/lib/python2.7/distutils/cmd.py", line 59, in __init__
13      raise TypeError, "dist must be a Distribution instance"
14  TypeError: dist must be a Distribution instance
15  Traceback (most recent call last):
16    File "setup.py", line 29, in <module>
17      pbr=True)
18    File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
19      dist.run_commands()
20    File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
21      self.run_command(cmd)
22    File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
23      cmd_obj.run()
24    File "/usr/lib/python2.7/dist-packages/setuptools/command/develop.py", line 34, in run
25      self.install_for_development()
26    File "/usr/lib/python2.7/dist-packages/setuptools/command/develop.py", line 133, in install_for_development
27      self.process_distribution(None, self.dist, not self.no_deps)
28    File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 740, in process_distribution
29      [requirement], self.local_index, self.easy_install
30    File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 826, in resolve
31      dist = best[req.key] = env.best_match(req, ws, installer)
32    File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1092, in best_match
33      return self.obtain(req, installer)
34    File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1104, in obtain
35      return installer(requirement)
36    File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 663, in easy_install
37      return self.install_item(spec, dist.location, tmpdir, deps)
38    File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 693, in install_item
39      dists = self.install_eggs(spec, download, tmpdir)
40    File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 873, in install_eggs
41      return self.build_and_install(setup_script, setup_base)
42    File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1101, in build_and_install
43      self.run_setup(setup_script, setup_base, args)
44    File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1087, in run_setup
45      run_setup(setup_script, args)
46    File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 246, in run_setup
47      raise
48    File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
49      self.gen.throw(type, value, traceback)
50    File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 195, in setup_context
51      yield
52    File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
53      self.gen.throw(type, value, traceback)
54    File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 166, in save_modules
55      saved_exc.resume()
56    File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 141, in resume
57      six.reraise(type, exc, self._tb)
58    File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 154, in save_modules
59      yield saved
60    File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 195, in setup_context
61      yield
62    File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 243, in run_setup
63      DirectorySandbox(setup_dir).run(runner)
64    File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 273, in run
65      return func()
66    File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 242, in runner
67      _execfile(setup_script, ns)
68    File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 46, in _execfile
69      exec(code, globals, locals)
70    File "/tmp/easy_install-McBupQ/os-brick-1.4.0/setup.py", line 29, in <module>
71      pbr=True)
72    File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
73      _setup_distribution = dist = klass(attrs)
74    File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 272, in __init__
75      _Distribution.__init__(self,attrs)
76    File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
77      self.finalize_options()
78    File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 327, in finalize_options
79      ep.load()(self, ep.name, value)
80    File "/usr/lib/python2.7/dist-packages/pbr/core.py", line 117, in pbr
81      'Error parsing %s: %s: %s' % (path, e.__class__.__name__, e))
82  setuptools.sandbox.UnpickleableException: DistutilsSetupError('Error parsing /tmp/easy_install-McBupQ/os-brick-1.4.0/setup.cfg: TypeError: dist must be a Distribution instance',)