Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
11.2. Configure the Data Processing Service
- Configure the Data Processing service database connection.
- Configure the Data Processing API service to authenticate with the Identity service.
- Configure the firewall to allow service traffic for the Data Processing service (through port
8386
).
11.2.1. Create the Data Processing Service Database Link kopierenLink in die Zwischenablage kopiert!
/etc/sahara/sahara.conf
file. It must be updated to point to a valid database server before starting the Data Processing API service (openstack-sahara-api
).
Procedure 11.1. Creating and Configuring a Database for the Data Processing API Service
- Connect to the database service:
mysql -u root -p
# mysql -u root -p
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the
sahara
database:mysql> CREATE DATABASE sahara;
mysql> CREATE DATABASE sahara;
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create a
sahara
database user and grant the user access to thesahara
database:mysql> GRANT ALL ON sahara.* TO 'sahara'@'%' IDENTIFIED BY 'PASSWORD'; mysql> GRANT ALL ON sahara.* TO 'sahara'@'localhost' IDENTIFIED BY 'PASSWORD';
mysql> GRANT ALL ON sahara.* TO 'sahara'@'%' IDENTIFIED BY 'PASSWORD'; mysql> GRANT ALL ON sahara.* TO 'sahara'@'localhost' IDENTIFIED BY 'PASSWORD';
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace PASSWORD with a secure password that will be used to authenticate with the database server as this user. - Exit the
mysql
client:mysql> quit
mysql> quit
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Set the value of the
sql_connection
configuration key:openstack-config --set /etc/sahara/sahara.conf \ database connection mysql://sahara:PASSWORD@IP/sahara
# openstack-config --set /etc/sahara/sahara.conf \ database connection mysql://sahara:PASSWORD@IP/sahara
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace the following values:- Replace PASS with the password of the database user.
- Replace IP with the IP address or host name of the server hosting the database service.
- Configure the schema of the
sahara
database:sahara-db-manage --config-file /etc/sahara/sahara.conf upgrade head
# sahara-db-manage --config-file /etc/sahara/sahara.conf upgrade head
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Important
11.2.2. Create the Data Processing Service Identity Records Link kopierenLink in die Zwischenablage kopiert!
services
tenant. For more information, see:
keystonerc_admin
file and on which the keystone command-line utility is installed.
Procedure 11.2. Creating Identity Records for the Data Processing Service
- Set up the shell to access keystone as the administrative user:
source ~/keystonerc_admin
# source ~/keystonerc_admin
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the
sahara
user:[(keystone_admin)]# keystone user-create --name sahara --pass PASSWORD
[(keystone_admin)]# keystone user-create --name sahara --pass PASSWORD
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace PASSWORD with a password that will be used by the Data Processing service when authenticating with the Identity service. - Link the
sahara
user and theadmin
role together within the context of theservices
tenant:[(keystone_admin)]# keystone user-role-add --user sahara --role admin --tenant services
[(keystone_admin)]# keystone user-role-add --user sahara --role admin --tenant services
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the
sahara
service entry:[(keystone_admin)]# keystone service-create --name sahara \ --type data-processing \ --description "OpenStack Data Processing"
[(keystone_admin)]# keystone service-create --name sahara \ --type data-processing \ --description "OpenStack Data Processing"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the
sahara
endpoint entry:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace SAHARA_HOST with the IP address or fully qualified domain name of the server hosting the Data Processing service.Note
By default, the endpoint is created in the default region,RegionOne
. This is a case-sensitive value. To specify a different region when creating an endpoint, use the--region
argument to provide it.See Section 3.6.1, “Service Regions” for more information.
11.2.3. Configure Data Processing Service Authentication Link kopierenLink in die Zwischenablage kopiert!
openstack-sahara-api
) to use the Identity service for authentication. All steps in this procedure must be performed on the server hosting the Data Processing API service, while logged in as the root
user.
Procedure 11.3. Configuring the Data Processing API Service to Authenticate through the Identity Service
- Set the Identity service host that the Data Processing API service must use:
openstack-config --set /etc/sahara/sahara.conf \ keystone_authtoken auth_uri http://IP:5000/v2.0/ openstack-config --set /etc/sahara/sahara.conf \ keystone_authtoken identity_uri http://IP:35357
# openstack-config --set /etc/sahara/sahara.conf \ keystone_authtoken auth_uri http://IP:5000/v2.0/ # openstack-config --set /etc/sahara/sahara.conf \ keystone_authtoken identity_uri http://IP:35357
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace IP with the IP address of the server hosting the Identity service. - Set the Data Processing API service to authenticate as the correct tenant:
openstack-config --set /etc/sahara/sahara.conf \ keystone_authtoken admin_tenant_name services
# openstack-config --set /etc/sahara/sahara.conf \ keystone_authtoken admin_tenant_name services
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace services with the name of the tenant created for the use of the Data Processing service. Examples in this guide useservices
. - Set the Data Processing API service to authenticate using the
sahara
administrative user account:openstack-config --set /etc/sahara/sahara.conf \ keystone_authtoken admin_user sahara
# openstack-config --set /etc/sahara/sahara.conf \ keystone_authtoken admin_user sahara
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Set the Data Processing API service to use the correct
sahara
administrative user account password:openstack-config --set /etc/sahara/sahara.conf \ keystone_authtoken admin_password PASSWORD
# openstack-config --set /etc/sahara/sahara.conf \ keystone_authtoken admin_password PASSWORD
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace PASSWORD with the password set when thesahara
user was created.
11.2.4. Configure the Firewall to Allow OpenStack Data Processing Service Traffic Link kopierenLink in die Zwischenablage kopiert!
8386
. The firewall on the service node must be configured to allow network traffic on this port. All steps in this procedure must be performed on the server hosting the Data Processing service, while logged in as the root
user.
Procedure 11.4. Configuring the Firewall to Allow Data Processing Service Traffic
- Open the
/etc/sysconfig/iptables
file in a text editor. - Add an INPUT rule allowing TCP traffic on port
8386
. The new rule must appear before any INPUT rules that REJECT traffic:-A INPUT -p tcp -m multiport --dports 8386 -j ACCEPT
-A INPUT -p tcp -m multiport --dports 8386 -j ACCEPT
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Save the changes to the
/etc/sysconfig/iptables
file. - Restart the
iptables
service to ensure that the change takes effect:systemctl restart iptables.service
# systemctl restart iptables.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow