This section shows the installation process of the FLUIDOS Node components.
There are two ways to install FLUIDOS Node components:
-
Launching the testbed environment with a script.
-
Installing the FLUIDOS Node manually on your Kubernetes cluster.
If it's your first time with FLUIDOS Node components, we suggest the testbed environment via script. This allows you to install as many kind clusters as you want to run your experiments.
However, if you want to test FLUIDOS Node on your cluster already setup, we suggest you the manual installation.
Below are the required tools, along with the versions used by the script:
- Docker v28.1.1
- Kubectl v1.33.0
- KIND v0.27.0
- Helm v3.17.3
- Liqo CLI tool v1.0.0
Note The installation script will automatically check if these tools are installed and will ask for your confirmation to install them if they are missing. It will install each tool using a fixed version, except for Docker, which will be installed at the stable version. After Docker installation, an additional CLI command will be required to ensure its proper functionality.
This setup leverages KIND (Kubernetes IN Docker) to quickly provision a reliable testbed for evaluating the FLUIDOS Node architecture.
When running multiple KIND clusters, certain issues may arise—particularly related to swap memory usage and system-level resource limits. To mitigate these problems, it is strongly recommended to execute the following commands prior to starting the installation:
sudo swapoff -asudo sysctl fs.inotify.max_user_instances=8192sudo sysctl fs.inotify.max_user_watches=524288
The script will create two different types of Kubernetes clusters, each consisting of 3 nodes, as defined in the files located in the quickstart/kind directory:
-
fluidos-consumer: This cluster (also known as a FLUIDOS node) will act as a consumer of FLUIDOS resources. It will use the REAR protocol to communicate with the provider cluster, retrieve available Flavors, and reserve the one that best matches the solver’s request, proceeding to purchase it.
-
fluidos-provider: This cluster (also known as a FLUIDOS node) will act as a provider of FLUIDOS resources. It will offer its available Flavors in response to requests from the consumer, managing their reservation and sale accordingly.
-
Clone the repository
git clone https://github.com/fluidos-project/node.git
-
Move into the KIND Example folder
cd node/tools/scripts -
Launch the
setup.shscript./setup.sh
-
No command-line arguments are currently supported; instead, the installation mode is selected interactively at the beginning of the script execution. The available options are:
-
1Install the FLUIDOS Node using the demo testbed (one consumer and one provider cluster) via KIND. -
2Install the FLUIDOS Node using a custom setup with n consumer clusters and m provider clusters via KIND.
For both options, you will be prompted to choose:
-
Whether to install from the official remote FLUIDOS repository or use local repositories and build all components locally.
-
Whether to enable resource auto-discovery.
-
Whether to enable LAN node discovery.
An example prompt flow is shown below:
1. Use demo KIND environment (one consumer and one provider) 2. Use a custom KIND environment with n consumer and m provides Please enter the number of the option you want to use: 1 Do you want to use local repositories? [y/n] y Do you want to enable resource auto discovery? [y/n] y Do you want to enable LAN node discovery? [y/n] y
-
-
At the beginning of the script execution, a check is performed to ensure all required tools are installed. If any dependencies are missing, the script will prompt you for confirmation before proceeding with their automatic installation.
Note The tools will be installed assuming Linux as the operating system. If you are not using Linux, you will need to install them manually.
If Docker is not installed and you choose to install it, the script will terminate after its installation. This is necessary because the Docker group must be reloaded in order to use Docker commands without sudo. You can achieve this by running:
newgrp docker
This command opens a new shell with updated group permissions. After executing it, simply restart the installation script.
-
After executing the script, you can verify the status of the pods in the consumer cluster using the following commands:
export KUBECONFIG=fluidos-consumer-1-config kubectl get pods -n fluidosTo inspect the provider cluster, use its corresponding kubeconfig file:
export KUBECONFIG=fluidos-provider-1-config kubectl get pods -n fluidosAlternatively, to avoid switching the KUBECONFIG environment variable each time, you can directly specify the configuration file path and context when using kubectl. The paths to the generated configuration files are displayed at the end of the script execution:
kubectl get pods --kubeconfig "$PWD/fluidos-consumer-1-config" --context kind-fluidos-consumer -n fluidosThis approach enables seamless monitoring of both consumer and provider clusters without needing to re-export environment variables manually.
-
You should see 4 pods running on the
fluidos-consumercluster and 4 pods running on thefluidos-providercluster:node-local-resource-manager-<random>node-network-manager-<random>node-rear-controller-<random>node-rear-manager-<random>
In this section, we will guide you through interacting with the FLUIDOS Node at a high level. If you prefer to interact with the FLUIDOS Node using its Custom Resource Definitions (CRDs), please refer to the Low-Level Usage section.
Let’s start by deploying an example solver Custom Resource (CR) on the fluidos-consumer cluster.
-
Open a new terminal on the repo and move into the
deployments/node/samplesfoldercd deployments/node/samples -
Set the
KUBECONFIGenvironment variable to thefluidos-consumerclusterexport KUBECONFIG=../../../tools/scripts/fluidos-consumer-1-config -
Deploy the
solverCRkubectl apply -f solver.yaml
Note Please review the architecture field and change it to amd64 or arm64 according to your local machine architecture.
-
Check the result of the deployment
kubectl get solver -n fluidos
The result should be something like this:
NAME INTENT ID FIND CANDIDATE RESERVE AND BUY PEERING STATUS MESSAGE AGE solver-sample intent-sample true true true Solved Solver has completed all the phases 83s
-
Other resources have been created and can be inspected using the following commands:
kubectl get flavors.nodecore.fluidos.eu -n fluidos kubectl get discoveries.advertisement.fluidos.eu -n fluidos kubectl get reservations.reservation.fluidos.eu -n fluidos kubectl get contracts.reservation.fluidos.eu -n fluidos kubectl get peeringcandidates.advertisement.fluidos.eu -n fluidos kubectl get transactions.reservation.fluidos.eu -n fluidos
-
The infrastructure for resource sharing has been established. A demo namespace should now be created in the fluidos-consumer cluster:
kubectl create namespace demo
The namespace can then be offloaded to the fluidos-provider cluster using the following command:
liqoctl offload namespace demo --pod-offloading-strategy Remote
Once the namespace has been offloaded, any workload can be deployed within it. As an example, the provided Kubernetes deployment can be used:
kubectl apply -f nginx-deployment.yaml -n demo
Another example involves deploying the solver-service, which requests a provider with a database service.
-
Deploy the mock database service in the provider cluster.
export KUBECONFIG=../../../tools/scripts/fluidos-consumer-1-config kubectl apply -f service-blueprint-db.yaml -
Deploy the
solverCRkubectl apply -f solver-service.yaml
-
Check the result of the deployment
kubectl get solver -n fluidos
The result should be something like this:
NAME INTENT ID FIND CANDIDATE RESERVE AND BUY PEERING STATUS MESSAGE AGE solver-sample-service intent-sample-service true true true Solved Solver has completed all the phases 83s
If you installed FLUIDOS Node on kind clusters and want to clean up the entire testbed setup, run the following commands:
cd ../../tools/scripts
./clean-dev-env.shThis script will delete both the kind clusters and their corresponding kubeconfig files.
Please, make sure you have helm installed.
To install the FLUIDOS Node on your Kubernetes cluster already up and running, you must ensure you have Liqo up and running.
If you are not sure you already have Liqo on your Kubernetes cluster, we suggest to check the next sub-section.
To ensure you have Liqo, please run the following script:
cd ../../tools/scripts
chmod +x install_liqo.sh
./install_liqo.sh <provider> <cluster-name> $KUBECONFIG <liqoctl PATH>Please, note that you need to pass a few parameters.
-
"provider": this parameter depends on your Kubernetes installation. We currently test it on the following providers:
- kubeadm
- k3s
- kind
-
"cluster-name": this is the name you want to give to your Liqo local cluster (e.g.:
fluidos-turin-1) -
$KUBECONFIG: it is the typical environment variable that points to the path of your Kubernetes cluster configuration.
-
"liqoctl PATH": it is the path to the liqoctl command. If installed via Liqo guide, liqoctl is sufficient.
For more information, check out Liqo official documentation for all supported providers.
DISCLAIMER: before going ahead, ensure that at least one node is tagged with node-role.fluidos.eu/worker: "true" and, if acting as a provider, choose the nodes that exposes their Kubernetes resources with the label node-role.fluidos.eu/resources: "true".
Once we have Liqo running, we can install the FLUIDOS Node component via helm:
helm repo add fluidos https://fluidos-project.github.io/node/
helm upgrade --install node fluidos/node \
-n fluidos --version "$FLUIDOS_VERSION" \
--create-namespace -f $PWD/node/quickstart/utils/consumer-values.yaml \
--set networkManager.configMaps.nodeIdentity.ip="$NODE_IP" \
--set rearController.service.gateway.nodePort.port="$REAR_PORT" \
--set networkManager.config.enableLocalDiscovery="$ENABLE_LOCAL_DISCOVERY" \
--set networkManager.config.address.thirdOctet="$THIRD_OCTET" \
--set networkManager.config.netInterface="$NET_INTERFACE" \
--wait \
--debug \
--v=2Here, the meaning of the various parameters:
- FLUIDOS_VERSION: The FLUIDOS Node version to be installed
- NODE_IP: The IP address of your local Kubernetes cluster Control Plane
- REAR_PORT: The port on which your local cluster uses the REAR protocol
- ENABLE_LOCAL_DISCOVERY: A flag that enables the Network Manager, which is the component advertising the local FLUIDOS Node into a LAN
- THIRD_OCTET: This is the third byte of the IP address used by Multus CNI for sending broadcast messages into the LAN. Warning: this parameters should be different for each FLUIDOS Node to be working (e.g. 1 for the 1st cluster, 2 for the 2nd cluster, etc.)
- NET_INTERFACE: The host network interface that Multus binds to
To enable the Network Manager to discover FLUIDOS Nodes outside a LAN, you need to configure and apply a Broker CR.
The broker-creation.sh script simplifies this process by guiding you through the creation of the Broker YAML file.
What you need:
-
Kubeconfig PATH
-
Broker's name (custom name of your choice)
-
Broker's server address
-
Client certificate (.pem)
-
Client private key (.pem)
-
Broker's Root certificate (.pem)
-
Role (publisher ^ subscriber ^ both)
Two Kubernetes Secrets are created from the certificates and key, one containing the client cert and private key, the other containing the root certificate of the remote broker.
The script will create and apply the .yaml.
To inspect the new Broker: kubectl describe broker my-broker -n fluidos
Once applied, the Network Manager Reconcile process starts, enabling message exchange.