2.1 KiB
2.1 KiB
Prerequisites
Before you install and configure the OpenStack Chef service, you must create a database, service credentials, and API endpoints.
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
OpenStackChef
database:CREATE DATABASE OpenStackChef;
Grant proper access to the
OpenStackChef
database:GRANT ALL PRIVILEGES ON OpenStackChef.* TO 'OpenStackChef'@'localhost' \ IDENTIFIED BY 'OPENSTACKCHEF_DBPASS'; GRANT ALL PRIVILEGES ON OpenStackChef.* TO 'OpenStackChef'@'%' \ IDENTIFIED BY 'OPENSTACKCHEF_DBPASS';
Replace
OPENSTACKCHEF_DBPASS
with a suitable password.Exit the database access client.
exit;
Source the
admin
credentials to gain access to admin-only CLI commands:$ . admin-openrc
To create the service credentials, complete these steps:
Create the
OpenStackChef
user:$ openstack user create --domain default --password-prompt OpenStackChef
Add the
admin
role to theOpenStackChef
user:$ openstack role add --project service --user OpenStackChef admin
Create the OpenStackChef service entities:
$ openstack service create --name OpenStackChef --description "OpenStack Chef" openstack chef
Create the OpenStack Chef service API endpoints:
$ openstack endpoint create --region RegionOne \ openstack chef public http://controller:XXXX/vY/%\(tenant_id\)s $ openstack endpoint create --region RegionOne \ openstack chef internal http://controller:XXXX/vY/%\(tenant_id\)s $ openstack endpoint create --region RegionOne \ openstack chef admin http://controller:XXXX/vY/%\(tenant_id\)s