Creating keystone services and service endpoints

Here we define the services and their endpoints. Recall that you must have the following environment variables set.

$ export OS_SERVICE_TOKEN=012345SECRET99TOKEN012345
$ export OS_SERVICE_ENDPOINT=http://192.168.206.130:35357/v2.0

Define the Identity service:

$ keystone service-create --name=keystone --type=identity --description="Identity Service"

+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description | Identity Service                 |
| id          | 15c11a23667e427e91bc31335b45f4bd |
| name        | keystone                         |
| type        | identity                         |
+-------------+----------------------------------+
$ keystone endpoint-create \
 --region RegionOne \
 --service-id=15c11a23667e427e91bc31335b45f4bd \
 --publicurl=http://192.168.206.130:5000/v2.0 \
 --internalurl=http://192.168.206.130:5000/v2.0 \
 --adminurl=http://192.168.206.130:35357/v2.0
+-------------+-----------------------------------+
|   Property  |             Value                 |
+-------------+-----------------------------------+
| adminurl    | http://192.168.206.130:35357/v2.0 |
| id          | 11f9c625a3b94a3f8e66bf4e5de2679f  |
| internalurl | http://192.168.206.130:5000/v2.0  |
| publicurl   | http://192.168.206.130:5000/v2.0  |
| region      | RegionOne                         |
| service_id  | 15c11a23667e427e91bc31335b45f4bd  |
+-------------+-----------------------------------+

Define the Compute service, which requires a separate endpoint for each tenant. Here we use the service tenant from the previous section.

[Note]Note

The %(tenant_id)s and single quotes around the publicurl, internalurl, and adminurl must be typed exactly as shown for both the Compute endpoint and the Volume endpoint.

$ keystone service-create --name=nova --type=compute --description="Compute Service"
+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description | Compute Service                  |
| id          | abc0f03c02904c24abdcc3b7910e2eed |
| name        | nova                             |
| type        | compute                          |
+-------------+----------------------------------+

$ keystone endpoint-create \
 --region RegionOne \
 --service-id=abc0f03c02904c24abdcc3b7910e2eed \
 --publicurl='http://192.168.206.130:8774/v2/%(tenant_id)s' \
 --internalurl='http://192.168.206.130:8774/v2/%(tenant_id)s' \
 --adminurl='http://192.168.206.130:8774/v2/%(tenant_id)s'
+-------------+----------------------------------------------+
|   Property  |                               Value          |
+-------------+----------------------------------------------+
| adminurl    | http://192.168.206.130:8774/v2/%(tenant_id)s |
| id          | 935fd37b6fa74b2f9fba6d907fa95825             |
| internalurl | http://192.168.206.130:8774/v2/%(tenant_id)s |
| publicurl   | http://192.168.206.130:8774/v2/%(tenant_id)s |
| region      | RegionOne                                    |
| service_id  | abc0f03c02904c24abdcc3b7910e2eed             |
+-------------+----------------------------------------------+

Define the Volume service, which also requires a separate endpoint for each tenant.

$ keystone service-create --name=volume --type=volume --description="Volume Service"


+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description | Volume Service                   |
| id          | 1ff4ece13c3e48d8a6461faebd9cd38f |
| name        | volume                           |
| type        | volume                           |
+-------------+----------------------------------+

$ keystone endpoint-create \
 --region RegionOne \
 --service-id=1ff4ece13c3e48d8a6461faebd9cd38f \
 --publicurl='http://192.168.206.130:8776/v1/%(tenant_id)s' \
 --internalurl='http://192.168.206.130:8776/v1/%(tenant_id)s' \
 --adminurl='http://192.168.206.130:8776/v1/%(tenant_id)s'


+-------------+----------------------------------------------+
|   Property  |                   Value                      |
+-------------+----------------------------------------------+
| adminurl    | http://192.168.206.130:8776/v1/%(tenant_id)s |
| id          | 1ff4ece13c3e48d8a6461faebd9cd38f             |
| internalurl | http://192.168.206.130:8776/v1/%(tenant_id)s |
| publicurl   | http://192.168.206.130:8776/v1/%(tenant_id)s |
| region      | RegionOne                                    |
| service_id  | 8a70cd235c7d4a05b43b2dffb9942cc0             |
+-------------+----------------------------------------------+

Define the Image service:

$ keystone service-create --name=glance --type=image --description="Image Service"


+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description | Image Service                    |
| id          | 7d5258c490144c8c92505267785327c1 |
| name        | glance                           |
| type        | image                            |
+-------------+----------------------------------+

$ keystone --token 012345SECRET99TOKEN012345 \
 --endpoint http://192.168.206.130:35357/v2.0/ \
 endpoint-create \
 --region RegionOne \
 --service-id=7d5258c490144c8c92505267785327c1 \
 --publicurl=http://192.168.206.130:9292 \
 --internalurl=http://192.168.206.130:9292 \
 --adminurl=http://192.168.206.130:9292


+-------------+-----------------------------------+
|   Property  |             Value                 |
+-------------+-----------------------------------+
| adminurl    | http://192.168.206.130:9292       |
| id          | 3c8c0d749f21490b90163bfaed9befe7  |
| internalurl | http://192.168.206.130:9292       |
| publicurl   | http://192.168.206.130:9292       |
| region      | RegionOne                         |
| service_id  | 7d5258c490144c8c92505267785327c1  |
+-------------+-----------------------------------+

Define the EC2 compatibility service:

$ keystone service-create --name=ec2 --type=ec2 --description="EC2 Compatibility Layer"
+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description | EC2 Compatibility Layer          |
| id          | 181cdad1d1264387bcc411e1c6a6a5fd |
| name        | ec2                              |
| type        | ec2                              |
+-------------+----------------------------------+

$ keystone --token 012345SECRET99TOKEN012345 \
 --endpoint http://192.168.206.130:35357/v2.0/ \
 endpoint-create \
 --region RegionOne \
 --service-id=181cdad1d1264387bcc411e1c6a6a5fd \
 --publicurl=http://192.168.206.130:8773/services/Cloud \
 --internalurl=http://192.168.206.130:8773/services/Cloud \
 --adminurl=http://192.168.206.130:8773/services/Admin


+-------------+--------------------------------------------+
|   Property  |                  Value                     |
+-------------+--------------------------------------------+
| adminurl    | http://192.168.206.130:8773/services/Admin |
| id          | d2a3d7490c61442f9b2c8c8a2083c4b6           |
| internalurl | http://192.168.206.130:8773/services/Cloud |
| publicurl   | http://192.168.206.130:8773/services/Cloud |
| region      | RegionOne                                  |
| service_id  | 181cdad1d1264387bcc411e1c6a6a5fd           |
+-------------+--------------------------------------------+

Define the Object Storage service:

$ keystone service-create --name=swift --type=object-store --description="Object Storage Service"
+-------------+---------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description | Object Storage Service           |
| id          | 272efad2d1234376cbb911c1e5a5a6ed |
| name        | swift                            |
| type        | object-store                     |
+-------------+----------------------------------+

$ keystone endpoint-create \
 --region RegionOne \
 --service-id=272efad2d1234376cbb911c1e5a5a6ed \
 --publicurl 'http://192.168.206.130:8888/v1/AUTH_%(tenant_id)s' \
 --internalurl 'http://192.168.206.130:8888/v1/AUTH_%(tenant_id)s' \
 --adminurl 'http://192.168.206.130:8888/v1'


+-------------+---------------------------------------------------+
|   Property  |                       Value                       |
+-------------+---------------------------------------------------+
| adminurl    | http://192.168.206.130:8888/v1                    |
| id          | e32b3c4780e51332f9c128a8c208a5a4                  |
| internalurl | http://192.168.206.130:8888/v1/AUTH_%(tenant_id)s |
| publicurl   | http://192.168.206.130:8888/v1/AUTH_%(tenant_id)s |
| region      | RegionOne                                         |
| service_id  | 272efad2d1234376cbb911c1e5a5a6ed                  |
+-------------+---------------------------------------------------+


loading table of contents...