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
EVS Disks
- During component deployment, choose Advanced Settings > Deployment Configuration in the Advanced Settings area.
- Choose Data Storage > Cloud Storage > Add Cloud Storage and set parameters by referring to Table 2.
- Click OK.
SFS File Systems
- During component deployment, choose Advanced Settings > Deployment Configuration in the Advanced Settings area.
- 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 a created storage.
- Automatic
A storage is created automatically. You need to enter the storage capacity.
Add Docker Mounting
- Set Sub-path and Container Path to the path to which the data volume is mounted.
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.
- 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.
- Manual
- Click OK.
OBS Buckets
- During component deployment, choose Advanced Settings > Deployment Configuration in the Advanced Settings area.
- 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 a created storage.
- Automatic
- 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.
- Select a storage sub-type. You can select Standard or Infrequent Access.
- Set Secret.
Add Docker Mounting
- Set Sub-path and Container Path to the path to which the data volume is mounted.
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.
- 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.
- Manual
- Click OK.
HostPath
The file or directory of the host is mounted to the component.
- During component deployment, choose Advanced Settings > Deployment Configuration in the Advanced Settings area.
- Choose Data Storage > Local Disk > Add Local Disk and set parameters by referring to Table 5.
Table 5 HostPath Parameter
Description
Local Disk Type
Select HostPath.
Host Path
Enter the host path, for example, /etc/hosts.
Docker Mounting
- Set Sub-path and Container Path to the path to which the data volume is mounted.
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.
- 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.
- Set Sub-path and Container Path to the path to which the data volume is mounted.
- 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.
- During component deployment, choose Advanced Settings > Deployment Configuration in the Advanced Settings area.
- Choose Data Storage > Local Disk > Add Local Disk and set parameters by referring to Table 6.
Table 6 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
- Set Sub-path and Container Path to the path to which the data volume is mounted.
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.
- 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.
- Click OK.
ConfigMap
ServiceStage separates the application codes from configuration files. ConfigMap is used to process application component configuration parameters.
- During component deployment, choose Advanced Settings > Deployment Configuration in the Advanced Settings area.
- Choose Data Storage > Local Disk > Add Local Disk and set parameters by referring to Table 7.
Table 7 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.
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.
- 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.
- Set Sub-path and Container Path to the path to which the data volume is mounted.
- Click OK.
Secret
The data in the secret is mounted to the specified application component. The content of the secret is user-defined.
- During component deployment, choose Advanced Settings > Deployment Configuration in the Advanced Settings area.
- Choose Data Storage > Local Disk > Add Local Disk and set parameters by referring to Table 8.
Table 8 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.
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.
- 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.
- Set Sub-path and Container Path to the path to which the data volume is mounted.
- Click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot