Skip to content

Deployment and Maintenance / Helm Deployment

This document mainly introduces how to deploy DataFlux Func via Helm. Currently, Helm only supports the GSE version, and older versions can be directly upgraded to the GSE version.

1. System and Environment Requirements

Before installing DataFlux Func, please ensure that the environment meets the following conditions.

1.1 System Requirements

The cluster running DataFlux Func needs to meet the following conditions:

  • Kubernetes > 1.14
  • Helm >= 3.0
  • Network bandwidth >= 10Mbps
  • Memory capacity >= 4GB
  • CPU cores >= 2
  • When using external MySQL, the MySQL version must be 5.7 or higher, enable the innodb_large_prefix parameter, and the database encoding must be utf8mb4
  • When using external Redis, the Redis version must be 5.0 or higher, with at least 1 GB of available memory, non-cluster version

DataFlux Func storage should preferably use shared storage; hostPath has drawbacks

2. Command-Line Deployment

Helm can deploy Func via the command line.

2.1 Obtain Cluster Storage Class

Execute the command:

Bash
1
kubectl get sc

Output as follows:

Text Only
1
2
NAME         PROVISIONER                                     RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
nfs-client   cluster.local/nfs-subdir-external-provisioner   Delete          Immediate           true                   77d

2.2 Check Helm Version

Execute the command:

Bash
1
helm version

2.3 Perform Installation

Bash
1
2
3
helm install {Release Name} func --repo https://pubrepo.dataflux-func.com/chartrepo/func -n {Namespace} --create-namespace  \
    --set storage.pvc.enabled=true,storage.pvc.storageClass="{Storage Class}" \
    --set ingress.enabled=true,ingress.hostName="{Host Name}"

{Release Name} is the Helm alias, {Namespace} will be created if it does not exist, {Storage Class} is the storage class name from step one, {Host Name} is the domain name for ingress, and you can access it after successful installation.

Helm deployment by default installs MySQL and Redis. You can also use external MySQL and Redis. For detailed deployment methods, see the README document in the charts package.

2.4 Verify Installation

Execute the command:

Bash
1
helm ls -n {Namespace}

STATUS as deployed indicates success

You can also access the specified {Host Name} via a browser.

2.5 Initialize System

Access the configured ingress domain via a browser, you can initialize using the default configuration or customize your own configuration. You can also save the default settings and initialize the database.

setup-page.png

3. Rancher Visual Deployment

Helm can deploy Func via a visual interface.

3.1 Deployment Prerequisites

  • The cluster has been registered on the Rancher container management platform.
  • Rancher users have permissions to manage the application market.

3.2 Add Chart Repository

Log in to the Rancher platform, Applications & Application Market / Chart Repository, create a repository, and set the repository address to https://pubrepo.dataflux-func.com/chartrepo/func

3.3 Configuration and Installation

Select «Charts / Func»

Click Install

Set Namespace

Set Storage

Set Access Method

3.4 Verify Installation

Select «Applications & Application Market / Installed Applications»

3.5 Initialize System

Steps are the same as «Command-Line Deployment / Initialize System»

4. Upgrade Func

For Func deployed via Helm, please use the following method for upgrades.

4.1 Obtain values Configuration

Execute the command:

Bash
1
2
helm get values {Release Name}  -n {Namespace} -o yaml > values.yaml
cat values.yaml

4.2 Obtain Current Func Version

Execute the command:

Bash
1
helm ls -n {Namespace}

4.3 Perform Upgrade

Execute the command:

Bash
1
2
3
helm upgrade {Release Name} func --repo https://pubrepo.dataflux-func.com/chartrepo/func \
    -n {Namespace}  \
    -f values.yaml

4.4 Verify Upgrade Results

Execute the command:

Bash
1
helm ls -n {Namespace}

5. Common Issues

Below are common issues that may occur when deploying Func via Helm.

5.1 Browser Returns 502

If the Helm status shows deployed, follow these steps for troubleshooting:

Check If Ingress Was Successfully Created

View ingress information:

Bash
1
kubectl get ing -n {Namespace}

Check Pod Status

Generally caused by failed creation of pvc; solve problems based on actual situations.

View pod status:

Bash
1
kubectl get pods -n {Namespace}

Output as follows:

Text Only
1
2
3
4
5
6
7
8
9
NAME                                READY   STATUS    RESTARTS   AGE
func-mysql-575d576db7-zclcr         1/1     Running   0          13m
func-redis-fc8f8b95f-c27b2          1/1     Running   0          13m
func-server-7d44fc4dc6-d4gp8        1/1     Running   0          13m
func-worker-0-cb64778bc-q6vts       1/1     Running   2          13m
func-worker-1-6-597668777f-lnmbb    1/1     Running   2          13m
func-worker-7-8f976bfd9-fz7jf       1/1     Running   2          13m
func-worker-8-9-656fdb9bd9-rcbph    1/1     Running   1          13m
func-worker-beat-67c995968c-znq2r   1/1     Running   1          13m

View PVC status:

Bash
1
kubectl get pvc -n {Namespace}

Output as follows:

Text Only
1
2
3
func-mysql       Pening    pvc-0a3db9c5-0b60-428b-9b19-4ff827d155fe   50G    RWX    nfs-client    15m
func-redis       Pening    pvc-cfceb581-c711-4e1d-9ae9-8063ca1ee1a9   10G    RWX    nfs-client    15m
func-resources   Bound     pvc-0cc6f1df-666c-4512-bea9-baa40461c81c   10G    RWX    nfs-client    15m

5.2 Occurrence of 「cannot re-use a name that is still in use」 Error

If you encounter the error 「cannot re-use a name that is still in use」 during deployment, it means that there is already a {Release Name} in the current namespace.

You can delete the old {Release Name} before installation or change the {Release Name}.

5.3 Occurrence of 「Timeout Connecting to Connector」 Error

If you find the error 「Timeout connecting to connector」 while creating a connector, please restart all pods related to func.

The following are func-related deployments:

  • func-server
  • func-worker-XXX
  • func-worker-beat

The func-server's func is {Release Name}, which changes with the modification of {Release Name}