This document describes how to install Keystone in order to use it. If you are intending to develop on or with Keystone, please read Developing with Keystone and Setting up a Keystone development environment.
The source install instructions specifically avoid using platform specific packages, instead using the source for the code and the Python Package Index (PyPi).
It’s expected that your system already has python
, pip
, and git
available.
$ git clone https://git.openstack.org/openstack/keystone.git
$ cd keystone
You need to install the libopenssl-dev
and libffi-dev
before you execute the follow commands(ubuntu).
# pip install -r requirements.txt
# python setup.py install
You should have all the pieces you need to run Keystone installed on your system. The following commands should be available on the command-line path:
keystone
the Keystone client, used to interact with Keystonekeystone-manage
used to bootstrap Keystone datakeystone-all
used to run the Keystone services
You will find sample configuration files in etc/:
keystone.conf.sample
keystone-paste.ini
logging.conf.sample
policy.json
default_catalog.templates
Copy the above five files to /etc/keystone/ and remove the .sample
sufix.
- Install the database(mysql)
- Install the
python-mysqldb
module - Setup the keystone databse via
$ mysql -u root –p
CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'KEYSTONE_DBPASS';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'KEYSTONE_DBPASS';
- Edit the property of
/etc/keystone/keystone.conf
, such as:
[DEFAULT]
admin_token = ADMIN_TOKEN
verbose = True
[database]
connection = mysql://keystone:KEYSTONE_DBPASS@localhost/keystone
- Sync keystone database, you have to run the follow command as root user:
/bin/sh -c "keystone-manage db_sync" keystone
keystone-all
keystone --help