Ask Your Question

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

asked 2016-06-19 10:52:31 -0500

babak gravatar image

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 develop or pip install -e /root/testCinder I am using Ubuntu Server 16.04 and I cloned the cinder code from 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/';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 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/", line 109, in pbr
05      attrs = util.cfg_to_args(path)
06    File "/usr/lib/python2.7/dist-packages/pbr/", line 245, in cfg_to_args
07      kwargs = setup_cfg_to_setup_kwargs(config)
08    File "/usr/lib/python2.7/dist-packages/pbr/", line 379, in setup_cfg_to_setup_kwargs
09      cmd = cls(dist)
10    File "/usr/lib/python2.7/dist-packages/setuptools/", line 132, in __init__
11      _Command.__init__(self, dist)
12    File "/usr/lib/python2.7/distutils/", 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 "", line 29, in <module>
17      pbr=True)
18    File "/usr/lib/python2.7/distutils/", line 151, in setup
19      dist.run_commands()
20    File "/usr/lib/python2.7/distutils/", line 953, in run_commands
21      self.run_command(cmd)
22    File "/usr/lib/python2.7/distutils/", line 972, in run_command
24    File "/usr/lib/python2.7/dist-packages/setuptools/command/", line 34, in run
25      self.install_for_development()
26    File "/usr/lib/python2.7/dist-packages/setuptools/command/", 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/", line 740, in process_distribution
29      [requirement], self.local_index, self.easy_install
30    File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__ ...
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-07-17 16:09:02 -0500

babak gravatar image

First follow (Setting Up a Development Environment) instruction. I copy paste them here for ubuntu as well.

sudo apt-get install python-dev libssl-dev python-pip git-core libmysqlclient-dev libpq-dev libffi-dev libxslt-dev

Install virtualenv:

sudo easy_install virtualenv

Grab the code:

git clone
cd cinder

run unit tests, install virtual environment then activate the virtual environment.

tox -e py34
tox -e py27
python tools/
source .venv/bin/activate

install Cinder

python install

if everything goes well you will have cinder-scheduler in the virtual environment bin directory.

Run Cinder API

/usr/bin/python /root/cinder/.venv/bin/cinder-api --config-file=/root/cinder/.venv/etc/cinder/cinder.conf --log-file=/root/cinder/.venv/var/log/cinder/cinder-api.log

Run Cinder Scheduler

/usr/bin/python /root/cinder/.venv/bin/cinder-scheduler --config-file=/root/cinder/.venv/etc/cinder/cinder.conf  --log-file=/root/cinder/.venv/var/log/cinder/cinder-scheduler.log

make sure to have a proper cinder.conf file. Also, there are few more configuration files that might be needed, I recommend to copy them from a running Cinder instance. Below are the list of those configuration files:


Below is another issue that I ran into.

2016-07-16 12:38:07.862 1849 ERROR cinder.api.middleware.fault ImportError: No module named memcache

To fix, deactivate the virtual environment and install memcached.

pip install python-memcached
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-06-19 10:52:31 -0500

Seen: 230 times

Last updated: Jul 17 '16