Updated on 2024-07-01 GMT+08:00

Configuring a Bucket

A bucket is a container for storing objects in OBS. It provides massive, secure, reliable, and cost-effective data storage.

  • The cloud storage configuration path must be different from the log collection path.
  • Currently, only Standard buckets are supported.

Prerequisites

You have uploaded all files in the application path to be mounted to the OBS bucket.

For details, see Uploading an Object.

Procedure

  1. Log in to CAE.
  2. Choose Component Configurations.
  3. Select the target component from the drop-down list in the upper part of the page.

    Figure 1 Selecting a component

  4. Click Edit in the Cloud Storage module.
  5. Click Set Bucket.
  6. Select an authorized bucket from the drop-down list.

    To add an authorization, click Authorize Bucket. For details, see Authorizing a Bucket.

  7. Configure the path to which the container is mounted and the permissions on the path. For details, see Table 1.

    Table 1 Parameters

    Parameter

    Description

    File Mask (umask)

    File mask (umask) of the file to mount.

    Enter four digits (0 to 7).

    Default value: 0027.

    NOTE:

    A user file-creation mask (umask) is used to set permissions for newly created files.

    You can set a umask in the CAE cloud storage configuration to set permissions for the directories and files to mount. For example, 0027 indicates that the permission on the directory is 750 and that on the file is 640.

    Mount Path

    Component path to which the data storage is mounted.

    For example, if the index.html file is stored in the OBS bucket test-nginx, enter index.html to reference the file.

    NOTE:
    • Do not mount the data storage to a system directory, such as / or /var/run. Otherwise, an exception occurs.
    • The mount path of the cloud storage must be unique.

    Sub-path

    Sub-path in the cloud storage referenced by data.

    NOTE:
    • A sub-path is used to mount a local volume so that the same data volume is used in a single pod.
    • If this parameter is left blank, the root path is used.

    Required Permissions

    Permissions on the mount path and files in the mount path. The value can be Read/Write or Read only.

    Figure 2 Configuring a bucket

  8. (Optional) Click Add Mount Path to configure more mount paths.
  9. Click OK.

    You can view the configured buckets on the Cloud Storage page.

  10. Make the configurations take effect.

    • If the component has been deployed, click Activate Settings in the upper part of the page. In the dialog box displayed on the right, confirm the configurations and click OK for the configurations to take effect.
    • If the component has not been deployed, click Set and Deploy Component in the upper part of the page. In the dialog box displayed on the right, click OK. After the deployment is complete, the configurations take effect.