Chapter 4. Creating and managing buckets using MCG object browser
Multicloud Object Gateway (MCG) object browser within the OpenShift console enables you to create and manage buckets to keep your data organized and accessible. You can navigate to your S3 and OpenShift managed buckets and perform the following activities:
- Add new objects
- View objects
- Download objects
- Share objects
4.1. Creating new buckets using MCG object browser Copy linkLink copied to clipboard!
Prerequisites
- Administrator access to OpenShift Data Foundation.
-
Make sure MCG cluster is deployed and
noobaa-endpoint-* pod is running in the MCG namespace.
Procedure
-
In the OpenShift Web Console, click Storage
Object Storage. - Click the Buckets tab.
Select one of the following options to create the buckets:
Create via Object Bucket Claim
NoteFor RGW object bucket claims (OBCs), you must use the credentials associated with the OBC to access the newly created bucket. RGW administrator credentials cannot be used to access these buckets.
- Select a namespace.
- Enter the ObjectBucketClaim name.
- Select the storage class.
- Select the bucket class
- Select the Enable replication to obtain higher resiliency of the objects stored in the buckets.
- Click Create using ObjectBucketClaim.
Create via S3 API
- Enter a name for the bucket.
- Add tags with different key and value criteria to tag your bucket.
- Click Create.
4.2. Listing bucket details using MCG object browser Copy linkLink copied to clipboard!
Prerequisites
- Administrator access to OpenShift Data Foundation.
-
Make sure MCG cluster is deployed and
noobaa-endpoint-* pod is running in the MCG namespace.
Procedure
-
In the OpenShift Web Console, click Storage
Object Storage. Click the Buckets tab.
All the MCG buckets that are created are listed in the page.
- Select the required bucket.
- Click the Details tab.
4.3. Listing objects and object details using MCG object browser Copy linkLink copied to clipboard!
Prerequisites
- Administrator access to OpenShift Data Foundation.
-
Make sure MCG cluster is deployed and
noobaa-endpoint-* pod is running in the MCG namespace.
Procedure
-
In the OpenShift Web Console, click Storage
Object Storage. - Click the Buckets tab and select the required bucket.
- Click the Objects tab.
Select the required object.
A sidebar pops-up with the object details.
4.4. Downloading or previewing objects using MCG object browser Copy linkLink copied to clipboard!
Prerequisites
- Administrator access to OpenShift Data Foundation.
-
Make sure MCG cluster is deployed and
noobaa-endpoint-* pod is running in the MCG namespace.
Procedure
-
In the OpenShift Web Console, click Storage
Object Storage. - Click the Buckets tab and select the required bucket.
- Select the Objects tab.
- In the options menu corresponding to the required object, select either Download or Preview based on your requirement.
Preview is a browser dependent feature, which means that if a browser does not recognize the file or the object’s type or extension, such as .zip, .rar, and so on, and unable to display it in a separate tab, then the file or the object is downloaded by default.
4.6. Uploading objects to the bucket using MCG object browser Copy linkLink copied to clipboard!
Prerequisites
- Administrator access to OpenShift Data Foundation.
-
Make sure MCG cluster is deployed and
noobaa-endpoint-* pod is running in the MCG namespace.
Procedure
-
In the OpenShift Web Console, click Storage
Object Storage. - Click the Buckets tab and select the required bucket.
- Select the Objects tab.
In the Add objects section, do one of the following:
- To upload a folder, click Upload and select the folder that you want to upload from the browser.
- To upload specific files, drag and drop the files.
Click on the object that you added.
A window with the Overview and Versions tab opens up for the object where you can get an overview of the object and the different versions of the object if the versioning is enabled.
4.7. Creating folder using MCG object browser Copy linkLink copied to clipboard!
Prerequisites
- Administrator access to OpenShift Data Foundation.
-
Make sure MCG cluster is deployed and
noobaa-endpoint-* pod is running in the MCG namespace.
Procedure
-
In the OpenShift Web Console, click Storage
Object Storage. - Click the Buckets tab and select the required bucket.
- Select the Objects tab.
- Click Create folder.
- Enter a name for the folder that satisfies the requirements.
Click Create.
You are redirected inside the new folder.
The new folder persists only if you upload objects to it. If you navigate away without uploading the objects, the folder disappears.
4.8. Deleting objects using MCG object browser Copy linkLink copied to clipboard!
Prerequisites
- Administrator access to OpenShift Data Foundation.
-
Make sure MCG cluster is deployed and
noobaa-endpoint-* pod is running in the MCG namespace.
Procedure
-
In the OpenShift Web Console, click Storage
Object Storage. - Click the Buckets tab and select the required bucket.
- Select the Objects tab.
To delete the object, do one of the following:
- To delete multiple objects together, select multiple objects using the checkbox and then from the Actions menu select Delete.
- To delete a single object, select the Action menu corresponding to the object and select Delete.
You cannot delete a folder directly.
4.9. Deleting or emptying bucket using MCG object browser Copy linkLink copied to clipboard!
Prerequisites
- Administrator access to OpenShift Data Foundation.
-
Make sure MCG cluster is deployed and
noobaa-endpoint-* pod is running in the MCG namespace.
Procedure
-
In the OpenShift Web Console, click Storage
Object Storage. - Click the Buckets tab.
- In the options menu corresponding to the required bucket, select Empty bucket.
- Enter the bucket name for confirmation and click Empty bucket.
- After the bucket is empty, in the options menu corresponding to the bucket, select Delete bucket.
- Enter the bucket name for confirmation and click Delete bucket.
4.10. Creating new lifecycle rules using MCG object browser Copy linkLink copied to clipboard!
Prerequisites
- Administrator access to OpenShift Data Foundation.
-
Make sure MCG cluster is deployed and
noobaa-endpoint-* pod is running in the MCG namespace.
Procedure
-
In the OpenShift Web Console, click Storage
Object Storage. - Click the Buckets tab.
Select a bucket for which the lifecycle rule needs to be created.
You can also create a new bucket using the steps from the Creating a new bucket using the MCG Object browser section.
- In the bucket view, click the Management tab.
- Click on Create lifecycle rule.
- Enter a name for the lifecycle rule.
Select one of the following Rule scope.
Rules can be created for either a specific subset of objects within a bucket or all objects in the bucket.
Targeted
Add any or all of the following filters to apply the rule for the specific object:
- Prefix
- Object tags
- Object size
- Global (Bucket-wide)
Define at least one lifecycle rule.
Delete an object after a specified time
For a versioned bucket, the current version of the object is retained as a noncurrent version. For a nonversioned object, the object is deleted permanently.
Noncurrent versions of the objects
This rule which applies to only the versioned objects deletes the older versions of the objects after they become noncurrent.
Incomplete multipart uploads
This rule cleans up the abandoned uploads that were initiated but never completed after a specified period of time to prevent unnecessary storage costs. The object tags and size filter that were specified for the object with the targeted rule scope are not applicable for this rule and it deletes all multipart uploads from the bucket regardless of any filter.
Expired object delete markers
This rule removes any unnecessary delete markers in versioned buckets that do not have any associated object versions, which might clutter bucket listings. The object tags and size filter that were specified for the object with the targeted rule scope are not applicable for this rule and it deletes all multipart uploads from the bucket regardless of any filter.
Note- The object tags and object size filters are not applicable for this rule. The expired object delete markers are removed from the bucket regardless of any filters that are configured.
- This rule is not enabled when delete an object after a specified time rule is selected.
Click Save.
The newly created rule is listed in the Lifecycle rules page.
4.11. Editing lifecycle rules using MCG object browser Copy linkLink copied to clipboard!
Prerequisites
- Administrator access to OpenShift Data Foundation.
-
Make sure MCG cluster is deployed and
noobaa-endpoint-* pod is running in the MCG namespace.
Procedure
-
In the OpenShift Web Console, click Storage
Object Storage. - Click the Buckets tab.
- Select a bucket for which the lifecycle rule needs to be edited.
- In the bucket view, click the Management tab.
- In the Lifecycle rules tab, existing rules are listed.
- Select the rule that you want to edit and from the Action menu select Edit lifecycle rule.
- Edit the required fields and click Save.
4.12. Creating Cross Origin Resource Sharing (CORS) rule Copy linkLink copied to clipboard!
Prerequisites
- Administrator access to OpenShift Data Foundation.
-
Make sure MCG cluster is deployed and
noobaa-endpoint-* pod is running in the MCG namespace.
Procedure
-
In the OpenShift Web Console, click Storage
Object Storage. - Click the Buckets tab.
- Select a bucket for which you need to create the CORS rule.
- In the bucket view, click the Permission tab and then click the CORS tab.
- Click Create CORS rule.
- Provide a name for the rule.
Select one of the following for Allowed origins:
- All origins to allow requests from all domains
Custom origins to allow requests only from specified domains:
- You can add the required domains under Origin.
- Select the required Allowed methods.
Select one of the following for Allowed headers:
- All headers to allow all headers
Custom headers to restrict access to the specified headers
- You can add required headers under the Exposed header.
- Enter the maximum age of preflight request in seconds.
- Click Create.
4.13. Editing Cross Origin Resource Sharing (CORS) rule Copy linkLink copied to clipboard!
Prerequisites
- Administrator access to OpenShift Data Foundation.
-
Make sure MCG cluster is deployed and
noobaa-endpoint-* pod is running in the MCG namespace.
Procedure
-
In the OpenShift Web Console, click Storage
Object Storage. - Click the Buckets tab.
- Select a bucket for which you need to edit the CORS rule.
- In the bucket view, click the Permission tab and then click the CORS tab.
- Select the CORS rule that you want to edit.
- From the Actions menu, click Edit configuration.
- Modify the required fields.
- Click Save.
4.14. Using bucket policy to grant public or restricted access to objects Copy linkLink copied to clipboard!
Prerequisites
- Administrator access to OpenShift Data Foundation.
-
Make sure MCG cluster is deployed and
noobaa-endpoint-* pod is running in the MCG namespace.
Procedure
-
In the OpenShift Web Console, click Storage
Object Storage. - Click the Buckets tab.
- Select a bucket for which you need to set a policy.
- In the bucket view, click the Permission tab.
In the Bucket policy tab, you can do one of the following:
When no policy exists, you can do one of the following:
- Drag a file from another location or upload a file using the Browse button.
Start from scratch or use a predefined policy configuration. Select Use a predefined policy configuration.
- Create a new policy or choose a policy from Available policies.
- Update the policy as required.
- Click Apply policy.
- Click Confirm to update the policy after reviewing the changes.
When a policy already exists, use a predefined policy configuration by selecting the Edit bucket policy from the Action menu.
- Select Use a predefined policy configuration.
- Choose a policy from Available policies.
- Update the policy as required.
- Click Apply policy.
- Click Confirm to update the policy after reviewing the changes.
The bucket policy configuration may take up to 120 seconds to take effect after it is applied.
4.15. Enabling or suspending versioning of objects in a bucket using MCG object browser Copy linkLink copied to clipboard!
Prerequisites
- Administrator access to OpenShift Data Foundation.
-
Make sure MCG cluster is deployed and
noobaa-endpoint-* pod is running in the MCG namespace.
Procedure
-
In the OpenShift Web Console, click Storage
Object Storage. - Click the Buckets tab.
- Select a bucket for which you need to enable versioning for the objects.
- Click the Properties tab.
- Toggle Versioning to Enabled if you want to enable versioning or switch to Disabled if you want to suspend versioning of objects.
- Click Enable or Suspend to confirm depending on your versioning selection.
You need to update the lifecycle rules after enabling versions.
4.16. Listing versions of objects using MCG object browser Copy linkLink copied to clipboard!
Prerequisites
Administrator access to OpenShift Data Foundation. Make sure MCG cluster is deployed and noobaa-endpoint-* pod is running in the MCG namespace.
Procedure
-
In the OpenShift Web Console, click Storage
Object Storage. - Click the Buckets tab.
- Select a bucket in which you need to list the versions of the objects.
- Click the Objects tab.
Toggle the List all versions.
When List all versions is off:
- The current version of the object excluding the delete markers is displayed.
- Any Action menu actions are only performed for the latest or the current version.
- To view all the versions of a particular object you need to click on that object. It opens up a side bar and in the Versions tab of the sidebar all the versions of the object is displayed.
- Any Action menu option on the Versions sidebar table can be performed on that particular object version.
When List all versions is on:
- All object versions including deleted objects that have delete markers are displayed. Each version of an object is listed as a separate row making it easier to track changes, restore previous versions, recover deleted data or permanently delete objects.
- If you delete a specific version of an object, it is permanently deleted and cannot be undone.
- If you remove a delete marker, the object is restored to its most recent version, which makes it accessible again. If no previous version exists, the object is permanently deleted.