Please download the baetyl-cloud project before installation. We take the scripts/demo in the project as an example to demonstrate the steps. The cloud management suite and the edge computing framework are all installed on the same machine.

git clone

Install database

Before installing baetyl-cloud, we need to install the database first, and execute the following command to install it.

helm repo add bitnami
helm install mariadb --set rootUser.password=secretpassword, bitnami/mariadb
helm install phpmyadmin bitnami/phpmyadmin 

Note: For the convenience of demonstration, we have hardcoded the password, please modify it yourself, and you can replace secretpassword globally.

Initialize data

Confirm that mariadb and phpmyadmin are in the Running state.

kubectl get pod
# NAME                            READY   STATUS             RESTARTS   AGE
# mariadb-master-0                1/1     Running            0          2m56s
# mariadb-slave-0                 1/1     Running            0          2m56s
# phpmyadmin-55f4f964d7-ctmxj     1/1     Running            0          117s

Then execute the following command to keep the terminal from exiting.

export POD_NAME=$(kubectl get pods --namespace default -l "app=phpmyadmin,release=phpmyadmin" -o jsonpath="{.items[0]}")
echo "phpMyAdmin URL:"
kubectl port-forward --namespace default svc/phpmyadmin 8080:80

Then use a browser to open, Server input: mariadb, Username input: root, Password input: secretpassword. After logging in, select the database baetyl_cloud, click the SQL button, and enter the sql statements of all files in the scripts/sql directory under the baetyl-cloud project into the page for execution. If no error is reported during execution, the data initialization is successful.

Install baetyl-cloud

Enter the directory where the baetyl-cloud project is located and execute the following commands.

# helm 3
helm install baetyl-cloud ./scripts/demo/charts/baetyl-cloud/

Make sure that baetyl-cloud is in the Running state, and you can also check the log for errors.

kubectl get pod
# NAME                            READY   STATUS    RESTARTS   AGE
# baetyl-cloud-57cd9597bd-z62kb   1/1     Running   0          97s

kubectl logs -f baetyl-cloud-57cd9597bd-z62kb

Create and install edge node

Call the RESTful API to create a node.

curl -d "{\"name\":\"demo-node\"}" -H "Content-Type: application/json" -X POST
# {"namespace":"baetyl-cloud","name":"demo-node","version":"1931564","createTime":"2020-07-22T06:25:05Z","labels":{"baetyl-node-name":"demo-node"},"ready":false}

Obtain the online installation script of the edge node.

# {"cmd":"curl -skfL '' && sh"}

Execute the installation script on the machine where baetyl-cloud is deployed.

curl -skfL '' && sh

Note: If you need to install an edge node on a device other than the machine where baetyl-cloud is deployed, please modify the database, change the node-address and active-address in the baetyl_system_config table to real addresses.

Check the status of the edge node. Eventually, two edge services will be in the Running state. You can also call the cloud RESTful API to view the edge node status. You can see that the edge node is online (“ready”:true).

kubectl get pod -A
# NAMESPACE            NAME                                      READY   STATUS    RESTARTS   AGE
# baetyl-edge-system   baetyl-core-8668765797-4kt7r              1/1     Running   0          2m15s
# baetyl-edge-system   baetyl-function-5c5748957-nhn88           1/1     Running   0          114s

# {"namespace":"baetyl-cloud","name":"demo-node","version":"1939112",...,"report":{"time":"2020-07-22T07:25:27.495362661Z","sysapps":...,"node":...,"nodestats":...,"ready":true}