百度智能云

All Product Document

          Intelligent Edge

          Service Call

          Definition of terms

          Container application: is the application composed of container service configuration and data volume configuration.

          Function application: is the application composed of function service configuration and data volume configuration.

          Feature Introduction

          The "Service Call" means that other services running on the edge computing platform you can access through the agreed domain name address on the edge node. In essence, the call between services is carried out based on the network model of Kubernetes Pods and the Kubernetes Service resources. For more information, see Kubernetes documentation: Connect to Applications by Using Service.

          Call Process

          The service call includes the "Container Application" service call and "Function Application" service call.

          Container application

          1. Create a container application

          Click "Create Application" on the Application List page to enter the Create page. Fill in the application information, select "Container Application", and fill in the "Container Port" to be exposed on the Service Configuration Information interface. After the configuration of the container port, the edge computing platform will create a Kubernetes Service resource for this service on the end side, which is used to proxy the network traffic of Pods corresponding to this service. For the details on the application creation, refer to Application Deployment.

          For example, create a service to deploy the nginx program and configure the container port 80.

          image.png

          After deployment of the program to the edge computing node, you can see that you have created a Kubernetes Service resource with the name nginx through the kubectl command.

          image.png

          The Kubernetes Service name is the same as that on the Service Configuration Information interface.

          Then, we access the nginx applications in the Kubernetes cluster on the edge node through the Kubernetes Service.

          1. Service call

          You can access the specific service through the service name: container port number in the previous step. For example, you can access the nginx service deployed in the previous step through nginx: 80. For example, you can request the HTTP service in the following format:

          http://[service]:[port]/

          The service represents the service name in the application. Besides, the port represents the container port in this service configuration.

          Furthermore, you can also deploy some system container applications in different Kubernetes command spaces via the edge computing platform. At present, the system container applications that are accessible include baetyl-broker and baetyl-function, which you can be requested in the following format:

          [baetyl-broker|baetyl-function].baetyl-edge-system:[port]

          The port is the port of the system container application, supporting configuration. The baetyl-edge-system is the Kubernetes command space of system container application.

          Function application

          The call of function application is different from that of container application. The end-side function computing framework consists of the front-end proxy and back-end function runtime (function application). baetyl-function provides the front end agent, which is a function entry. You can call it by other services through the exposed HTTP interface and then transmits the request to the back-end function runtime module transparently.

          You can request a function application in the following format:

          https://baetyl-function.baetyl-edge-system:50011/[function-service]/[function]

          In the above requrest, 50011 is the port for baetyl-function to provide the service, the function-service is the service name of the function application, and the function represents the function entry. If failed to specify the function field, the system will select the first function in its function list by default when the back-end function operates.

          Previous
          Node Management
          Next
          Node Pre-configuration