keystone install from source docs missing required steps

Bug #1322771 reported by John Schofield
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Expired
Low
Unassigned
PBR
Invalid
Undecided
Unassigned

Bug Description

The following is completely reproducible using Vagrant and the hashicorp/precise64 image.

Following the install instructions here: http://docs.openstack.org/developer/keystone/installing.html#installing-from-source is impossible, even after the patch in https://bugs.launchpad.net/keystone/+bug/1322735

There are several issues:

"python setup.py install" fails with these missing dependencies:
* missing Python.h
* missing libxml/xmlversion.h

Once those dependencies are taken care of by installing python-dev, libxml2-devm and libxslt1-dev, you can complete "setup.py install"

Running "keystone" at that point gets an error because pbr.version is not present.

pbr.version is listed in requirements.txt, but is not installed by "setup.py install" for some reason. Installing it resolves this issue.

Running keystone-manage and keystone-all gives an error because repoze.lru is not installed. Repoze.lru is a dependency of Routes, which is installed by setup.py. For some reason, when setup.py installs Routes, it does not install the dependency. if, AFTER running setup.py, you attempt to "pip install -r requirements.txt" it will not install repoze.lru because Routes is already installed, and pip doesn't detect that the dependency is not installed.

The following steps work reproducibly to install keystone from source on a completely clean hashicorp/precise64:

# Vagrant setup in an empty directory
vagrant init hashicorp/precise64
vagrant up
vagrant ssh
# Generic Ubuntu Precise instructions begin here.
sudo su
apt-get update
apt-get install -y git python-setuptools python-dev libxml2-dev libxslt1-dev
easy_install pip
cd /root
git clone https://github.com/openstack/keystone.git
cd keystone
pip install -r requirements.txt
python setup.py install

At that point all three executables (keystone, keystone-manage, and keystone-all) will execute and display their non-configured / help message without dependency errors.

Revision history for this message
Dolph Mathews (dolph) wrote :

Most of the issues described here are resolved by following the dev docs [1] instead of the "install from source" docs. I think it would be best to merge these two documents, or just outright nuke the "install from packaging" [2] page since that should really be documented downstream, or in openstack-manuals, anyway (not sure there's any unique value on that page that's not redundant with other doc sources).

The issue with pbr.version is odd. I can reproduce it if I use "setup.py install" but "setup.py develop" seems to work fine. Running "setup.py install" a second time after "setup.py install" has failed once also seems to resolve the issue.

[1] http://docs.openstack.org/developer/keystone/setup.html
[2] http://docs.openstack.org/developer/keystone/installing.html

Changed in keystone:
status: New → Triaged
importance: Undecided → Low
tags: added: documentation
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

Are you still seeing issues installing pbr? I think we are trying not to use it as a runtime dependency, and to use pkg_resources to get the version string instead.

Changed in pbr:
status: New → Incomplete
Changed in pbr:
status: Incomplete → Invalid
Ankur (ankur-gupta-f)
Changed in keystone:
assignee: nobody → Ankur (ankur-gupta-f)
Revision history for this message
Ankur (ankur-gupta-f) wrote :

I was not able to reproduce this error

Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

Is this really still an issue? marked as incomplete pending a response.

Changed in keystone:
assignee: Ankur (ankur-gupta-f) → nobody
status: Triaged → Incomplete
Revision history for this message
Sean Perry (sean-perry-a) wrote :

On a fresh, minimal Trusty system I had to install the following:
  * git
  * apache2
  * python-pip
  * python-dev
  * libffi-dev
  * libssl-dev

Nothing odd or unexpected there if you have done any Python work. It might make sense to list the dependencies instead of telling people to go look at DEVSTACK.

 * apache2
 * pip
 * Python development headers
 * Foreign Function Interface (FFI) headers
 * SSL headers

Revision history for this message
Steve Martinelli (stevemar) wrote :

@sean, sounds fair

looking at: http://docs.openstack.org/developer/keystone/devref/development.environment.html we list the following as necessary:

Python 2.7 and 3.4
git
setuptools
pip
msgfmt (part of the gettext package)
virtualenv
tox

and recommend performing the following:

sudo apt-get install python-dev python3-dev libxml2-dev libxslt1-dev \
    libsasl2-dev libsqlite3-dev libssl-dev libldap2-dev libffi-dev

aside from apache (which is arguably not necessary to develop on keystone), this looks like everything is covered

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Identity (keystone) because there has been no activity for 60 days.]

Changed in keystone:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.