openstack-manuals/doc/install-guide/section_sahara-install.xml
Andreas Jaeger 591552a786 Install Guide: Fix openstack service create invocation
Fix this warning that appears with openstack version 1.0.3:
 # openstack service create --type identity   --description "OpenStack
Identity" keystone
WARNING: openstackclient.identity.v2_0.service.CreateService The
argument --type is deprecated, use service create --name <service-name>
type instead.

Note that the order is different, previously "--type TYPE NAME" and
now "--name NAME TYPE".

partially implements: blueprint installguide-kilo

Closes-Bug: #1453883
Closes-Bug: #1453891

Co-Authored-By: Christian Berendt <berendt@b1-systems.de>
Co-Authored-By: Flávio Ramalho <flaviosr@lsd.ufcg.edu.br>
Change-Id: I72f89defd7f55ce2822b5b511280f40196361f68
2015-05-14 22:16:58 +02:00

208 lines
11 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0"
xml:id="sahara-install">
<title>Install the Data processing service</title>
<para>This procedure installs the Data processing service (sahara) on the
controller node.</para>
<para>To install the Data processing service on the controller:</para>
<procedure>
<step os="rhel;centos;fedora;opensuse;sles">
<para>Install the required packages:</para>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install openstack-sahara python-saharaclient</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-sahara python-saharaclient</userinput></screen>
</step>
<step os="debian">
<para>Install the packages:</para>
<screen os="debian"><prompt>#</prompt> <userinput>apt-get install sahara python-saharaclient</userinput></screen>
</step>
<step os="debian">
<para>Respond to prompts for
<link linkend="debconf-dbconfig-common">database management</link>,
<link linkend="debconf-keystone_authtoken">Identity service
credentials</link>,
<link linkend="debconf-api-endpoints">service endpoint
registration</link>, and
<link linkend="debconf-rabbitmq">message broker
credentials</link>.</para>
</step>
<step os="ubuntu">
<warning><para>You need to install the required packages. For now, sahara
doesn't have packages for Ubuntu.
Documentation will be updated once the packages are available. The rest
of this document assumes that you have the sahara service packages
installed on the system.</para></warning>
</step>
<step>
<para>Edit <filename>/etc/sahara/sahara.conf</filename> configuration file</para>
<substeps>
<step os="rhel;centos;fedora;opensuse;sles;ubuntu"><para>First, edit <option>connection</option> option in
the <literal>[database]</literal> section. The URL provided here
should point to an empty database. For instance, connection
string for MySQL database will be:
<programlisting language="ini">connection = mysql://sahara:<replaceable>SAHARA_DBPASS</replaceable>@<replaceable>controller</replaceable>/sahara</programlisting>
</para></step>
<step os="rhel;centos;fedora;opensuse;sles;ubuntu"><para>Switch to the <literal>[keystone_authtoken]</literal>
section. The <option>auth_uri</option> option should point to
the public Identity API endpoint. <option>identity_uri</option>
should point to the admin Identity API endpoint. For example:
<programlisting language="ini">auth_uri = http://<replaceable>controller</replaceable>:5000/v2.0
identity_uri = http://<replaceable>controller</replaceable>:35357</programlisting>
</para></step>
<step os="rhel;centos;fedora;opensuse;sles;ubuntu"><para>Next specify <literal>admin_user</literal>,
<literal>admin_password</literal> and
<literal>admin_tenant_name</literal>. These parameters must specify
a keystone user which has the <literal>admin</literal> role in the
given tenant. These credentials allow sahara to authenticate and
authorize its users.
</para></step>
<step><para>Switch to the <literal>[DEFAULT]</literal> section.
Proceed to the networking parameters. If you are using Neutron
for networking, then set <literal>use_neutron=true</literal>.
Otherwise if you are using <systemitem>nova-network</systemitem> set
the given parameter to <literal>false</literal>.
</para></step>
<step><para>That should be enough for the first run. If you want to
increase logging level for troubleshooting, there are two parameters
in the config: <literal>verbose</literal> and
<literal>debug</literal>. If the former is set to
<literal>true</literal>, sahara will
start to write logs of <literal>INFO</literal> level and above. If
<literal>debug</literal> is set to
<literal>true</literal>, sahara will write all the logs, including
the <literal>DEBUG</literal> ones.
</para></step>
</substeps>
</step>
<step>
<para>If you use the Data processing service with a MySQL or MariaDB
database, you must configure the maximum number of allowed packets for
storing big job binaries in the service internal database.</para>
<substeps>
<step>
<para>Edit the
<filename os="ubuntu;debian">/etc/mysql/my.cnf</filename>
<filename os="rhel;centos;fedora;sles;opensuse">/etc/my.cnf</filename>
file and change the <literal>max_allowed_packet</literal>
option:</para>
<programlisting language="ini">[mysqld]
max_allowed_packet = 256M</programlisting>
</step>
<step>
<para>Restart the database service:</para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>service mysql restart</userinput></screen>
<screen os="rhel;centos;fedora;opensuse;sles"><prompt>#</prompt> <userinput>systemctl restart mariadb.service</userinput></screen>
</step>
</substeps>
</step>
<step>
<para>To create the database, complete these steps:</para>
<substeps>
<step>
<para>Use the database access client to connect to the database server as the <literal>root</literal> user:</para>
<screen><prompt>$</prompt> <userinput>mysql -u root -p</userinput></screen>
</step>
<step>
<para>Create the <literal>sahara</literal> database:</para>
<screen><userinput>CREATE DATABASE sahara;</userinput></screen>
</step>
<step>
<para>Grant proper access to the <literal>sahara</literal> database:</para>
<screen><userinput>GRANT ALL PRIVILEGES ON sahara.* TO 'sahara'@'localhost' \ IDENTIFIED BY ' <replaceable>SAHARA_DBPASS</replaceable>';</userinput>
<userinput>GRANT ALL PRIVILEGES ON sahara.* TO 'sahara'@'%' \ IDENTIFIED BY '<replaceable>SAHARA_DBPASS</replaceable>';</userinput></screen>
<para>Replace <replaceable>SAHARA_DBPASS</replaceable> with a suitable password.</para>
</step>
<step>
<para>Exit the database access client.</para>
</step>
</substeps>
</step>
<step os="rhel;centos;fedora;opensuse;sles;ubuntu">
<para>Create database schema:
<screen><prompt>#</prompt> <userinput>sahara-db-manage --config-file /etc/sahara/sahara.conf upgrade head</userinput></screen>
</para>
</step>
<step os="rhel;centos;fedora;opensuse;sles;ubuntu">
<para>Source the <literal>admin</literal> credentials to gain access to
admin-only CLI commands:</para>
<screen><prompt>$</prompt> <userinput>source admin-openrc.sh</userinput></screen>
</step>
<step os="rhel;centos;fedora;opensuse;sles;ubuntu">
<para>To create the service credentials, complete these steps:</para>
<substeps>
<step>
<para>Create the <literal>sahara</literal> user:</para>
<screen><prompt>$</prompt> <userinput>openstack user create --password-prompt sahara</userinput>
<computeroutput>User Password:
Repeat User Password:
+----------+----------------------------------+
| Field | Value |
+----------+----------------------------------+
| email | None |
| enabled | True |
| id | 92fbc405a237420fbc92e9bbd697b8c8 |
| name | sahara |
| username | sahara |
+----------+----------------------------------+</computeroutput></screen>
</step>
<step>
<para>Add the <literal>admin</literal> role to the
<literal>sahara</literal> user:</para>
<screen><prompt>$</prompt> <userinput>openstack role add --project service --user sahara admin</userinput>
<computeroutput>+-------+----------------------------------+
| Field | Value |
+-------+----------------------------------+
| id | cd2cb9a39e874ea69e5d4b896eb16128 |
| name | admin |
+-------+----------------------------------+</computeroutput></screen>
</step>
<step>
<para>Create the <literal>sahara</literal> service entity:</para>
<screen><prompt>$</prompt> <userinput>openstack service create --name sahara \
--description "Data processing service" data_processing</userinput>
<computeroutput>+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Data processing service |
| enabled | True |
| id | 6e867d0a062e4c1fb1c335b74ab7a8f4 |
| name | sahara |
| type | data_processing |
+-------------+----------------------------------+</computeroutput></screen>
</step>
</substeps>
</step>
<step os="rhel;centos;fedora;opensuse;sles;ubuntu">
<para>Create the Data processing service API endpoint:</para>
<screen><prompt>$</prompt> <userinput>openstack endpoint create \
--publicurl http://<replaceable>controller</replaceable>:8386/v1.1/%\(tenant_id\)s \
--internalurl http://<replaceable>controller</replaceable>:8386/v1.1/%\(tenant_id\)s \
--adminurl http://<replaceable>controller</replaceable>:8386/v1.1/%\(tenant_id\)s \
--region RegionOne \
data_processing</userinput>
<computeroutput>+--------------+-------------------------------------------+
| Field | Value |
+--------------+-------------------------------------------+
| adminurl | http://controller:8386/v1.1/%(tenant_id)s |
| id | dbb754f069c949e19fc40171112bfc01 |
| internalurl | http://controller:8386/v1.1/%(tenant_id)s |
| publicurl | http://controller:8386/v1.1/%(tenant_id)s |
| region | RegionOne |
| service_id | 6e867d0a062e4c1fb1c335b74ab7a8f4 |
| service_name | sahara |
| service_type | data_processing |
+--------------+-------------------------------------------+</computeroutput></screen>
</step>
<step os="rhel;centos;fedora;opensuse;sles;ubuntu">
<para>Start the Data processing service and configure it to
start when the system boots:
<screen><prompt>#</prompt> <userinput>systemctl enable openstack-sahara-all.service</userinput>
<prompt>#</prompt> <userinput>systemctl start openstack-sahara-all.service</userinput></screen>
</para></step>
</procedure>
</section>