百度智能云

All Product Document

          Intelligent Edge

          Configuration Item

          The configuration item is a resource type used to store the configuration information required for the application. The configuration item allows you to decouple the configuration file from the application container image to enhance the application portability. Unlike the ciphertext type configuration to store sensitive information, the configuration item is mainly used to store the general configuration information, such as a set of configuration files. The application uses the configuration item as the data volume mount. For example, mount a configuration item type volume in the "Volume Configuration" to become a file in Pod. The configuration item will be automatically updated to the Pod that is using the configuration item through the Report/Desire mechanism. For more information, see Kubernetes documentation.

          Design concept

          The configuration item is the abstraction of configuration information required for the application, such as the management configuration file and AI model. The configuration item can realize the isolation and sharing of resources. The application service can use the resources in the configuration item only when the configuration item is mounted. Several application services can mount the same configuration item for sharing.

          The value of the configuration item is shown as follows:

          • The configuration item function can help you manage the configuration of different environments and businesses.
          • It can facilitate you to deploy different environments with the same workload. The configuration file supports multiple versions to facilitate you to update and roll back the workload.
          • It facilitates you to import your configuration into the container in the form of a file quickly.

          Classification

          At present, the configuration item consists of a general configuration item and a function configuration item. The function configuration item is used to store the script to be loaded for the function application, and it supports the Python36, Nodejs10, and SQL runtime. The function configuration item is identified by adding the function tag. After the function tag is added, you can select to use it during the creation of the function application.

          Edit function tag

          Create configuration item

          1. Select "Configuration Management > Configuration Item > Create Configuration Item on the left navigation bar;

            Create configuration item

          2. Enter the configuration item information.

            • Name: Configuration item name, which cannot be empty or duplicated.
            • Description: Description information of configuration item, which can be empty.
            • Configuration item data: The configuration item data is in the form of key-value pair. Please enter the property name and property value. It can be empty.
            • Runtime: At present, it supports the Python36, Nodejs10, and SQL runtime, which can be empty.

            Fill in the configuration item information.

          After the configuration item is mounted to the service in the application, it will create the file in the mount directory in the container corresponding to the service according to the content of the configuration item. Each configuration data (property name - property value) is a file, the property name is the file name, and the property value is the file content. For example, the property name of a data is "key" and the property value is "value", it is mounted in the /test directory. After successful mount, there is a file with the name "key" and the content "value" in the /test directory.

          Three import modes are supported for the configuration item data.

          Add configuration data

          Add the configuration data manually. The variable name is the file name, and the variable value is the file content.

          Add configuration data

          Import file

          Distribute the download address of files in the cloud. After it gets the download address of files, the edge node will download the files at the specified address to import the files. There are two file import modes:

          1. Direct downloading of HTTP files

          Fill in the download address of files in the cloud, and the edge node can download the files from the download address directly.

          image.png

          2. Import file from object storage

          If there is no exposed download address for the files, you can upload the files to the object storage service and import them into the edge node as the object.

          The object storage type supported by BIE includes Baidu Object Storage (BOS) or AWSS3 interface-compliant object storage, such as Minio and CEPH. They are unified as the "BOS" option on the interface. Once the files are uploaded, they will form the common objects, and the format of the files itself will not be important again. Import file from object storage

          When you upload multiple files, you can pack the files as a zip package. Users can select whether the zip package is decompressed at the edge during the configuration in the cloud. If users select "Decompress", this zip package will be decompressed when it is distributed to the end side. The user needs to ensure that the decompressed files will not conflict with other configuration item data.

          To ensure the integrity of file download, you can select to enable the MD5 checksum function. You need to enter the MD5 value of files in the cloud. After file downloading, the node will calculate the MD5 value of local files and compare it with the value in the cloud. If the compared results are consistent with each other, the file download is complete. Otherwise, the Baidu AI cloud will display the download failure. Thus, the files should be downloaded again.

          image.png

          The users who use the BOS service of the current Baidu cloud account can upload the zip package to be imported to BOS in advance. And then, you can select the object storage type as "BOS" and the account as "Current Account". Select the bucket name, file name, checksum, and decompression.

          image.png

          For the BOS service using other accounts and external object storage, you can select the account type as "Other Accounts". Users shall fill in the endpoint, bucket name, file name, and decompression.

          image.png

          • Note: At present, the public cloud supports reading the bucket from South China - Guangzhou region only. The region of BIE should be consistent with that of BOS.

          Import function

          If we set the function tag, we can select to import the function created on Baidu cloud CFC in advance directly. At present, it supports the script import of Python36 and Nodejs85 runtime.

          Import function

          Users select the name and version of the CFC function and click OK to complete the import operation. Then, we will pull this function package to a fixed bucket of user BOS from CFC for storage. Then, the end side device requests this function package, downloads, and then decompresses it.

          Import function from CFC

          For the function configuration item of SQL runtime, the user can add the SQL script in the form of "Add configuration data" because CFC does not support the SQL runtime temporarily.

          Find configuration item

          Select "Configuration Management > Configuration Item > Search Bar" on the left navigation bar.

          Find configuration item

          Delete configuration item

          Select "Configuration Management > Configuration Item > Delete" on the left navigation bar.

          Delete configuration item

          Previous
          Function
          Next
          Image Registry Credential