cyborg-specs/doc/source/install/common_prerequisites.rst

1.9 KiB

Prerequisites

Before you install and configure the cyborg-specs service, you must create a database, service credentials, and API endpoints.

  1. To create the database, complete these steps:

    • Use the database access client to connect to the database server as the root user:

      $ mysql -u root -p
    • Create the specs database:

      CREATE DATABASE specs;
    • Grant proper access to the specs database:

      GRANT ALL PRIVILEGES ON specs.* TO 'specs'@'localhost' \
        IDENTIFIED BY 'SPECS_DBPASS';
      GRANT ALL PRIVILEGES ON specs.* TO 'specs'@'%' \
        IDENTIFIED BY 'SPECS_DBPASS';

      Replace SPECS_DBPASS with a suitable password.

    • Exit the database access client.

      exit;
  2. Source the admin credentials to gain access to admin-only CLI commands:

    $ . admin-openrc
  3. To create the service credentials, complete these steps:

    • Create the specs user:

      $ openstack user create --domain default --password-prompt specs
    • Add the admin role to the specs user:

      $ openstack role add --project service --user specs admin
    • Create the specs service entities:

      $ openstack service create --name specs --description "cyborg-specs" cyborg-specs
  4. Create the cyborg-specs service API endpoints:

    $ openstack endpoint create --region RegionOne \
      cyborg-specs public http://controller:XXXX/vY/%\(tenant_id\)s
    $ openstack endpoint create --region RegionOne \
      cyborg-specs internal http://controller:XXXX/vY/%\(tenant_id\)s
    $ openstack endpoint create --region RegionOne \
      cyborg-specs admin http://controller:XXXX/vY/%\(tenant_id\)s