You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -17,28 +17,224 @@ However, if you want to test FLUIDOS Node on your cluster already setup, we sugg
17
17
<!-- --- -->
18
18
<!--
19
19
**⚠️ ATTENTION:** The script is currently in an experimental phase, so it may not work as expected. If any issues arise, it may be tricky to understand and terminate the script, as many sub-tasks are executed in the background. We are aware of these issues and are actively working to resolve them.
20
-
21
-
If you want to use a **working and tested script** to test the FLUIDOS Node within a KinD environment, please refer to the [**Testbed**](../../testbed/kind/README.md) section. -->
20
+
-->
22
21
23
22
<!-- --- -->
24
23
24
+
## Prerequisites
25
+
26
+
Below are the required tools, along with the versions used by the script:
> **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.
35
+
36
+
## Common issues with KIND
37
+
38
+
This setup leverages KIND (Kubernetes IN Docker) to quickly provision a reliable testbed for evaluating the FLUIDOS Node architecture.
39
+
40
+
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:
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:
51
+
52
+
-**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.
53
+
54
+
-**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.
4. 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:
77
+
78
+
- `1` Install the FLUIDOS Node using the demo testbed (one consumer and one provider cluster) via KIND.
79
+
80
+
- `2` Install the FLUIDOS Node using a custom setup with n consumer clusters and m provider clusters via KIND.
81
+
82
+
For both options, you will be prompted to choose:
83
+
84
+
- Whether to install from the official remote FLUIDOS repository or use local repositories and build all components locally.
85
+
86
+
- Whether to enable resource auto-discovery.
87
+
88
+
- Whether to enable LAN node discovery.
89
+
90
+
An example prompt flow is shown below:
91
+
92
+
```sh
93
+
1. Use demo KIND environment (one consumer and one provider)
94
+
2. Use a custom KIND environment with n consumer and m provides
95
+
Please enter the number of the option you want to use:
96
+
1
97
+
Do you want to use local repositories? [y/n] y
98
+
Do you want to enable resource auto discovery? [y/n] y
99
+
Do you want to enable LAN node discovery? [y/n] y
100
+
```
101
+
102
+
5. At the beginning of the script execution, a check is performed to ensure all [required tools](#prerequisites) are installed. If any dependencies are missing, the script will prompt you for confirmation before proceeding with their automatic installation.
103
+
>**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.
104
+
105
+
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:
106
+
107
+
```sh
108
+
newgrp docker
109
+
```
110
+
111
+
This command opens a new shell with updated group permissions. After executing it, simply restart the installation script.
112
+
113
+
6. After executing the script, you can verify the status of the pods in the consumer cluster using the following commands:
114
+
115
+
```sh
116
+
export KUBECONFIG=fluidos-consumer-1-config
117
+
kubectl get pods -n fluidos
118
+
```
119
+
120
+
To inspect the provider cluster, use its corresponding kubeconfig file:
33
121
34
-
No options are available through the CLI, but you can choose the installation mode by choosing the right option during the script execution.
35
-
The option supported are:
122
+
```sh
123
+
export KUBECONFIG=fluidos-provider-1-config
124
+
kubectl get pods -n fluidos
125
+
```
36
126
37
-
-`1`to install the FLUIDOS Node as the demo testbed through KIND
127
+
Alternatively, 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:
38
128
39
-
-`2` to install the FLUIDOS Node in n consumer clusters and m provider clusters through KIND
129
+
```sh
130
+
kubectl get pods --kubeconfig "$PWD/fluidos-consumer-1-config" --context kind-fluidos-consumer -n fluidos
131
+
```
40
132
41
-
For both options, you can choose to install from either the official remote FLUIDOS repository or the local repository, building all the components locally.
133
+
This approach enables seamless monitoring of both consumer and provider clusters without needing to re-export environment variables manually.
134
+
135
+
7. You should see 4 pods running on the `fluidos-consumer` cluster and 4 pods running on the `fluidos-provider` cluster:
136
+
137
+
- `node-local-resource-manager-<random>`
138
+
- `node-network-manager-<random>`
139
+
- `node-rear-controller-<random>`
140
+
- `node-rear-manager-<random>`
141
+
142
+
### Usage
143
+
144
+
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](../../docs/usage/usage.md) section.
145
+
146
+
Let’s start by deploying an example `solver` Custom Resource (CR) on the `fluidos-consume`r cluster.
147
+
148
+
1. Open a new terminal on the repo and move into the `deployments/node/samples` folder
149
+
150
+
```sh
151
+
cd deployments/node/samples
152
+
```
153
+
154
+
2. Set the `KUBECONFIG` environment variable to the `fluidos-consumer` cluster
Please, note that you need to pass a few parameters.
@@ -75,11 +272,14 @@ Please, note that you need to pass a few parameters.
75
272
1. kubeadm
76
273
2. k3s
77
274
3. kind
275
+
78
276
- "cluster-name": this is the name you want to give to your Liqo local cluster (e.g.: `fluidos-turin-1`)
79
277
80
278
- $KUBECONFIG: it is the typical environment variable that points to the path of your Kubernetes cluster configuration.
81
279
82
-
For more information, check out [Liqo official documentation](https://docs.liqo.io/en/v0.10.3/installation/install.html#install-with-liqoctl) for all supported providers.
280
+
- "liqoctl PATH": it is the path to the liqoctl command. If installed via Liqo guide, liqoctl is sufficient.
281
+
282
+
For more information, check out [Liqo official documentation](https://docs.liqo.io/en/v1.0.0/installation/install.html#install-with-liqoctl) for all supported providers.
83
283
84
284
**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"`.
0 commit comments