This document provides a brief introduction to the implementation of the ICEWAPP use case testbed. For more information about the use case and how FLUIDOS has helped to the development of the project, you can check out this video.
During the development and testing phases of the project, the environment had to be reinstalled from scratch several times. For this reason, automation through Ansible scripts allowed us to save time and facilitate replicability. This guide is inspired by the documentation provided in the Node repository and in the intelligent-power-grid-use-case.
The testbed environment involves the following components and tools:
- Two K3s Kubernetes clusters
- CONSUMER: with 1
armv8master node (Revolution Pi Connect 4). - PROVIDER: with 1
amd64master node.
- CONSUMER: with 1
- ArgoCD: a declarative GitOps continuous delivery tool for Kubernetes.
- LIQO: v0.10.3
- FLUIDOS Node: v0.1.1
- Helm
- Kubernetes-Dashboard
- kube-prometheus-stack
Despite the specified nodes, ANSIBLE variables can be customized to install the testbed in a different setup.
ANSIBLE scripts are located on /ansible folder, but first a brief overview of ANSIBLE and how to setup it will be given.
Ansible is a configuration automation and systems management tool, based on an agentless approach that uses SSH to communicate with remote machines. It was developed by Red Hat and is designed to be simple, powerful, and flexible.
- Installing and configuring software on servers (Apache, Docker, K3s, RabbitMQ...).
- Infrastructure orchestration (deploying microservices, restarting services, etc.).
- Managing heterogeneous environments (local VMs, edge devices, clouds, containers).
- Automating repetitive tasks (copying files, applying configuration changes, restarting systems...).
All this is achieved through playbooks written in YAML.
- Define tasks in YAML files called playbooks.
- Use SSH to execute these tasks on one or more remote servers.
- No agents required (nothing is installed on managed servers).
- An inventory file defines the target servers.
❌ Windows limitations:
- Compatibility issues → Ansible is based on Linux/POSIX and is not designed to run natively on Windows.
- Lacks full SSH support → Until recent versions, Windows did not include robust SSH support, which Ansible requires.
- Dependency problems → Ansible depends on UNIX tools (bash, python, scp...), which are not available natively on Windows.
- Lack of official support → Official documentation does not recommend or support running Ansible directly on Windows.
WSL (Windows Subsystem for Linux) is the ideal way to use Ansible on Windows:
- Real Linux environment → Install Ansible just like on Ubuntu.
- Full SSH support → Use SSH keys, ssh-agent, etc., without restrictions.
- Integration with Windows → Edit files with VS Code, access shared folders.
- Lightweight and fast → No need for a full VM or VirtualBox.
Ansible is installed on your computer. To install it, open a WSL terminal and run:
- Ensure Python is installed, otherwise install it with:
sudo apt update
sudo apt install -y python3-pip python3-venv- Install Ansible with pip and the Kubernetes module:
pip3 install --user ansible
pip3 install kubernetesMake sure ~/.local/bin is in your PATH:
echo 'export PATH=$HOME/.local/bin:$PATH' >> ~/.bashrc
source ~/.bashrcVerify the installation:
ansible --versionExpected output:
ansible [core 2.x.x]
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 3.10.12 (main, Feb 4 2025, 14:57:36) [GCC 11.4.0]Important: Virtual machines require their own IP address for SSH connections, so use bridge mode networking.
Ansible connects via SSH. From the host:
- Generate an SSH key:
ssh-keygen -t rsa -b 4096- Copy the public key to the VM:
ssh-copy-id -i /path/to/id_rsa.pub user@VM_IP- If using root in WSL, copy the key to root’s folder:
mkdir -p /root/.ssh
cp /mnt/c/Git_repository/eium_ansible/.ssh/id_rsa /root/.ssh/
chmod 600 /root/.ssh/id_rsa- Add the configuration to
~/.ssh/config:
Host <IP_ADDRESS>
User <USER>
IdentityFile <PATH_TO_GENERATED_KEY> (e.g. /root/.ssh/id_rsa)- Ensure the SSH server is installed and running:
sudo apt update
sudo apt install -y openssh-server
sudo systemctl enable ssh
sudo systemctl start ssh- Check SSH permissions:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys- Verify SSH server configuration:
In/etc/ssh/sshd_configmake sure these lines are present:
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication yesRestart SSH if changes were made:
sudo systemctl restart ssh- Ensure port 22 is open:
sudo ufw allow ssh
sudo ufw enable- Install Python and required modules for Ansible:
sudo apt update
sudo apt install -y python3 python3-pip python3-venv
pip3 install sixIf everything is configured correctly, you can connect to the VM/edge from your host with:
ssh user@ipwithout needing to enter the password.