logo

logo

Monday 18 August 2014

Manually setup all-in-one OpenStack Icehouse 2 - keystone

1.       install the keystone package/service

commands: apt-get install -y keystone

2.       create database and username/password

in mysql client tool:
mysql> CREATE DATABASE keystone;
mysql> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'keystone_dbpass';

3.       update keystone configuration file

in /etc/keystone/keystone.conf
hash out line
connection = sqlite:////var/lib/keystone/keystone.db
add line:
connection = mysql://keystone:keystone_dbpass@192.168.139.111/keystone

4.       restart keystone service and sync database

service keystone restart
keystone-manage db_sync

5.       export the environment variables

export OS_SERVICE_TOKEN=ADMIN
export OS_SERVICE_ENDPOINT=http://192.168.139.111:35357/v2.0

6.       data preparation(well explain later)

#tenant, user, role and user-role
keystone tenant-create --name=admin --description="Admin Tenant"
keystone tenant-create --name=service --description="Service Tenant"
keystone user-create --name=admin --pass=ADMIN --email=admin@example.com
keystone role-create --name=admin
keystone user-role-add --user=admin --tenant=admin --role=admin
#service
keystone service-create --name=keystone --type=identity --description="Keystone Identity Service"
#end point
keystone endpoint-create --service=keystone --publicurl=http://192.168.139.111:5000/v2.0 --internalurl=http://192.168.139.111:5000/v2.0 --adminurl=http://192.168.139.111:35357/v2.0

7.       create confidential file and source it

export OS_USERNAME=admin
export OS_PASSWORD=ADMIN
export OS_TENANT_NAME=admin
export OS_AUTH_URL=http://192.168.139.111:35357/v2.0

8.       testing

keystone token-get
keystone user-list



No comments:

Post a Comment