FalconFS Cluster Test Setup Guide
Usage:
- Install ansible with apt.
apt update && apt install -y ansible sshpass
- Create your user on all nodes. You can do this manually or by ansible with your own playbook.
useradd -m -s /bin/bash falcon
passwd falcon
# input your password here
# repeat the password
usermod -aG sudo falcon # add sudo for falcon
-
Set up SSH key-based authentication for passwordless login under user falcon
-
Prepare working directory
mkdir -p ~/code/ansible
cd ~/code/ansible
wget https://raw.githubusercontent.com/falcon-infra/falconfs/main/deploy/ansible/inventory
wget https://raw.githubusercontent.com/falcon-infra/falconfs/main/deploy/ansible/falcontest.yml
wget https://raw.githubusercontent.com/falcon-infra/falconfs/main/deploy/ansible/install-ubuntu24.04.sh
wget https://raw.githubusercontent.com/falcon-infra/falconfs/main/deploy/ansible/install-ubuntu22.04.sh # if ubuntu22.04- Create .ansible.cfg at your home
~/.ansible.cfg. The content can be like:
[defaults]
inventory = /home/$USER/code/ansible/inventory
log_path = /home/$USER/code/ansible/ansible.log
- Set value in inventory according to the annotation.
- change ips in
[falconcn] [falcondn] [falconclient] - fill ansible_become_password
- Install dependencies.
ansible-playbook falcontest.yml --tags install-deps
- Clone code and Build.
ansible-playbook falcontest.yml --tags build
- Start.
ansible-playbook falcontest.yml --tags start
- Stop.
ansible-playbook falcontest.yml --tags stop
Cloud Native Deployment
Requirement:
FalconFS needs at least 3 nodes in K8S environment.
Usage:
- Install
jqandyq
apt update && apt -y install jq yq- Set values in
$FALCON_PATH/cloud_native/deployment_script/node.json
-
change nodes name in
[nodes]to deploy the corresponding modules. Important: The number of[zk]should be 3, the number of[cn]should be 3-5, the number of[dn]should be larger than 3. -
change the
[images]of each module. We have provided images in the json -
change the
[hostpath]of each module.
- Prepare the environment
bash $FALCON_PATH/cloud_native/deployment_script/prepare.sh-
Modify the
[PVC]setting in$FALCON_PATH/cloud_native/deployment_script/zk.yaml -
Modify the configmap.yaml if you want to enable the meta server replication error report.
-
Set up FalconFS
- Set up configmap
kubectl apply -f configmap.yaml- Set up zookeeper
kubectl apply -f zk.yaml # ensure zookeeper is ready- Set up FalconFS CN
kubectl apply -f cn.yaml- Set up FalconFS DN
kubectl apply -f dn.yaml- Set up FalconFS Store
kubectl apply -f store.yamlIf you need to build the docker images, you can follow:
- Compile FalconFS
suppose at the ~/code dir
git clone https://github.com/falcon-infra/falconfs.git
cd falconfs
git submodule update --init --recursive # submodule update postresql
./patches/apply.sh
docker run -it --privileged --rm -v `pwd`/..:/root/code -w /root/code/falconfs ghcr.io/falcon-infra/falcon-dockerbuild:0.1.1 /bin/bash
bash cloud_native/docker_build/docker_build.sh
dockerd &- Build FalconFS images
The dockerfile in the path
cd cloud_native/docker_build/
- build the CN image
cd cn
docker build -t falcon-cn .
- build the DN image
cd dn
docker build -t falcon-dn .
- build the store iamge
cd store
docker build -t falcon-store .
- Push images to docker registry
docker tag falcon-cn [falcon-cn url]
docker tag falcon-dn [falcon-dn url]
docker tag falcon-store [falcon-store url]
docker push [falcon-cn url]
docker push [falcon-dn url]
docker push [falcon-store url]
- Clean the workspace
bash clean.shDebug
⚠️ Warning
This only for debug mode, do not use no_root_check.patch in production!
no root check debug, suppose at the ~/code dir
docker run --privileged -d -it --name falcon-dev -v `pwd`:/root/code -w /root/code/falconfs ghcr.io/falcon-infra/falconfs-dev:0.1.1
docker exec -it --detach-keys="ctrl-z,z" falcon-dev /bin/zsh
git -C third_party/postgres apply ../../patches/no_root_check.patch
./build.sh clean
./build.sh build --debug && ./build.sh install
source deploy/falcon_env.sh
./deploy/falcon_start.sh- first login to cn:
psql -d postgres -p $cnport - when in the pg cli
select pg_backend_pid(); # to get pid, then use gdb to attach the pid
SELECT falcon_plain_mkdir('/test'); # to trigger mkdir meta operation./.github/workflows/smoke_test.sh /tmp/falcon_mnt
./deploy/falcon_stop.shCopyright (c) 2025 Huawei Technologies Co., Ltd.