12.4. Create the Telemetry Identity Records

In this section, you will:
  1. Create the ceilometer user, who has the ResellerAdmin role in the services tenant.
  2. Create the ceilometer service entry and assign it an endpoint.
In order to proceed, you need to have already completed the following steps:
  1. Created an Administrator role named admin (refer to Section 3.8, “Create an Administrator Account” for instructions)
  2. Created the services tenant (refer to Section 3.10, “Create the Services Tenant” for instructions)

Note

The Deploying OpenStack: Learning Environments guide uses one tenant for all service users. For more information, refer to Section 3.10, “Create the Services Tenant”.
You can perform this procedure from your Identity service host or on any machine where you've copied the keystonerc_admin file (which contains administrator credentials) and the keystone command-line utility is installed. For more information about the keystonerc_admin file, refer to Section 3.8, “Create an Administrator Account”.

Procedure 12.1. Creating Identity records for the Telemetry service

  1. Set up the shell to access Keystone as the admin user:
    # source ~/keystonerc_admin
  2. Create a ceilometer user using the following command:
    # keystone user-create --name=ceilometer \
       --pass=SERVICE_PASSWORD \
       --email=CEILOMETER_EMAIL
    Where:
    • SERVICE_PASSWORD is the password the Telemetry service should use when authenticating with the Identity service.
    • CEILOMETER_EMAIL is the email address used by the Telemetry service.
  3. Create a ResellerAdmin role:
    # keystone role-create --name=ResellerAdmin
  4. Establish the relationship between the Telemetry service, the services tenant, and ResellerAdmin role:
    # keystone user-role-add --user ceilometer
        --role ResellerAdmin
        --tenant services
  5. Establish the relationship between the Telemetry service, the services tenant, and admin role:
    # keystone user-role-add --user ceilometer
        --role admin
        --tenant services
  6. Create the ceilometer service entry:
    # keystone service-create --name=ceilometer \
    		--type=metering \
    		--description="OpenStack Telemetry Service"
    +-------------+----------------------------------+
    |   Property  |              Value               |
    +-------------+----------------------------------+
    | description |     OpenStack Telemetry Service   |
    | id          | a511aea8bc1264641f4dff1db38751br |
    | name        |             ceilometer           |
    | type        |             metering             |
    +-------------+----------------------------------+
  7. Create the ceilometer endpoint entry:
    # keystone endpoint-create \
    	--service ceilometer \
    	--publicurl "IP:8777"
    	--adminurl "IP:8777"
    	--internalurl "IP:8777"
    Replace IP with the IP address or host name of the system hosting the Telemetry service.

    Note

    By default, the endpoint is created in the default region, regionOne. If you need to specify a different region when creating an endpoint use the --region argument to provide it. See Section 3.7.1, “Service Regions” for more information.