2012-01-19 17:30:27 -08:00
|
|
|
..
|
2013-08-26 06:32:10 -07:00
|
|
|
Copyright 2011-2012 OpenStack Foundation
|
2012-01-19 17:30:27 -08:00
|
|
|
All Rights Reserved.
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
|
|
not use this file except in compliance with the License. You may obtain
|
|
|
|
a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
License for the specific language governing permissions and limitations
|
|
|
|
under the License.
|
|
|
|
|
|
|
|
=============================================
|
2015-11-17 10:45:18 -03:00
|
|
|
Setting up a keystone development environment
|
2012-01-19 17:30:27 -08:00
|
|
|
=============================================
|
|
|
|
|
2015-11-17 10:45:18 -03:00
|
|
|
This document describes getting the source from keystone's `Git Repository`_
|
|
|
|
and setting the environment up for development purposes.
|
2012-01-19 17:30:27 -08:00
|
|
|
|
2015-11-17 10:45:18 -03:00
|
|
|
To install keystone from packaging, refer instead to OpenStack's `User
|
2012-03-14 05:08:58 +00:00
|
|
|
Documentation`_.
|
2012-01-19 17:30:27 -08:00
|
|
|
|
2015-05-06 11:19:06 +08:00
|
|
|
.. _`Git Repository`: http://git.openstack.org/cgit/openstack/keystone
|
2012-01-19 17:30:27 -08:00
|
|
|
.. _`User Documentation`: http://docs.openstack.org/
|
|
|
|
|
|
|
|
Prerequisites
|
|
|
|
=============
|
|
|
|
|
2015-11-17 10:45:18 -03:00
|
|
|
This document assumes you are using an Ubuntu, Fedora, or openSUSE platform and
|
|
|
|
that you have the following tools pre-installed on your system:
|
2012-01-19 17:30:27 -08:00
|
|
|
|
2015-11-17 10:45:18 -03:00
|
|
|
- Python_ 2.7 and 3.4, as the programming language;
|
|
|
|
- git_, as the version control tool;
|
2012-01-19 17:30:27 -08:00
|
|
|
|
2015-11-17 10:45:18 -03:00
|
|
|
**Reminder**: If you are successfully using a different platform, or a
|
2012-01-19 17:30:27 -08:00
|
|
|
different version of the above, please document your configuration here!
|
|
|
|
|
|
|
|
.. _git: http://git-scm.com/
|
2015-11-17 10:45:18 -03:00
|
|
|
.. _Python: http://www.python.org/
|
2012-01-19 17:30:27 -08:00
|
|
|
|
|
|
|
Getting the latest code
|
|
|
|
=======================
|
|
|
|
|
2015-11-17 10:45:18 -03:00
|
|
|
Make a clone of the code from our git repository and enter the directory:
|
2014-09-04 17:08:07 -04:00
|
|
|
|
|
|
|
.. code-block:: bash
|
2012-01-19 17:30:27 -08:00
|
|
|
|
2015-05-06 11:19:06 +08:00
|
|
|
$ git clone https://git.openstack.org/openstack/keystone.git
|
2012-01-19 17:30:27 -08:00
|
|
|
$ cd keystone
|
|
|
|
|
2015-11-17 10:45:18 -03:00
|
|
|
Development environment
|
2012-01-19 17:30:27 -08:00
|
|
|
=======================
|
|
|
|
|
2015-11-17 10:45:18 -03:00
|
|
|
For setting up the Python development environment and running `tox` testing
|
|
|
|
environments, please refer to the `Project Team Guide: Python Project Guide`_,
|
|
|
|
the OpenStack guide on wide standard practices around the use of Python.
|
2014-10-17 15:52:27 +02:00
|
|
|
|
2015-11-17 10:45:18 -03:00
|
|
|
That documentation will guide you to configure your development environment
|
|
|
|
and run keystone tests using `tox`, which uses virtualenv_ to isolate the Python
|
|
|
|
environment. After running it, notice the existence of a `.tox` directory.
|
2012-01-19 17:30:27 -08:00
|
|
|
|
2015-11-17 10:45:18 -03:00
|
|
|
.. _`Project Team Guide: Python Project Guide`: http://docs.openstack.org/project-team-guide/project-setup/python.html
|
2012-01-29 10:57:02 -08:00
|
|
|
.. _virtualenv: http://www.virtualenv.org/
|
2012-01-19 17:30:27 -08:00
|
|
|
|
2015-11-17 10:45:18 -03:00
|
|
|
Verifying keystone is set up
|
2012-01-29 10:57:02 -08:00
|
|
|
============================
|
|
|
|
|
2015-11-17 10:45:18 -03:00
|
|
|
Once set up, you should be able to invoke Python and import the libraries:
|
2014-09-04 17:08:07 -04:00
|
|
|
|
2015-06-05 14:33:17 +00:00
|
|
|
.. code-block:: bash
|
2012-01-19 17:30:27 -08:00
|
|
|
|
2015-11-17 10:45:18 -03:00
|
|
|
$ .tox/py27/bin/python -c "import keystone"
|
2012-01-19 17:30:27 -08:00
|
|
|
|
2015-11-17 10:45:18 -03:00
|
|
|
If you can import keystone without a traceback, you should be ready to move on
|
2015-09-23 15:15:21 -05:00
|
|
|
to :doc:`../developing`.
|