Skip to content

Resource Settings

Resource settings is the configuration of the resource layer based on the ECP deployed by Docker or Kubernetes, which mainly includes Basic Config, Docker Deployment Mode Configuration, Kubernetes Deployment Mode Configuration three categories.

Basic Config

Image Repository Configuration

ECP supports connecting to the internal private image registry. To configure the connection to an internal private image registry in ECP, follow these steps:

  1. Log in to ECP as a system admin and navigate to System Settings -> Resource Settings.
  2. Expand the Image Repository Configuration panel.
  3. Click Edit to enter the editing page.
  4. Enter the repository URL, and the Email and password to access this repository.
  5. Before confirming the setting, click Test to test the connection.
  6. Click Save to complete the configuration.

Edge Service Image List

System administrators can add, edit, or delete edge service image list. When there is a public network connection, the administrator can directly configure the public image repository. If you are using a private server image, you can also refer to the Image Repository Configuration.

  1. Log in to ECP as a system administrator, and on the system management page, click System Settings -> Resource Settings.

  2. Click to expand the Basic Config section, and click to expand the Edge Service Image List.

  3. Click Edit under NeuronEX to enter the editing page.

  4. You can click + to add a new image and determine whether to set it as the default image. You can also click the delete icon to delete an image.

  5. Click Confirm to complete the settings.

eKuiper

Managed edge service authentication configuration

The public key file automatically generated by ECP during installation can be obtained from Managed Edge Service Authentication Configuration, which is used as the secret key when Managed NeuronEX turns on authentication. For information on NeuronEX certification, please refer to Authenticate Edge Services.

rsa

Docker Deployment Mode Configuration

Docker Configuration

For edge services created using ECP, you have the option to customize the docker node connect configuration. However, you are recommended to keep the default settings as they are verified by EMQ technical team. Modify them only if necessary.

  1. Log in to ECP as a system admin and navigate to System Settings -> Resource Settings.
  2. Expand the Docker Mode -> Docker Configuration.
  3. Click Edit to enter the editing page, where you can modify the settings.

Edge Service Setting

  1. Log in to ECP as a system admin and navigate to System Settings -> Resource Settings.
  2. Expand the Docker Mode -> Edge Service Setting.
  3. Click Edit to enter the editing page, where you can modify the settings.

Kubernetes Deployment Mode Configuration

Kubernetes Connection Setting

Before ECP can manage, control or authenticate Kubernetes resources, system admins must first finish the Kubernetes Connection settings for ECP.

Obtain kuberconfig File from Kubernetes

Download the kubeconfig from the Kubernetes master cluster, which is usually located in ~/.kube/config

ECP does not support accessing external files within your kubeconfig for authentication. Therefore if the certificate-authority-data, client-certificate-data, and client-key-data fields are file paths rather than base64-encoded strings, you need to convert the certificate file to a base64-encoded string before uploading them:

macOS & Linux

bash
cat "certificate file" | base64

Windows

bash
certutil -f -encode "certificate file" "output file"

Then update the kubeconfig file

  1. Change certificate-authority to certificate-authority-data, and enter the base64-encoded string of the */ca.crt certificate file.
  2. Change client-certificate to client-certificate-data, and enter the base64-encoded string of the */client.crt certificate file.
  3. Change client-key to client-key-data, and enter the base64-encoded string of the */client.key certificate file.

WARNING

To ensure high availability, replace the server address in the kubeconfig file with the Loadbalancer or vip address.

Upload kuberconfig to ECP

  1. Log in to ECP as a system admin and navigate to System Settings -> Resource Settings.
  2. Expand the Create Kubernetes Connect panel.
  3. Click Create Kubernetes Connect and select the certificate file to upload in the dialog box. The changes will take effect immediately without requiring a restart of ECP.

setting-k8s

WARNING

Once connected to Kubernetes and with active running clusters, it is recommended to avoid modifying the settings. Modifying the settings can result in the disruption of all active clusters.

EMQX Cluster Setting

This is to configure the EMQX cluster image versions, define quota, and annotate load balancing for public cloud clients.

Configure EMQX Image Versions

System admins can add, edit or delete EMQX image versions. If you have internet connectivity, you can use public image addresses. Additionally, you can also specify a private image registry service. On how to configure a Telegraf image, see Image Repository Configuration.

  1. Log in to ECP as a system admin and navigate to System Settings -> Resource Settings -> Kubernetes Mode.
  2. Expand the EMQX Cluster Setting -> EMQX Image Versions.
  3. Click Edit to enter the editing page.
  4. To add a new image version, click the "+" icon and provide the image version. You can choose to set it as the default version. To delete an image version, simply click the delete icon.
  5. Click Save to complete the configuration.

Configure EMQX Cluster Quota

For EMQX clusters created using ECP, you have the option to customize the quota according to your specific business requirements. However, you are recommended to keep the default settings as they are verified by EMQ technical team. Modify them only if necessary.

  1. Log in to ECP as a system admin and navigate to System Settings -> Resource Settings -> Kubernetes Mode.

  2. Expand the EMQX Cluster Setting -> EMQX Quota List.

  3. Click Edit to enter the editing page, where you can modify the CPU and memory-related quota for each quota entry, delete an existing quota entry, or add a new quota entry. Note: Deleting a quota entry will not impact the currently running clusters.

    quota-add

Below is the specification for an EMQX cluster with 1 CPU core, 1 GiB of memory, and 512 MiB of disc space:

ItemSpecification/UnitDescription
EMQX Storage Classlocal-pathThe Kubernetes storage class name
EMQX Storage Size512MiOccupied disk space size
Defaulttrue or falsetrue: Set to default

false: Not set as default
EMQX Quota List Note1C1G0.5GThe specification name displayed when installing the EMQX cluster
EMQX-cpu-limit1000mMaximum CPU usage limit for the cluster
EMQX-memory-limit1024MiMaximum memory usage limit for the cluster
EMQX-cpu-request1000mMinimum CPU usage limit for the cluster
EMQX-memory-request1024MiMinimum memory usage limit for the cluster
Telegraf-cpu-limit1000mMaximum CPU usage limit for Telegraf
Telegraf-memory-limit1024MiMaximum memory usage limit for Telegraf
Telegraf-cpu-request100mMinimum CPU usage limit for Telegraf
Telegraf-memory-request100MiMinimum memory usage limit for Telegraf

Configure Load Balancing

For public cloud clients, you can configure load balancing by adding annotations.

You can configure the annotation feature as follows:

  • Add configurations and set the range of connection numbers.
  • Multiple configurations can be created and made effective.
  • By default, configurations are matched based on business connection numbers.
  • When there is an overlap in connection numbers, the earliest created configuration is selected by default.
  • The maximum number of configurations is 100.

Configure Storage Class

A Storage Class provides a way for administrators to describe the "classes" of storage they offer. In ECP, StorageClass is used to specify the provisioning PVs for storage.

Obtain the Storage Class from Kubernetes

  1. Log in to the Kubernetes environment using the command line interface (CLI).

  2. Execute the following command to view the list of storage classes:

    bash
    kubectl get sc
    
    NAME                    PROVISIONER                      RECLAIMPOLICY  VOLUMEBINDINGMODE     ALLOWVOLUMEEXPANSION        AGE
    alicloud-disk-ssd       diskplugin.csi.alibabacloud.com  Delete         Immediate             true                        170d
    alicloud-disk-topology  diskplugin.csi.alibabacloud.com  Delete         WaitForFirstConsumer  true                        170d
    local-path              rancher.io/local-path            Delete         WaitForFirstConsumer  false                       169d

Configure EMQX Storage Class

  1. Log in to ECP as a system admin and navigate to System Settings -> Resource Settings.
  2. Expand the Cluster Setting panel, and then the EMQX Quota List panel.
  3. Click Edit to enter the editing page.
  4. Enter the Storage Class Name obtained from Kubernetes, the desired Storage Size in MiB, and indicate whether it should be set as the default Storage Class.
  1. Click Save to complete the configuration. The changes will take effect immediately.

Telegraf Image

Telegraf is for the log collection of EMQX clusters.

Telegraf 镜像