百度智能云

All Product Document

          Intelligent Edge

          Configure a Core Service

          Description of the Configuration of the Agent Module in the System

          When a core is created, the system will default to configure the agent service for the core.

          • The agent service uses x.509 certificate to realize the bidirectional verification secure connection between the edge core and the cloud management suite, so the service supports to reset certificate.
          • The agent service is a default service in the system and cannot be deleted

          Introduction to the Storage Volume Concept

          • Storage volume: A storage volume in the BIE cloud can be understood as a folder in the distributed configuration. One distribution can contain multiple folders, and the folders can be empty or contain files. In the concept of the BIE cloud, the storage volume contains attributes of the host directory, and it will be placed under the corresponding directory of the host.
          • Mount a storage volume: Service is operating within the container, and there are two demands at this time. One is obtainment of service configuration files, and the other is persistence of service data. They are realized by mounting the storage volume, and through mapping between host directories and directories in the container, configuration obtainment and data persistence are realized.

          Add Service

          Click “Add a service”, enter the name, select Baidu official as the source, select the required module and click OK to complete creation. As shown below:

          image.png

          image.png

          The service configuration is described as follows:

          • Port mapping: For example, 9884:8884, the left is the host port configuration, and the right is the port configuration in the container.
          • Number of service copies: Start the number of services, and in official modules, it will be 0 during function runtime and 1 for others.
          • ENV environment variable: It is in the key-value form and is the content after -e’ in the docker run command.
          • MD startup parameter: It is a command or parameter (it depends on whether there is entrypoint in the Dockerfile. If yes, it is a parameter of entrypoint, otherwise it is a command executed after the container is started) added lastly when docker run is operated, such as -c and onf/conf.yml.
          • mapping: E.g. /dev/video0
          • networks: Configure the network connected to the container. The service supports multiple networks, and each network supports multiple alias.
          • entrypoint: Entry when the service is started. It will not be overwritten by the command specified by the startup parameter of docker run.
          • hostname: Set the host name of the container, and it will be written into /etc/hostname and /etc/hosts in the container.
          • runtime: Specify the runtime of docker operation. There are 3 types of lxc, runc and rkt, and the default is runc.
          • Resource limit

            • Memory restriction: Memory available for the service instance, for example: 500m means 500 M memory can be used.
            • Swap restriction: Swap space available for the service instance, for example: 1g means 1 G memory can be used.
            • Number of processes: Number of processes that can be created for the service instance.
            • cpu number: The ratio of CPU available for the service instance, for example: 1.5 means 1.5 CPU cores can be used.
            • Available cpu core: CPU cores available for the service instance, for example: 0-2 means the 0th to 2nd CPU cores can be used; 0 means the 0th CPU core can be used; 1 means the 1st CPU core can be used.

          The depens_on keyword in Docker Compose is not supported. If you need to set the startup sequence of the container, please see Adjust the service startup sequence


          Mount a Storage Volume to the Service

          Click “Add a storage volume mounting”, select the storage volume which has been created, its corresponding version and container directory, set a read-only privilege, click “OK” to complete the mounting.

          getting-started-core-service-mount.png

          You can set the directory in the container and read/write attribute (whether read only).

          Lastly, click “Save” to complete the service creation.


          View a Service Configuration

          Click “View” to display the service details. Click “Edit”, and it supports to modify the description information, port mapping and number of service duplicates.

          image.png


          Mount a Storage Volume to the Core

          Open the tab page of configuration details > storage volume, click “Import a storage volume”, select the storage volume which has been created, select the version, and click “OK” to complete the import.

          image.png


          Download a Storage Volume

          Click “Download” to download the file content of the storage volume as a compressed package.

          image.png


          Adjust the Service Startup Sequence

          The serial number of the service also represents the startup sequence of the service on the edge core. You can drag the service to adjust the startup sequence of the service, as shown in the figure below:

          image.png

          Previous
          Query and Monitor Core
          Next
          Release and Distribute a Configuration