mirror of
https://github.com/clearlinux/clear-linux-documentation.git
synced 2026-09-05 13:21:27 +00:00
Merging OpenStack files from Staging to Master.
This commit is contained in:
+2
-2
@@ -42,8 +42,8 @@ OpenStack* implementation
|
||||
openstack_bundle_and_service_summary
|
||||
openstack_sys_req_and_pw_summary
|
||||
openstack_installing_bundles
|
||||
openstack_environment-database
|
||||
openstack_environment-messaging
|
||||
openstack_supporting-database
|
||||
openstack_supporting-messaging
|
||||
openstack_identity
|
||||
openstack_identity-openrc
|
||||
openstack_image
|
||||
|
||||
+345
-251
@@ -1,169 +1,225 @@
|
||||
.. _openstack_block_storage:
|
||||
|
||||
OpenStack* Block Storage
|
||||
############################################################
|
||||
########################
|
||||
|
||||
Clear Linux* OS for Intel® Architecture can be used with the
|
||||
OpenStack Block Storage service (cinder) to add persistent storage
|
||||
options to a virtual machine. Block Storage provides an infrastructure
|
||||
for managing volumes and interacting with OpenStack Compute (nova) to
|
||||
provide volumes for specific instances. These volumes can be easily
|
||||
managed (types and snapshots) under Block Storage. Here's how to get
|
||||
OpenStack Block Storage working with Clear Linux OS for Intel
|
||||
Architecture:
|
||||
The OpenStack Block Storage service (cinder) adds persistent storage to
|
||||
a virtual machine. Block Storage provides an infrastructure for managing
|
||||
volumes, and interacts with OpenStack Compute to provide volumes for
|
||||
instances. The service also enables management of volume snapshots, and
|
||||
volume types.
|
||||
|
||||
Installing and configuring the controller node
|
||||
----------------------------------------------------
|
||||
Install and configure controller node
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The first step is to install and configure the Block Storage service,
|
||||
code-named cinder, on the controller node. This service requires at
|
||||
least one additional storage node that provides volumes to instances.
|
||||
This section describes how to install and configure the Block
|
||||
Storage service, code-named cinder, on the controller node. This
|
||||
service requires at least one additional storage node that provides
|
||||
volumes to instances.
|
||||
|
||||
Prerequisites:
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
--------------
|
||||
|
||||
Before installing and configuring the Block Storage service, create a
|
||||
database, service credentials, and an API endpoint. To create the
|
||||
database, complete these steps:
|
||||
Before you install and configure the Block Storage service, you
|
||||
|
||||
**Create a database:**
|
||||
#. To create the database, complete these steps:
|
||||
|
||||
#. Use the database access client to connect to the database server as
|
||||
the root user::
|
||||
* Use the database access client to connect to the database
|
||||
server as the ``root`` user::
|
||||
|
||||
$ mysql -u root -p
|
||||
$ mysql -u root -p
|
||||
|
||||
#. Create the cinder database::
|
||||
|
||||
CREATE DATABASE cinder;
|
||||
* Create the ``cinder`` database::
|
||||
|
||||
#. Grant proper access to the cinder database. Replace ``CINDER_DBPASS``
|
||||
with a suitable password::
|
||||
CREATE DATABASE cinder;
|
||||
|
||||
GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' \
|
||||
IDENTIFIED BY 'CINDER_DBPASS';
|
||||
GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' \
|
||||
IDENTIFIED BY 'CINDER_DBPASS';
|
||||
* Grant proper access to the ``cinder`` database::
|
||||
|
||||
#. Exit the database access client.
|
||||
GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' \
|
||||
IDENTIFIED BY 'CINDER_DBPASS';
|
||||
GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' \
|
||||
IDENTIFIED BY 'CINDER_DBPASS';
|
||||
|
||||
**Create service credentials:**
|
||||
Replace ``CINDER_DBPASS`` with a suitable password.
|
||||
|
||||
#. Now source the admin credentials to gain access to admin-only CLI
|
||||
commands::
|
||||
* Exit the database access client.
|
||||
|
||||
$ source admin-openrc.sh
|
||||
#. Source the ``admin`` credentials to gain access to admin-only
|
||||
CLI commands::
|
||||
|
||||
$ source admin-openrc.sh
|
||||
|
||||
#. To create the service credentials, complete these steps:
|
||||
|
||||
* Create a cinder user::
|
||||
|
||||
$ openstack user create --password-prompt cinder
|
||||
User Password:
|
||||
Repeat User Password:
|
||||
+----------+----------------------------------+
|
||||
| Field | Value |
|
||||
+----------+----------------------------------+
|
||||
| email | None |
|
||||
| enabled | True |
|
||||
| id | 881ab2de4f7941e79504a759a83308be |
|
||||
| name | cinder |
|
||||
| username | cinder |
|
||||
+----------+----------------------------------+
|
||||
* Create a ``cinder`` user::
|
||||
|
||||
* Add the admin role to the cinder user::
|
||||
|
||||
$ openstack role add --project service --user cinder admin
|
||||
+-------+----------------------------------+
|
||||
| Field | Value |
|
||||
+-------+----------------------------------+
|
||||
| id | cd2cb9a39e874ea69e5d4b896eb16128 |
|
||||
| name | admin |
|
||||
+-------+----------------------------------+
|
||||
$ openstack user create --domain default --password-prompt cinder
|
||||
User Password:
|
||||
Repeat User Password:
|
||||
+-----------+----------------------------------+
|
||||
| Field | Value |
|
||||
+-----------+----------------------------------+
|
||||
| domain_id | default |
|
||||
| enabled | True |
|
||||
| id | bb279f8ffc444637af38811a5e1f0562 |
|
||||
| name | cinder |
|
||||
+-----------+----------------------------------+
|
||||
|
||||
* Now create the cinder service entities::
|
||||
|
||||
$ openstack service create --name cinder \
|
||||
--description "OpenStack Block Storage" volume
|
||||
| Field | Value |
|
||||
+-------------+----------------------------------+
|
||||
| description | OpenStack Block Storage |
|
||||
| enabled | True |
|
||||
| id | 1e494c3e22a24baaafcaf777d4d467eb |
|
||||
| name | cinder |
|
||||
| type | volume |
|
||||
+-------------+----------------------------------+
|
||||
$ openstack service create --name cinderv2
|
||||
--description "OpenStack Block Storage" volumev2
|
||||
+-------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+-------------+----------------------------------+
|
||||
| description | OpenStack Block Storage |
|
||||
| enabled | True |
|
||||
| id | 16e038e449c94b40868277f1d801edb5 |
|
||||
| name | cinderv2 |
|
||||
| type | volumev2 |
|
||||
+-------------+----------------------------------+
|
||||
* Add the ``admin`` role to the ``cinder`` user::
|
||||
|
||||
**Create service endpoints:**
|
||||
$ openstack role add --project service --user cinder admin
|
||||
|
||||
The last prerequisite is to create the Block Storage service API endpoints::
|
||||
* Create the ``cinder`` and ``cinderv2`` service entities::
|
||||
|
||||
$ openstack endpoint create \
|
||||
--publicurl http://controller:8776/v2/%\(tenant_id\)s \
|
||||
--internalurl http://controller:8776/v2/%\(tenant_id\)s \
|
||||
--adminurl http://controller:8776/v2/%\(tenant_id\)s \
|
||||
--region RegionOne \
|
||||
volume
|
||||
+--------------+-----------------------------------------+
|
||||
|Field | Value +
|
||||
|--------------+-----------------------------------------+
|
||||
| adminurl | http://controller:8776/v2/%(tenant_id)s |
|
||||
| id | d1b7291a2d794e26963b322c7f2a55a4 |
|
||||
| internalurl | http://controller:8776/v2/%(tenant_id)s |
|
||||
| publicurl | http://controller:8776/v2/%(tenant_id)s |
|
||||
| region | RegionOne |
|
||||
| service_id | 1e494c3e22a24baaafcaf777d4d467eb |
|
||||
| service_name | cinder |
|
||||
| service_type | volume |
|
||||
+--------------+-----------------------------------------+
|
||||
$ openstack endpoint create \
|
||||
--publicurl http://controller:8776/v2/%\(tenant_id\)s \
|
||||
--internalurl http://controller:8776/v2/%\(tenant_id\)s \
|
||||
--adminurl http://controller:8776/v2/%\(tenant_id\)s \
|
||||
--region RegionOne \
|
||||
volumev2
|
||||
+--------------+-----------------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+-----------------------------------------+
|
||||
| adminurl | http://controller:8776/v2/%(tenant_id)s |
|
||||
| id | 097b4a6fc8ba44b4b10d4822d2d9e076 |
|
||||
| internalurl | http://controller:8776/v2/%(tenant_id)s |
|
||||
| publicurl | http://controller:8776/v2/%(tenant_id)s |
|
||||
| region | RegionOne |
|
||||
| service_id | 16e038e449c94b40868277f1d801edb5 |
|
||||
| service_name | cinderv2 |
|
||||
| service_type | volumev2 |
|
||||
+--------------+-----------------------------------------+
|
||||
$ openstack service create --name cinder \
|
||||
--description "OpenStack Block Storage" volume
|
||||
+-------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+-------------+----------------------------------+
|
||||
| description | OpenStack Block Storage |
|
||||
| enabled | True |
|
||||
| id | ab3bbbef780845a1a283490d281e7fda |
|
||||
| name | cinder |
|
||||
| type | volume |
|
||||
+-------------+----------------------------------+
|
||||
|
||||
Installing and configuring Block Storage controller components
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
$ openstack service create --name cinderv2 \
|
||||
--description "OpenStack Block Storage" volumev2
|
||||
+-------------+----------------------------------+
|
||||
| Field | Value |
|
||||
+-------------+----------------------------------+
|
||||
| description | OpenStack Block Storage |
|
||||
| enabled | True |
|
||||
| id | eb9fd245bdbc414695952e93f29fe3ac |
|
||||
| name | cinderv2 |
|
||||
| type | volumev2 |
|
||||
+-------------+----------------------------------+
|
||||
|
||||
Once your prerequisites are finished, you can install and configure
|
||||
Block Storage controller components:
|
||||
.. note::
|
||||
|
||||
The Block Storage services requires two service entities.
|
||||
|
||||
#. Create the Block Storage service API endpoints::
|
||||
|
||||
$ openstack endpoint create --region RegionOne \
|
||||
volume public http://controller:8776/v1/%\(tenant_id\)s
|
||||
+--------------+-----------------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+-----------------------------------------+
|
||||
| enabled | True |
|
||||
| id | 03fa2c90153546c295bf30ca86b1344b |
|
||||
| interface | public |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | ab3bbbef780845a1a283490d281e7fda |
|
||||
| service_name | cinder |
|
||||
| service_type | volume |
|
||||
| url | http://controller:8776/v1/%(tenant_id)s |
|
||||
+--------------+-----------------------------------------+
|
||||
|
||||
$ openstack endpoint create --region RegionOne \
|
||||
volume internal http://controller:8776/v1/%\(tenant_id\)s
|
||||
+--------------+-----------------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+-----------------------------------------+
|
||||
| enabled | True |
|
||||
| id | 94f684395d1b41068c70e4ecb11364b2 |
|
||||
| interface | internal |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | ab3bbbef780845a1a283490d281e7fda |
|
||||
| service_name | cinder |
|
||||
| service_type | volume |
|
||||
| url | http://controller:8776/v1/%(tenant_id)s |
|
||||
+--------------+-----------------------------------------+
|
||||
|
||||
$ openstack endpoint create --region RegionOne \
|
||||
volume admin http://controller:8776/v1/%\(tenant_id\)s
|
||||
+--------------+-----------------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+-----------------------------------------+
|
||||
| enabled | True |
|
||||
| id | 4511c28a0f9840c78bacb25f10f62c98 |
|
||||
| interface | admin |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | ab3bbbef780845a1a283490d281e7fda |
|
||||
| service_name | cinder |
|
||||
| service_type | volume |
|
||||
| url | http://controller:8776/v1/%(tenant_id)s |
|
||||
+--------------+-----------------------------------------+
|
||||
|
||||
$ openstack endpoint create --region RegionOne \
|
||||
volumev2 public http://controller:8776/v2/%\(tenant_id\)s
|
||||
+--------------+-----------------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+-----------------------------------------+
|
||||
| enabled | True |
|
||||
| id | 513e73819e14460fb904163f41ef3759 |
|
||||
| interface | public |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | eb9fd245bdbc414695952e93f29fe3ac |
|
||||
| service_name | cinderv2 |
|
||||
| service_type | volumev2 |
|
||||
| url | http://controller:8776/v2/%(tenant_id)s |
|
||||
+--------------+-----------------------------------------+
|
||||
|
||||
$ openstack endpoint create --region RegionOne \
|
||||
volumev2 internal http://controller:8776/v2/%\(tenant_id\)s
|
||||
+--------------+-----------------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+-----------------------------------------+
|
||||
| enabled | True |
|
||||
| id | 6436a8a23d014cfdb69c586eff146a32 |
|
||||
| interface | internal |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | eb9fd245bdbc414695952e93f29fe3ac |
|
||||
| service_name | cinderv2 |
|
||||
| service_type | volumev2 |
|
||||
| url | http://controller:8776/v2/%(tenant_id)s |
|
||||
+--------------+-----------------------------------------+
|
||||
|
||||
$ openstack endpoint create --region RegionOne \
|
||||
volumev2 admin http://controller:8776/v2/%\(tenant_id\)s
|
||||
+--------------+-----------------------------------------+
|
||||
| Field | Value |
|
||||
+--------------+-----------------------------------------+
|
||||
| enabled | True |
|
||||
| id | e652cf84dd334f359ae9b045a2c91d96 |
|
||||
| interface | admin |
|
||||
| region | RegionOne |
|
||||
| region_id | RegionOne |
|
||||
| service_id | eb9fd245bdbc414695952e93f29fe3ac |
|
||||
| service_name | cinderv2 |
|
||||
| service_type | volumev2 |
|
||||
| url | http://controller:8776/v2/%(tenant_id)s |
|
||||
+--------------+-----------------------------------------+
|
||||
|
||||
.. note::
|
||||
|
||||
The Block Storage services requires endpoints for each service
|
||||
entity.
|
||||
|
||||
Install and configure components
|
||||
--------------------------------
|
||||
|
||||
#. Install OpenStack Block Storage Controller bundle::
|
||||
|
||||
# clr_bundle_add openstack-block-storage-controller
|
||||
|
||||
# swupd bundle-add openstack-block-storage-controller
|
||||
# swupd verify --fix
|
||||
|
||||
#. Custom configurations will be located at ``/etc/cinder``.
|
||||
|
||||
* Create ``/etc/cinder`` directory::
|
||||
|
||||
mkdir /etc/cinder
|
||||
|
||||
mkdir /etc/cinder
|
||||
|
||||
* Create empty cinder configuration file in
|
||||
``/etc/cinder/cinder.conf``::
|
||||
|
||||
touch /etc/cinder/cinder.conf
|
||||
touch /etc/cinder/cinder.conf
|
||||
|
||||
#. Edit the ``/etc/cinder/cinder.conf`` file and complete the following
|
||||
actions:
|
||||
@@ -172,104 +228,119 @@ Block Storage controller components:
|
||||
``CINDER_DBPASS`` with the password you chose for the
|
||||
database::
|
||||
|
||||
[database]
|
||||
...
|
||||
connection=mysql://cinder:CINDER_DBPASS@controller/cinder
|
||||
[database]
|
||||
...
|
||||
connection=mysql://cinder:CINDER_DBPASS@controller/cinder
|
||||
|
||||
* In the ``[DEFAULT]`` and ``[oslo_messaging_rabbit]`` section,
|
||||
configure RabbitMQ message queue access. Replace ``RABBIT_PASS``
|
||||
with the password you chose for the account in
|
||||
RabbitMQ::
|
||||
|
||||
[DEFAULT]
|
||||
...
|
||||
rpc_backend = rabbit
|
||||
...
|
||||
[oslo_messaging_rabbit]
|
||||
rabbit_host = controller
|
||||
rabbit_userid = openstack
|
||||
rabbit_password = RABBIT_PASS
|
||||
[DEFAULT]
|
||||
...
|
||||
rpc_backend = rabbit
|
||||
|
||||
[oslo_messaging_rabbit]
|
||||
...
|
||||
rabbit_host = controller
|
||||
rabbit_userid = openstack
|
||||
rabbit_password = RABBIT_PASS
|
||||
|
||||
* In the ``[DEFAULT]`` and ``[keystone_authtoken]`` sections,
|
||||
configure Identity service access. Replace ``CINDER_PASS`` with the
|
||||
password you chose for the cinder user in the Identity
|
||||
service::
|
||||
configure Identity service access:
|
||||
|
||||
[DEFAULT]
|
||||
...
|
||||
auth_strategy = keystone
|
||||
...
|
||||
[keystone_authtoken]
|
||||
auth_uri = http://controller:5000/v2.0
|
||||
admin_tenant_name = service
|
||||
admin_user = cinder
|
||||
admin_password = CINDER_PASS
|
||||
.. code-block:: ini
|
||||
|
||||
[DEFAULT]
|
||||
...
|
||||
auth_strategy = keystone
|
||||
|
||||
[keystone_authtoken]
|
||||
...
|
||||
auth_uri = http://controller:5000
|
||||
auth_url = http://controller:35357
|
||||
auth_plugin = password
|
||||
project_domain_id = default
|
||||
user_domain_id = default
|
||||
project_name = service
|
||||
username = cinder
|
||||
password = CINDER_PASS
|
||||
|
||||
Replace ``CINDER_PASS`` with the password you chose for
|
||||
the ``cinder`` user in the Identity service.
|
||||
|
||||
* In the ``[DEFAULT]`` section, configure the ``my_ip`` option to
|
||||
use the management interface IP address of the controller node::
|
||||
use the management interface IP address of the controller node:
|
||||
|
||||
[DEFAULT] ... my_ip = 10.0.0.11
|
||||
.. code-block:: ini
|
||||
|
||||
#. Let ``systemd`` set the correct permissions for files in ``/etc/cinder``::
|
||||
|
||||
# systemctl restart update-triggers.target
|
||||
[DEFAULT]
|
||||
...
|
||||
my_ip = 10.0.0.11
|
||||
|
||||
#. Populate the Block Storage database::
|
||||
|
||||
# su -s /bin/sh -c "cinder-manage db sync" cinder
|
||||
|
||||
Finalizing installation
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# su -s /bin/sh -c "cinder-manage db sync" cinder
|
||||
|
||||
To finalize installation, enable and start the Block Storage services::
|
||||
Configure Compute to use Block Storage
|
||||
--------------------------------------
|
||||
|
||||
# systemctl enable cinder-api cinder-scheduler
|
||||
# systemctl start cinder-api cinder-scheduler
|
||||
* Edit the ``/etc/nova/nova.conf`` file and add the following
|
||||
to it::
|
||||
|
||||
Installing and configuring a storage node
|
||||
----------------------------------------------
|
||||
[cinder]
|
||||
os_region_name = RegionOne
|
||||
|
||||
This section describes how to install and configure storage nodes for
|
||||
the Block Storage service. For simplicity, this configuration references
|
||||
one storage node with an empty local block storage device ``/dev/sdb``
|
||||
(for physical device) or ``/dev/vda`` (for virtual machine) that
|
||||
contains a suitable partition table with one partition ``/dev/sdb1``
|
||||
occupying the entire device. The service provisions logical volumes on
|
||||
this device using the LVM driver and provides them to instances via
|
||||
iSCSI transport. You can follow these instructions with minor
|
||||
modifications to horizontally scale your environment with additional
|
||||
storage nodes.
|
||||
Finalize installation
|
||||
---------------------
|
||||
|
||||
Install Block Storage volume components
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#. Restart the Compute API service::
|
||||
|
||||
Install the packages::
|
||||
# systemctl restart uwsgi@nova-api.service
|
||||
|
||||
# clr_bundle_add openstack-block-storage
|
||||
#. Start the Block Storage services and configure them to start when
|
||||
the system boots::
|
||||
|
||||
**Prerequisites:**
|
||||
# systemctl enable cinder-api cinder-scheduler
|
||||
# systemctl start cinder-api cinder-scheduler
|
||||
|
||||
You must configure the storage node before installing and configuring
|
||||
the volume service on it. Similar to the controller node, the storage
|
||||
node contains one network interface on the management network. The
|
||||
storage node also needs an empty block storage device of suitable size
|
||||
for your environment.
|
||||
Install and configure a storage node
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This section describes how to install and configure storage nodes
|
||||
for the Block Storage service. For simplicity, this configuration
|
||||
references one storage node with an empty local block storage device.
|
||||
The instructions use ``/dev/sdb``, but you can substitute a different
|
||||
value for your particular node.
|
||||
|
||||
The service provisions logical volumes on this device using the
|
||||
LVM driver and provides them to instances via iSCSI transport.
|
||||
You can follow these instructions with minor modifications to
|
||||
horizontally scale your environment with additional storage nodes.
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
#. Install the openstack block storage bundle::
|
||||
|
||||
# clr_bundle_add openstack-block-storage
|
||||
|
||||
#. Create the LVM physical volume: ``/dev/sdb1`` If your system uses a
|
||||
different device name, adjust these steps accordingly::
|
||||
|
||||
# pvcreate /dev/sdb1
|
||||
Physical volume "/dev/sdb1" successfully created
|
||||
# pvcreate /dev/sdb1
|
||||
Physical volume "/dev/sdb1" successfully created
|
||||
|
||||
#. Create the LVM volume group ``cinder-volumes``::
|
||||
|
||||
# vgcreate cinder-volumes /dev/sdb1
|
||||
Volume group "cinder-volumes" successfully created
|
||||
|
||||
# vgcreate cinder-volumes /dev/sdb1
|
||||
Volume group "cinder-volumes" successfully created
|
||||
|
||||
The Block Storage service creates logical volumes in this volume
|
||||
group.
|
||||
|
||||
Only instances can access Block Storage volumes. However, the
|
||||
#. Only instances can access Block Storage volumes. However, the
|
||||
underlying operating system manages the devices associated with the
|
||||
volumes. By default, the LVM volume scanning tool scans the ``/dev``
|
||||
directory for block storage devices that contain volumes. If projects
|
||||
@@ -277,19 +348,18 @@ for your environment.
|
||||
attempts to cache them which can cause a variety of problems with
|
||||
both the underlying operating system and project volumes. You must
|
||||
reconfigure LVM to scan only the devices that contain the
|
||||
``cinder-volume`` volume group.
|
||||
|
||||
#. Edit the ``/etc/lvm/lvm.conf`` file
|
||||
``cinder-volume`` volume group. Edit the ``/etc/lvm/lvm.conf`` file
|
||||
and complete the following action:
|
||||
|
||||
* In the ``devices`` section, add a filter that accepts the
|
||||
``/dev/sdb`` device and rejects all other devices::
|
||||
|
||||
devices {
|
||||
filter = [ "a/sdb/", "r/.*/"]
|
||||
}
|
||||
devices {
|
||||
filter = [ "a/sdb/", "r/.*/"]
|
||||
}
|
||||
|
||||
**Configure Block Storage volume components:**
|
||||
Install and configure components
|
||||
--------------------------------
|
||||
|
||||
#. Edit the ``/etc/cinder/cinder.conf`` file and complete the following
|
||||
actions:
|
||||
@@ -298,93 +368,117 @@ for your environment.
|
||||
``CINDER_DBPASS`` with the password you chose for the Block Storage
|
||||
database::
|
||||
|
||||
[database]
|
||||
...
|
||||
[database]
|
||||
...
|
||||
connection = mysql://cinder:CINDER_DBPASS@controller/cinder
|
||||
|
||||
* In the ``[DEFAULT]`` and ``[oslo_messaging_rabbit]`` sections,
|
||||
configure *RabbitMQ* message queue access. Replace ``RABBIT_PASS``
|
||||
configure ``RabbitMQ`` message queue access. Replace ``RABBIT_PASS``
|
||||
with the password you chose for the openstack account in
|
||||
*RabbitMQ*::
|
||||
``RabbitMQ``::
|
||||
|
||||
[DEFAULT]
|
||||
...
|
||||
rpc_backend = rabbit
|
||||
[oslo_messaging_rabbit]
|
||||
...
|
||||
rabbit_host = controller
|
||||
rabbit_userid = openstack
|
||||
rabbit_password = RABBIT_PASS
|
||||
[DEFAULT]
|
||||
...
|
||||
rpc_backend = rabbit
|
||||
|
||||
[oslo_messaging_rabbit]
|
||||
...
|
||||
rabbit_host = controller
|
||||
rabbit_userid = openstack
|
||||
rabbit_password = RABBIT_PASS
|
||||
|
||||
* In the ``[DEFAULT]`` and ``[keystone_authtoken]`` sections,
|
||||
configure Identity service access. Replace ``CINDER_PASS`` with the
|
||||
password you chose for the cinder user in the Identity service::
|
||||
|
||||
[DEFAULT]
|
||||
...
|
||||
auth_strategy = keystone
|
||||
[keystone_authtoken]
|
||||
...
|
||||
auth_uri = http://controller:5000
|
||||
identity_uri = http://controller:35357
|
||||
admin_tenant_name = service
|
||||
admin_user = cinder
|
||||
admin_password = CINDER_PASS
|
||||
[DEFAULT]
|
||||
...
|
||||
auth_strategy = keystone
|
||||
|
||||
[keystone_authtoken]
|
||||
...
|
||||
auth_uri = http://controller:5000
|
||||
auth_url = http://controller:35357
|
||||
auth_plugin = password
|
||||
project_domain_id = default
|
||||
user_domain_id = default
|
||||
project_name = service
|
||||
username = cinder
|
||||
password = CINDER_PASS
|
||||
|
||||
* In the ``[DEFAULT]`` section, configure the ``my_ip`` option.
|
||||
Replace *MANAGEMENT_INTERFACE_IP_ADDRESS* with the IP address
|
||||
Replace ``MANAGEMENT_INTERFACE_IP_ADDRESS`` with the IP address
|
||||
of the management network interface on your storage node,
|
||||
typically 10.0.0.41 for the first node in the example
|
||||
architecture::
|
||||
|
||||
[DEFAULT]
|
||||
...
|
||||
my_ip = MANAGEMENT_INTERFACE_IP_ADDRESS
|
||||
[DEFAULT]
|
||||
...
|
||||
my_ip = MANAGEMENT_INTERFACE_IP_ADDRESS
|
||||
|
||||
* In the ``[lvm]`` section, configure the LVM back end with the LVM
|
||||
driver, ``cinder-volumes`` volume group, iSCSI protocol, and
|
||||
appropriate iSCSI service::
|
||||
|
||||
[lvm]
|
||||
...
|
||||
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
|
||||
volume_group = cinder-volumes
|
||||
iscsi_protocol = iscsi
|
||||
iscsi_helper = tgtadm
|
||||
[lvm]
|
||||
...
|
||||
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
|
||||
volume_group = cinder-volumes
|
||||
iscsi_protocol = iscsi
|
||||
iscsi_helper = tgtadm
|
||||
|
||||
* In the ``[DEFAULT]`` section, enable the LVM back end::
|
||||
|
||||
[DEFAULT]
|
||||
...
|
||||
enabled_backends = lvm
|
||||
|
||||
[DEFAULT]
|
||||
...
|
||||
enabled_backends = lvm
|
||||
|
||||
* In the ``[DEFAULT]`` section, configure the location of the Image
|
||||
service::
|
||||
|
||||
[DEFAULT]
|
||||
...
|
||||
glance_host = controller
|
||||
[DEFAULT]
|
||||
...
|
||||
glance_host = controller
|
||||
|
||||
#. Let systemd set the correct permissions for files in ``/etc/cinder``::
|
||||
|
||||
# systemctl restart update-triggers.target
|
||||
|
||||
Finalizing installation
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# systemctl restart update-triggers.target
|
||||
|
||||
Restart the Block Storage volume service including its dependencies::
|
||||
Finalize installation
|
||||
---------------------
|
||||
|
||||
# systemctl enable iscsid tgtd cinder-volume
|
||||
# systemctl start iscsid tgtd cinder-volume
|
||||
#. Start the Block Storage volume service including its dependencies
|
||||
and configure them to start when the system boots::
|
||||
|
||||
# systemctl enable iscsid tgtd cinder-volume
|
||||
# systemctl start iscsid tgtd cinder-volume
|
||||
|
||||
Configuring a compute node to use Block Storage
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
-----------------------------------------------
|
||||
|
||||
Perform the following steps to enable a compute node to work with block
|
||||
storage::
|
||||
#. Perform the following steps to enable a compute node to work with
|
||||
block storage::
|
||||
|
||||
# systemctl enable iscsid
|
||||
# systemctl start iscsi-gen-initiatorname
|
||||
# systemctl start iscsid
|
||||
# systemctl enable iscsid
|
||||
# systemctl start iscsi-gen-initiatorname iscsid
|
||||
|
||||
Verify operation
|
||||
~~~~~~~~~~~~~~~~
|
||||
Verify operation of the Block Storage service.
|
||||
|
||||
#. Source the ``admin`` credentials to gain access to
|
||||
admin-only CLI commands::
|
||||
|
||||
$ source admin-openrc.sh
|
||||
|
||||
#. List service components to verify successful launch of each process::
|
||||
|
||||
$ cinder service-list
|
||||
+------------------+------------+------+---------+-------+----------------------------+-----------------+
|
||||
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
|
||||
+------------------+------------+------+---------+-------+----------------------------+-----------------+
|
||||
| cinder-scheduler | controller | nova | enabled | up | 2014-10-18T01:30:54.000000 | None |
|
||||
| cinder-volume | block1@lvm | nova | enabled | up | 2014-10-18T01:30:57.000000 | None |
|
||||
+------------------+------------+------+---------+-------+----------------------------+-----------------+
|
||||
|
||||
Next topic: :ref:`openstack_dashboard`.
|
||||
@@ -1,3 +1,5 @@
|
||||
.. _openstack_bundle_and_service_summary:
|
||||
|
||||
OpenStack* bundle and service summary
|
||||
############################################################
|
||||
|
||||
@@ -45,3 +47,5 @@ uses two-node architecture with legacy networking (Nova-network).
|
||||
with layer-3 (routing) services that enable self-service networks
|
||||
using overlay segmentation methods. Additionally, this option provides
|
||||
the foundation for advanced services such as LBaaS and FWaaS.
|
||||
|
||||
Next topic: :ref:`openstack_sys_req_and_pw_summary`.
|
||||
@@ -1,3 +1,5 @@
|
||||
.. _openstack_compute:
|
||||
|
||||
OpenStack* Compute
|
||||
##################
|
||||
|
||||
@@ -50,10 +52,11 @@ create a database, service credentials, and API endpoints.
|
||||
|
||||
#. To create the service credentials, complete these steps:
|
||||
|
||||
* Create the ``nova`` user. Replace ``NOVA_PASS`` with a suitable
|
||||
password::
|
||||
* Create the ``nova`` user::
|
||||
|
||||
$ openstack user create --domain default --password NOVA_PASS nova
|
||||
$ openstack user create --domain default --password-prompt nova
|
||||
User Password:
|
||||
Repeat User Password:
|
||||
+-----------+----------------------------------+
|
||||
| Field | Value |
|
||||
+-----------+----------------------------------+
|
||||
@@ -138,7 +141,8 @@ To install and configure the Compute controller components:
|
||||
|
||||
#. Install OpenStack Compute Controller bundle::
|
||||
|
||||
# clr_bundle_add openstack-compute-controller
|
||||
# swupd bundle-add openstack-compute-controller
|
||||
# swupd verify --fix
|
||||
|
||||
#. Custom configurations will be located at ``/etc/nova``.
|
||||
|
||||
@@ -225,7 +229,7 @@ To install and configure the Compute controller components:
|
||||
...
|
||||
host = controller
|
||||
|
||||
#. Let systemd set the correct permissions for files in ``/etc/nova``::
|
||||
#. Ensure files have proper ownership by running the following command::
|
||||
|
||||
# systemctl restart update-triggers.target
|
||||
|
||||
@@ -238,17 +242,27 @@ Finalizing Compute installation
|
||||
|
||||
Complete the following steps to finalize Compute installation:
|
||||
|
||||
#. Create the ``/etc/nginx`` directory if doesn't exists and setup nova-api
|
||||
and nova-metadata to start with the Nginx http server::
|
||||
|
||||
# mkdir -p /etc/nginx
|
||||
# ln -s /usr/share/nginx/conf.d/nova-api.template /etc/nginx/nova-api.conf
|
||||
|
||||
#. Restart the Nginx server to reload new configurations::
|
||||
|
||||
# systemctl restart nginx
|
||||
|
||||
#. Start the Compute Service services and configure them to start
|
||||
when the system boots::
|
||||
|
||||
# systemctl enable uwsgi@nova-api.socket \
|
||||
nova-cert.service nova-consoleauth.service \
|
||||
nova-scheduler.service nova-conductor.service \
|
||||
nova-novncproxy.service
|
||||
uwsgi@nova-metadata.socket nova-cert.service \
|
||||
nova-consoleauth.service nova-scheduler.service \
|
||||
nova-conductor.service nova-novncproxy.service
|
||||
# systemctl start uwsgi@nova-api.socket \
|
||||
nova-cert.service nova-consoleauth.service \
|
||||
nova-scheduler.service nova-conductor.service \
|
||||
nova-novncproxy.service
|
||||
uwsgi@nova-metadata.socket nova-cert.service \
|
||||
nova-consoleauth.service nova-scheduler.service \
|
||||
nova-conductor.service nova-novncproxy.service
|
||||
|
||||
Install and configure a compute note
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -374,6 +388,10 @@ Finalize compute node installation
|
||||
...
|
||||
virt_type = qemu
|
||||
|
||||
#. Ensure files have proper ownership by running the following command::
|
||||
|
||||
# systemctl restart update-triggers.target
|
||||
|
||||
#. Start the Compute service including its dependencies and configure
|
||||
them to start automatically when the system boots::
|
||||
|
||||
@@ -506,3 +524,5 @@ Verify operation of the Compute service.
|
||||
+--------------------------------------+--------+--------+--------+
|
||||
| 38047887-61a7-41ea-9b49-27987d5e8bb9 | cirros | ACTIVE | |
|
||||
+--------------------------------------+--------+--------+--------+
|
||||
|
||||
Next topic: :ref:`openstack_block_storage`.
|
||||
@@ -1,29 +1,33 @@
|
||||
.. _openstack_dashboard:
|
||||
|
||||
OpenStack* Dashboard
|
||||
############################################################
|
||||
####################
|
||||
|
||||
The OpenStack Dashboard, also known as Horizon, is a web-based interface
|
||||
for cloud administrators to manage various OpenStack resources and
|
||||
services. This dashboard enables interaction with the OpenStack Compute
|
||||
cloud controller via OpenStack APIs.
|
||||
for cloud administrators and users to manage various OpenStack resources
|
||||
and services.
|
||||
|
||||
The Dashboard enables web-based interactions with the
|
||||
OpenStack Compute cloud controller through the OpenStack APIs.
|
||||
|
||||
Installation and configuration
|
||||
------------------------------
|
||||
|
||||
Please note that the dashboard relies on functional core services in
|
||||
`OpenStack MVP <openstack_installing_bundles.html>`__,
|
||||
including identity, image service, compute, and either networking
|
||||
(``neutron``) or legacy networking (``nova-network``).
|
||||
|
||||
Environments with stand-alone services, such as Object Storage, cannot
|
||||
use the dashboard.
|
||||
The dashboard relies on functional core services including
|
||||
Identity, Image service, Compute, and either Networking (neutron)
|
||||
or legacy networking (nova-network). Environments with
|
||||
stand-alone services such as Object Storage cannot use the
|
||||
dashboard.
|
||||
|
||||
To get started with OpenStack Dashboard services:
|
||||
|
||||
#. Install the OpenStack Dashboard bundle::
|
||||
|
||||
# clr_bundle_add openstack-dashboard
|
||||
# clr_bundle_add openstack-dashboard
|
||||
|
||||
#. Enable and start the memcached service and the httpd server::
|
||||
#. Enable and start the dashboard socket and the Nginx server::
|
||||
|
||||
# systemctl enable httpd memcached
|
||||
# systemctl restart httpd memcached
|
||||
# systemctl enable nginx uwsgi@horizon.socket
|
||||
# systemctl restart nginx uwsgi@horizon.socket
|
||||
|
||||
Next topic: :ref:`openstack_networking`.
|
||||
@@ -1,3 +1,5 @@
|
||||
.. _openstack_identity-openrc:
|
||||
|
||||
Create OpenStack* client environment scripts
|
||||
############################################
|
||||
|
||||
@@ -17,7 +19,7 @@ Create client environment scripts for the ``admin`` and ``demo``
|
||||
projects and users. Future portions of this guide reference these
|
||||
scripts to load appropriate credentials for client operations.
|
||||
|
||||
#. Edit the ``admin-openrc.sh`` file and add the following content::
|
||||
#. Create the ``admin-openrc.sh`` file and add the following content::
|
||||
|
||||
export OS_PROJECT_DOMAIN_ID=default
|
||||
export OS_USER_DOMAIN_ID=default
|
||||
@@ -31,7 +33,7 @@ scripts to load appropriate credentials for client operations.
|
||||
Replace ``ADMIN_PASS`` with the password you chose
|
||||
for the ``admin`` user in the Identity service.
|
||||
|
||||
#. Edit the ``demo-openrc.sh`` file and add the following content::
|
||||
#. Create the ``demo-openrc.sh`` file and add the following content::
|
||||
|
||||
export OS_PROJECT_DOMAIN_ID=default
|
||||
export OS_USER_DOMAIN_ID=default
|
||||
@@ -70,3 +72,4 @@ For example:
|
||||
| user_id | 4d411f2291f34941b30eef9bd797505a |
|
||||
+------------+----------------------------------+
|
||||
|
||||
Next topic: :ref:`openstack_image`.
|
||||
@@ -1,38 +1,13 @@
|
||||
.. _openstack_identity:
|
||||
|
||||
OpenStack* Identity
|
||||
###################
|
||||
|
||||
The OpenStack Identity service provides a single point of
|
||||
integration for managing authentication, authorization, and service catalog
|
||||
services. Other OpenStack services use the Identity service as a common
|
||||
unified API. Additionally, services that provide information about users
|
||||
but that are not included in OpenStack (such as LDAP services) can be
|
||||
integrated into a pre-existing infrastructure.
|
||||
|
||||
In order to benefit from the Identity service, other OpenStack services need to
|
||||
collaborate with it. When an OpenStack service receives a request from a user,
|
||||
it checks with the Identity service whether the user is authorized to make the
|
||||
request.
|
||||
|
||||
The Identity service contains these components:
|
||||
|
||||
**Server**
|
||||
A centralized server provides authentication and authorization
|
||||
services using a RESTful interface.
|
||||
|
||||
**Drivers**
|
||||
Drivers or a service back end are integrated to the centralized
|
||||
server. They are used for accessing identity information in
|
||||
repositories external to OpenStack, and may already exist in
|
||||
the infrastructure where OpenStack is deployed (for example, SQL
|
||||
databases or LDAP servers).
|
||||
|
||||
**Modules**
|
||||
Middleware modules run in the address space of the OpenStack
|
||||
component that is using the Identity service. These modules
|
||||
intercept service requests, extract user credentials, and send them
|
||||
to the centralized server for authorization. The integration between
|
||||
the middleware modules and OpenStack components uses the Python* Web
|
||||
Server Gateway Interface.
|
||||
The OpenStack Identity service provides a single point of integration for
|
||||
managing authentication, authorization, and service catalog services.
|
||||
Additionally, it provides information about users but that are not included in
|
||||
OpenStack (such as LDAP services) can be integrated into a pre-existing
|
||||
infrastructure.
|
||||
|
||||
When installing OpenStack Identity service, you must register each
|
||||
service in your OpenStack installation. Identity service can then track
|
||||
@@ -56,22 +31,22 @@ database and an administration token.
|
||||
#. To create the database, complete the following actions:
|
||||
|
||||
* Use the database access client to connect to the database server as the
|
||||
``root`` user::
|
||||
``root`` user.::
|
||||
|
||||
$ mysql -u root -p
|
||||
|
||||
* Create the ``keystone`` database::
|
||||
* Create the ``keystone`` database.::
|
||||
|
||||
CREATE DATABASE keystone;
|
||||
|
||||
* Grant proper access to the ``keystone`` database::
|
||||
* Grant proper access to the ``keystone`` databaseReplace ``KEYSTONE_DBPASS``
|
||||
with a suitable password.::
|
||||
|
||||
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' \
|
||||
IDENTIFIED BY 'KEYSTONE_DBPASS';
|
||||
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' \
|
||||
IDENTIFIED BY 'KEYSTONE_DBPASS';
|
||||
|
||||
Replace ``KEYSTONE_DBPASS`` with a suitable password.
|
||||
|
||||
* Exit the database access client.
|
||||
|
||||
@@ -83,17 +58,18 @@ database and an administration token.
|
||||
Install and configure components
|
||||
--------------------------------
|
||||
|
||||
#. Run the following command to install the packages::
|
||||
#. Run the following command to install the packages.::
|
||||
|
||||
# clr_bundle_add openstack-identity
|
||||
# swupd bundle-add openstack-identity
|
||||
# swupd verify --fix
|
||||
|
||||
#. Custom configurations will be located at ``/etc/keystone/``.
|
||||
|
||||
* Create the ``/etc/keystone`` directory::
|
||||
* Create the ``/etc/keystone`` directory.::
|
||||
|
||||
# mkdir /etc/keystone
|
||||
|
||||
* Create empty keystone configuration file ``/etc/keystone/keystone.conf``::
|
||||
* Create keystone configuration file ``/etc/keystone/keystone.conf``.::
|
||||
|
||||
# touch /etc/keystone/keystone.conf
|
||||
|
||||
@@ -101,24 +77,22 @@ Install and configure components
|
||||
actions:
|
||||
|
||||
* In the ``[DEFAULT]`` section, define the value of the initial
|
||||
administration token::
|
||||
administration token. Replace ``ADMIN_TOKEN`` with the random value that
|
||||
you generated in a previous step.::
|
||||
|
||||
[DEFAULT]
|
||||
...
|
||||
admin_token = ADMIN_TOKEN
|
||||
|
||||
Replace ``ADMIN_TOKEN`` with the random value that you generated in a
|
||||
previous step.
|
||||
|
||||
* In the ``[database]`` section, configure database access::
|
||||
* In the ``[database]`` section, configure database access. Replace
|
||||
``KEYSTONE_DBPASS`` with the password you chose for the database.::
|
||||
|
||||
[database]
|
||||
...
|
||||
connection = mysql://keystone:KEYSTONE_DBPASS@controller/keystone
|
||||
|
||||
Replace ``KEYSTONE_DBPASS`` with the password you chose for the database.
|
||||
|
||||
#. Enter the following command::
|
||||
#. Ensure files have proper ownership by running the following command::
|
||||
|
||||
# systemctl restart update-triggers.target
|
||||
|
||||
@@ -130,7 +104,7 @@ Finalize the installation
|
||||
-------------------------
|
||||
|
||||
#. Keystone is deployed as a uwsgi module. To start the Identity
|
||||
service, you should enable and start the nginx service::
|
||||
service, you should enable and start the nginx service.::
|
||||
|
||||
# systemctl enable nginx uwsgi@keystone-admin.socket \
|
||||
uwsgi@keystone-public.socket
|
||||
@@ -165,7 +139,7 @@ environment variables to reduce command length.
|
||||
|
||||
$ export OS_TOKEN=294a4c8a8a475f9b9836
|
||||
|
||||
#. Configure the endpoint::
|
||||
#. Configure the endpoint URL::
|
||||
|
||||
$ export OS_URL=http://controller:35357/v3
|
||||
|
||||
@@ -175,16 +149,19 @@ environment variables to reduce command length.
|
||||
|
||||
#. Install the OpenStack Python clients bundle::
|
||||
|
||||
# clr_bundle_add openstack-python-clients
|
||||
# swupd bundle-add openstack-python-clients
|
||||
# swupd verify --fix
|
||||
|
||||
|
||||
Create the service entity and API endpoints
|
||||
-------------------------------------------
|
||||
|
||||
The Identity service manages a catalog of services in your OpenStack
|
||||
environment. Services use this catalog to determine the other services
|
||||
available in your environment.
|
||||
|
||||
#. Create the service entity for the Identity service::
|
||||
#. The Identity service manages a catalog of services in your OpenStack
|
||||
environment. Services use this catalog to determine the other services
|
||||
available in your environment.
|
||||
|
||||
Create the service entity for the Identity service::
|
||||
|
||||
$ openstack service create \
|
||||
--name keystone --description "OpenStack Identity" identity
|
||||
@@ -198,7 +175,7 @@ available in your environment.
|
||||
| type | identity |
|
||||
+-------------+----------------------------------+
|
||||
|
||||
The Identity service manages a catalog of API endpoints associated with
|
||||
#. The Identity service manages a catalog of API endpoints associated with
|
||||
the services in your OpenStack environment. Services use this catalog to
|
||||
determine how to communicate with other services in your environment.
|
||||
|
||||
@@ -216,7 +193,7 @@ available in your environment.
|
||||
management network for all endpoint variations and the default
|
||||
``RegionOne`` region.
|
||||
|
||||
#. Create the Identity service API endpoints::
|
||||
Create the Identity service API endpoints::
|
||||
|
||||
$ openstack endpoint create --region RegionOne \
|
||||
identity public http://controller:5000/v3
|
||||
@@ -290,11 +267,12 @@ Complete the following steps to create projects, users and roles:
|
||||
| parent_id | None |
|
||||
+-------------+----------------------------------+
|
||||
|
||||
* Create the ``admin`` user. Replace ``ADMIN_PASS`` with a suitable
|
||||
password and ``EMAIL_ADDRESS`` with a suitable e-mail address::
|
||||
* Create the ``admin`` user::
|
||||
|
||||
$ openstack user create --domain default \
|
||||
--password ADMIN_PASS --email EMAIL_ADDRESS admin
|
||||
--password-prompt admin
|
||||
User Password:
|
||||
Repeat User Password:
|
||||
+-----------+----------------------------------+
|
||||
| Field | Value |
|
||||
+-----------+----------------------------------+
|
||||
@@ -356,12 +334,12 @@ Complete the following steps to create projects, users and roles:
|
||||
| parent_id | None |
|
||||
+-------------+----------------------------------+
|
||||
|
||||
* Create the ``demo`` user. Replace ``DEMO_PASS``
|
||||
with a suitable password and ``EMAIL_ADDRESS`` with a suitable
|
||||
e-mail address::
|
||||
* Create the ``demo`` user::
|
||||
|
||||
$ openstack user create --domain default \
|
||||
--password DEMO_PASS --email EMAIL_ADDRESS demo
|
||||
--password-prompt demo
|
||||
User Password:
|
||||
Repeat User Password:
|
||||
+-----------+----------------------------------+
|
||||
| Field | Value |
|
||||
+-----------+----------------------------------+
|
||||
@@ -392,11 +370,15 @@ Verify operation
|
||||
Verify operation of the Identity service before installing other
|
||||
services.
|
||||
|
||||
#. For security reasons, remove the admin_token value in
|
||||
#. For security reasons, remove admin_token from
|
||||
``/etc/keystone/keystone.conf``:
|
||||
|
||||
Edit the ``[DEFAULT]`` section and remove ``admin_token``.
|
||||
|
||||
#. Restart the keystone-admin service to reload the changes::
|
||||
|
||||
# systemctl restart uwsgi@keystone-admin.service
|
||||
|
||||
#. Unset the temporary ``OS_TOKEN`` and ``OS_URL`` environment variables::
|
||||
|
||||
$ unset OS_TOKEN OS_URL
|
||||
@@ -432,3 +414,5 @@ services.
|
||||
| project_id | 4aa51bb942be4dd0ac0555d7591f80a6 |
|
||||
| user_id | 7004dfa0dda84d63aef81cf7f100af01 |
|
||||
+------------+----------------------------------+
|
||||
|
||||
Next topic: :ref:`openstack_identity-openrc`.
|
||||
+85
-114
@@ -1,44 +1,29 @@
|
||||
.. _openstack_image:
|
||||
|
||||
OpenStack* Image
|
||||
################
|
||||
|
||||
The OpenStack Image service (glance) enables users to discover,
|
||||
register, and retrieve virtual machine images. It offers a
|
||||
`REST` API that enables you to query virtual
|
||||
machine image metadata and retrieve an actual image.
|
||||
You can store virtual machine images made available through
|
||||
the Image service in a variety of locations, from simple file
|
||||
systems to object-storage systems like OpenStack Object Storage.
|
||||
|
||||
**Important:** For simplicity, this guide describes configuring the Image service to
|
||||
use the ``file`` back end, which uploads and stores in a
|
||||
directory on the controller node hosting the Image service. By
|
||||
default, this directory is ``/var/lib/glance/images/``.
|
||||
|
||||
Before you proceed, ensure that the controller node has at least
|
||||
several gigabytes of space available in this directory.
|
||||
|
||||
For information on requirements for other back ends, see
|
||||
`Configuration Reference <http://docs.openstack.org/liberty/
|
||||
config-reference/content/
|
||||
ch_configuring-openstack-image-service.html>`_.
|
||||
The OpenStack Image service (glance) enables users to discover, register, and
|
||||
retrieve virtual machine images.
|
||||
|
||||
Install and configure the Image Service
|
||||
---------------------------------------
|
||||
|
||||
This section describes how to install and configure the Image service,
|
||||
code-named glance, on the controller node. For simplicity, this
|
||||
configuration stores images on the local file system.
|
||||
code-named glance, on the controller node. For simplicity, this configuration
|
||||
stores images on the local file system. By default, this directory is
|
||||
``/var/lib/glance/images/``.
|
||||
|
||||
Prerequisites
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Before you install and configure the Image service, you must
|
||||
create a database, service credentials, and API endpoints.
|
||||
Before you install and configure the Image 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::
|
||||
server as the ``root`` user.::
|
||||
|
||||
$ mysql -u root -p
|
||||
|
||||
@@ -46,27 +31,27 @@ create a database, service credentials, and API endpoints.
|
||||
|
||||
CREATE DATABASE glance;
|
||||
|
||||
* Grant proper access to the ``glance`` database::
|
||||
* Grant proper access to the ``glance`` database. Replace ``GLANCE_DBPASS``
|
||||
with a suitable password.::
|
||||
|
||||
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' \
|
||||
IDENTIFIED BY 'GLANCE_DBPASS';
|
||||
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' \
|
||||
IDENTIFIED BY 'GLANCE_DBPASS';
|
||||
|
||||
Replace ``GLANCE_DBPASS`` with a suitable password.
|
||||
|
||||
* Exit the database access client.
|
||||
|
||||
#. Source the ``admin`` credentials to gain access to
|
||||
admin-only CLI commands::
|
||||
#. Source the ``admin`` credentials to gain access to admin-only CLI commands.::
|
||||
|
||||
$ source admin-openrc.sh
|
||||
|
||||
$ source admin-openrc.sh
|
||||
#. To create the service credentials, complete these steps:
|
||||
|
||||
* Create the ``glance`` user. Replace ``GLANCE_PASS`` with a suitable
|
||||
password::
|
||||
* Create the ``glance`` user::
|
||||
|
||||
$ openstack user create --domain default --password GLANCE_PASS glance
|
||||
$ openstack user create --domain default --password-prompt glance
|
||||
User Password:
|
||||
Repeat User Password:
|
||||
+-----------+----------------------------------+
|
||||
| Field | Value |
|
||||
+-----------+----------------------------------+
|
||||
@@ -76,12 +61,11 @@ create a database, service credentials, and API endpoints.
|
||||
| name | glance |
|
||||
+-----------+----------------------------------+
|
||||
|
||||
* Add the ``admin`` role to the ``glance`` user and
|
||||
``service`` project::
|
||||
* Add the ``admin`` role to the ``glance`` user and ``service`` project.::
|
||||
|
||||
$ openstack role add --project service --user glance admin
|
||||
|
||||
* Create the ``glance`` service entity::
|
||||
* Create the ``glance`` service entity.::
|
||||
|
||||
$ openstack service create --name glance \
|
||||
--description "OpenStack Image service" image
|
||||
@@ -95,7 +79,7 @@ create a database, service credentials, and API endpoints.
|
||||
| type | image |
|
||||
+-------------+----------------------------------+
|
||||
|
||||
#. Create the Image service API endpoints::
|
||||
#. Create the Image service API endpoints.::
|
||||
|
||||
$ openstack endpoint create --region RegionOne \
|
||||
image public http://controller:9292
|
||||
@@ -148,35 +132,36 @@ create a database, service credentials, and API endpoints.
|
||||
Install and configure components
|
||||
--------------------------------
|
||||
|
||||
#. Install OpenStack Image bundle::
|
||||
#. Install OpenStack Image bundle.::
|
||||
|
||||
# clr_bundle_add openstack-image
|
||||
# swupd bundle-add openstack-image
|
||||
# swupd verify --fix
|
||||
|
||||
#. configurations will be located at ``/etc/glance``.
|
||||
#. Configurations will be located at ``/etc/glance``.
|
||||
|
||||
* Create ``/etc/glance`` directory::
|
||||
* Create ``/etc/glance`` directory.::
|
||||
|
||||
# mkdir /etc/glance
|
||||
|
||||
* Create empty configuration files ``/etc/glance/glance-api.conf``
|
||||
and ``/etc/glance/glance-registry.conf``::
|
||||
* Create ``/etc/glance/glance-api.conf`` and
|
||||
``/etc/glance/glance-registry.conf`` configuration files.::
|
||||
|
||||
# touch /etc/glance/glance-{api,registry}.conf
|
||||
|
||||
#. Edit the ``/etc/glance/glance-api.conf`` file and complete
|
||||
the following actions:
|
||||
#. Edit the ``/etc/glance/glance-api.conf`` file and complete the following
|
||||
actions:
|
||||
|
||||
* In the ``[database]`` section, configure database access::
|
||||
* In the ``[database]`` section, configure database access. Replace
|
||||
``GLANCE_DBPASS`` with the password you chose for the Image service
|
||||
database.::
|
||||
|
||||
[database]
|
||||
...
|
||||
connection = mysql://glance:GLANCE_DBPASS@controller/glance
|
||||
|
||||
Replace ``GLANCE_DBPASS`` with the password you chose for the
|
||||
Image service database.
|
||||
|
||||
* In the ``[keystone_authtoken]`` section, configure Identity
|
||||
service access::
|
||||
* In the ``[keystone_authtoken]`` section, configure Identity service access.
|
||||
Replace ``GLANCE_PASS`` with the password you chose for the ``glance`` user
|
||||
in the Identity service.::
|
||||
|
||||
[keystone_authtoken]
|
||||
...
|
||||
@@ -189,23 +174,20 @@ Install and configure components
|
||||
username = glance
|
||||
password = GLANCE_PASS
|
||||
|
||||
Replace ``GLANCE_PASS`` with the password you chose for the
|
||||
``glance`` user in the Identity service.
|
||||
#. Edit the ``/etc/glance/glance-registry.conf`` file and complete the following
|
||||
actions:
|
||||
|
||||
#. Edit the ``/etc/glance/glance-registry.conf`` file and
|
||||
complete the following actions:
|
||||
|
||||
* In the ``[database]`` section, configure database access::
|
||||
* In the ``[database]`` section, configure database access. Replace
|
||||
``GLANCE_DBPASS`` with the password you chose for the Image service
|
||||
database.::
|
||||
|
||||
[database]
|
||||
...
|
||||
connection = mysql://glance:GLANCE_DBPASS@controller/glance
|
||||
|
||||
Replace ``GLANCE_DBPASS`` with the password you chose for the
|
||||
Image service database.
|
||||
|
||||
* In the ``[keystone_authtoken]`` section, configure Identity
|
||||
service access::
|
||||
* In the ``[keystone_authtoken]`` section, configure Identity service
|
||||
access. Replace ``GLANCE_PASS`` with the password you chose for the
|
||||
``glance`` user in the Identity service.::
|
||||
|
||||
[keystone_authtoken]
|
||||
...
|
||||
@@ -218,10 +200,7 @@ Install and configure components
|
||||
username = glance
|
||||
password = GLANCE_PASS
|
||||
|
||||
Replace ``GLANCE_PASS`` with the password you chose for the
|
||||
``glance`` user in the Identity service.
|
||||
|
||||
#. Let systemd set the correct permissions for files in ``/etc/glance``::
|
||||
#. Ensure files have proper ownership by running the following command::
|
||||
|
||||
# systemctl restart update-triggers.target
|
||||
|
||||
@@ -239,69 +218,61 @@ Finalize installation
|
||||
# systemctl start glance-api.service glance-registry.service
|
||||
|
||||
Verify operation
|
||||
----------------
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
Verify operation of the Image service using
|
||||
`CirrOS <http://launchpad.net/cirros>`__, a small
|
||||
Linux image that helps you test your OpenStack deployment.
|
||||
|
||||
For more information about how to download and build images, see
|
||||
`OpenStack Virtual Machine Image Guide
|
||||
<http://docs.openstack.org/image-guide/content/index.html>`__.
|
||||
For information about how to manage images, see the
|
||||
`OpenStack User Guide
|
||||
<http://docs.openstack.org/user-guide/common/cli_manage_images.html>`__.
|
||||
|
||||
#. In each client environment script, configure the Image service
|
||||
client to use API version 2.0::
|
||||
|
||||
$ echo "export OS_IMAGE_API_VERSION=2" \
|
||||
| tee -a admin-openrc.sh demo-openrc.sh
|
||||
$ echo "export OS_IMAGE_API_VERSION=2" \
|
||||
| tee -a admin-openrc.sh demo-openrc.sh
|
||||
|
||||
#. Source the ``admin`` credentials to gain access to
|
||||
admin-only CLI commands::
|
||||
#. Source the ``admin`` credentials to gain access to admin-only CLI commands::
|
||||
|
||||
$ source admin-openrc.sh
|
||||
$ source admin-openrc.sh
|
||||
|
||||
#. Download the source image::
|
||||
|
||||
$ curl -Ok http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
|
||||
$ curl -Ok http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
|
||||
|
||||
#. Upload the image to the Image service using the
|
||||
`QCOW2` disk format, `bare` container format, and
|
||||
public visibility so all projects can access it::
|
||||
#. Upload the image to the Image service using the `QCOW2` disk format, `bare`
|
||||
container format, and public visibility so all projects can access it::
|
||||
|
||||
$ openstack image create cirros --file cirros-0.3.4-x86_64-disk.img \
|
||||
--disk-format qcow2 --container-format bare --public
|
||||
+------------------+------------------------------------------------------+
|
||||
| Field | Value |
|
||||
+------------------+------------------------------------------------------+
|
||||
| checksum | ee1eca47dc88f4879d8a229cc70a07c6 |
|
||||
| container_format | bare |
|
||||
| created_at | 2015-10-26T23:40:03Z |
|
||||
| disk_format | qcow2 |
|
||||
| file | /v2/images/fcf6fa55-56e9-4402-8137-3e9315c84905/file |
|
||||
| id | fcf6fa55-56e9-4402-8137-3e9315c84905 |
|
||||
| min_disk | 0 |
|
||||
| min_ram | 0 |
|
||||
| name | cirros |
|
||||
| owner | 2e3093872ebf4143a122e2cc01a50d13 |
|
||||
| protected | False |
|
||||
| schema | /v2/schemas/image |
|
||||
| size | 13287936 |
|
||||
| status | active |
|
||||
| tags | |
|
||||
| updated_at | 2015-10-26T23:40:03Z |
|
||||
| virtual_size | None |
|
||||
| visibility | public |
|
||||
+------------------+------------------------------------------------------+
|
||||
$ openstack image create cirros --file cirros-0.3.4-x86_64-disk.img \
|
||||
--disk-format qcow2 --container-format bare --public
|
||||
+------------------+------------------------------------------------------+
|
||||
| Field | Value |
|
||||
+------------------+------------------------------------------------------+
|
||||
| checksum | ee1eca47dc88f4879d8a229cc70a07c6 |
|
||||
| container_format | bare |
|
||||
| created_at | 2015-10-26T23:40:03Z |
|
||||
| disk_format | qcow2 |
|
||||
| file | /v2/images/fcf6fa55-56e9-4402-8137-3e9315c84905/file |
|
||||
| id | fcf6fa55-56e9-4402-8137-3e9315c84905 |
|
||||
| min_disk | 0 |
|
||||
| min_ram | 0 |
|
||||
| name | cirros |
|
||||
| owner | 2e3093872ebf4143a122e2cc01a50d13 |
|
||||
| protected | False |
|
||||
| schema | /v2/schemas/image |
|
||||
| size | 13287936 |
|
||||
| status | active |
|
||||
| tags | |
|
||||
| updated_at | 2015-10-26T23:40:03Z |
|
||||
| virtual_size | None |
|
||||
| visibility | public |
|
||||
+------------------+------------------------------------------------------+
|
||||
|
||||
#. Confirm upload of the image and validate attributes::
|
||||
|
||||
$ openstack image list
|
||||
+--------------------------------------+--------+
|
||||
| ID | Name |
|
||||
+--------------------------------------+--------+
|
||||
| 38047887-61a7-41ea-9b49-27987d5e8bb9 | cirros |
|
||||
+--------------------------------------+--------+
|
||||
$ openstack image list
|
||||
+--------------------------------------+--------+
|
||||
| ID | Name |
|
||||
+--------------------------------------+--------+
|
||||
| 38047887-61a7-41ea-9b49-27987d5e8bb9 | cirros |
|
||||
+--------------------------------------+--------+
|
||||
|
||||
Next topic: :ref:`openstack_compute`.
|
||||
@@ -1,3 +1,5 @@
|
||||
.. _openstack_installing_bundles:
|
||||
|
||||
Installing OpenStack* MVP bundles
|
||||
############################################################
|
||||
|
||||
@@ -8,8 +10,8 @@ for your environment.
|
||||
|
||||
To install, continue with the following topics:
|
||||
|
||||
* `Database <openstack_environment-database.html>`_
|
||||
* `Message queue <openstack_environment-messaging.html>`_
|
||||
* `Database <openstack_supporting-database.html>`_
|
||||
* `Message queue <openstack_supporting-messaging.html>`_
|
||||
* `OpenStack Identity <openstack_identity.html>`_
|
||||
* `Create OpenStack client environment scripts <openstack_identity-openrc.html>`_
|
||||
* `OpenStack Image <openstack_image.html>`_
|
||||
@@ -19,4 +21,6 @@ To install, continue with the following topics:
|
||||
* `OpenStack Networking <openstack_networking.html>`_
|
||||
* `OpenStack Orchestration <openstack_orchestration.html>`_
|
||||
* `OpenStack Telemetry <openstack_telemetry.html>`_
|
||||
* `OpenStack Object Storage <openstack_object_storage.html>`_
|
||||
* `OpenStack Object Storage <openstack_object_storage.html>`_
|
||||
|
||||
Next topic: :ref:`openstack_supporting-database`.
|
||||
@@ -1,3 +1,5 @@
|
||||
.. _openstack_networking:
|
||||
|
||||
OpenStack* Networking
|
||||
############################################################
|
||||
|
||||
@@ -303,3 +305,5 @@ Finalizing installation
|
||||
|
||||
# systemctl enable neutron-server.service
|
||||
# systemctl start neutron-server.service
|
||||
|
||||
Next topic: :ref:`openstack_orchestration`.
|
||||
@@ -1,3 +1,5 @@
|
||||
.. _openstack_object_storage:
|
||||
|
||||
OpenStack* Object Storage
|
||||
#########################
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
.. _openstack_orchestration:
|
||||
|
||||
OpenStack* Orchestration
|
||||
############################################################
|
||||
|
||||
@@ -284,3 +286,5 @@ Complete this step to finalize the installation:
|
||||
|
||||
# systemctl enable heat-api.service heat-api-cfn.service heat-engine.service
|
||||
# systemctl start heat-api.service heat-api-cfn.service heat-engine.service``
|
||||
|
||||
Next topic: :ref:`openstack_telemetry`.
|
||||
@@ -0,0 +1,53 @@
|
||||
.. _openstack_supporting-database:
|
||||
|
||||
Database
|
||||
########
|
||||
|
||||
Most OpenStack* services use an SQL database to store information. The
|
||||
database typically runs on the controller node. The procedures in this
|
||||
guide use MariaDB.
|
||||
|
||||
Install and configure the database server
|
||||
-----------------------------------------
|
||||
|
||||
#. Install MariaDB bundle::
|
||||
|
||||
# swupd bundle-add database-mariadb
|
||||
# swupd verify --fix
|
||||
|
||||
#. Create the ``/etc/mariadb/`` folder and the ``/etc/mariadb/openstack.cnf``
|
||||
file::
|
||||
|
||||
# mkdir /etc/mariadb
|
||||
# touch /etc/mariadb/openstack.cnf
|
||||
|
||||
#. Add the ``[mysqld]`` section, set the bind-address key to the
|
||||
management IP address of the controller node to enable access by
|
||||
other nodes via the management network and enable useful options for
|
||||
UTF-8 character set::
|
||||
|
||||
[mysqld]
|
||||
bind-address = 10.0.0.11
|
||||
default-storage-engine = innodb
|
||||
innodb_file_per_table
|
||||
collation-server = utf8_general_ci
|
||||
init-connect = 'SET NAMES utf8'
|
||||
character-set-server = utf8
|
||||
|
||||
Finalizing database installation
|
||||
--------------------------------
|
||||
|
||||
Complete the following steps to finalize database installation:
|
||||
|
||||
#. Start the database service and configure it to start when the system
|
||||
boots::
|
||||
|
||||
# systemctl enable mariadb.service
|
||||
# systemctl start mariadb.service
|
||||
|
||||
#. Secure the database service including choosing a suitable password
|
||||
for the root account::
|
||||
|
||||
# mysql_secure_installation
|
||||
|
||||
Next topic: :ref:`openstack_supporting-messaging`.
|
||||
@@ -0,0 +1,48 @@
|
||||
.. _openstack_supporting-messaging:
|
||||
|
||||
Message queue
|
||||
#############
|
||||
|
||||
OpenStack* uses a `message queue` to coordinate operations and
|
||||
status information among services. The message queue service typically
|
||||
runs on the controller node. OpenStack supports several message queue
|
||||
services. This guide implements the RabbitMQ message queue service.
|
||||
|
||||
Install the message queue service
|
||||
---------------------------------
|
||||
|
||||
#. Install the message queue bundle.::
|
||||
|
||||
# swupd bundle-add message-broker-rabbitmq
|
||||
# swupd verify --fix
|
||||
|
||||
Configuring the message broker service
|
||||
--------------------------------------
|
||||
|
||||
Complete the following steps to configure the message broker service:
|
||||
|
||||
#. Message broker service needs to be able to resolve to itself. Add the
|
||||
following line to ``/etc/hosts``.::
|
||||
|
||||
127.0.0.1 controller
|
||||
|
||||
#. Start the message broker service and configure it to start when the
|
||||
system boots.::
|
||||
|
||||
# systemctl enable rabbitmq-server.service
|
||||
# systemctl start rabbitmq-server.service
|
||||
|
||||
#. Add the OpenStack user. Replace ``RABBIT_PASS`` with a suitable password.::
|
||||
|
||||
# rabbitmqctl add_user openstack RABBIT_PASS
|
||||
Creating user openstack ...
|
||||
...done.
|
||||
|
||||
|
||||
#. Permit configuration, write, and read access for the OpenStack user.::
|
||||
|
||||
# rabbitmqctl set_permissions openstack ".*" ".*" ".*"
|
||||
Setting permissions for user "openstack" in vhost "/" ...
|
||||
...done.
|
||||
|
||||
Next topic: :ref:`openstack_identity`.
|
||||
@@ -1,3 +1,5 @@
|
||||
.. _openstack_sys_req_and_pw_summary:
|
||||
|
||||
System requirements and password summary
|
||||
############################################################
|
||||
|
||||
@@ -72,3 +74,5 @@ and their associated references in the guide:
|
||||
+----------------------------------------+--------------------------------------------------+
|
||||
| CINDER_PASS | Password of Block Storage service user cinder |
|
||||
+----------------------------------------+--------------------------------------------------+
|
||||
|
||||
Next topic: :ref:`openstack_installing_bundles`.
|
||||
@@ -1,3 +1,5 @@
|
||||
.. _openstack_telemetry:
|
||||
|
||||
OpenStack* Telemetry
|
||||
############################################################
|
||||
|
||||
@@ -219,3 +221,4 @@ Finalizing installation
|
||||
# systemctl start ceilometer-api.service ceilometer-agent-notification.service ceilometer-agent-central.service ceilometer-collector.service \
|
||||
ceilometer-alarm-evaluator.service ceilometer-alarm-notifier.service
|
||||
|
||||
Next topic: :ref:`openstack_object_storage`.
|
||||
@@ -1,3 +1,5 @@
|
||||
.. _openstack_use_cases:
|
||||
|
||||
OpenStack* use cases with Clear Linux* OS for Intel® Architecture
|
||||
###################################################################
|
||||
|
||||
@@ -20,4 +22,6 @@ OpenStack supports the following use cases:
|
||||
|
||||
Clear Linux OS for Intel Architecture is designed with all of these use
|
||||
cases in mind, but the initial target is to enable only those services
|
||||
required for Cloud.
|
||||
required for Cloud.
|
||||
|
||||
Next topic: :ref:`openstack_bundle_and_service_summary`.
|
||||
Reference in New Issue
Block a user