Help Center> CloudPipeline> User Guide> Service Endpoints
Updated on 2022-10-12 GMT+08:00

Service Endpoints

A service endpoint is an extension plug-in of DevCloud. It enables DevCloud to connect to third-party services.

During the pipeline configuration of a project, you can connect to a third-party GitHub or connect to a third-party Jenkins service to perform some tasks, connect to a Kubernetes cluster to perform deployment tasks, connect to Nexus repository to add private Maven repository information, connect to docker repository to connect to a Docker image repository, or connect to IAM account service endpoints to delegate the AK/SK to the account that needs to run task using service endpoints.

Prerequisites

  • All roles can create service endpoints.
  • Project creators and project managers can view all service endpoints in projects and set permissions.

Creating a Docker Repository Service Endpoint

The Docker repository service endpoint is used to connect to a Docker image repository. After the connection is successful, you can perform operations on Docker images.

  1. In a project, choose Settings > General Settings > Service Endpoints.
  2. On the Service Endpoints page displayed, click Create Service Endpoint and choose Docker repository from the drop-down list box.
  3. In the Create Service Endpoint dialog box displayed, set the parameters.

    Table 1 Parameter description

    Parameter

    Description

    Service Endpoint Name

    Name of the service endpoint.

    Repository URL

    Address of the Docker image repository to connect (HTTP or HTTPS address).

    Username

    Username for connecting to the Docker image repository.

    Password

    Password for connecting to the Docker image repository.

  4. Click OK.

Creating a Jenkins Service Endpoint

The Jenkins service endpoint is used to connect to a Jenkins service. After the connection is successful, you can perform operations on the tasks contained in the Jenkins service.

  1. In a project, choose Settings > General Settings > Service Endpoints.
  2. On the Service Endpoints page displayed, click Create Service Endpoint and choose Jenkins from the drop-down list box.
  3. In the Create Service Endpoint dialog box displayed, set the parameters.

    Table 2 Parameter description

    Parameter

    Description

    Service Endpoint Name

    Name of the service endpoint.

    Server URL

    Address of the Jenkins service to connect. Currently, only public network addresses such as http://<IP_ address>:<port_number> and https://<IP_address>:<port_number> are supported.

    Username

    Username for logging in to the Jenkins service.

    Password

    Password for logging in to the Jenkins service.

    You can click Verify and OK to check whether the username and password can be connected to the Jenkins server.

  4. Click OK.

Creating a Kubernetes Service Endpoint

The Kubernetes service endpoint is used to connect to a Kubernetes cluster. After the connection is successful, you can deliver deployment tasks to the Kubernetes cluster.

  1. In a project, choose Settings > General Settings > Service Endpoints.
  2. On the Service Endpoints page displayed, click Create Service Endpoint and choose Kubernetes cluster from the drop-down list box.
  3. In the Create Service Endpoint dialog box displayed, set the parameters.
    Table 3 Parameter description

    Parameter

    Description

    Service Endpoint Name

    Name of the service endpoint.

    Kubernetes URL

    API server address of the Kubernetes cluster to connect (HTTP or HTTPS address).

    Kubeconfig

    The Kubeconfig file contains information about clusters, users, namespaces, and authentication mechanisms. Kubectl uses kubeconfig to select a cluster and communicate with the Kubernetes APIs. This file supports multiple clusters, users, and authentication mechanisms. Reference link: Organizing Cluster Access Using Kubeconfig Files.

  4. Click OK.

Creating a Nexus Repository Service Endpoint

The Nexus repository endpoint is used to add private Maven repository information.

  1. In a project, choose Settings > General Settings > Service Endpoints.
  2. On the Service Endpoints page displayed, click Create Service Endpoint and choose Nexus repository from the drop-down list box.
  3. In the Create Service Endpoint dialog box displayed, set the parameters.

    Table 4 Parameter description

    Parameter

    Description

    Service Endpoint Name

    Name of the service endpoint.

    Repository URL

    Nexus repository public network address, which is an HTTP or HTTPS address.

    Username

    Username for logging in to the Nexus repository.

    Password

    Password for logging in to the Nexus repository.

  4. Click OK.

Creating a GitHub Service Endpoint

After connecting to a GitHub repository, you can obtain the repository and branch information.

  1. In a project, choose Settings > General Settings > Service Endpoints.
  2. On the Service Endpoints page displayed, click Create Service Endpoint and choose GitHub repository from the drop-down list box.
  3. In the Create Service Endpoint dialog box displayed, select an authentication mode and set other parameters.
    • OAuth authentication

      Table 5 Parameter description

      Parameter

      Description

      Service Endpoint Name

      Name of the service endpoint.

      Authentication Mode

      In OAuth authentication mode, you must log in to GitHub for manual authorization.

    • Access token authentication

      Table 6 Parameter description

      Parameter

      Description

      Service Endpoint Name

      Name of the service endpoint.

      Authentication Mode

      Access token authentication is used.

      Access Token

      Obtain an Access Token and enter it here for authentication.

    • Click OK.

Creating a Git Service Endpoint

After connecting to a Git repository, you can obtain the repository and branch information.

  1. In a project, choose Settings > General Settings > Service Endpoints.
  2. On the Service Endpoints page displayed, click Create Service Endpoint and choose Git repository from the drop-down list box.
  3. In the Create Service Endpoint dialog box displayed, set the parameters.

    Table 7 Parameter description

    Parameter

    Description

    Service Endpoint Name

    Name of the service endpoint.

    Git Repository URL

    Web URL of a Git repository (HTTPS address).

    Username

    Username used for logging in to the Git repository.

    Password or Access Token

    Password or access token used for logging in to the Git repository.

  4. Click OK.

Creating an IAM Account Service Endpoint

The IAM account endpoint is used to delegate the AK/SK to the account that needs to perform tasks. When the account performs deployment tasks, the token of the delegated account can be obtained through the AK/SK to perform tasks with higher permissions.

  1. In a project, choose Settings > General Settings > Service Endpoints.
  2. On the Service Endpoints page displayed, click Create Service Endpoint and choose IAM account from the drop-down list box.
  3. In the Create Service Endpoint dialog box displayed, set the parameters.

    Table 8 Parameter description

    Parameter

    Description

    Service Endpoint Name

    Name of the service endpoint.

    Access Key Id

    Access Key ID (AK). For details, see Obtaining Access Key ID/Secret Access Key (AK/SK).

    Secret Access Key

    Secret Access Key (SK). For details, see Obtaining Secret Access Key (SK)/Secret Access Key (AK/SK).

  4. Click OK.

Editing or Deleting a Service Endpoint

On the Service Endpoints page, click a service endpoint on the list. The service endpoint details and operation buttons are displayed. Authorized users can edit and delete service endpoints.