Skip to content

Deployment and Maintenance / Raspberry Pi Ubuntu Deployment

This document primarily introduces how to run this system on a Raspberry Pi with the Ubuntu Server (64bit) system installed.

Always use the latest version of DataFlux Func for operations

It is recommended to use a wired network connection during the operation process when connecting to the Raspberry Pi

This article is based on operations using the Raspberry Pi 4B 8GB version. The Raspberry Pi 3B is too weak to run the system

You must use the 64-bit Ubuntu Server image for Raspberry Pi

1. Preparation

Before installing DataFlux Func on a Raspberry Pi, some preparations are needed.

1.1 Burning the Raspberry Pi SD Card

It is recommended to burn the SD card using a clean official image before installing DataFlux Func.

When burning the SD card, you can choose:

  1. Use the official Raspberry Pi Imager tool for burning

  2. Directly download the official Ubuntu Server 64-bit image and use a third-party tool for burning

After burning is complete, the SD card can be inserted into the Raspberry Pi, and power it on to boot.

1.2 Initializing the System

After the first boot of Ubuntu for Raspberry Pi, you need to log in with the default username and password:

Username Password
ubuntu ubuntu

After successful login, you will be prompted to change your password

1.3 Configuring Wi-Fi Connection (Optional)

If you want to connect via Wi-Fi, follow these steps:

Open the configuration file

Bash
1
sudo vim /etc/netplan/50-cloud-init.yaml

Assume your Wi-Fi SSID is my-wifi and the password is my-wifi-password. Then, the configuration should be modified as follows:

YAML
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
network:
    ethernets:
        eth0:
            dhcp4: true
            optional: true
    # Add Wi-Fi configuration here
    wifis:
        wlan0:
            dhcp4: true
            access-points:
                my-wifi:
                    password: my-wifi-password
    version: 2

Apply the new configuration

Bash
1
sudo netplan apply

Restart the Raspberry Pi

Bash
1
sudo reboot

Use cURL to verify if the network connection was successful

Bash
1
curl -L function.guance.com/h

2. Installing DataFlux Func

The installation process of DataFlux Func on a Raspberry Pi is basically the same as on a regular server.

2.1 Downloading

The download process is the same as on other platforms; use the following command. The script will detect the current environment architecture and download ARM resources.

Bash
1
/bin/bash -c "$(curl -fsSL func.guance.com/download)" -- --for=GSE
Bash
1
/bin/bash -c "$(curl -fsSL func.guance.com/download)"

GSE Edition and Old Edition

If you need to download the DataFlux Func installation package for Raspberry Pi on a PC, specify --aarch64 in the download command.

Bash
1
/bin/bash -c "$(curl -fsSL func.guance.com/download)" -- --for=GSE --arch=aarch64
Bash
1
/bin/bash -c "$(curl -fsSL func.guance.com/download)" -- --arch=aarch64

2.2 Installation

After downloading, enter the downloaded directory and execute the following command to install:

Bash
1
sudo /bin/bash run-portable.sh

2.3 Initializing the System

After installation, use a browser to open the DataFlux Func initialization page.

  • Access http://{Raspberry Pi IP}:8088

2.4 Confirming Installation

After installation, log in to the system, go to "Manage / About," and you should see the "Architecture" as aarch64:

management-about-aarch64.png

Subsequent operations are no different from those when installing DataFlux Func on a regular server.

X. Appendix

This section records content related to the Raspberry Pi for reference.

X.1 Maximizing Raspberry Pi Performance

Open the /boot/firmware/usercfg.txt file

Bash
1
sudo vim /boot/firmware/usercfg.txt

Add the following content according to your needs:

Text Only
1
2
3
force_turbo=0  # Prevents the CPU from running at maximum frequency
arm_freq=2100  # Overclocks the CPU to 2.1Ghz (default is 1.5Ghz)
over_voltage=6 # Increases voltage to level 6

Even without the above settings, normal usage is possible, and passive cooling with just a metal case is sufficient

This setting involves overclocking, and full load operation cannot rely solely on passive cooling with a metal case; at least a fan is required

More aggressive configurations can further enhance Raspberry Pi performance but will void the warranty

If your Raspberry Pi is damaged due to overclocking, the author of this article assumes no responsibility. Please think carefully before proceeding

X.2 Raspberry Pi Stress Testing Program

You can use the Raspberry Pi stress testing tool to test the stability of its operation (especially after overclocking).

Clone the project repository

Bash
1
git clone https://gitee.com/sujivin/rpi-cpu-stress.git

The original author's Github repository address is: github.com/xukejing/rpi-cpu-stress

Add executable permissions

Bash
1
2
cd rpi-cpu-stress
chmod +x stress.sh

Start the stress test

Text Only
1
sudo ./stress.sh

In the terminal, you can see output like the following:

Text Only
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
a72 freq: 2100000
temp: 50634

a72 freq: 2100000
temp: 54530

a72 freq: 2100000
temp: 55991

a72 freq: 2100000
temp: 56478
  • a72 freq: 2100000: Indicates that the current CPU frequency is 2.1Ghz
  • temp: 50634: Indicates a temperature of 50.634 degrees Celsius

Do not let the Raspberry Pi remain at high temperatures (above 80 degrees Celsius) for long periods