Skip to content

Latest commit

 

History

History
155 lines (101 loc) · 4.43 KB

setup.rst

File metadata and controls

155 lines (101 loc) · 4.43 KB

Setting up a Keystone development environment

This document describes setting up keystone directly from GitHub for development purposes.

To install keystone from packaging, refer instead to Keystone's User Documentation.

Prerequisites

This document assumes you are using:

  • Ubuntu 11.10, Fedora 15, openSUSE 11.4, 12.1 or Mac OS X Lion
  • Python 2.7

And that you have the following tools available on your system:

Reminder: If you're successfully using a different platform, or a different version of the above, please document your configuration here!

Getting the latest code

You can clone our latest code from our Github repository:

$ git clone https://github.com/openstack/keystone.git

When that is complete, you can:

$ cd keystone

Installing dependencies

Keystone maintains a list of PyPi dependencies, designed for use by pip.

However, your system may need additional dependencies that pip (and by extension, PyPi) cannot satisfy. These dependencies should be installed prior to using pip, and the installation method may vary depending on your platform.

Ubuntu 11.10:

$ sudo apt-get install python-dev libxml2-dev libxslt1-dev libsasl2-dev libsqlite3-dev libssl-dev libldap2-dev

Fedora 15:

$ sudo yum install python-sqlite2 python-lxml python-greenlet-devel python-ldap

openSUSE 11.4, 12.1:

$ sudo zypper in python-devel python-xml gcc libxslt-devel python-ldap openldap2-devel

Mac OS X Lion (requires MacPorts):

$ sudo port install py-ldap

PyPi Packages

Assuming you have any necessary binary packages & header files available on your system, you can then install PyPi dependencies.

You may also need to prefix pip install with sudo, depending on your environment:

# Describe dependencies (including non-PyPi dependencies)
$ cat tools/pip-requires

# Install all PyPi dependencies (for production, testing, and development)
$ pip install -r tools/pip-requires

Updating your PYTHONPATH

There are a number of methods for getting Keystone into your PYTHON PATH, the easiest of which is:

# Fake-install the project by symlinking Keystone into your Python site-packages
$ python setup.py develop

You should then be able to import keystone from your Python shell without issue:

>>> import keystone.version
>>>

If you want to check the version of Keystone you are running:

>>> print keystone.version.version()
2012.1-dev

If you can import keystone successfully, you should be ready to move on to :doc:`testing`.

Troubleshooting

Eventlet segfaults on RedHat / Fedora

[If this is no longer an issue, please remove this section, thanks!]

On some OSes, specifically Fedora 15, the current versions of greenlet/eventlet segfault when running keystone. To fix this, install the development versions of greenlet and eventlet:

$ pip uninstall greenlet eventlet
$ cd <appropriate working directory>
$ hg clone https://bitbucket.org/ambroff/greenlet
$ cd greenlet
$ sudo python setup.py install

$ cd <appropriate working directory>
$ hg clone https://bitbucket.org/which_linden/eventlet
$ cd greenlet
$ sudo python setup.py install