2.3 KiB
Initializing Keystone
Before using keystone, it is necessary to create the database tables and ensures the database schemas are up to date, perform the following:
$ keystone-manage db_sync
If the above commands result in a KeyError
, or they fail
on a .pyc
file with the message,
You can only have one Python script per version
, then it is
possible that there are out-of-date compiled Python bytecode files in
the Keystone directory tree that are causing problems. This can occur if
you have previously installed and ran older versions of Keystone. These
out-of-date files can be easily removed by running a command like the
following from the Keystone root project directory:
$ find . -name "*.pyc" -delete
Initial Sample Data
There is an included script which is helpful in setting up some initial sample data for use with keystone:
$ ADMIN_PASSWORD=s3cr3t tools/sample_data.sh
Once run, you can see the sample data that has been created by using the python-openstackclient command-line interface:
$ export OS_USERNAME=admin
$ export OS_PASSWORD=s3cr3t
$ export OS_PROJECT_NAME=admin
$ export OS_USER_DOMAIN_ID=default
$ export OS_PROJECT_DOMAIN_ID=default
$ export OS_IDENTITY_API_VERSION=3
$ export OS_AUTH_URL=http://localhost:5000/v3
$ openstack user list
The python-openstackclient can be installed using the following:
$ pip install python-openstackclient