From Fedora Project Wiki

(remove from cloud SIG category)
 
(7 intermediate revisions by 4 users not shown)
Line 9: Line 9:
 
  $> sudo openstack-keystone-db-setup
 
  $> sudo openstack-keystone-db-setup
  
Generate a random administrative token
+
Set up a keystonerc file with a generated admin token and various passwords:
 +
 
 +
$> cat > keystonerc <<EOF
 +
export ADMIN_TOKEN=$(openssl rand -hex 10)
 +
export OS_USERNAME=admin
 +
export OS_PASSWORD=verybadpass
 +
export OS_TENANT_NAME=admin
 +
export OS_AUTH_URL=http://127.0.0.1:5000/v2.0/
 +
EOF
 +
$> chmod 600 keystonerc
 +
$> . ./keystonerc
 +
 
 +
Set the administrative token in the config file
  
$> ADMIN_TOKEN=$(openssl rand -hex 10)
 
 
  $> sudo openstack-config-set /etc/keystone/keystone.conf DEFAULT admin_token $ADMIN_TOKEN
 
  $> sudo openstack-config-set /etc/keystone/keystone.conf DEFAULT admin_token $ADMIN_TOKEN
  
 
Start and enable Keystone service
 
Start and enable Keystone service
 
  $> sudo systemctl start openstack-keystone.service && sudo systemctl enable openstack-keystone.service
 
  $> sudo systemctl start openstack-keystone.service && sudo systemctl enable openstack-keystone.service
 
Install the keystone CLI
 
$> sudo yum install python-keystoneclient
 
  
 
Create sample Tenants, Users and Roles
 
Create sample Tenants, Users and Roles
  $> sudo ADMIN_PASSWORD=verybadpass openstack-keystone-sample-data
+
  $> sudo ADMIN_PASSWORD=$OS_PASSWORD SERVICE_PASSWORD=servicepass openstack-keystone-sample-data
  
 
Test the Keystone CLI is working
 
Test the Keystone CLI is working
$> export OS_USERNAME=admin
+
 
$> export OS_PASSWORD=verybadpass
 
$> export OS_TENANT_NAME=admin
 
$> export OS_AUTH_URL=http://127.0.0.1:5000/v2.0/
 
 
  $> keystone user-list
 
  $> keystone user-list
  
Line 36: Line 41:
  
 
[[Category:OpenStack Test Cases]]
 
[[Category:OpenStack Test Cases]]
[[Category:Cloud SIG]]
 

Latest revision as of 06:16, 25 April 2012

Description

Setup required for the Keystone service.

Setup

Follow QA:Testcase_install_OpenStack_packages.

How to test

Configure the Keystone database, similar to how we do it for nova

$> sudo openstack-keystone-db-setup

Set up a keystonerc file with a generated admin token and various passwords:

$> cat > keystonerc <<EOF
export ADMIN_TOKEN=$(openssl rand -hex 10)
export OS_USERNAME=admin
export OS_PASSWORD=verybadpass
export OS_TENANT_NAME=admin
export OS_AUTH_URL=http://127.0.0.1:5000/v2.0/
EOF
$> chmod 600 keystonerc
$> . ./keystonerc

Set the administrative token in the config file

$> sudo openstack-config-set /etc/keystone/keystone.conf DEFAULT admin_token $ADMIN_TOKEN

Start and enable Keystone service

$> sudo systemctl start openstack-keystone.service && sudo systemctl enable openstack-keystone.service

Create sample Tenants, Users and Roles

$> sudo ADMIN_PASSWORD=$OS_PASSWORD SERVICE_PASSWORD=servicepass openstack-keystone-sample-data

Test the Keystone CLI is working

$> keystone user-list

Expected Results

Check that no errors are reported.