Updated on 2024-05-28 GMT+08:00

Configuring Data Storage

Container storage is a component that provides storage for applications. Multiple types of storage are supported. An application component can use any amount of storage.

Components deployed using CCE support data storage settings.

Scenario

Table 1 Storage scenarios

Storage Type

Scenario

EVS Disks

EVS supports three specifications: common I/O, high I/O, and ultra-high I/O.

  • Common I/O: The backend storage is provided by the Serial Advanced Technology Attachment (SATA) storage media. Common I/O is applicable to scenarios where large capacity is needed but high read/write rate is not required, and the volume of transactions is low. Examples include development testing and enterprise office applications.
  • High I/O: The backend storage is provided by the Serial Attached SCSI (SAS) storage media. High I/O is applicable to scenarios where relatively high performance, high read/write rate, and real-time data storage are required. Examples include creating file systems and sharing distributed files.
  • Ultra-high I/O: The backend storage is provided by the Solid-State Drive (SSD) storage media. Ultra-high I/O is applicable to scenarios where high performance, high read/write rate, and data-intensive applications are required. Examples include NoSQL, relational database, and data warehouse (such as Oracle RAC and SAP HANA).

SFS File Systems

SFS applies to a wide range of scenarios, including media processing, content management, big data, and workload analysis.

OBS Buckets

  • Standard OBS buckets:

    This type of OBS buckets applies to scenarios where a large number of hotspot files or small-sized files need to be accessed frequently (multiple times per month on average) and data can be quickly obtained. For example, cloud applications, data analysis, content analysis, and hotspot objects.

  • Infrequent access OBS buckets:

    This type of OBS buckets applies to scenarios where data is not frequently accessed (less than 12 times per year on average) but fast access response is required. For example, static website hosting, backup/active archiving, storage resource pools or backup storage for cloud services.

SFS Turbo

SFS Turbo file systems are fast, on-demand, and scalable, which are suitable for DevOps, containerized microservices, and enterprise office applications.

HostPath

The file directory of the host where the application component is located is mounted to the specified mounting point of the application. If the application component needs to access /etc/hosts, use HostPath to map /etc/hosts.

NOTICE:

Do not mount the file directory to a system directory such as / or /var/run. Otherwise, an exception occurs. An empty directory is recommended. If the directory is not empty, ensure that the directory does not contain any files that affect the application component instance startup. Otherwise, the file will be replaced, causing application component instance startup exceptions.

EmptyDir

Used for temporary storage. The lifecycle of temporary storage is the same as that of an application component instance. When an application instance disappears, EmptyDir will be deleted and the data is permanently lost.

ConfigMap

Keys in a configuration item are mapped to an application so that configuration files can be mounted to the specified application component directory.

Secret

Sensitive information such as application authentication and application keys is stored in a secret, and the secret is mounted to a specified path of the application component.

EVS Disks

  1. During component deployment, choose Advanced Settings > Deployment Configuration in the Advanced Settings area.
  2. Choose Data Storage > Cloud Storage > Add Cloud Storage and set parameters by referring to Table 2.

    Table 2 EVS disks

    Parameter

    Description

    Storage Type

    Select EVS disk.

    The method of using an EVS disk is the same as that of using a traditional disk. However, EVS disks have higher data reliability and I/O throughput and are easier to use. They apply to file systems, databases, or other system software or workloads that require block storage devices.

    Storage Allocation Mode

    • Manual

      Select an EVS volume. You need to create an EVS volume in advance. For details, see EVS Volumes.

    • Automatic

      A storage is created automatically. You need to enter the storage capacity.

      1. If Storage Class is set to EVS Disk, select an AZ for creating the EVS disk first.
      2. Select a storage sub-type.

        High I/O: EVS disks that have high I/O and use SAS.

        Common I/O: EVS disks that use SATA.

        Ultra-high I/O: EVS disks that have ultra-high I/O and use SSD.

      3. Enter the storage capacity, in the unit of GB. Ensure that the storage capacity quota is not exceeded; otherwise, creation will fail.

    Add Docker Mounting

    1. Set Sub-path and Container Path to the path to which the data volume is mounted.
      For example, if Container Path is set to /tmp and Sub-path is set to /app, the data volume is mounted to /tmp/app of the application.
      NOTICE:
      • Do not mount a data volume to a system directory such as / or /var/run. Otherwise, an exception occurs. An empty directory is recommended. If the directory is not empty, ensure that the directory does not contain any file that affects application startup. Otherwise, the files will be replaced, causing application startup exceptions. As a result, the application fails to be created.
      • When the data volume is mounted to a high-risk directory, you are advised to use a low-permission account to start the application; otherwise, high-risk files on the host may be damaged.
    2. Set Permission.
      • Read-only: allows you only to read data volumes in the application path.
      • Read/Write: allows you to modify data volumes in the application path. To prevent data loss, newly written data will not be migrated during application migration.

  3. Click OK.

SFS File Systems

  1. During component deployment, choose Advanced Settings > Deployment Configuration in the Advanced Settings area.
  2. Choose Data Storage > Cloud Storage > Add Cloud Storage and set parameters by referring to Table 3.

    Table 3 SFS file systems

    Parameter

    Description

    Storage Type

    Select SFS.

    SFS applies to a wide range of scenarios, including media processing, content management, big data, and application analysis.

    Storage Allocation Mode

    • Manual

      Select an SFS volume. You need to create an SFS volume in advance. For details, see SFS Volumes.

    • Automatic

      A storage is created automatically. You need to enter the storage capacity.

      1. Select a storage sub-type.

        Set the sub-type to NFS.

      2. Enter the storage capacity, in the unit of GB. Ensure that the storage capacity quota is not exceeded; otherwise, creation will fail.

    Add Docker Mounting

    1. Set Sub-path and Container Path to the path to which the data volume is mounted.
      For example, if Container Path is set to /tmp and Sub-path is set to /app, the data volume is mounted to /tmp/app of the application.
      NOTICE:
      • Do not mount a data volume to a system directory such as / or /var/run. Otherwise, an exception occurs. An empty directory is recommended. If the directory is not empty, ensure that the directory does not contain any file that affects application startup. Otherwise, the files will be replaced, causing application startup exceptions. As a result, the application fails to be created.
      • When the data volume is mounted to a high-risk directory, you are advised to use a low-permission account to start the application; otherwise, high-risk files on the host may be damaged.
    2. Set Permission.
      • Read-only: allows you only to read data volumes in the application path.
      • Read/Write: allows you to modify data volumes in the application path. To prevent data loss, newly written data will not be migrated during application migration.

  3. Click OK.

OBS Buckets

  1. During component deployment, choose Advanced Settings > Deployment Configuration in the Advanced Settings area.
  2. Choose Data Storage > Cloud Storage > Add Cloud Storage and set parameters by referring to Table 4.

    Table 4 OBS buckets

    Parameter

    Description

    Storage Type

    Select OBS.

    Standard and Infrequent Access OBS classes are supported. OBS buckets apply to scenarios such as big data analytics, cloud native application data, static website hosting, and backup/active archiving.

    Storage Allocation Mode

    • Manual

      Select an OBS volume. You need to create an OBS volume in advance. For details, see OBS Volumes.

    • Automatic
      1. Set Secret.

        Namespace is the namespace of the container where the component instance is deployed when creating and deploying a component. It cannot be changed.

        Click Use Existing Secret to select the secret in the namespace of the container where the component instance is located.

        You can also create a secret: Enter a new secret name, click Add Key File, and upload the obtained local secret file. For details about how to obtain the secret file, see Access Keys.

      2. Select a storage sub-type. You can select Standard or Infrequent Access.

    Add Docker Mounting

    1. Set Sub-path and Container Path to the path to which the data volume is mounted.
      For example, if Container Path is set to /tmp and Sub-path is set to /app, the data volume is mounted to /tmp/app of the application.
      NOTICE:
      • Do not mount a data volume to a system directory such as / or /var/run. Otherwise, an exception occurs. An empty directory is recommended. If the directory is not empty, ensure that the directory does not contain any file that affects application startup. Otherwise, the files will be replaced, causing application startup exceptions. As a result, the application fails to be created.
      • When the data volume is mounted to a high-risk directory, you are advised to use a low-permission account to start the application; otherwise, high-risk files on the host may be damaged.
    2. Set Permission.
      • Read-only: allows you only to read data volumes in the application path.
      • Read/Write: allows you to modify data volumes in the application path. To prevent data loss, newly written data will not be migrated during application migration.

  3. Click OK.

SFS Turbo

  1. During component deployment, choose Advanced Settings > Deployment Configuration in the Advanced Settings area.
  2. Choose Data Storage > Cloud Storage > Add Cloud Storage and set parameters by referring to Table 5.

    Table 5 SFS Turbo

    Parameter

    Description

    Storage Type

    Select SFS Turbo.

    Standard and Infrequent Access OBS buckets are supported. OBS buckets apply to scenarios such as big data analytics, cloud native application data, static website hosting, and backup/active archiving.

    Storage Allocation Mode

    • Manual

      Select an SFS Turbo volume. You need to create an SFS Turbo volume in advance. For details, see SFS Turbo.

    • Automatic

      Select an SFS Turbo file system. You need to create an SFS Turbo file system in advance. For details, see Creating an SFS Turbo File System.

    Add Docker Mounting

    1. Set Sub-path and Container Path to the path to which the data volume is mounted.
      For example, if Container Path is set to /tmp and Sub-path is set to /app, the data volume is mounted to /tmp/app of the application.
      NOTICE:
      • Do not mount a data volume to a system directory such as / or /var/run. Otherwise, an exception occurs. An empty directory is recommended. If the directory is not empty, ensure that the directory does not contain any file that affects application startup. Otherwise, the files will be replaced, causing application startup exceptions. As a result, the application fails to be created.
      • When the data volume is mounted to a high-risk directory, you are advised to use a low-permission account to start the application; otherwise, high-risk files on the host may be damaged.
    2. Set Permission.
      • Read-only: allows you only to read data volumes in the application path.
      • Read/Write: allows you to modify data volumes in the application path. To prevent data loss, newly written data will not be migrated during application migration.

  3. Click OK.

HostPath

The file or directory of the host is mounted to the component.

  1. During component deployment, choose Advanced Settings > Deployment Configuration in the Advanced Settings area.
  2. Choose Data Storage > Local Disk > Add Local Disk and set parameters by referring to Table 6.

    Table 6 HostPath

    Parameter

    Description

    Local Disk Type

    Select HostPath.

    Host Path

    Enter the host path, for example, /etc/hosts.

    Docker Mounting

    1. Set Sub-path and Container Path to the path to which the data volume is mounted.
      For example, if Container Path is set to /tmp and Sub-path is set to /app, the data volume is mounted to /tmp/app of the application.
      NOTICE:
      • Do not mount a data volume to a system directory such as / or /var/run. Otherwise, an exception occurs. An empty directory is recommended. If the directory is not empty, ensure that the directory does not contain any file that affects application startup. Otherwise, the files will be replaced, causing application startup exceptions. As a result, the application fails to be created.
      • When the data volume is mounted to a high-risk directory, you are advised to use a low-permission account to start the application; otherwise, high-risk files on the host may be damaged.
    2. Set Permission.
      • Read-only: allows you only to read data volumes in the application path.
      • Read/Write: allows you to modify data volumes in the application path. To prevent data loss, newly written data will not be migrated during application migration.

  3. Click OK.

EmptyDir

EmptyDir applies to temporary data storage, disaster recovery, and shared running. It will be deleted upon deletion or transfer of application component instances.

  1. During component deployment, choose Advanced Settings > Deployment Configuration in the Advanced Settings area.
  2. Choose Data Storage > Local Disk > Add Local Disk and set parameters by referring to Table 7.

    Table 7 EmptyDir

    Parameter

    Description

    Local Disk Type

    Select EmptyDir.

    Disk Media

    • If you select Memory, the running speed is improved, but the storage capacity is limited by the memory size. This mode applies to a small amount of data with high requirements on reading and writing efficiency.
    • If Memory is not selected, data is stored in disks, which is applicable to a large amount of data with low requirements on reading and writing efficiency.

    Docker Mounting

    1. Set Sub-path and Container Path to the path to which the data volume is mounted.
      For example, if Container Path is set to /tmp and Sub-path is set to /app, the data volume is mounted to /tmp/app of the application.
      NOTICE:
      • Do not mount a data volume to a system directory such as / or /var/run. Otherwise, an exception occurs. An empty directory is recommended. If the directory is not empty, ensure that the directory does not contain any file that affects application startup. Otherwise, the files will be replaced, causing application startup exceptions. As a result, the application fails to be created.
      • When the data volume is mounted to a high-risk directory, you are advised to use a low-permission account to start the application; otherwise, high-risk files on the host may be damaged.
    2. Set Permission.
      • Read-only: allows you only to read data volumes in the application path.
      • Read/Write: allows you to modify data volumes in the application path. To prevent data loss, newly written data will not be migrated during application migration.

  3. Click OK.

ConfigMap

ServiceStage separates the application codes from configuration files. ConfigMap is used to process application component configuration parameters.

  1. During component deployment, choose Advanced Settings > Deployment Configuration in the Advanced Settings area.
  2. Choose Data Storage > Local Disk > Add Local Disk and set parameters by referring to Table 8.

    Table 8 ConfigMap

    Parameter

    Description

    Local Disk Type

    Select ConfigMap.

    Configuration Item

    Select the desired configuration item name.

    Create a configuration item. For details, see Creating a Configuration Item.

    Docker Mounting

    Set Sub-path and Container Path to the path to which the data volume is mounted.

    For example, if Container Path is set to /tmp and Sub-path is set to /app, the data volume is mounted to /tmp/app of the application.

    When you select ConfigMap, only Read-only is supported. You can only read the data volume in the container path.
    NOTICE:
    • Do not mount a data volume to a system directory such as / or /var/run. Otherwise, an exception occurs. An empty directory is recommended. If the directory is not empty, ensure that the directory does not contain any file that affects application startup. Otherwise, the files will be replaced, causing application startup exceptions. As a result, the application fails to be created.
    • When the data volume is mounted to a high-risk directory, you are advised to use a low-permission account to start the application; otherwise, high-risk files on the host may be damaged.

  3. Click OK.

Secret

The data in the secret is mounted to the specified application component. The content of the secret is user-defined.

  1. During component deployment, choose Advanced Settings > Deployment Configuration in the Advanced Settings area.
  2. Choose Data Storage > Local Disk > Add Local Disk and set parameters by referring to Table 9.

    Table 9 Secret

    Parameter

    Description

    Local Disk Type

    Select Secret.

    Secret Item

    Select the desired secret name.

    For details about how to create a secret, see Creating a Secret.

    Docker Mounting

    Set Sub-path and Container Path to the path to which the data volume is mounted.

    For example, if Container Path is set to /tmp and Sub-path is set to /app, the data volume is mounted to /tmp/app of the application.

    When you select Secret, only Read-only is supported. You can only read the data volume in the container path.
    NOTICE:
    • Do not mount a data volume to a system directory such as / or /var/run. Otherwise, an exception occurs. An empty directory is recommended. If the directory is not empty, ensure that the directory does not contain any file that affects application startup. Otherwise, the files will be replaced, causing application startup exceptions. As a result, the application fails to be created.
    • When the data volume is mounted to a high-risk directory, you are advised to use a low-permission account to start the application; otherwise, high-risk files on the host may be damaged.

  3. Click OK.