Skip to content

Commit d8c56dd

Browse files
authored
Merge pull request ceph#62763 from bluikko/doc-prompts-radosgw
doc/radosgw: Promptify CLI, cosmetic fixes Reviewed-by: Anthony D'Atri <[email protected]>
2 parents 54f7236 + 7fdaa94 commit d8c56dd

File tree

6 files changed

+662
-610
lines changed

6 files changed

+662
-610
lines changed

doc/radosgw/archive-sync-module.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ See `Multisite Configuration`_ for multisite configuration instructions. The
3030
archive sync module requires the creation of a new zone. The zone tier type needs
3131
to be defined as ``archive``:
3232

33-
::
33+
.. prompt:: bash #
34+
35+
radosgw-admin zone create --rgw-zonegroup={zone-group-name} \
36+
--rgw-zone={zone-name} \
37+
--endpoints={http://fqdn}[,{http://fqdn}] \
38+
--tier-type=archive
39+
3440

35-
# radosgw-admin zone create --rgw-zonegroup={zone-group-name} \
36-
--rgw-zone={zone-name} \
37-
--endpoints={http://fqdn}[,{http://fqdn}]
38-
--tier-type=archive
3941

4042
.. _Multisite Configuration: ../multisite

doc/radosgw/cloud-restore.rst

Lines changed: 85 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
===============
2-
Cloud Restore
3-
===============
1+
=============
2+
Cloud Restore
3+
=============
44

55
The :doc:`cloud-transition>` feature makes it possible to transition objects to a remote
66
cloud service. The ``cloud-restore`` feature described below enables restoration
@@ -12,23 +12,22 @@ S3-compatible cloud services. In order to faciliate this,
1212
the ``retain_head_object`` option should be set to ``true``
1313
in the ``tier-config`` when configuring the storage class.
1414

15-
Objects can be restored using the `S3 RestoreObject <https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html>`
16-
PI . The restored copies will be retained within RGW only for the number
15+
Objects can be restored using the `S3 RestoreObject <https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html>`_
16+
API. The restored copies will be retained within RGW only for the number
1717
of ``days`` specified. However if ``days`` is not provided, the restored copies
1818
are considered permanent and will be treated as regular objects.
1919
In addition, by enabling the ``allow_read_through`` option,
20-
the `S3 GetObject <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html>`
20+
the `S3 GetObject <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html>`_
2121
API can be used to restore the object temporarily.
2222

2323

2424
Cloud Storage Class Tier Configuration
2525
--------------------------------------
2626

27-
The `tier configuration <https://docs.ceph.com/en/latest/radosgw/cloud-transition/#cloud-storage-class-configuration>`
27+
The `tier configuration <https://docs.ceph.com/en/latest/radosgw/cloud-transition/#cloud-storage-class-configuration>`_
2828
of the cloud storage class configured for data transition is used to restore
29-
objects as well:
29+
objects as well::
3030

31-
```
3231
{
3332
"access_key": <access>,
3433
"secret": <secret>,`
@@ -44,7 +43,6 @@ objects as well:
4443
"multipart_min_part_size": {part_size},
4544
"retain_head_object": <true | false>
4645
}
47-
```
4846

4947
The below options have been added to the tier configuration to facilitate object restoration.
5048

@@ -53,7 +51,7 @@ The below options have been added to the tier configuration to facilitate object
5351
The storage class to which object data is to be restored. Default value is ``STANDARD``.
5452

5553

56-
read-through specific Configurables:
54+
Read-through Specific Configurables
5755
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5856

5957
* ``allow_read_through`` (``true`` | ``false``)
@@ -67,20 +65,21 @@ Default value is 1 day.
6765

6866
For example:
6967

70-
```
71-
# radosgw-admin zonegroup placement modify --rgw-zonegroup default \
72-
--placement-id default-placement \
73-
--storage-class CLOUDTIER \
74-
--tier-config=endpoint=http://XX.XX.XX.XX:YY,\
75-
access_key=<access_key>,secret=<secret>, \
76-
retain_head_object=true, \
77-
restore_storage_class=COLDTIER, \
78-
allow_read_through=true, \
79-
read_through_restore_days=10
80-
```
68+
.. prompt:: bash #
8169

70+
radosgw-admin zonegroup placement modify --rgw-zonegroup default \
71+
--placement-id default-placement \
72+
--storage-class CLOUDTIER \
73+
--tier-config=endpoint=http://XX.XX.XX.XX:YY,\
74+
access_key=<access_key>,secret=<secret>, \
75+
retain_head_object=true, \
76+
restore_storage_class=COLDTIER, \
77+
allow_read_through=true, \
78+
read_through_restore_days=10
8279

83-
S3 Glacier specific Configurables:
80+
81+
82+
S3 Glacier Specific Configurables
8483
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8584

8685
To restore objects archived in an S3 Glacier or Tape cloud storage class, the
@@ -101,26 +100,27 @@ pricing. Supported options are ``Standard`` and ``Expedited``.
101100

102101
For example:
103102

104-
```
105-
# radosgw-admin zonegroup placement add --rgw-zonegroup=default \
106-
--placement-id=default-placement \
107-
--storage-class=CLOUDTIER-GLACIER --tier-type=cloud-s3-glacier
108-
109-
# radosgw-admin zonegroup placement modify --rgw-zonegroup default \
110-
--placement-id default-placement \
111-
--storage-class CLOUDTIER \
112-
--tier-config=endpoint=http://XX.XX.XX.XX:YY,\
113-
access_key=XXXXX,secret=YYYYY, \
114-
retain_head_object=true, \
115-
target_storage_class=Glacier, \
116-
............
117-
............
118-
restore_storage_class=COLDTIER, \
119-
glacier_restore_days=2, \
120-
glacier_restore_tier_type=Expedited
121-
122-
123-
[
103+
.. prompt:: bash #
104+
105+
radosgw-admin zonegroup placement add --rgw-zonegroup=default \
106+
--placement-id=default-placement \
107+
--storage-class=CLOUDTIER-GLACIER --tier-type=cloud-s3-glacier
108+
radosgw-admin zonegroup placement modify --rgw-zonegroup default \
109+
--placement-id default-placement \
110+
--storage-class CLOUDTIER \
111+
--tier-config=endpoint=http://XX.XX.XX.XX:YY,\
112+
access_key=XXXXX,secret=YYYYY, \
113+
retain_head_object=true, \
114+
target_storage_class=Glacier, \
115+
............ \
116+
............ \
117+
restore_storage_class=COLDTIER, \
118+
glacier_restore_days=2, \
119+
glacier_restore_tier_type=Expedited
120+
121+
::
122+
123+
[
124124
{
125125
"key": "default-placement",
126126
"val": {
@@ -159,47 +159,47 @@ For example:
159159
}
160160
}
161161
]
162-
```
163162

164163

165-
Examples of Restore Objects:
166-
----------------------------
164+
Examples of Restore Objects
165+
---------------------------
167166

168167
Using the S3 RestoreObject CLI
169168
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
170169

171-
Th `S3 restore-object <https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html>`
170+
Th `S3 restore-object <https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html>`_
172171
CLI supports these options:
173172

174-
```
175-
$ aws s3api restore-object
176-
--bucket <value>
177-
--key <value>
178-
[--version-id <value>]
179-
--restore-request (structure) {
180-
Days=<integer>
181-
}
182-
```
173+
.. prompt:: bash $
174+
175+
aws s3api restore-object --bucket <value> \
176+
--key <value> \
177+
[--version-id <value>] \
178+
--restore-request (structure) { \
179+
Days=<integer> \
180+
}
181+
183182

184183
Note: ``Days`` is optional and if not provided, the object is restored permanently.
185184

186185
Example 1:
187186

188-
```
189-
$ aws s3api restore-object --bucket bucket1 --key doc1.rtf
190-
[--version-id 3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo]
191-
--restore-request Days=10
187+
.. prompt:: bash $
188+
189+
aws s3api restore-object --bucket bucket1 --key doc1.rtf \
190+
[--version-id 3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo] \
191+
--restore-request Days=10 \
192192
....
193-
```
193+
194194

195195
This will restore the object ``doc1.rtf`` at an optional version,
196196
for the duration of 10 days.
197197

198198
Example 2:
199199

200-
```
201-
$ aws s3api restore-object --bucket bucket1 --key doc2.rtf --restore-request {} ....
202-
```
200+
.. prompt:: bash $
201+
202+
aws s3api restore-object --bucket bucket1 --key doc2.rtf --restore-request {} ....
203203

204204

205205
This will restore the object ``doc2.rtf`` permanently and it will be treated as regular object.
@@ -212,59 +212,62 @@ Ensure that the ``allow_read_through`` tier-config option is enabled.
212212

213213
Example 3:
214214

215-
```
216-
$ aws s3api get-object --bucket bucket1 --key doc3.rtf ....
217-
```
215+
.. prompt:: bash $
216+
217+
aws s3api get-object --bucket bucket1 --key doc3.rtf ....
218+
218219

219220
This will restore the object `doc3.rtf`` for ``read_through_restore_days`` days.
220221

221222
Note: The above CLI command may time out if object restoration takes too long.
222223
You can verify the restore status before reissuing the command.
223224

224225

225-
Verifying the restoration status
226+
Verifying the Restoration Status
226227
--------------------------------
227228
Verify the status of the restoration by issuing
228-
an `S3 HeadObject <https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html#API_HeadObject_ResponseSyntax>`
229+
an `S3 HeadObject <https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html#API_HeadObject_ResponseSyntax>`_
229230
request. The response includes the ``x-amz-restore`` header if object restoration
230231
is in progress or a copy of it is already restored.
231232

232233
Example:
233234

234-
```
235-
$ aws s3api head-object --key doc1.rtf --bucket bucket1 ....
236-
```
235+
.. prompt:: bash $
236+
237+
aws s3api head-object --key doc1.rtf --bucket bucket1 ....
238+
237239

238240
The ``radosgw-admin`` CLI can be used to check restoration status and other
239241
details.
240242

241243
Example:
242244

243-
```
244-
$ radosgw-admin object stat --bucket bucket1 --object doc1.rtf
245-
```
245+
.. prompt:: bash $
246+
247+
radosgw-admin object stat --bucket bucket1 --object doc1.rtf
248+
246249

247250

248251
Restored Object Properties
249252
--------------------------
250253

251254
Storage
252-
~~~~~~
255+
~~~~~~~
253256
Objects are restored to the storage class configured via ``restore_storage_class``
254257
in the tier-config. However, as
255-
per `<https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html>`
258+
per `<https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html>`_
256259
the storage class of restored objects should remain unchanged. Therefore, for
257-
temporary copies, the ```x-amz-storage-class``` will continue to reflect the
260+
temporary copies, the ``x-amz-storage-class`` will continue to reflect the
258261
original cloud-tier storage class.
259262

260263

261264
mtime
262-
~~~~
265+
~~~~~
263266
The ``mtime`` of the transitioned and restored objects should remain unchanged.
264267

265268

266269
Lifecycle
267-
~~~~~~~~
270+
~~~~~~~~~
268271
``Temporary`` copies are not subject to transition to the cloud. However, as is the
269272
case with cloud-transitioned objects, they can be deleted via regular LC (Life Cycle)
270273
expiration rules or an external S3 ``delete`` request.
@@ -274,15 +277,15 @@ policies.
274277

275278

276279
Replication
277-
~~~~~~~~~~
280+
~~~~~~~~~~~
278281
``Temporary`` copies are not replicated and will be retained only by the zone
279282
on which the restore request is initiated.
280283

281284
``Permanent`` copies are replicated like other regular objects.
282285

283286

284287
Versioned Objects
285-
~~~~~~~~~~~~~~~~
288+
~~~~~~~~~~~~~~~~~
286289
For versioned objects, if an object has been cloud-transitioned, it is in a
287290
non-current state. After a restore, the same non-current object will be
288291
updated with the downloaded data, and its ``HEAD`` object will be modified accordingly.

0 commit comments

Comments
 (0)