OpenStack Kilo : Configure Keystone#22015/06/07 |
Add Users or Roles, Services and others in Keystone.
|
|
[1] | Load environment variables first. Set value for "OS_TOKEN" from the value "admin_token" in keystone.conf. |
[root@dlp ~]# export OS_TOKEN=admintoken [root@dlp ~]# export OS_URL=http://10.0.0.30:35357/v2.0/ |
[2] | Add Projects. |
# add admin project [root@dlp ~]# openstack project create --description "Admin Project" admin +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Admin Project | | enabled | True | | id | 0761e4ccdc1d45e38ec21237cbd652b5 | | name | admin | +-------------+----------------------------------+ # add service project [root@dlp ~]# openstack project create --description "Service Project" service +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Service Project | | enabled | True | | id | 6bf148fa02004bf8b1f278b9777c6b70 | | name | service | +-------------+----------------------------------+ # confirm settings [root@dlp ~]# openstack project list +----------------------------------+---------+ | ID | Name | +----------------------------------+---------+ | 0761e4ccdc1d45e38ec21237cbd652b5 | admin | | 6bf148fa02004bf8b1f278b9777c6b70 | service | +----------------------------------+---------+ |
[3] | Add Roles. |
# add admin role [root@dlp ~]# openstack role create admin +-------+----------------------------------+ | Field | Value | +-------+----------------------------------+ | id | 6f560a28688344759dbb9fd4f39432f9 | | name | admin | +-------+----------------------------------+ # add Member role [root@dlp ~]# openstack role create Member +-------+----------------------------------+ | Field | Value | +-------+----------------------------------+ | id | 5fe74dd6b5074d6c86591e0f921a0c04 | | name | Member | +-------+----------------------------------+ # confirm settings [root@dlp ~]# openstack role list +----------------------------------+--------+ | ID | Name | +----------------------------------+--------+ | 5fe74dd6b5074d6c86591e0f921a0c04 | Member | | 6f560a28688344759dbb9fd4f39432f9 | admin | +----------------------------------+--------+ |
[4] | Add Users. |
# add admin user (set in admin project) [root@dlp ~]# openstack user create --project admin --password adminpassword admin +------------+----------------------------------+ | Field | Value | +------------+----------------------------------+ | email | None | | enabled | True | | id | 4a92ab2bdb1a4b07baa11fb60e3c26fd | | name | admin | | project_id | 0761e4ccdc1d45e38ec21237cbd652b5 | | username | admin | +------------+----------------------------------+ # add admin user in admin role [root@dlp ~]# openstack role add --project admin --user admin admin +-------+----------------------------------+ | Field | Value | +-------+----------------------------------+ | id | 6f560a28688344759dbb9fd4f39432f9 | | name | admin | +-------+----------------------------------+ # confirm settings [root@dlp ~]# openstack user list +----------------------------------+--------+ | ID | Name | +----------------------------------+--------+ | 4a92ab2bdb1a4b07baa11fb60e3c26fd | admin | +----------------------------------+--------+ |
[5] | Add entries for services. |
# add for keystone [root@dlp ~]# openstack service create --name keystone --description "OpenStack Identity" identity +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | OpenStack Identity | | enabled | True | | id | 713a279af6f14f07ae793f6402aa5aa3 | | name | keystone | | type | identity | +-------------+----------------------------------+ # confirm settings [root@dlp ~]# openstack service list +----------------------------------+----------+----------+ | ID | Name | Type | +----------------------------------+----------+----------+ | 22908e9078df428ea3ae3ebb49c096e2 | glance | image | +----------------------------------+----------+----------+ |
[6] | Add Endpoints. |
# define this host [root@dlp ~]# export controller=10.0.0.30
# add endpoint for keystone [root@dlp ~]# openstack endpoint create \ --publicurl http://$controller:5000/v2.0 \ --internalurl http://$controller:5000/v2.0 \ --adminurl http://$controller:35357/v2.0 \ --region RegionOne \ identity +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | adminurl | http://10.0.0.30:35357/v2.0 | | id | b55b04aef09a43b2bcbd410452859331 | | internalurl | http://10.0.0.30:5000/v2.0 | | publicurl | http://10.0.0.30:5000/v2.0 | | region | RegionOne | | service_id | 713a279af6f14f07ae793f6402aa5aa3 | | service_name | keystone | | service_type | identity | +--------------+----------------------------------+ # confirm settings [root@dlp ~]# openstack endpoint list +----------------------------------+-----------+--------------+--------------+ | ID | Region | Service Name | Service Type | +----------------------------------+-----------+--------------+--------------+ | b55b04aef09a43b2bcbd410452859331 | RegionOne | keystone | identity | +----------------------------------+-----------+--------------+--------------+ |
Sponsored Link |
|