Get rid of duplicate cinder file, and makes a few edits
Change-Id: Ib22167d86a3174c65ae4ef869757dadbc16be080 author: diane fleming
This commit is contained in:
parent
23d6daffd4
commit
0635e5d86f
@ -3,14 +3,16 @@
|
|||||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
|
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
|
||||||
xml:id="cli_manage_volumes">
|
xml:id="cli_manage_volumes">
|
||||||
|
<?dbhtml stop-chunking?>
|
||||||
<title>Manage volumes</title>
|
<title>Manage volumes</title>
|
||||||
<para>A volume is a detachable block storage device, similar to a
|
<para>A volume is a detachable block storage device, similar to a
|
||||||
USB hard drive. You can attach a volume to only one instance.
|
USB hard drive. You can attach a volume to only one instance.
|
||||||
To create and manage volumes, you use a combination of nova
|
To create and manage volumes, you use a combination of nova
|
||||||
and cinder client commands.</para>
|
and cinder client commands.</para>
|
||||||
<para>This example creates a volume named
|
<para os="adminuser">For an example of how to create and manage volumes, see the <link xlink:href="http://docs.openstack.org/user-guide/content/"><citetitle>OpenStack End User Guide</citetitle></link>.</para>
|
||||||
|
<para os="enduser">This example creates a volume named
|
||||||
<literal>my-new-volume</literal> based on an image.</para>
|
<literal>my-new-volume</literal> based on an image.</para>
|
||||||
<section xml:id="cli_list_volumes"><title>Create a volume</title><procedure>
|
<section xml:id="cli_list_volumes" os="enduser"><title>Create a volume</title><procedure>
|
||||||
<step>
|
<step>
|
||||||
<para>List images, and note the ID of the image to use for
|
<para>List images, and note the ID of the image to use for
|
||||||
your volume:</para>
|
your volume:</para>
|
||||||
@ -85,7 +87,7 @@
|
|||||||
</step>
|
</step>
|
||||||
</procedure>
|
</procedure>
|
||||||
</section>
|
</section>
|
||||||
<section xml:id="cli_attach_volume"><title>Attach a volume to an instance</title>
|
<section xml:id="cli_attach_volume" os="enduser"><title>Attach a volume to an instance</title>
|
||||||
<procedure> <step>
|
<procedure> <step>
|
||||||
<para>Attach your volume to a server:</para>
|
<para>Attach your volume to a server:</para>
|
||||||
<screen><prompt>$</prompt> <userinput>nova volume-attach 84c6e57d-a6b1-44b6-81eb-fcb36afd31b5 573e024d-5235-49ce-8332-be1576d323f8 /dev/vdb</userinput></screen>
|
<screen><prompt>$</prompt> <userinput>nova volume-attach 84c6e57d-a6b1-44b6-81eb-fcb36afd31b5 573e024d-5235-49ce-8332-be1576d323f8 /dev/vdb</userinput></screen>
|
||||||
@ -129,7 +131,7 @@
|
|||||||
bootable.</para>
|
bootable.</para>
|
||||||
</step>
|
</step>
|
||||||
</procedure></section>
|
</procedure></section>
|
||||||
<section xml:id="cli_delete_volumes"><title>Delete a volume</title>
|
<section xml:id="cli_delete_volumes" os="enduser"><title>Delete a volume</title>
|
||||||
<procedure>
|
<procedure>
|
||||||
<step>
|
<step>
|
||||||
<para>To delete your volume, you must first detach it from
|
<para>To delete your volume, you must first detach it from
|
@ -32,6 +32,8 @@
|
|||||||
<xi:include
|
<xi:include
|
||||||
href="../common/section_glance_cli_manage_images.xml"/>
|
href="../common/section_glance_cli_manage_images.xml"/>
|
||||||
<?hard-pagebreak?>
|
<?hard-pagebreak?>
|
||||||
|
<xi:include href="../common/section_cinder_cli_manage_volumes.xml"/>
|
||||||
|
<?hard-pagebreak?>
|
||||||
<xi:include href="section_nova_cli_manage_flavors.xml"/>
|
<xi:include href="section_nova_cli_manage_flavors.xml"/>
|
||||||
<?hard-pagebreak?>
|
<?hard-pagebreak?>
|
||||||
<xi:include href="section_nova_specify_host.xml"/>
|
<xi:include href="section_nova_specify_host.xml"/>
|
||||||
|
@ -3,32 +3,53 @@
|
|||||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
|
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
|
||||||
xml:id="specify-host-to-boot-instances-on">
|
xml:id="specify-host-to-boot-instances-on">
|
||||||
<title>Select a specific host to boot instances on</title>
|
<title>Select on which host instances are launched</title>
|
||||||
<para>If you have the appropriate permissions, you can select the specific host where the
|
<para>With the appropriate permissions, you can select on which
|
||||||
instance will be launched. This is done using the <literal>--availability_zone
|
host instances are launched and which roles can boot instances
|
||||||
<replaceable>zone</replaceable>:<replaceable>host</replaceable></literal>
|
on this host. </para>
|
||||||
arguments to the <command>nova boot</command> command. For example:</para>
|
<procedure><step><para>To select the host where instances are launched, use the
|
||||||
<para>
|
<literal>--availability_zone
|
||||||
|
<replaceable>zone</replaceable>:<replaceable>host</replaceable></literal>
|
||||||
|
parameter on n the <command>nova boot</command>
|
||||||
|
command, </para>
|
||||||
|
<para>For example:</para>
|
||||||
<screen><prompt>$</prompt> <userinput>nova boot --image <uuid> --flavor m1.tiny --key_name test --availability-zone nova:server2</userinput></screen>
|
<screen><prompt>$</prompt> <userinput>nova boot --image <uuid> --flavor m1.tiny --key_name test --availability-zone nova:server2</userinput></screen>
|
||||||
</para>
|
</step><step><para>To specify which roles can launch an instance on a specified
|
||||||
<para>Starting with the Grizzly release, you can specify which roles are permitted to boot
|
host, enable the <literal>create:forced_host</literal>
|
||||||
an instance to a specific host with the <literal>create:forced_host</literal> setting
|
option in the <filename>policy.json</filename> file.
|
||||||
within <filename>policy.json</filename> on the desired roles. By default, only the admin
|
By default, this option is enabled for only the admin
|
||||||
role has this setting enabled.</para>
|
role.</para></step>
|
||||||
<para>You can view the list of valid compute hosts by using the <command>nova
|
<step>
|
||||||
hypervisor-list</command> command, for
|
<para>To view the list of valid compute hosts, use the
|
||||||
example:<screen><prompt>$</prompt> <userinput>nova hypervisor-list</userinput>
|
<command>nova hypervisor-list</command> command,
|
||||||
|
as follows:</para><screen><prompt>$</prompt> <userinput>nova hypervisor-list</userinput>
|
||||||
<computeroutput>+----+---------------------+
|
<computeroutput>+----+---------------------+
|
||||||
| ID | Hypervisor hostname |
|
| ID | Hypervisor hostname |
|
||||||
+----+---------------------+
|
+----+---------------------+
|
||||||
| 1 | server2 |
|
| 1 | server2 |
|
||||||
| 2 | server3 |
|
| 2 | server3 |
|
||||||
| 3 | server4 |
|
| 3 | server4 |
|
||||||
+----+---------------------+</computeroutput></screen></para>
|
+----+---------------------+</computeroutput></screen></step></procedure>
|
||||||
<note>
|
<note>
|
||||||
<para>The <literal>--availability_zone
|
<para>
|
||||||
<replaceable>zone</replaceable>:<replaceable>host</replaceable></literal>
|
<itemizedlist>
|
||||||
flag replaced the <literal>--force_hosts</literal> scheduler hint for specifying a
|
<listitem>
|
||||||
specific host, starting with the Folsom release.</para>
|
<para>Beginning in the Folsom release, the
|
||||||
|
<literal>--availability_zone
|
||||||
|
<replaceable>zone</replaceable>:<replaceable>host</replaceable></literal>
|
||||||
|
parameter replaces the
|
||||||
|
<literal>--force_hosts</literal> scheduler
|
||||||
|
hint parameter.</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>Beginning in the Grizzly release, you can
|
||||||
|
enable the
|
||||||
|
<literal>create:forced_host</literal>
|
||||||
|
option in the <filename>policy.json</filename>
|
||||||
|
file to specify which roles can launch an
|
||||||
|
instance on a specified host.</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
</note>
|
</note>
|
||||||
</section>
|
</section>
|
||||||
|
@ -33,5 +33,5 @@
|
|||||||
<?hard-pagebreak?>
|
<?hard-pagebreak?>
|
||||||
<xi:include href="section_heat_cli.xml"/>
|
<xi:include href="section_heat_cli.xml"/>
|
||||||
<?hard-pagebreak?>
|
<?hard-pagebreak?>
|
||||||
<xi:include href="section_cinder_cli_manage_volumes.xml"/>
|
<xi:include href="../common/section_cinder_cli_manage_volumes.xml"/>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
@ -1,181 +0,0 @@
|
|||||||
<?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="cli_manage_volumes">
|
|
||||||
<title>Manage volumes</title>
|
|
||||||
<para>A volume is a detachable block storage device, similar to a
|
|
||||||
USB hard drive. You can attach a volume to only one instance.
|
|
||||||
To create and manage volumes, you use a combination of nova
|
|
||||||
and cinder client commands.</para>
|
|
||||||
<para>This example creates a volume named
|
|
||||||
<literal>my-volume</literal> based on an image.</para>
|
|
||||||
<procedure>
|
|
||||||
<title>To list volumes</title>
|
|
||||||
<step>
|
|
||||||
<para>To determine which image to use for your volume,
|
|
||||||
list images:</para>
|
|
||||||
<screen><prompt>$</prompt> <userinput><?db-font-size 75%?>nova image-list</userinput></screen>
|
|
||||||
<screen><computeroutput><?db-font-size 65%?>+--------------------------------------+---------------------------------+--------+--------------------------------------+
|
|
||||||
| ID | Name | Status | Server |
|
|
||||||
+--------------------------------------+---------------------------------+--------+--------------------------------------+
|
|
||||||
| 397e713c-b95b-4186-ad46-6126863ea0a9 | cirros-0.3.1-x86_64-uec | ACTIVE | |
|
|
||||||
| df430cc2-3406-4061-b635-a51c16e488ac | cirros-0.3.1-x86_64-uec-kernel | ACTIVE | |
|
|
||||||
| 3cf852bd-2332-48f4-9ae4-7d926d50945e | cirros-0.3.1-x86_64-uec-ramdisk | ACTIVE | |
|
|
||||||
| 7e5142af-1253-4634-bcc6-89482c5f2e8a | myCirrosImage | ACTIVE | 84c6e57d-a6b1-44b6-81eb-fcb36afd31b5 |
|
|
||||||
| 89bcd424-9d15-4723-95ec-61540e8a1979 | mysnapshot | ACTIVE | f51ebd07-c33d-4951-8722-1df6aa8afaa4 |
|
|
||||||
+--------------------------------------+---------------------------------+--------+--------------------------------------+</computeroutput></screen>
|
|
||||||
<para>Note the ID of the image that you want to
|
|
||||||
use.</para>
|
|
||||||
</step>
|
|
||||||
<step>
|
|
||||||
<para>To determine which availability zone are available
|
|
||||||
in which to create your volume, list the availability
|
|
||||||
zones:</para>
|
|
||||||
<screen><prompt>$</prompt> <userinput><?db-font-size 75%?>nova availability-zone-list</userinput></screen>
|
|
||||||
<screen><computeroutput><?db-font-size 65%?>+-----------------------+----------------------------------------+
|
|
||||||
| Name | Status |
|
|
||||||
+-----------------------+----------------------------------------+
|
|
||||||
| internal | available |
|
|
||||||
| |- devstack-grizzly | |
|
|
||||||
| | |- nova-conductor | enabled :-) 2013-07-25T16:50:44.000000 |
|
|
||||||
| | |- nova-consoleauth | enabled :-) 2013-07-25T16:50:44.000000 |
|
|
||||||
| | |- nova-scheduler | enabled :-) 2013-07-25T16:50:44.000000 |
|
|
||||||
| | |- nova-cert | enabled :-) 2013-07-25T16:50:44.000000 |
|
|
||||||
| | |- nova-network | enabled :-) 2013-07-25T16:50:44.000000 |
|
|
||||||
| nova | available |
|
|
||||||
| |- devstack-grizzly | |
|
|
||||||
| | |- nova-compute | enabled :-) 2013-07-25T16:50:39.000000 |
|
|
||||||
+-----------------------+----------------------------------------+</computeroutput></screen>
|
|
||||||
<para>Note the name of an available availability zone that
|
|
||||||
you want to use.</para>
|
|
||||||
</step>
|
|
||||||
<step>
|
|
||||||
<para>Create a volume with 8 GBs of space in the desired
|
|
||||||
availability zone and based on the desired image, as
|
|
||||||
follows:</para>
|
|
||||||
<screen><prompt>$</prompt> <userinput><?db-font-size 75%?>cinder create 8 --display-name my-new-volume --image-id 397e713c-b95b-4186-ad46-6126863ea0a9 --availability-zone nova</userinput></screen>
|
|
||||||
<screen><computeroutput><?db-font-size 65%?>+---------------------+--------------------------------------+
|
|
||||||
| Property | Value |
|
|
||||||
+---------------------+--------------------------------------+
|
|
||||||
| attachments | [] |
|
|
||||||
| availability_zone | nova |
|
|
||||||
| bootable | false |
|
|
||||||
| created_at | 2013-07-25T17:02:12.472269 |
|
|
||||||
| display_description | None |
|
|
||||||
| display_name | my-new-volume |
|
|
||||||
| id | 573e024d-5235-49ce-8332-be1576d323f8 |
|
|
||||||
| image_id | 397e713c-b95b-4186-ad46-6126863ea0a9 |
|
|
||||||
| metadata | {} |
|
|
||||||
| size | 8 |
|
|
||||||
| snapshot_id | None |
|
|
||||||
| source_volid | None |
|
|
||||||
| status | creating |
|
|
||||||
| volume_type | None |
|
|
||||||
+---------------------+--------------------------------------+</computeroutput></screen>
|
|
||||||
</step>
|
|
||||||
<step>
|
|
||||||
<para>To verify that your volume was created successfully,
|
|
||||||
list the available volumes:</para>
|
|
||||||
<screen><prompt>$</prompt> <userinput><?db-font-size 75%?>cinder list</userinput></screen>
|
|
||||||
<screen><computeroutput><?db-font-size 65%?>+--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+
|
|
||||||
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
|
|
||||||
+--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+
|
|
||||||
| 573e024d-5235-49ce-8332-be1576d323f8 | available | my-new-volume | 8 | None | true | |
|
|
||||||
| bd7cf584-45de-44e3-bf7f-f7b50bf235e3 | available | my-bootable-vol | 8 | None | true | |
|
|
||||||
+--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+</computeroutput></screen>
|
|
||||||
<para>If your volume was created successfully, its status
|
|
||||||
is <literal>available</literal>. If its status is
|
|
||||||
<literal>error</literal>, you might have tried to
|
|
||||||
create a volume outside of your quota.</para>
|
|
||||||
</step>
|
|
||||||
<step>
|
|
||||||
<para>Attach your volume to a server:</para>
|
|
||||||
<screen><prompt>$</prompt> <userinput><?db-font-size 75%?>nova volume-attach 84c6e57d-a6b1-44b6-81eb-fcb36afd31b5 573e024d-5235-49ce-8332-be1576d323f8 /dev/vdb</userinput></screen>
|
|
||||||
<screen><computeroutput><?db-font-size 65%?>+----------+--------------------------------------+
|
|
||||||
| Property | Value |
|
|
||||||
+----------+--------------------------------------+
|
|
||||||
| device | /dev/vdb |
|
|
||||||
| serverId | 84c6e57d-a6b1-44b6-81eb-fcb36afd31b5 |
|
|
||||||
| id | 573e024d-5235-49ce-8332-be1576d323f8 |
|
|
||||||
| volumeId | 573e024d-5235-49ce-8332-be1576d323f8 |
|
|
||||||
+----------+--------------------------------------+</computeroutput></screen>
|
|
||||||
<para>Note the ID of your volume.</para>
|
|
||||||
</step>
|
|
||||||
<step>
|
|
||||||
<para>Show information for your volume:</para>
|
|
||||||
<screen><prompt>$</prompt> <userinput><?db-font-size 75%?>cinder show 573e024d-5235-49ce-8332-be1576d323f8</userinput></screen>
|
|
||||||
<screen><computeroutput><?db-font-size 65%?><?db-fontsize 75%?>+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
||||||
| Property | Value |
|
|
||||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
||||||
| attachments | [{u'device': u'/dev/vdb', u'server_id': u'84c6e57d-a6b1-44b6-81eb-fcb36afd31b5', u'id': u'573e024d-5235-49ce-8332-be1576d323f8', u'volume_id': u'573e024d-5235-49ce-8332-be1576d323f8'}] |
|
|
||||||
| availability_zone | nova |
|
|
||||||
| bootable | true |
|
|
||||||
| created_at | 2013-07-25T17:02:12.000000 |
|
|
||||||
| display_description | None |
|
|
||||||
| display_name | my-new-volume |
|
|
||||||
| id | 573e024d-5235-49ce-8332-be1576d323f8 |
|
|
||||||
| metadata | {} |
|
|
||||||
| os-vol-host-attr:host | devstack-grizzly |
|
|
||||||
| os-vol-tenant-attr:tenant_id | 66265572db174a7aa66eba661f58eb9e |
|
|
||||||
| size | 8 |
|
|
||||||
| snapshot_id | None |
|
|
||||||
| source_volid | None |
|
|
||||||
| status | in-use |
|
|
||||||
| volume_image_metadata | {u'kernel_id': u'df430cc2-3406-4061-b635-a51c16e488ac', u'image_id': u'397e713c-b95b-4186-ad46-6126863ea0a9', u'ramdisk_id': u'3cf852bd-2332-48f4-9ae4-7d926d50945e', u'image_name': u'cirros-0.3.1-x86_64-uec'} |
|
|
||||||
| volume_type | None |
|
|
||||||
+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+</computeroutput></screen>
|
|
||||||
<para>From the output, you can see that the volume is
|
|
||||||
attached to the server with ID
|
|
||||||
<literal>84c6e57d-a6b1-44b6-81eb-fcb36afd31b5</literal>,
|
|
||||||
is in the nova availability zone, and is
|
|
||||||
bootable.</para>
|
|
||||||
</step>
|
|
||||||
<step>
|
|
||||||
<para>To delete your volume, you must first detach it from
|
|
||||||
the server.</para>
|
|
||||||
<para>To detach the volume from your server, pass the
|
|
||||||
server ID and volume ID to the command, as
|
|
||||||
follows:</para>
|
|
||||||
<screen><prompt>$</prompt> <userinput><?db-font-size 75%?>nova volume-detach 84c6e57d-a6b1-44b6-81eb-fcb36afd31b5 573e024d-5235-49ce-8332-be1576d323f8</userinput></screen>
|
|
||||||
<para>The <command>volume-detach</command> command does
|
|
||||||
not return any output.</para>
|
|
||||||
</step>
|
|
||||||
<step>
|
|
||||||
<para>List volumes:</para>
|
|
||||||
<screen><prompt>$</prompt> <userinput><?db-font-size 75%?>cinder list</userinput></screen>
|
|
||||||
<screen><computeroutput><?db-font-size 65%?>+--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+
|
|
||||||
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
|
|
||||||
+--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+
|
|
||||||
| 573e024d-5235-49ce-8332-be1576d323f8 | available | my-new-volume | 8 | None | true | |
|
|
||||||
| bd7cf584-45de-44e3-bf7f-f7b50bf235e3 | available | my-bootable-vol | 8 | None | true | |
|
|
||||||
+--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+</computeroutput></screen>
|
|
||||||
<para>Note that the volume is now available.</para>
|
|
||||||
</step>
|
|
||||||
<step>
|
|
||||||
<para>Now you can delete the volume, as follows:</para>
|
|
||||||
<screen><prompt>$</prompt> <userinput><?db-font-size 75%?>cinder delete my-new-volume</userinput></screen>
|
|
||||||
<para>The delete command does not return any
|
|
||||||
output.</para>
|
|
||||||
</step>
|
|
||||||
<step>
|
|
||||||
<para>List the volumes again, and note that the status of
|
|
||||||
your volume is <literal>deleting</literal>:</para>
|
|
||||||
<screen><prompt>$</prompt> <userinput><?db-font-size 75%?>cinder list</userinput></screen>
|
|
||||||
<screen><computeroutput><?db-font-size 65%?>+--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+
|
|
||||||
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
|
|
||||||
+--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+
|
|
||||||
| 573e024d-5235-49ce-8332-be1576d323f8 | deleting | my-new-volume | 8 | None | true | |
|
|
||||||
| bd7cf584-45de-44e3-bf7f-f7b50bf235e3 | available | my-bootable-vol | 8 | None | true | |
|
|
||||||
+--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+</computeroutput></screen>
|
|
||||||
<para>When the volume is fully deleted, it disappears from
|
|
||||||
the list of volumes:</para>
|
|
||||||
<screen><prompt>$</prompt> <userinput><?db-font-size 75%?>cinder list</userinput></screen>
|
|
||||||
<screen><computeroutput><?db-font-size 65%?>+--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+
|
|
||||||
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
|
|
||||||
+--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+
|
|
||||||
| bd7cf584-45de-44e3-bf7f-f7b50bf235e3 | available | my-bootable-vol | 8 | None | true | |
|
|
||||||
+--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+</computeroutput></screen>
|
|
||||||
</step>
|
|
||||||
</procedure>
|
|
||||||
</section>
|
|
@ -5,48 +5,34 @@
|
|||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
version="5.0"
|
version="5.0"
|
||||||
xml:id="managing-openstack-object-storage-with-swift-cli">
|
xml:id="managing-openstack-object-storage-with-swift-cli">
|
||||||
<title>Managing OpenStack Object Storage with CLI
|
<title>Manage object storage</title>
|
||||||
Swift</title>
|
<para>The OpenStack Object Storage service provides the swift
|
||||||
<para>In the Object Store (swift) project there is a tool that
|
command-line interface (CLI) that enables you to gather
|
||||||
can perform a variety of tasks on your storage cluster
|
statistics, list items, update metadata, upload, download, and
|
||||||
named swift. This client utility can be used for adhoc
|
delete files. This client is based on the native swift client
|
||||||
processing, to gather statistics, list items, update
|
library, <literal>client.py</literal>, which seamlessly
|
||||||
metadata, upload, download and delete files. It is based
|
re-authenticates if the current token expires during
|
||||||
on the native swift client library client.py.
|
processing, retries operations multiple times, and provides a
|
||||||
Incorporating client.py into swift provides many benefits
|
processing concurrency of 10. </para>
|
||||||
such as seamlessly re-authorizing if the current token
|
<para>Users have roles on accounts. For example, the admin
|
||||||
expires in the middle of processing, retrying operations
|
role enables full access to all containers and objects in an
|
||||||
up to five times and a processing concurrency of 10. All
|
account. </para>
|
||||||
of these things help make the swift tool robust and great
|
<para>You can set access control lists (ACLs) are set at the container level
|
||||||
for operational use.</para>
|
and support lists for read and write access, which are set
|
||||||
<section xml:id="swift-acls">
|
with the <literal>X-Container-Read</literal> and
|
||||||
<title>Swift ACLs</title>
|
<literal>X-Container-Write</literal> header
|
||||||
<para>Swift ACLs work with users and accounts. Users have
|
respectively.</para>
|
||||||
roles on accounts - such as '.admin', which allows
|
<para>You can use the swift client to set the ACLs by using the
|
||||||
full access to all containers and objects under the
|
<command>post</command> subcommand with the <parameter>-r</parameter> parameter for the read access and
|
||||||
account. ACLs are set at the container level and
|
<parameter>-w</parameter> option for the write access. The following example enables the testuser user
|
||||||
support lists for read and write access, which are set
|
to read objects in the container:</para>
|
||||||
with the X-Container-Read and X-Container-Write header
|
<screen><prompt>$</prompt> <userinput>swift post -r 'testuser'</userinput></screen>
|
||||||
respectively.</para>
|
<para>You can also use this command with a list of users.</para>
|
||||||
<para>The swift client can be used to set the acls, using
|
<para>If you use the StaticWeb middleware to enable
|
||||||
the post subcommand with the option '-r' for the read
|
|
||||||
ACL, and '-w' for the write ACL. This example allows
|
|
||||||
the user 'testuser' to read objects in the container:
|
|
||||||
<programlisting>
|
|
||||||
$ swift post -r 'testuser'
|
|
||||||
</programlisting>
|
|
||||||
This could instead be a list of users.</para>
|
|
||||||
<para>If you are using the StaticWeb middleware to allow
|
|
||||||
OpenStack Object Storage to serve public web content,
|
OpenStack Object Storage to serve public web content,
|
||||||
you should also be aware of the ACL syntax for
|
be aware of the ACL syntax for
|
||||||
managing allowed referrers. The syntax is '.r:'
|
managing allowed referrers. The syntax is <literal>.r:</literal>
|
||||||
followed by a list of allowed referrers. For example,
|
followed by a list of allowed referrers. For example,
|
||||||
this command allows all referring domains access to
|
the following command gives object access to all referring domains access:</para>
|
||||||
the object:
|
<screen><prompt>$</prompt> <userinput>swift post -r '.r:*'</userinput></screen>
|
||||||
<programlisting>
|
|
||||||
$ swift post -r '.r:*'
|
|
||||||
</programlisting>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
Loading…
Reference in New Issue
Block a user