[user-guide] Fix rst markups for user guide files

Implements: blueprint user-guides-reorganised
Change-Id: I2858722ee55ecb705b4e62c4cc763b4f747490c4
This commit is contained in:
venkatamahesh 2015-12-16 18:36:00 +05:30
parent 96d208e736
commit ca5a3104f1
27 changed files with 1002 additions and 927 deletions

View File

@ -26,29 +26,33 @@ This example shows you how to back up and restore a MySQL database.
- Users: The ``user1`` user with the ``password`` password - Users: The ``user1`` user with the ``password`` password
First, get the ID of the ``guest1`` database instance by using the First, get the ID of the ``guest1`` database instance by using the
trove ``list`` command: :command:`trove list` command:
.. code:: .. code-block:: console
$ trove list $ trove list
+--------------------------------------+--------+-----------+-------------------+--------+-----------+------+ +--------------------------------------+--------+-----------+-------------------+--------+-----------+------+
| id | name | datastore | datastore_version | status | flavor_id | size | | id | name | datastore | datastore_version | status | flavor_id | size |
+--------------------------------------+--------+-----------+-------------------+--------+-----------+------+ +--------------------------------------+--------+-----------+-------------------+--------+-----------+------+
| 97b4b853-80f6-414f-ba6f-c6f455a79ae6 | guest1 | mysql | mysql-5.5 | ACTIVE | 10 | 2 | | 97b4b853-80f6-414f-ba6f-c6f455a79ae6 | guest1 | mysql | mysql-5.5 | ACTIVE | 10 | 2 |
+--------------------------------------+--------+-----------+-------------------+--------+-----------+------+ +--------------------------------------+--------+-----------+-------------------+--------+-----------+------+
Back up the database instance by using the trove ``backup-create`` Back up the database instance by using the :command:`trove backup-create`
command. In this example, the backup is called ``backup1``. In this command. In this example, the backup is called ``backup1``. In this
example, replace ``INSTANCE_ID`` with example, replace ``INSTANCE_ID`` with
``97b4b853-80f6-414f-ba6f-c6f455a79ae6``: ``97b4b853-80f6-414f-ba6f-c6f455a79ae6``:
.. note:: This command syntax pertains only to python-troveclient version .. note::
This command syntax pertains only to python-troveclient version
1.0.6 and later. Earlier versions require you to pass in the backup 1.0.6 and later. Earlier versions require you to pass in the backup
name as the first argument. name as the first argument.
.. code:: .. code-block:: console
$ trove backup-create INSTANCE_ID backup1 $ trove backup-create INSTANCE_ID backup1
+-------------+--------------------------------------+ +-------------+--------------------------------------+
| Property | Value | | Property | Value |
+-------------+--------------------------------------+ +-------------+--------------------------------------+
@ -67,10 +71,10 @@ This example shows you how to back up and restore a MySQL database.
Note that the command returns both the ID of the original instance Note that the command returns both the ID of the original instance
(``instance_id``) and the ID of the backup artifact (``id``). (``instance_id``) and the ID of the backup artifact (``id``).
Later on, use the trove ``backup-list`` command to get this Later on, use the :command:`trove backup-list` command to get this
information: information:
.. code:: .. code-block:: console
$ trove backup-list $ trove backup-list
+--------------------------------------+--------------------------------------+---------+-----------+-----------+---------------------+ +--------------------------------------+--------------------------------------+---------+-----------+-----------+---------------------+
@ -80,12 +84,13 @@ This example shows you how to back up and restore a MySQL database.
+--------------------------------------+--------------------------------------+---------+-----------+-----------+---------------------+ +--------------------------------------+--------------------------------------+---------+-----------+-----------+---------------------+
You can get additional information about the backup by using the You can get additional information about the backup by using the
trove ``backup-show`` command and passing in the ``BACKUP_ID``, :command:`trove backup-show` command and passing in the ``BACKUP_ID``,
which is ``8af30763-61fd-4aab-8fe8-57d528911138``. which is ``8af30763-61fd-4aab-8fe8-57d528911138``.
.. code:: .. code-block:: console
$ trove backup-show BACKUP_ID $ trove backup-show BACKUP_ID
+-------------+----------------------------------------------------+ +-------------+----------------------------------------------------+
| Property | Value | | Property | Value |
+-------------+----------------------------------------------------+ +-------------+----------------------------------------------------+
@ -104,21 +109,22 @@ This example shows you how to back up and restore a MySQL database.
#. **Restore a database instance** #. **Restore a database instance**
Now assume that your ``guest1`` database instance is damaged and you Now assume that your ``guest1`` database instance is damaged and you
need to restore it. In this example, you use the trove ``create`` need to restore it. In this example, you use the :command:`trove create`
command to create a new database instance called ``guest2``. command to create a new database instance called ``guest2``.
- You specify that the new ``guest2`` instance has the same flavor - You specify that the new ``guest2`` instance has the same flavor
(``10``) and the same root volume size (``2``) as the original (``10``) and the same root volume size (``2``) as the original
``guest1`` instance. ``guest1`` instance.
- You use the ``--backup`` argument to indicate that this new - You use the :option:`--backup` argument to indicate that this new
instance is based on the backup artifact identified by instance is based on the backup artifact identified by
``BACKUP_ID``. In this example, replace ``BACKUP_ID`` with ``BACKUP_ID``. In this example, replace ``BACKUP_ID`` with
``8af30763-61fd-4aab-8fe8-57d528911138``. ``8af30763-61fd-4aab-8fe8-57d528911138``.
.. code:: .. code-block:: console
$ trove create guest2 10 --size 2 --backup BACKUP_ID $ trove create guest2 10 --size 2 --backup BACKUP_ID
+-------------------+----------------------------------------------+ +-------------------+----------------------------------------------+
| Property | Value | | Property | Value |
+-------------------+----------------------------------------------+ +-------------------+----------------------------------------------+
@ -140,9 +146,10 @@ This example shows you how to back up and restore a MySQL database.
Start by getting the ID of the new ``guest2`` instance. Start by getting the ID of the new ``guest2`` instance.
.. code:: .. code-block:: console
$ trove list $ trove list
+-----------+--------+-----------+-------------------+--------+-----------+------+ +-----------+--------+-----------+-------------------+--------+-----------+------+
| id | name | datastore | datastore_version | status | flavor_id | size | | id | name | datastore | datastore_version | status | flavor_id | size |
+-----------+--------+-----------+-------------------+--------+-----------+------+ +-----------+--------+-----------+-------------------+--------+-----------+------+
@ -150,13 +157,14 @@ This example shows you how to back up and restore a MySQL database.
| ac7...04b | guest2 | mysql | mysql-5.5 | ACTIVE | 10 | 2 | | ac7...04b | guest2 | mysql | mysql-5.5 | ACTIVE | 10 | 2 |
+-----------+--------+-----------+-------------------+--------+-----------+------+ +-----------+--------+-----------+-------------------+--------+-----------+------+
Use the trove ``show`` command to display information about the new Use the :command:`trove show` command to display information about the new
guest2 instance. Pass in guest2's ``INSTANCE_ID``, which is guest2 instance. Pass in guest2's ``INSTANCE_ID``, which is
``ac7a2b35-a9b4-4ff6-beac-a1bcee86d04b``. ``ac7a2b35-a9b4-4ff6-beac-a1bcee86d04b``.
.. code:: .. code-block:: console
$ trove show INSTANCE_ID $ trove show INSTANCE_ID
+-------------------+--------------------------------------+ +-------------------+--------------------------------------+
| Property | Value | | Property | Value |
+-------------------+--------------------------------------+ +-------------------+--------------------------------------+
@ -176,12 +184,13 @@ This example shows you how to back up and restore a MySQL database.
Note that the data store, flavor ID, and volume size have the same Note that the data store, flavor ID, and volume size have the same
values as in the original ``guest1`` instance. values as in the original ``guest1`` instance.
Use the trove ``database-list`` command to check that the original Use the :command:`trove database-list` command to check that the original
databases (``db1`` and ``db2``) are present on the restored instance. databases (``db1`` and ``db2``) are present on the restored instance.
.. code:: .. code-block:: console
$ trove database-li0st INSTANCE_ID
$ trove database-list INSTANCE_ID
+--------------------+ +--------------------+
| name | | name |
+--------------------+ +--------------------+
@ -191,12 +200,13 @@ This example shows you how to back up and restore a MySQL database.
| test | | test |
+--------------------+ +--------------------+
Use the trove ``user-list`` command to check that the original user Use the :command:`trove user-list` command to check that the original user
(``user1``) is present on the restored instance. (``user1``) is present on the restored instance.
.. code:: .. code-block:: console
$ trove user-list INSTANCE_ID $ trove user-list INSTANCE_ID
+--------+------+-----------+ +--------+------+-----------+
| name | host | databases | | name | host | databases |
+--------+------+-----------+ +--------+------+-----------+
@ -208,15 +218,15 @@ This example shows you how to back up and restore a MySQL database.
Tell the users who were accessing the now-disabled ``guest1`` Tell the users who were accessing the now-disabled ``guest1``
database instance that they can now access ``guest2``. Provide them database instance that they can now access ``guest2``. Provide them
with ``guest2``'s name, IP address, and any other information they with ``guest2``'s name, IP address, and any other information they
might need. (You can get this information by using the trove ``show`` might need. (You can get this information by using the
command.) :command:`trove show` command.)
#. **Clean up** #. **Clean up**
At this point, you might want to delete the disabled ``guest1`` At this point, you might want to delete the disabled ``guest1``
instance, by using the trove ``delete`` command. instance, by using the :command:`trove delete` command.
.. code:: .. code-block:: console
$ trove delete INSTANCE_ID $ trove delete INSTANCE_ID

View File

@ -29,7 +29,7 @@ Create and use incremental backups
#. **Create your first incremental backup** #. **Create your first incremental backup**
Use the trove ``backup-create`` command and specify: Use the :command:`trove backup-create` command and specify:
- The ``INSTANCE_ID`` of the database instance you are doing the - The ``INSTANCE_ID`` of the database instance you are doing the
incremental backup for (in this example, incremental backup for (in this example,
@ -41,9 +41,10 @@ Create and use incremental backups
is the regular backup, with an ID of is the regular backup, with an ID of
``6dc3a9b7-1f3e-4954-8582-3f2e4942cddd`` ``6dc3a9b7-1f3e-4954-8582-3f2e4942cddd``
.. code:: .. code-block:: console
$ trove backup-create INSTANCE_ID backup1.1 --parent BACKUP_ID $ trove backup-create INSTANCE_ID backup1.1 --parent BACKUP_ID
+-------------+--------------------------------------+ +-------------+--------------------------------------+
| Property | Value | | Property | Value |
+-------------+--------------------------------------+ +-------------+--------------------------------------+
@ -70,9 +71,10 @@ Create and use incremental backups
backup you just created in the previous step (``backup1.1``). In this backup you just created in the previous step (``backup1.1``). In this
example, it is ``1d474981-a006-4f62-b25f-43d7b8a7097e``. example, it is ``1d474981-a006-4f62-b25f-43d7b8a7097e``.
.. code:: .. code-block:: console
$ trove backup-create INSTANCE_ID backup1.2 --parent BACKUP_ID $ trove backup-create INSTANCE_ID backup1.2 --parent BACKUP_ID
+-------------+--------------------------------------+ +-------------+--------------------------------------+
| Property | Value | | Property | Value |
+-------------+--------------------------------------+ +-------------+--------------------------------------+
@ -92,18 +94,19 @@ Create and use incremental backups
Now assume that your ``guest1`` database instance is damaged and you Now assume that your ``guest1`` database instance is damaged and you
need to restore it from your incremental backups. In this example, need to restore it from your incremental backups. In this example,
you use the trove ``create`` command to create a new database you use the :command:`trove create` command to create a new database
instance called ``guest2``. instance called ``guest2``.
To incorporate your incremental backups, you simply use the To incorporate your incremental backups, you simply use the
``--backup`` parameter to pass in the ``BACKUP_ID`` of your most :option:`--backup` parameter to pass in the ``BACKUP_ID`` of your most
recent incremental backup. The Database service handles the recent incremental backup. The Database service handles the
complexities of applying the chain of all previous incremental complexities of applying the chain of all previous incremental
backups. backups.
.. code:: .. code-block:: console
$ trove create guest2 10 --size 1 --backup BACKUP_ID $ trove create guest2 10 --size 1 --backup BACKUP_ID
+-------------------+-----------------------------------------------------------+ +-------------------+-----------------------------------------------------------+
| Property | Value | | Property | Value |
+-------------------+-----------------------------------------------------------+ +-------------------+-----------------------------------------------------------+

View File

@ -65,13 +65,18 @@ stack and the :command:`ceilometer` client to measure resources.
#. Create an auto-scaling stack by running the following command. #. Create an auto-scaling stack by running the following command.
The :option:`-f` option specifies the name of the stack template The :option:`-f` option specifies the name of the stack template
file, and the :option:`-P` option specifies the ``KeyName`` file, and the :option:`-P` option specifies the ``KeyName``
parameter as ``heat_key``:: parameter as ``heat_key``:
.. code-block:: console
$ heat stack-create -f cfn/F17/AutoScalingCeilometer.yaml -P "KeyName=heat_key" $ heat stack-create -f cfn/F17/AutoScalingCeilometer.yaml -P "KeyName=heat_key"
#. List the heat resources that were created:: #. List the heat resources that were created:
.. code-block:: console
$ heat resource-list $ heat resource-list
+--------------------------+-----------------------------------------+----------------+----------------------+ +--------------------------+-----------------------------------------+----------------+----------------------+
| resource_name | resource_type |resource_status | updated_time | | resource_name | resource_type |resource_status | updated_time |
+--------------------------+-----------------------------------------+----------------+----------------------+ +--------------------------+-----------------------------------------+----------------+----------------------+
@ -86,7 +91,9 @@ stack and the :command:`ceilometer` client to measure resources.
| CPUAlarmLow | OS::Ceilometer::Alarm |CREATE_COMPLETE | 2013-10-02T05:56:02Z | | CPUAlarmLow | OS::Ceilometer::Alarm |CREATE_COMPLETE | 2013-10-02T05:56:02Z |
+--------------------------+-----------------------------------------+-----------------+---------------------+ +--------------------------+-----------------------------------------+-----------------+---------------------+
#. List the alarms that are set:: #. List the alarms that are set:
.. code-block:: console
$ ceilometer alarm-list $ ceilometer alarm-list
+--------------------------------------+------------------------------+-------------------+---------+------------+----------------------------------+ +--------------------------------------+------------------------------+-------------------+---------+------------+----------------------------------+
@ -96,7 +103,9 @@ stack and the :command:`ceilometer` client to measure resources.
| 75d8ecf7-afc5-4bdc-95ff-19ed9ba22920 | as-CPUAlarmHigh-sf4muyfruy5m | insufficient data | True | False | cpu_util > 50.0 during 1x 60s | | 75d8ecf7-afc5-4bdc-95ff-19ed9ba22920 | as-CPUAlarmHigh-sf4muyfruy5m | insufficient data | True | False | cpu_util > 50.0 during 1x 60s |
+--------------------------------------+------------------------------+-------------------+---------+------------+----------------------------------+ +--------------------------------------+------------------------------+-------------------+---------+------------+----------------------------------+
#. List the meters that are set:: #. List the meters that are set:
.. code-block:: console
$ ceilometer meter-list $ ceilometer meter-list
+-------------+------------+----------+--------------------------------------+----------------------------------+----------------------------------+ +-------------+------------+----------+--------------------------------------+----------------------------------+----------------------------------+
@ -107,7 +116,9 @@ stack and the :command:`ceilometer` client to measure resources.
| cpu_util | gauge | % | 3965b41b-81b0-4386-bea5-6ec37c8841c1 | d1a2996d3b1f4e0e8645ba9650308011 | bf03bf32e3884d489004ac995ff7a61c | | cpu_util | gauge | % | 3965b41b-81b0-4386-bea5-6ec37c8841c1 | d1a2996d3b1f4e0e8645ba9650308011 | bf03bf32e3884d489004ac995ff7a61c |
+-------------+------------+----------+--------------------------------------+----------------------------------+----------------------------------+ +-------------+------------+----------+--------------------------------------+----------------------------------+----------------------------------+
#. List samples:: #. List samples:
.. code-block:: console
$ ceilometer sample-list -m cpu_util $ ceilometer sample-list -m cpu_util
+--------------------------------------+----------+-------+---------------+------+---------------------+ +--------------------------------------+----------+-------+---------------+------+---------------------+
@ -116,7 +127,9 @@ stack and the :command:`ceilometer` client to measure resources.
| 3965b41b-81b0-4386-bea5-6ec37c8841c1 | cpu_util | gauge | 3.98333333333 | % | 2013-10-02T10:50:12 | | 3965b41b-81b0-4386-bea5-6ec37c8841c1 | cpu_util | gauge | 3.98333333333 | % | 2013-10-02T10:50:12 |
+--------------------------------------+----------+-------+---------------+------+---------------------+ +--------------------------------------+----------+-------+---------------+------+---------------------+
#. View statistics:: #. View statistics:
.. code-block:: console
$ ceilometer statistics -m cpu_util $ ceilometer statistics -m cpu_util
+--------+---------------------+---------------------+-------+---------------+---------------+---------------+---------------+----------+---------------------+---------------------+ +--------+---------------------+---------------------+-------+---------------+---------------+---------------+---------------+----------+---------------------+---------------------+

View File

@ -9,13 +9,13 @@ Identity (keystone)
List all users List all users
.. code:: console .. code-block:: console
$ keystone user-list $ keystone user-list
List Identity service catalog List Identity service catalog
.. code:: console .. code-block:: console
$ keystone catalog $ keystone catalog
@ -24,31 +24,31 @@ Images (glance)
List images you can access List images you can access
.. code:: console .. code-block:: console
$ glance image-list $ glance image-list
Delete specified image Delete specified image
.. code:: console .. code-block:: console
$ glance image-delete IMAGE $ glance image-delete IMAGE
Describe a specific image Describe a specific image
.. code:: console .. code-block:: console
$ glance image-show IMAGE $ glance image-show IMAGE
Update image Update image
.. code:: console .. code-block:: console
$ glance image-update IMAGE $ glance image-update IMAGE
Upload kernel image Upload kernel image
.. code:: console .. code-block:: console
$ glance image-create --name "cirros-threepart-kernel" \ $ glance image-create --name "cirros-threepart-kernel" \
--disk-format aki --container-format aki --is-public False \ --disk-format aki --container-format aki --is-public False \
@ -56,7 +56,7 @@ Upload kernel image
Upload RAM image Upload RAM image
.. code:: console .. code-block:: console
$ glance image-create --name "cirros-threepart-ramdisk" \ $ glance image-create --name "cirros-threepart-ramdisk" \
--disk-format ari --container-format ari --is-public False \ --disk-format ari --container-format ari --is-public False \
@ -64,7 +64,7 @@ Upload RAM image
Upload three-part image Upload three-part image
.. code:: console .. code-block:: console
$ glance image-create --name "cirros-threepart" --disk-format ami \ $ glance image-create --name "cirros-threepart" --disk-format ami \
--container-format ami --is-public False \ --container-format ami --is-public False \
@ -73,7 +73,7 @@ Upload three-part image
Register raw image Register raw image
.. code:: console .. code-block:: console
$ glance image-create --name "cirros-qcow2" --disk-format qcow2 \ $ glance image-create --name "cirros-qcow2" --disk-format qcow2 \
--container-format bare --is-public False \ --container-format bare --is-public False \
@ -84,25 +84,25 @@ Compute (nova)
List instances, check status of instance List instances, check status of instance
.. code:: console .. code-block:: console
$ nova list $ nova list
List images List images
.. code:: console .. code-block:: console
$ nova image-list $ nova image-list
List flavors List flavors
.. code:: console .. code-block:: console
$ nova flavor-list $ nova flavor-list
Boot an instance using flavor and image names (if names are unique) Boot an instance using flavor and image names (if names are unique)
.. code:: console .. code-block:: console
$ nova boot --image IMAGE --flavor FLAVOR INSTANCE_NAME $ nova boot --image IMAGE --flavor FLAVOR INSTANCE_NAME
$ nova boot --image cirros-0.3.1-x86_64-uec --flavor m1.tiny \ $ nova boot --image cirros-0.3.1-x86_64-uec --flavor m1.tiny \
@ -110,38 +110,40 @@ Boot an instance using flavor and image names (if names are unique)
Login to instance Login to instance
.. code:: console .. code-block:: console
# ip netns # ip netns
# ip netns exec NETNS_NAME ssh USER@SERVER # ip netns exec NETNS_NAME ssh USER@SERVER
# ip netns exec qdhcp-6021a3b4-8587-4f9c-8064-0103885dfba2 \ # ip netns exec qdhcp-6021a3b4-8587-4f9c-8064-0103885dfba2 \
ssh cirros@10.0.0.2 ssh cirros@10.0.0.2
.. note:: In CirrOS the password for user ``cirros`` is "cubswin:)" without .. note::
In CirrOS the password for user ``cirros`` is "cubswin:)" without
the quotes. the quotes.
Show details of instance Show details of instance
.. code:: console .. code-block:: console
$ nova show NAME $ nova show NAME
$ nova show MyFirstInstance $ nova show MyFirstInstance
View console log of instance View console log of instance
.. code:: console .. code-block:: console
$ nova console-log MyFirstInstance $ nova console-log MyFirstInstance
Set metadata on an instance Set metadata on an instance
.. code:: console .. code-block:: console
$ nova meta volumeTwoImage set newmeta='my meta data' $ nova meta volumeTwoImage set newmeta='my meta data'
Create an instance snapshot Create an instance snapshot
.. code:: console .. code-block:: console
$ nova image-create volumeTwoImage snapshotOfVolumeImage $ nova image-create volumeTwoImage snapshotOfVolumeImage
$ nova image-show snapshotOfVolumeImage $ nova image-show snapshotOfVolumeImage
@ -151,51 +153,51 @@ Pause, suspend, stop, rescue, resize, rebuild, reboot an instance
Pause Pause
.. code:: console .. code-block:: console
$ nova pause NAME $ nova pause NAME
$ nova pause volumeTwoImage $ nova pause volumeTwoImage
Unpause Unpause
.. code:: console .. code-block:: console
$ nova unpause NAME $ nova unpause NAME
Suspend Suspend
.. code:: console .. code-block:: console
$ nova suspend NAME $ nova suspend NAME
Unsuspend Unsuspend
.. code:: console .. code-block:: console
$ nova resume NAME $ nova resume NAME
Stop Stop
.. code:: console .. code-block:: console
$ nova stop NAME $ nova stop NAME
Start Start
.. code:: console .. code-block:: console
$ nova start NAME $ nova start NAME
Rescue Rescue
.. code:: console .. code-block:: console
$ nova rescue NAME $ nova rescue NAME
$ nova rescue NAME --rescue_image_ref RESCUE_IMAGE $ nova rescue NAME --rescue_image_ref RESCUE_IMAGE
Resize Resize
.. code:: console .. code-block:: console
$ nova resize NAME FLAVOR $ nova resize NAME FLAVOR
$ nova resize my-pem-server m1.small $ nova resize my-pem-server m1.small
@ -203,21 +205,21 @@ Resize
Rebuild Rebuild
.. code:: console .. code-block:: console
$ nova rebuild NAME IMAGE $ nova rebuild NAME IMAGE
$ nova rebuild newtinny cirros-qcow2 $ nova rebuild newtinny cirros-qcow2
Reboot Reboot
.. code:: console .. code-block:: console
$ nova reboot NAME $ nova reboot NAME
$ nova reboot newtinny $ nova reboot newtinny
Inject user data and files into an instance Inject user data and files into an instance
.. code:: console .. code-block:: console
$ nova boot --user-data FILE INSTANCE $ nova boot --user-data FILE INSTANCE
$ nova boot --user-data userdata.txt --image cirros-qcow2 \ $ nova boot --user-data userdata.txt --image cirros-qcow2 \
@ -231,21 +233,21 @@ keypair
Create keypair Create keypair
.. code:: console .. code-block:: console
$ nova keypair-add test > test.pem $ nova keypair-add test > test.pem
$ chmod 600 test.pem $ chmod 600 test.pem
Start an instance (boot) Start an instance (boot)
.. code:: console .. code-block:: console
$ nova boot --image cirros-0.3.0-x86_64 --flavor m1.small \ $ nova boot --image cirros-0.3.0-x86_64 --flavor m1.small \
--key_name test MyFirstServer --key_name test MyFirstServer
Use ssh to connect to the instance Use ssh to connect to the instance
.. code:: console .. code-block:: console
# ip netns exec qdhcp-98f09f1e-64c4-4301-a897-5067ee6d544f \ # ip netns exec qdhcp-98f09f1e-64c4-4301-a897-5067ee6d544f \
ssh -i test.pem cirros@10.0.0.4 ssh -i test.pem cirros@10.0.0.4
@ -255,7 +257,7 @@ Manage security groups
Add rules to default security group allowing ping and SSH between Add rules to default security group allowing ping and SSH between
instances in the default security group instances in the default security group
.. code:: console .. code-block:: console
$ nova secgroup-add-group-rule default default icmp -1 -1 $ nova secgroup-add-group-rule default default icmp -1 -1
$ nova secgroup-add-group-rule default default tcp 22 22 $ nova secgroup-add-group-rule default default tcp 22 22
@ -265,13 +267,13 @@ Networking (neutron)
Create network Create network
.. code:: console .. code-block:: console
$ neutron net-create NAME $ neutron net-create NAME
Create a subnet Create a subnet
.. code:: console .. code-block:: console
$ neutron subnet-create NETWORK_NAME CIDR $ neutron subnet-create NETWORK_NAME CIDR
$ neutron subnet-create my-network 10.0.0.0/29 $ neutron subnet-create my-network 10.0.0.0/29
@ -283,27 +285,27 @@ Used to manage volumes and volume snapshots that attach to instances.
Create a new volume Create a new volume
.. code:: console .. code-block:: console
$ cinder create SIZE_IN_GB --display-name NAME $ cinder create SIZE_IN_GB --display-name NAME
$ cinder create 1 --display-name MyFirstVolume $ cinder create 1 --display-name MyFirstVolume
Boot an instance and attach to volume Boot an instance and attach to volume
.. code:: console .. code-block:: console
$ nova boot --image cirros-qcow2 --flavor m1.tiny MyVolumeInstance $ nova boot --image cirros-qcow2 --flavor m1.tiny MyVolumeInstance
List volumes, notice status of volume List volumes, notice status of volume
.. code:: console .. code-block:: console
$ cinder list $ cinder list
Attach volume to instance after instance is active, and volume is Attach volume to instance after instance is active, and volume is
available available
.. code:: console .. code-block:: console
$ nova volume-attach INSTANCE_ID VOLUME_ID auto $ nova volume-attach INSTANCE_ID VOLUME_ID auto
$ nova volume-attach MyVolumeInstance /dev/vdb auto $ nova volume-attach MyVolumeInstance /dev/vdb auto
@ -312,38 +314,38 @@ Manage volumes after login into the instance
List storage devices List storage devices
.. code:: console .. code-block:: console
# fdisk -l # fdisk -l
Make filesystem on volume Make filesystem on volume
.. code:: console .. code-block:: console
# mkfs.ext3 /dev/vdb # mkfs.ext3 /dev/vdb
Create a mountpoint Create a mountpoint
.. code:: console .. code-block:: console
# mkdir /myspace # mkdir /myspace
Mount the volume at the mountpoint Mount the volume at the mountpoint
.. code:: console .. code-block:: console
# mount /dev/vdb /myspace # mount /dev/vdb /myspace
Create a file on the volume Create a file on the volume
.. code:: console .. code-block:: console
# touch /myspace/helloworld.txt # touch /myspace/helloworld.txt
# ls /myspace # ls /myspace
Unmount the volume Unmount the volume
.. code:: console .. code-block:: console
# umount /myspace # umount /myspace
@ -352,7 +354,7 @@ Object Storage (swift)
Display information for the account, container, or object Display information for the account, container, or object
.. code:: console .. code-block:: console
$ swift stat $ swift stat
$ swift stat ACCOUNT $ swift stat ACCOUNT
@ -361,7 +363,7 @@ Display information for the account, container, or object
List containers List containers
.. code:: console .. code-block:: console
$ swift list $ swift list

View File

@ -25,7 +25,9 @@ Create a stack from an example template file
- To create a stack, or template, from an `example template - To create a stack, or template, from an `example template
file <https://git.openstack.org/cgit/openstack/heat-templates>`__, run file <https://git.openstack.org/cgit/openstack/heat-templates>`__, run
the following command:: the following command:
.. code-block:: console
$ heat stack-create mystack --template-file /PATH_TO_HEAT_TEMPLATES/WordPress_Single_Instance.template \ $ heat stack-create mystack --template-file /PATH_TO_HEAT_TEMPLATES/WordPress_Single_Instance.template \
--parameters "InstanceType=m1.large;DBUsername=USERNAME;DBPassword=PASSWORD;KeyName=HEAT_KEY;LinuxDistribution=F17" --parameters "InstanceType=m1.large;DBUsername=USERNAME;DBPassword=PASSWORD;KeyName=HEAT_KEY;LinuxDistribution=F17"
@ -35,7 +37,9 @@ Create a stack from an example template file
file, you can specify the URL with the :option:`--template-url` parameter file, you can specify the URL with the :option:`--template-url` parameter
instead of the :option:`--template-file` parameter. instead of the :option:`--template-file` parameter.
The command returns the following output:: The command returns the following output:
.. code-block:: console
+------------------+---------------+--------------------+----------------------+ +------------------+---------------+--------------------+----------------------+
| id | stack_name | stack_status | creation_time | | id | stack_name | stack_status | creation_time |
@ -52,7 +56,9 @@ Create a stack from an example template file
:command:`template-validate`, but it has been deprecated in favor of :command:`template-validate`, but it has been deprecated in favor of
:command:`template-validate`. :command:`template-validate`.
To do so, run the following command:: To do so, run the following command:
.. code-block:: console
$ heat template-validate --template-file /PATH_TO_HEAT_TEMPLATES/WordPress_Single_Instance.template $ heat template-validate --template-file /PATH_TO_HEAT_TEMPLATES/WordPress_Single_Instance.template
@ -65,7 +71,9 @@ To explore the state and history of a particular stack, you can run a
number of commands. number of commands.
- To see which stacks are visible to the current user, run the - To see which stacks are visible to the current user, run the
following command:: following command:
.. code-block:: console
$ heat stack-list $ heat stack-list
+------------------+---------------+-----------------+----------------------+ +------------------+---------------+-----------------+----------------------+
@ -75,12 +83,16 @@ number of commands.
| 7edc7480-bda5... | my-otherstack | CREATE_FAILED | 2013-04-03T23:28:20Z | | 7edc7480-bda5... | my-otherstack | CREATE_FAILED | 2013-04-03T23:28:20Z |
+------------------+---------------+-----------------+----------------------+ +------------------+---------------+-----------------+----------------------+
- To show the details of a stack, run the following command:: - To show the details of a stack, run the following command:
.. code-block:: console
$ heat stack-show mystack $ heat stack-show mystack
- A stack consists of a collection of resources. To list the resources - A stack consists of a collection of resources. To list the resources
and their status, run the following command:: and their status, run the following command:
.. code-block:: console
$ heat resource-list mystack $ heat resource-list mystack
+---------------------+--------------------+-----------------+----------------------+ +---------------------+--------------------+-----------------+----------------------+
@ -90,18 +102,24 @@ number of commands.
+---------------------+--------------------+-----------------+----------------------+ +---------------------+--------------------+-----------------+----------------------+
- To show the details for a specific resource in a stack, run the - To show the details for a specific resource in a stack, run the
following command:: following command:
.. code-block:: console
$ heat resource-show mystack WikiDatabase $ heat resource-show mystack WikiDatabase
- Some resources have associated metadata which can change throughout - Some resources have associated metadata which can change throughout
the life cycle of a resource. Show the metadata by running the the life cycle of a resource. Show the metadata by running the
following command:: following command:
.. code-block:: console
$ heat resource-metadata mystack WikiDatabase $ heat resource-metadata mystack WikiDatabase
- A series of events is generated during the life cycle of a stack. To - A series of events is generated during the life cycle of a stack. To
display life cycle events, run the following command:: display life cycle events, run the following command:
.. code-block:: console
$ heat event-list mystack $ heat event-list mystack
+---------------------+----+------------------------+-----------------+----------------------+ +---------------------+----+------------------------+-----------------+----------------------+
@ -112,7 +130,9 @@ number of commands.
+---------------------+----+------------------------+-----------------+----------------------+ +---------------------+----+------------------------+-----------------+----------------------+
- To show the details for a particular event, run the following - To show the details for a particular event, run the following
command:: command:
.. code-block:: console
$ heat event-show WikiDatabase 1 $ heat event-show WikiDatabase 1
@ -120,7 +140,9 @@ Update a stack
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
To update an existing stack from a modified template file, run a command To update an existing stack from a modified template file, run a command
like the following command:: like the following command:
.. code-block:: console
$ heat stack-update mystack --template-file \ $ heat stack-update mystack --template-file \
/path/to/heat/templates/WordPress_Single_Instance_v2.template \ /path/to/heat/templates/WordPress_Single_Instance_v2.template \

View File

@ -93,7 +93,7 @@ define the response format:
The following auto-extract archive files example shows a ``text/plain`` The following auto-extract archive files example shows a ``text/plain``
response body where no failures occurred: response body where no failures occurred:
.. code:: .. code-block:: console
Number Files Created: 10 Number Files Created: 10
Errors: Errors:
@ -104,7 +104,7 @@ Storage system is configured to reject certain character strings so that
the 400 Bad Request error occurs for any objects that use the restricted the 400 Bad Request error occurs for any objects that use the restricted
strings. strings.
.. code:: .. code-block:: console
Number Files Created: 8 Number Files Created: 8
Errors: Errors:
@ -114,7 +114,7 @@ strings.
The following example shows the failure response in ``application/json`` The following example shows the failure response in ``application/json``
format. format.
.. code:: .. code-block:: json
{ {
"Number Files Created":1, "Number Files Created":1,

View File

@ -78,7 +78,7 @@ The following bulk delete response is in ``application/xml`` format. In
this example, the ``mycontainer`` container is not empty, so it cannot this example, the ``mycontainer`` container is not empty, so it cannot
be deleted. be deleted.
.. code:: .. code-block:: xml
<delete> <delete>
<number_deleted>2</number_deleted> <number_deleted>2</number_deleted>

View File

@ -5,23 +5,23 @@ Create and manage containers
- To create a container, run the following command and replace - To create a container, run the following command and replace
``CONTAINER`` with the name of your container. ``CONTAINER`` with the name of your container.
.. code:: .. code-block:: console
$ swift post CONTAINER $ swift post CONTAINER
- To list all containers, run the following command: - To list all containers, run the following command:
.. code:: .. code-block:: console
$ swift list $ swift list
- To check the status of containers, run the following command: - To check the status of containers, run the following command:
.. code:: .. code-block:: console
$ swift stat $ swift stat
.. code:: .. code-block:: console
Account: AUTH_7b5970fbe7724bf9b74c245e77c03bcg Account: AUTH_7b5970fbe7724bf9b74c245e77c03bcg
Containers: 2 Containers: 2
@ -31,14 +31,14 @@ Create and manage containers
X-Timestamp: 1392683866.17952 X-Timestamp: 1392683866.17952
Content-Type: text/plain; charset=utf-8 Content-Type: text/plain; charset=utf-8
You can also use the ``swift stat`` command with the ``ACCOUNT`` or You can also use the :command:`swift stat` command with the ``ACCOUNT`` or
``CONTAINER`` names as parameters. ``CONTAINER`` names as parameters.
.. code:: .. code-block:: console
$ swift stat CONTAINER $ swift stat CONTAINER
.. code:: .. code-block:: console
Account: AUTH_7b5970fbe7724bf9b74c245e77c03bcg Account: AUTH_7b5970fbe7724bf9b74c245e77c03bcg
Container: storage1 Container: storage1

View File

@ -18,13 +18,13 @@ use the ``/info`` request.
To use the ``/info`` request, send a ``GET`` request using the ``/info`` To use the ``/info`` request, send a ``GET`` request using the ``/info``
path to the Object Store endpoint as shown in this example: path to the Object Store endpoint as shown in this example:
.. code:: .. code-block:: console
$ curl https://storage.example.com/info $ curl https://storage.example.com/info
This example shows a truncated response body: This example shows a truncated response body:
.. code:: .. code-block:: json
{ {
"swift":{ "swift":{

View File

@ -16,12 +16,12 @@ publicURL
token token
The authentication token for Object Storage. The authentication token for Object Storage.
To obtain these values, run the ``swift stat -v`` command. To obtain these values, run the :command:`swift stat -v` command.
As shown in this example, the public URL appears in the ``StorageURL`` As shown in this example, the public URL appears in the ``StorageURL``
field, and the token appears in the ``Auth Token`` field: field, and the token appears in the ``Auth Token`` field:
.. code:: .. code-block:: console
StorageURL: https://23.253.72.207/v1/my_account StorageURL: https://23.253.72.207/v1/my_account
Auth Token: {token} Auth Token: {token}

View File

@ -34,7 +34,7 @@ To page through a large list of containers
Assume the following list of container names: Assume the following list of container names:
.. code:: .. code-block:: console
apples apples
bananas bananas
@ -44,11 +44,11 @@ Assume the following list of container names:
#. Use a ``limit`` of two: #. Use a ``limit`` of two:
.. code:: .. code-block:: console
# curl -i $publicURL/?limit=2 -X GET -H "X-Auth-Token: $token" # curl -i $publicURL/?limit=2 -X GET -H "X-Auth-Token: $token"
.. code:: .. code-block:: console
apples apples
bananas bananas
@ -59,12 +59,12 @@ Assume the following list of container names:
#. Make another request with a ``marker`` parameter set to the name of #. Make another request with a ``marker`` parameter set to the name of
the last item returned: the last item returned:
.. code:: .. code-block:: console
# curl -i $publicURL/?limit=2&amp;marker=bananas -X GET -H \ # curl -i $publicURL/?limit=2&amp;marker=bananas -X GET -H \
“X-Auth-Token: $token" “X-Auth-Token: $token"
.. code:: .. code-block:: console
kiwis kiwis
oranges oranges
@ -73,12 +73,12 @@ Assume the following list of container names:
#. Make another request with a ``marker`` of the last item returned: #. Make another request with a ``marker`` of the last item returned:
.. code:: .. code-block:: console
# curl -i $publicURL/?limit=2&amp;marker=oranges -X GET -H \” # curl -i $publicURL/?limit=2&amp;marker=oranges -X GET -H \”
X-Auth-Token: $token" X-Auth-Token: $token"
.. code:: .. code-block:: console
pears pears
@ -88,12 +88,12 @@ Assume the following list of container names:
#. Use the ``end_marker`` parameter to limit the result set to object #. Use the ``end_marker`` parameter to limit the result set to object
names that are less than the ``end_marker`` parameter value: names that are less than the ``end_marker`` parameter value:
.. code:: .. code-block:: console
# curl -i $publicURL/?end_marker=oranges -X GET -H \” # curl -i $publicURL/?end_marker=oranges -X GET -H \”
X-Auth-Token: $token" X-Auth-Token: $token"
.. code:: .. code-block:: console
apples apples
bananas bananas

View File

@ -91,7 +91,7 @@ This example shows three segment objects. You can use several containers
and the object names do not have to conform to a specific pattern, in and the object names do not have to conform to a specific pattern, in
contrast to dynamic large objects. contrast to dynamic large objects.
.. code:: .. code-block:: json
[ [
{ {
@ -184,7 +184,7 @@ manifest is still available to download the first set of segments.
Upload segment of large object request: HTTP Upload segment of large object request: HTTP
-------------------------------------------- --------------------------------------------
.. code:: .. code-block:: console
PUT /API_VERSION/ACCOUNT/CONTAINER/OBJECT HTTP/1.1 PUT /API_VERSION/ACCOUNT/CONTAINER/OBJECT HTTP/1.1
Host: storage.example.com Host: storage.example.com
@ -206,7 +206,7 @@ uploading the manifest.
Upload next segment of large object request: HTTP Upload next segment of large object request: HTTP
------------------------------------------------- -------------------------------------------------
.. code:: .. code-block:: console
PUT /API_VERSION/ACCOUNT/CONTAINER/OBJECT HTTP/1.1 PUT /API_VERSION/ACCOUNT/CONTAINER/OBJECT HTTP/1.1
Host: storage.example.com Host: storage.example.com
@ -224,7 +224,7 @@ subsequent additional segments.
Upload manifest request: HTTP Upload manifest request: HTTP
----------------------------- -----------------------------
.. code:: .. code-block:: console
PUT /API_VERSION/ACCOUNT/CONTAINER/OBJECT HTTP/1.1 PUT /API_VERSION/ACCOUNT/CONTAINER/OBJECT HTTP/1.1
Host: storage.clouddrive.com Host: storage.clouddrive.com
@ -235,7 +235,7 @@ Upload manifest request: HTTP
Upload manifest response: HTTP Upload manifest response: HTTP
------------------------------ ------------------------------
.. code:: .. code-block:: console
[...] [...]

View File

@ -8,14 +8,14 @@ Manage access
lists for read and write access, which you set with the lists for read and write access, which you set with the
``X-Container-Read`` and ``X-Container-Write`` headers. ``X-Container-Read`` and ``X-Container-Write`` headers.
To give a user read access, use the ``swift post`` command with the To give a user read access, use the :command:`swift post` command with the
``-r`` parameter. To give a user write access, use the ``-w`` :option:`-r` parameter. To give a user write access, use the
parameter. :option:`-w` parameter.
The following example enables the ``testuser`` user to read objects The following example enables the ``testuser`` user to read objects
in the container: in the container:
.. code:: .. code-block:: console
$ swift post -r 'testuser' $ swift post -r 'testuser'
@ -27,6 +27,6 @@ Manage access
The following command gives object access to all referring domains: The following command gives object access to all referring domains:
.. code:: .. code-block:: console
$ swift post -r '.r:*' $ swift post -r '.r:*'

View File

@ -4,23 +4,23 @@ Manage objects
- To upload an object to a container, run the following command: - To upload an object to a container, run the following command:
.. code:: .. code-block:: console
$ swift upload CONTAINER OBJECT_FILENAME $ swift upload CONTAINER OBJECT_FILENAME
To upload in chunks, for large files, run the following command: To upload in chunks, for large files, run the following command:
.. code:: .. code-block:: console
$ swift upload -S CHUNK_SIZE CONTAINER OBJECT_FILENAME $ swift upload -S CHUNK_SIZE CONTAINER OBJECT_FILENAME
- To check the status of the object, run the following command: - To check the status of the object, run the following command:
.. code:: .. code-block:: console
$ swift stat CONTAINER OBJECT_FILENAME $ swift stat CONTAINER OBJECT_FILENAME
.. code:: .. code-block:: console
Account: AUTH_7b5970fbe7724bf9b74c245e77c03bcg Account: AUTH_7b5970fbe7724bf9b74c245e77c03bcg
Container: storage1 Container: storage1
@ -35,12 +35,12 @@ Manage objects
- To list the objects in a container, run the following command: - To list the objects in a container, run the following command:
.. code:: .. code-block:: console
$ swift list CONTAINER $ swift list CONTAINER
- To download an object from a container, run the following command: - To download an object from a container, run the following command:
.. code:: .. code-block:: console
$ swift download CONTAINER OBJECT_FILENAME $ swift download CONTAINER OBJECT_FILENAME

View File

@ -24,7 +24,7 @@ List pseudo-hierarchical folders request: HTTP
To display a list of all the objects in the storage container, use To display a list of all the objects in the storage container, use
``GET`` without a ``delimiter`` or ``prefix``. ``GET`` without a ``delimiter`` or ``prefix``.
.. code:: .. code-block:: console
$ curl -X GET -i -H "X-Auth-Token: $token" \ $ curl -X GET -i -H "X-Auth-Token: $token" \
$publicurl/v1/AccountString/backups $publicurl/v1/AccountString/backups
@ -32,7 +32,7 @@ To display a list of all the objects in the storage container, use
The system returns status code 2xx (between 200 and 299, inclusive) and The system returns status code 2xx (between 200 and 299, inclusive) and
the requested list of the objects. the requested list of the objects.
.. code:: .. code-block:: console
photos/animals/cats/persian.jpg photos/animals/cats/persian.jpg
photos/animals/cats/siamese.jpg photos/animals/cats/siamese.jpg
@ -47,7 +47,7 @@ Use the delimiter parameter to limit the displayed results. To use
``delimiter`` with pseudo-directories, you must use the parameter slash ``delimiter`` with pseudo-directories, you must use the parameter slash
(``/``). (``/``).
.. code:: .. code-block:: console
$ curl -X GET -i -H "X-Auth-Token: $token" \ $ curl -X GET -i -H "X-Auth-Token: $token" \
$publicurl/v1/AccountString/backups?delimiter=/ $publicurl/v1/AccountString/backups?delimiter=/
@ -59,14 +59,14 @@ pseudo-directory ``photos/`` displays. The returned values from a slash
``application/directory`` and are in the ``subdir`` section of JSON and ``application/directory`` and are in the ``subdir`` section of JSON and
XML results. XML results.
.. code:: .. code-block:: console
photos/ photos/
Use the ``prefix`` and ``delimiter`` parameters to view the objects Use the ``prefix`` and ``delimiter`` parameters to view the objects
inside a pseudo-directory, including further nested pseudo-directories. inside a pseudo-directory, including further nested pseudo-directories.
.. code:: .. code-block:: console
$ curl -X GET -i -H "X-Auth-Token: $token" \ $ curl -X GET -i -H "X-Auth-Token: $token" \
$publicurl/v1/AccountString/backups?prefix=photos/&delimiter=/ $publicurl/v1/AccountString/backups?prefix=photos/&delimiter=/
@ -75,7 +75,7 @@ The system returns status code 2xx (between 200 and 299, inclusive) and
the objects and pseudo-directories within the top level the objects and pseudo-directories within the top level
pseudo-directory. pseudo-directory.
.. code:: .. code-block:: console
photos/animals/ photos/animals/
photos/me.jpg photos/me.jpg
@ -88,7 +88,7 @@ pseudo-directory called ``dogs`` within the pseudo-directory
``animals``. To navigate directly to the files contained within ``animals``. To navigate directly to the files contained within
``dogs``, enter the following command: ``dogs``, enter the following command:
.. code:: .. code-block:: console
$ curl -X GET -i -H "X-Auth-Token: $token" \ $ curl -X GET -i -H "X-Auth-Token: $token" \
$publicurl/v1/AccountString/backups?prefix=photos/animals/dogs/&delimiter=/ $publicurl/v1/AccountString/backups?prefix=photos/animals/dogs/&delimiter=/
@ -96,7 +96,7 @@ pseudo-directory called ``dogs`` within the pseudo-directory
The system returns status code 2xx (between 200 and 299, inclusive) and The system returns status code 2xx (between 200 and 299, inclusive) and
the objects and pseudo-directories within the nested pseudo-directory. the objects and pseudo-directories within the nested pseudo-directory.
.. code:: .. code-block:: console
photos/animals/dogs/corgi.jpg photos/animals/dogs/corgi.jpg
photos/animals/dogs/poodle.jpg photos/animals/dogs/poodle.jpg

View File

@ -38,11 +38,11 @@ Example 1. JSON example with format query parameter
For example, this request uses the ``format`` query parameter to ask For example, this request uses the ``format`` query parameter to ask
for a JSON response: for a JSON response:
.. code:: .. code-block:: console
$ curl -i $publicURL?format=json -X GET -H "X-Auth-Token: $token" $ curl -i $publicURL?format=json -X GET -H "X-Auth-Token: $token"
.. code:: .. code-block:: console
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Length: 96 Content-Length: 96
@ -59,7 +59,7 @@ for a JSON response:
Object Storage lists container names with additional information in JSON Object Storage lists container names with additional information in JSON
format: format:
.. code:: .. code-block:: json
[ [
{ {
@ -81,12 +81,12 @@ Example 2. XML example with Accept header
This request uses the ``Accept`` request header to ask for an XML This request uses the ``Accept`` request header to ask for an XML
response: response:
.. code:: .. code-block:: console
$ curl -i $publicURL -X GET -H "X-Auth-Token: $token" -H \ $ curl -i $publicURL -X GET -H "X-Auth-Token: $token" -H \
”Accept: application/xml; charset=utf-8" ”Accept: application/xml; charset=utf-8"
.. code:: .. code-block:: console
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Length: 263 Content-Length: 263
@ -103,7 +103,7 @@ response:
Object Storage lists container names with additional information in XML Object Storage lists container names with additional information in XML
format: format:
.. code:: .. code-block:: xml
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<account name="AUTH_73f0aa26640f4971864919d0eb0f0880"> <account name="AUTH_73f0aa26640f4971864919d0eb0f0880">

View File

@ -23,11 +23,11 @@ To enable and use object versioning
#. Create an ``archive`` container to store older versions of objects: #. Create an ``archive`` container to store older versions of objects:
.. code:: .. code-block:: console
$ curl -i $publicURL/archive -X PUT -H "Content-Length: 0" -H "X-Auth-Token: $token" $ curl -i $publicURL/archive -X PUT -H "Content-Length: 0" -H "X-Auth-Token: $token"
.. code:: .. code-block:: console
HTTP/1.1 201 Created HTTP/1.1 201 Created
Content-Length: 0 Content-Length: 0
@ -45,12 +45,12 @@ To enable and use object versioning
Changes to objects in the ``current`` container automatically create Changes to objects in the ``current`` container automatically create
non-current versions in the ``archive`` container. non-current versions in the ``archive`` container.
.. code:: .. code-block:: console
$ curl -i $publicURL/current -X PUT -H "Content-Length: 0" -H \ $ curl -i $publicURL/current -X PUT -H "Content-Length: 0" -H \
”X-Auth-Token: $token" -H "X-Versions-Location: archive" ”X-Auth-Token: $token" -H "X-Versions-Location: archive"
.. code:: .. code-block:: console
HTTP/1.1 201 Created HTTP/1.1 201 Created
Content-Length: 0 Content-Length: 0
@ -60,12 +60,12 @@ To enable and use object versioning
#. Create the first version of an object in the ``current`` container: #. Create the first version of an object in the ``current`` container:
.. code:: .. code-block:: console
$ curl -i $publicURL/current/my_object --data-binary 1 -X PUT -H \ $ curl -i $publicURL/current/my_object --data-binary 1 -X PUT -H \
”Content-Length: 0" -H "X-Auth-Token: $token" ”Content-Length: 0" -H "X-Auth-Token: $token"
.. code:: .. code-block:: console
HTTP/1.1 201 Created HTTP/1.1 201 Created
Last-Modified: Thu, 23 Jan 2014 21:31:22 GMT Last-Modified: Thu, 23 Jan 2014 21:31:22 GMT
@ -82,7 +82,7 @@ To enable and use object versioning
These non-current versions are named as follows: These non-current versions are named as follows:
.. code:: .. code-block:: console
<length><object_name><timestamp> <length><object_name><timestamp>
@ -93,12 +93,12 @@ To enable and use object versioning
#. Create a second version of the object in the ``current`` container: #. Create a second version of the object in the ``current`` container:
.. code:: .. code-block:: console
$ curl -i $publicURL/current/my_object --data-binary 2 -X PUT -H \ $ curl -i $publicURL/current/my_object --data-binary 2 -X PUT -H \
“Content-Length: 0" -H "X-Auth-Token: $token" “Content-Length: 0" -H "X-Auth-Token: $token"
.. code:: .. code-block:: console
HTTP/1.1 201 Created HTTP/1.1 201 Created
Last-Modified: Thu, 23 Jan 2014 21:41:32 GMT Last-Modified: Thu, 23 Jan 2014 21:41:32 GMT
@ -114,12 +114,12 @@ To enable and use object versioning
List older versions of the object in the ``archive`` container: List older versions of the object in the ``archive`` container:
.. code:: .. code-block:: console
$ curl -i $publicURL/archive?prefix=009my_object -X GET -H \ $ curl -i $publicURL/archive?prefix=009my_object -X GET -H \
"X-Auth-Token: $token" "X-Auth-Token: $token"
.. code:: .. code-block:: console
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Length: 30 Content-Length: 30
@ -143,12 +143,12 @@ To enable and use object versioning
current version of the object and replace it with the next-most current version of the object and replace it with the next-most
current version in the non-current container. current version in the non-current container.
.. code:: .. code-block:: console
$ curl -i $publicURL/current/my_object -X DELETE -H \ $ curl -i $publicURL/current/my_object -X DELETE -H \
"X-Auth-Token: $token" "X-Auth-Token: $token"
.. code:: .. code-block:: console
HTTP/1.1 204 No Content HTTP/1.1 204 No Content
Content-Length: 0 Content-Length: 0
@ -159,12 +159,12 @@ To enable and use object versioning
List objects in the ``archive`` container to show that the archived List objects in the ``archive`` container to show that the archived
object was moved back to the ``current`` container: object was moved back to the ``current`` container:
.. code:: .. code-block:: console
$ curl -i $publicURL/archive?prefix=009my_object -X GET -H \ $ curl -i $publicURL/archive?prefix=009my_object -X GET -H \
"X-Auth-Token: $token" "X-Auth-Token: $token"
.. code:: .. code-block:: console
HTTP/1.1 204 No Content HTTP/1.1 204 No Content
Content-Length: 0 Content-Length: 0
@ -184,12 +184,12 @@ To enable and use object versioning
its ``X-Versions-Location`` metadata header by sending an empty key its ``X-Versions-Location`` metadata header by sending an empty key
value. value.
.. code:: .. code-block:: console
$ curl -i $publicURL/current -X PUT -H "Content-Length: 0" -H \ $ curl -i $publicURL/current -X PUT -H "Content-Length: 0" -H \
"X-Auth-Token: $token" -H "X-Versions-Location: " "X-Auth-Token: $token" -H "X-Versions-Location: "
.. code:: .. code-block:: console
HTTP/1.1 202 Accepted HTTP/1.1 202 Accepted
Content-Length: 76 Content-Length: 76

View File

@ -51,13 +51,13 @@ The following sections show how to use Static Web middleware through
Object Storage. Object Storage.
Make container publicly readable Make container publicly readable
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Make the container publicly readable. Once the container is publicly Make the container publicly readable. Once the container is publicly
readable, you can access your objects directly, but you must set the readable, you can access your objects directly, but you must set the
index file to browse the main site URL and its sub-directories. index file to browse the main site URL and its sub-directories.
.. code:: .. code-block:: console
$ swift post -r '.r:*' container $ swift post -r '.r:*' container
@ -68,7 +68,7 @@ Set site index file
Set the index file. In this case, ``index.html`` is the default file Set the index file. In this case, ``index.html`` is the default file
displayed when the site appears. displayed when the site appears.
.. code:: .. code-block:: console
$ swift post -m 'web-index:index.html' container $ swift post -m 'web-index:index.html' container
@ -79,7 +79,7 @@ Turn on file listing. If you do not set the index file, the URL displays
a list of the objects in the container. Instructions on styling the list a list of the objects in the container. Instructions on styling the list
with a CSS follow. with a CSS follow.
.. code:: .. code-block:: console
$ swift post -m 'web-listings: true' container $ swift post -m 'web-listings: true' container
@ -88,7 +88,7 @@ Enable CSS for file listing
Style the file listing using a CSS. Style the file listing using a CSS.
.. code:: .. code-block:: console
$ swift post -m 'web-listings-css:listings.css' container $ swift post -m 'web-listings-css:listings.css' container
@ -116,7 +116,7 @@ for your entire static website.
Set error pages for static website request Set error pages for static website request
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code:: .. code-block:: console
$ swift post -m 'web-error:error.html' container $ swift post -m 'web-error:error.html' container

View File

@ -20,15 +20,16 @@ Create and access a database
sufficient to create database instances. You might need to create or sufficient to create database instances. You might need to create or
obtain some new nova flavors that work for databases. obtain some new nova flavors that work for databases.
The first step is to list flavors by using the nova ``flavor-list`` The first step is to list flavors by using the :command:`nova flavor-list`
command. command.
Here are the default flavors, although you may have additional custom Here are the default flavors, although you may have additional custom
flavors in your environment: flavors in your environment:
.. code:: .. code-block:: console
$ nova flavor-list $ nova flavor-list
+-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+ +-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | | ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+ +-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
@ -59,8 +60,8 @@ Create and access a database
:ref:`Step 2 <create-database-instance>` and use that flavor. :ref:`Step 2 <create-database-instance>` and use that flavor.
- If your environment does not have a suitable flavor, an - If your environment does not have a suitable flavor, an
administrative user must create a custom flavor by using the nova administrative user must create a custom flavor by using the
``flavor-create`` command. :command:`nova flavor-create` command.
**MySQL example.** This example creates a flavor that you can use **MySQL example.** This example creates a flavor that you can use
with a MySQL database. This example has the following attributes: with a MySQL database. This example has the following attributes:
@ -76,7 +77,7 @@ Create and access a database
- Virtual CPUs: ``1`` - Virtual CPUs: ``1``
.. code:: .. code-block:: console
$ nova flavor-create mysql-minimum 6 512 5 1 $ nova flavor-create mysql-minimum 6 512 5 1
+----+---------------+-----------+------+-----------+------+-------+-------------+-----------+ +----+---------------+-----------+------+-----------+------+-------+-------------+-----------+
@ -107,7 +108,7 @@ Create and access a database
- The ``userA`` user with the ``password`` password. - The ``userA`` user with the ``password`` password.
.. code:: .. code-block:: console
$ trove create mysql_instance_1 6 --size 5 --databases myDB \ $ trove create mysql_instance_1 6 --size 5 --databases myDB \
--users userA:password --datastore_version mysql-5.5 \ --users userA:password --datastore_version mysql-5.5 \
@ -128,10 +129,10 @@ Create and access a database
#. **Get the IP address of the database instance** #. **Get the IP address of the database instance**
First, use the trove ``list`` command to list all instances and their First, use the :command:`trove list` command to list all instances and
IDs: their IDs:
.. code:: .. code-block:: console
$ trove list $ trove list
+--------------------------------------+------------------+-----------+-------------------+--------+-----------+------+ +--------------------------------------+------------------+-----------+-------------------+--------+-----------+------+
@ -142,13 +143,14 @@ Create and access a database
This command returns the instance ID of your new instance. This command returns the instance ID of your new instance.
You can now pass in the instance ID with the trove ``show`` command You can now pass in the instance ID with the :command:`trove show` command
to get the IP address of the instance. In this example, replace to get the IP address of the instance. In this example, replace
``INSTANCE_ID`` with ``5599dad6-731e-44df-bb60-488da3da9cfe``. ``INSTANCE_ID`` with ``5599dad6-731e-44df-bb60-488da3da9cfe``.
.. code:: .. code-block:: console
$ trove show INSTANCE_ID $ trove show INSTANCE_ID
+-------------------+--------------------------------------+ +-------------------+--------------------------------------+
| Property | Value | | Property | Value |
+-------------------+--------------------------------------+ +-------------------+--------------------------------------+
@ -172,7 +174,7 @@ Create and access a database
typical database access commands. In this MySQL example, replace typical database access commands. In this MySQL example, replace
``IP_ADDRESS`` with ``172.16.200.2``. ``IP_ADDRESS`` with ``172.16.200.2``.
.. code:: .. code-block:: console
$ mysql -u userA -ppassword -h IP_ADDRESS myDB $ mysql -u userA -ppassword -h IP_ADDRESS myDB

View File

@ -15,7 +15,7 @@ environment. This can provide significant time savings in managing your
cloud. cloud.
Bulk-configure a database or databases Bulk-configure a database or databases
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#. **List available options** #. **List available options**
@ -25,22 +25,24 @@ Bulk-configure a database or databases
List the names and IDs of all available versions of the ``mysql`` List the names and IDs of all available versions of the ``mysql``
data store: data store:
.. code:: .. code-block:: console
$ trove datastore-version-list mysql $ trove datastore-version-list mysql
+--------------------------------------+-----------+ +--------------------------------------+-----------+
| id | name | | id | name |
+--------------------------------------+-----------+ +--------------------------------------+-----------+
| eeb574ce-f49a-48b6-820d-b2959fcd38bb | mysql-5.5 | | eeb574ce-f49a-48b6-820d-b2959fcd38bb | mysql-5.5 |
+--------------------------------------+-----------+ +--------------------------------------+-----------+
Pass in the data store version ID with the trove Pass in the data store version ID with the
``configuration-parameter-list`` command to get the available :command:`trove configuration-parameter-list` command to get the available
options: options:
.. code:: .. code-block:: console
$ trove configuration-parameter-list DATASTORE_VERSION_ID $ trove configuration-parameter-list DATASTORE_VERSION_ID
+--------------------------------+---------+---------+----------------------+------------------+ +--------------------------------+---------+---------+----------------------+------------------+
| name | type | min | max | restart_required | | name | type | min | max | restart_required |
+--------------------------------+---------+---------+----------------------+------------------+ +--------------------------------+---------+---------+----------------------+------------------+
@ -80,19 +82,19 @@ Bulk-configure a database or databases
| wait_timeout | integer | 1 | 31536000 | False | | wait_timeout | integer | 1 | 31536000 | False |
+--------------------------------+---------+---------+----------------------+------------------+ +--------------------------------+---------+---------+----------------------+------------------+
In this example, the ``configuration-parameter-list`` command returns In this example, the :command:`configuration-parameter-list` command
a list of options that work with MySQL 5.5. returns a list of options that work with MySQL 5.5.
#. **Create a configuration group** #. **Create a configuration group**
A configuration group contains a comma-separated list of key-value A configuration group contains a comma-separated list of key-value
pairs. Each pair consists of a configuration option and its value. pairs. Each pair consists of a configuration option and its value.
You can create a configuration group by using the trove You can create a configuration group by using the
``configuration-create`` command. The general syntax for this command :command:`trove configuration-create` command. The general syntax
is: for this command is:
.. code:: .. code-block:: console
$ trove configuration-create NAME VALUES --datastore DATASTORE_NAME $ trove configuration-create NAME VALUES --datastore DATASTORE_NAME
@ -104,7 +106,7 @@ Bulk-configure a database or databases
Set *VALUES* as a JSON dictionary, for example: Set *VALUES* as a JSON dictionary, for example:
.. code:: .. code-block:: json
{"myFirstKey" : "someString", "mySecondKey" : someInt} {"myFirstKey" : "someString", "mySecondKey" : someInt}
@ -112,9 +114,10 @@ Bulk-configure a database or databases
``group1`` contains just one key and value pair, and this pair sets ``group1`` contains just one key and value pair, and this pair sets
the ``sync_binlog`` option to ``1``. the ``sync_binlog`` option to ``1``.
.. code:: .. code-block:: console
$ trove configuration-create group1 '{"sync_binlog" : 1}' --datastore mysql $ trove configuration-create group1 '{"sync_binlog" : 1}' --datastore mysql
+----------------------+--------------------------------------+ +----------------------+--------------------------------------+
| Property | Value | | Property | Value |
+----------------------+--------------------------------------+ +----------------------+--------------------------------------+
@ -132,7 +135,7 @@ Bulk-configure a database or databases
following sample connection values with values that connect to your following sample connection values with values that connect to your
database: database:
.. code:: .. code-block:: console
$ mysql -u user7 -ppassword -h 172.16.200.2 myDB7 $ mysql -u user7 -ppassword -h 172.16.200.2 myDB7
Welcome to the MySQL monitor. Commands end with ; or \g. Welcome to the MySQL monitor. Commands end with ; or \g.
@ -151,14 +154,15 @@ Bulk-configure a database or databases
You can change a database's configuration by attaching a You can change a database's configuration by attaching a
configuration group to a database instance. You do this by using the configuration group to a database instance. You do this by using the
trove ``configuration-attach`` command and passing in the ID of the :command:`trove configuration-attach` command and passing in the ID of the
database instance and the ID of the configuration group. database instance and the ID of the configuration group.
Get the ID of the database instance: Get the ID of the database instance:
.. code:: .. code-block:: console
$ trove list $ trove list
+-------------+------------------+-----------+-------------------+--------+-----------+------+ +-------------+------------------+-----------+-------------------+--------+-----------+------+
| id | name | datastore | datastore_version | status | flavor_id | size | | id | name | datastore | datastore_version | status | flavor_id | size |
+-------------+------------------+-----------+-------------------+--------+-----------+------+ +-------------+------------------+-----------+-------------------+--------+-----------+------+
@ -167,9 +171,10 @@ Bulk-configure a database or databases
Get the ID of the configuration group: Get the ID of the configuration group:
.. code:: .. code-block:: console
$ trove configuration-list $ trove configuration-list
+-------------+--------+-------------+---------------------+ +-------------+--------+-------------+---------------------+
| id | name | description |datastore_version_id | | id | name | description |datastore_version_id |
+-------------+--------+-------------+---------------------+ +-------------+--------+-------------+---------------------+
@ -178,11 +183,13 @@ Bulk-configure a database or databases
Attach the configuration group to the database instance: Attach the configuration group to the database instance:
.. note:: This command syntax pertains only to python-troveclient version .. note::
This command syntax pertains only to python-troveclient version
1.0.6 and later. Earlier versions require you to pass in the 1.0.6 and later. Earlier versions require you to pass in the
configuration group ID as the first argument. configuration group ID as the first argument.
.. code:: .. code-block:: console
$ trove configuration-attach DB_INSTANCE_ID CONFIG_GROUP_ID $ trove configuration-attach DB_INSTANCE_ID CONFIG_GROUP_ID
@ -190,7 +197,7 @@ Bulk-configure a database or databases
Display the ``sync_binlog`` setting again: Display the ``sync_binlog`` setting again:
.. code:: .. code-block:: console
mysql> show variables like 'sync_binlog'; mysql> show variables like 'sync_binlog';
+---------------+-------+ +---------------+-------+
@ -218,15 +225,15 @@ cloud configuration, on the fly, on a massive scale.
features for working with configuration groups. You can: features for working with configuration groups. You can:
- Disassociate a configuration group from a database instance, using - Disassociate a configuration group from a database instance, using
the trove ``configuration-detach`` command. the :command:`trove configuration-detach` command.
- Modify a configuration group on the fly, using the trove - Modify a configuration group on the fly, using the
``configuration-patch`` command. :command:`trove configuration-patch` command.
- Find out what instances are using a configuration group, using the - Find out what instances are using a configuration group, using the
trove ``configuration-instances`` command. :command:`trove configuration-instances` command.
- Delete a configuration group, using the trove - Delete a configuration group, using the
``configuration-delete`` command. You might want to do this if no :command:`trove configuration-delete` command. You might want to
instances use a group. to do this if no instances use a group.

View File

@ -20,7 +20,9 @@ You can only assign these headers to objects. For more information, see
`www.w3.org/TR/access-control/ <http://www.w3.org/TR/access-control/>`__. `www.w3.org/TR/access-control/ <http://www.w3.org/TR/access-control/>`__.
This example assigns the file origin to the ``Origin`` header, which This example assigns the file origin to the ``Origin`` header, which
ensures that the file originated from a reputable source:: ensures that the file originated from a reputable source.
.. code-block:: console
$ curl -i -X POST -H "Origin: example.com" -H "X-Auth-Token: $ curl -i -X POST -H "Origin: example.com" -H "X-Auth-Token:
48e17715dfce47bb90dc2a336f63493a" 48e17715dfce47bb90dc2a336f63493a"

View File

@ -36,5 +36,6 @@ If the OpenStack cloud is configured to use public-key infrastructure
fhuUpJT-s9mU7+WEC3-8qkcBjEpqVCvMpmM4INI= fhuUpJT-s9mU7+WEC3-8qkcBjEpqVCvMpmM4INI=
.. note:: .. note::
This example shows a subset of a PKI token. A complete token is over This example shows a subset of a PKI token. A complete token is over
5000 characters long. 5000 characters long.

View File

@ -22,7 +22,7 @@ To list the available images, call the
The images method returns a Python generator, as shown in the following The images method returns a Python generator, as shown in the following
interaction with the Python interpreter: interaction with the Python interpreter:
:: .. code-block:: python
>>> images = glance.images.list() >>> images = glance.images.list()
>>> images >>> images

View File

@ -29,6 +29,7 @@ X-Delete-After
seconds. seconds.
.. note:: .. note::
Use http://www.epochconverter.com/ to convert dates to and from Use http://www.epochconverter.com/ to convert dates to and from
epoch timestamps and for batch conversions. epoch timestamps and for batch conversions.
@ -38,7 +39,7 @@ that you want to expire.
In this example, the ``X-Delete-At`` header is assigned a UNIX epoch In this example, the ``X-Delete-At`` header is assigned a UNIX epoch
timestamp in integer form for ``Mon, 11 Jun 2012 15:38:25 GMT``. timestamp in integer form for ``Mon, 11 Jun 2012 15:38:25 GMT``.
.. code:: .. code-block:: console
$ curl -i publicURL/marktwain/goodbye -X PUT -H "X-Auth-Token: token" \ $ curl -i publicURL/marktwain/goodbye -X PUT -H "X-Auth-Token: token" \
-H "X-Delete-At: 1390581073" -H "Content-Length: 14" -H \ -H "X-Delete-At: 1390581073" -H "Content-Length: 14" -H \
@ -47,7 +48,7 @@ timestamp in integer form for ``Mon, 11 Jun 2012 15:38:25 GMT``.
In this example, the ``X-Delete-After`` header is set to 864000 seconds. In this example, the ``X-Delete-After`` header is set to 864000 seconds.
The object expires after this time. The object expires after this time.
.. code:: .. code-block:: console
PUT /<api version>/<account>/<container>/<object> HTTP/1.1 PUT /<api version>/<account>/<container>/<object> HTTP/1.1
Host: storage.example.com Host: storage.example.com

View File

@ -21,7 +21,9 @@ Each cluster includes:
This example shows you how to set up a MongoDB sharded cluster. This example shows you how to set up a MongoDB sharded cluster.
.. note:: **Before you begin.** Make sure that: .. note::
**Before you begin.** Make sure that:
- The administrative user has registered a MongoDB datastore type and - The administrative user has registered a MongoDB datastore type and
version. version.
@ -34,7 +36,7 @@ Set up clustering
#. **Create a cluster** #. **Create a cluster**
Create a cluster by using the trove ``cluster-create`` command. This Create a cluster by using the :command:`trove cluster-create` command. This
command creates a one-shard cluster. Pass in: command creates a one-shard cluster. Pass in:
- The name of the cluster. - The name of the cluster.
@ -42,17 +44,18 @@ Set up clustering
- The name and version of the datastore you want to use. - The name and version of the datastore you want to use.
- The three instances you want to include in the replication set for - The three instances you want to include in the replication set for
the first shard. Specify each instance by using the ``--instance`` the first shard. Specify each instance by using the :option:`--instance`
argument and the associated flavor ID and volume size. Use the argument and the associated flavor ID and volume size. Use the
same flavor ID and volume size for each instance. In this example, same flavor ID and volume size for each instance. In this example,
flavor ``7`` is a custom flavor that meets the MongoDB minimum flavor ``7`` is a custom flavor that meets the MongoDB minimum
requirements. requirements.
.. code:: .. code-block:: console
$ trove cluster-create cluster1 mongodb "2.4" \ $ trove cluster-create cluster1 mongodb "2.4" \
--instance flavor_id=7,volume=2 --instance flavor_id=7,volume=2 \ --instance flavor_id=7,volume=2 --instance flavor_id=7,volume=2 \
--instance flavor_id=7,volume=2 --instance flavor_id=7,volume=2
+-------------------+--------------------------------------+ +-------------------+--------------------------------------+
| Property | Value | | Property | Value |
+-------------------+--------------------------------------+ +-------------------+--------------------------------------+
@ -68,16 +71,17 @@ Set up clustering
#. **Display cluster information** #. **Display cluster information**
Display information about a cluster by using the trove Display information about a cluster by using the
``cluster-show`` command. Pass in the ID of the cluster. :command:`trove cluster-show` command. Pass in the ID of the cluster.
The cluster ID displays when you first create a cluster. (If you need The cluster ID displays when you first create a cluster. (If you need
to find it later on, use the trove ``cluster-list`` command to list to find it later on, use the :command:`trove cluster-list` command to list
the names and IDs of all the clusters in your system.) the names and IDs of all the clusters in your system.)
.. code:: .. code-block:: console
$ trove cluster-show CLUSTER_ID $ trove cluster-show CLUSTER_ID
+-------------------+--------------------------------------+ +-------------------+--------------------------------------+
| Property | Value | | Property | Value |
+-------------------+--------------------------------------+ +-------------------+--------------------------------------+
@ -93,19 +97,22 @@ Set up clustering
+-------------------+--------------------------------------+ +-------------------+--------------------------------------+
.. note:: **Your application connects to this IP address.** The trove .. note::
``cluster-show`` command displays the IP address of the query router.
**Your application connects to this IP address.** The trove
:command:`cluster-show` command displays the IP address of the query router.
This is the IP address your application uses to retrieve data from This is the IP address your application uses to retrieve data from
the database. the database.
#. **List cluster instances** #. **List cluster instances**
List the instances in a cluster by using the trove List the instances in a cluster by using the
``cluster-instances`` command. :command:`trove cluster-instances` command.
.. code:: .. code-block:: console
$ trove cluster-instances CLUSTER_ID $ trove cluster-instances CLUSTER_ID
+--------------------------------------+----------------+-----------+------+ +--------------------------------------+----------------+-----------+------+
| ID | Name | Flavor ID | Size | | ID | Name | Flavor ID | Size |
+--------------------------------------+----------------+-----------+------+ +--------------------------------------+----------------+-----------+------+
@ -134,12 +141,13 @@ Set up clustering
#. **List clusters** #. **List clusters**
List all the clusters in your system, using the trove List all the clusters in your system, using the
``cluster-list`` command. :command:`trove cluster-list` command.
.. code:: .. code-block:: console
$ trove cluster-list $ trove cluster-list
+--------------------------------------+----------+-----------+-------------------+-----------+ +--------------------------------------+----------+-----------+-------------------+-----------+
| ID | Name | Datastore | Datastore Version | Task Name | | ID | Name | Datastore | Datastore Version | Task Name |
+--------------------------------------+----------+-----------+-------------------+-----------+ +--------------------------------------+----------+-----------+-------------------+-----------+
@ -149,9 +157,9 @@ Set up clustering
#. **Delete a cluster** #. **Delete a cluster**
Delete a cluster, using the trove ``cluster-delete`` command. Delete a cluster, using the :command:`trove cluster-delete` command.
.. code:: .. code-block:: console
$ trove cluster-delete CLUSTER_ID $ trove cluster-delete CLUSTER_ID

View File

@ -8,8 +8,8 @@ applies those changes to the replica.
- Replicas are read-only. - Replicas are read-only.
- When you create a replica, do not specify the ``--users`` or - When you create a replica, do not specify the :option:`--users` or
``--databases`` options. :option:`--databases` options.
- You can choose a smaller volume or flavor for a replica than for the - You can choose a smaller volume or flavor for a replica than for the
original, but the replica's volume must be big enough to hold the original, but the replica's volume must be big enough to hold the
@ -24,9 +24,10 @@ Set up replication
Get the ID of the original instance you want to replicate: Get the ID of the original instance you want to replicate:
.. code:: .. code-block:: console
$ trove list $ trove list
+-----------+------------+-----------+-------------------+--------+-----------+------+ +-----------+------------+-----------+-------------------+--------+-----------+------+
| id | name | datastore | datastore_version | status | flavor_id | size | | id | name | datastore | datastore_version | status | flavor_id | size |
+-----------+------------+-----------+-------------------+--------+-----------+------+ +-----------+------------+-----------+-------------------+--------+-----------+------+
@ -36,26 +37,27 @@ Set up replication
#. **Create the replica** #. **Create the replica**
Create a new instance that will be a replica of the original Create a new instance that will be a replica of the original
instance. You do this by passing in the ``--replica_of`` option with instance. You do this by passing in the :option:`--replica_of` option with
the trove ``create`` command. This example creates a replica the :command:`trove create` command. This example creates a replica
called ``replica_1``. ``replica_1`` is a replica of the original instance, called ``replica_1``. ``replica_1`` is a replica of the original instance,
``base_1``: ``base_1``:
.. code:: .. code-block:: console
$ trove create replica_1 6 --size=5 --datastore_version mysql-5.5 \ $ trove create replica_1 6 --size=5 --datastore_version mysql-5.5 \
--datastore mysql --replica_of ID_OF_ORIGINAL_INSTANCE --datastore mysql --replica_of ID_OF_ORIGINAL_INSTANCE
#. **Verify replication status** #. **Verify replication status**
Pass in ``replica_1``'s instance ID with the trove ``show`` command Pass in ``replica_1``'s instance ID with the :command:`trove show` command
to verify that the newly created ``replica_1`` instance is a replica to verify that the newly created ``replica_1`` instance is a replica
of the original ``base_1``. Note that the ``replica_of`` property is of the original ``base_1``. Note that the ``replica_of`` property is
set to the ID of ``base_1``. set to the ID of ``base_1``.
.. code:: .. code-block:: console
$ trove show INSTANCE_ID_OF_REPLICA_1 $ trove show INSTANCE_ID_OF_REPLICA_1
+-------------------+--------------------------------------+ +-------------------+--------------------------------------+
| Property | Value | | Property | Value |
+-------------------+--------------------------------------+ +-------------------+--------------------------------------+
@ -71,14 +73,15 @@ Set up replication
| volume | 5 | | volume | 5 |
+-------------------+--------------------------------------+ +-------------------+--------------------------------------+
Now pass in ``base_1``'s instance ID with the trove ``show`` command Now pass in ``base_1``'s instance ID with the :command:`trove show` command
to list the replica(s) associated with the original instance. Note to list the replica(s) associated with the original instance. Note
that the ``replicas`` property is set to the ID of ``replica_1``. If that the ``replicas`` property is set to the ID of ``replica_1``. If
there are multiple replicas, they appear as a comma-separated list. there are multiple replicas, they appear as a comma-separated list.
.. code:: .. code-block:: console
$ trove show INSTANCE_ID_OF_BASE_1 $ trove show INSTANCE_ID_OF_BASE_1
+-------------------+--------------------------------------+ +-------------------+--------------------------------------+
| Property | Value | | Property | Value |
+-------------------+--------------------------------------+ +-------------------+--------------------------------------+
@ -102,9 +105,9 @@ Set up replication
replica becomes a standalone database instance. You can then take the replica becomes a standalone database instance. You can then take the
new standalone instance and create a new replica of that instance. new standalone instance and create a new replica of that instance.
You detach a replica using the trove ``detach-replica`` command: You detach a replica using the :command:`trove detach-replica` command:
.. code:: .. code-block:: console
$ trove detach-replica INSTANCE_ID_OF_REPLICA $ trove detach-replica INSTANCE_ID_OF_REPLICA

View File

@ -1,6 +1,7 @@
=========================== ===========================
Create and manage databases Create and manage databases
=========================== ===========================
The Database service provides scalable and reliable cloud provisioning The Database service provides scalable and reliable cloud provisioning
functionality for both relational and non-relational database engines. functionality for both relational and non-relational database engines.
Users can quickly and easily use database features without the burden of Users can quickly and easily use database features without the burden of