Skip to content

Instantly share code, notes, and snippets.

@carmark
Last active September 17, 2015 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carmark/ea1e59c3f76226b50c7f to your computer and use it in GitHub Desktop.
Save carmark/ea1e59c3f76226b50c7f to your computer and use it in GitHub Desktop.

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.

Installing from Source

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.

Clone the Keystone repository:

$ git clone https://git.openstack.org/openstack/keystone.git
$ cd keystone

Install the Keystone web service:

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 Keystone
  • keystone-manage used to bootstrap Keystone data
  • keystone-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 configuration files to /etc/keystone/

Copy the above five files to /etc/keystone/ and remove the .sample sufix.

Setup database

  • 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

Run the keystone service

keystone-all

Run the keystone client

keystone --help
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment