Skip to content

Commit

Permalink
Prototype of user-friendly installation script and its documentation (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
andreacv98 authored Mar 26, 2024
1 parent f28d851 commit cf1adf5
Show file tree
Hide file tree
Showing 14 changed files with 1,683 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/installation/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Installation

A quick script for installing the FLUIDOS Node is available. Currently, the script supports installation on KIND Clusters, with plans to extend support to generic Kubernetes clusters in the near future.

---

**⚠️ 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.

If you want to use a **working and tested script** to test the FLUIDOS Node, please refer to the [**Testbed**](../testbed/README.md) section.

---

To execute the script, use the following command:

```bash
cd tools/scripts
. ./setup.sh
```

No options are available through the CLI, but you can choose the installation mode by choosing the right option during the script execution.
The option supported are:

- `1` to install the FLUIDOS Node as the demo testbed through KIND
- `2` to install the FLUIDOS Node in n consumer clusters and m provider clusters through KIND
- `3` to install the FLUIDOS Node in n clusters through their KUBECONFIG files
**DISCLAIMER:** in this case all your Kubernetes clusters inserted in the script must have at least one node tagged with `node-role.fluidos.eu/worker: "true"` and at least in the provider clusters, you can choose the nodes that exposes their Kubernetes resources with the label `node-role.fluidos.eu/resources: "true"`.

For each option, you can choose to install from either the official remote FLUIDOS repository or the local repository, by building it at the moment.
14 changes: 14 additions & 0 deletions quickstart/kind/configs/consumer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.28.0
- role: worker
labels:
node-role.fluidos.eu/resources: "true"
node-role.fluidos.eu/worker: "true"
image: kindest/node:v1.28.0
- role: worker
image: kindest/node:v1.28.0
labels:
node-role.fluidos.eu/resources: "true"
14 changes: 14 additions & 0 deletions quickstart/kind/configs/provider.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.28.0
- role: worker
labels:
node-role.fluidos.eu/resources: "true"
node-role.fluidos.eu/worker: "true"
image: kindest/node:v1.28.0
- role: worker
image: kindest/node:v1.28.0
labels:
node-role.fluidos.eu/resources: "true"
14 changes: 14 additions & 0 deletions quickstart/kind/configs/standard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.28.0
- role: worker
labels:
node-role.fluidos.eu/resources: "true"
node-role.fluidos.eu/worker: "true"
image: kindest/node:v1.28.0
- role: worker
image: kindest/node:v1.28.0
labels:
node-role.fluidos.eu/resources: "true"
151 changes: 151 additions & 0 deletions quickstart/utils/consumer-values-nolrm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# Default values for fluidos-node.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# -- Images' tag to select a development version of fluidos-node instead of a release
tag: ""
# -- The pullPolicy for fluidos-node pods.
pullPolicy: "IfNotPresent"

common:
# -- NodeSelector for all fluidos-node pods
nodeSelector: {
node-role.fluidos.eu/worker: "true"
}
# -- Tolerations for all fluidos-node pods
tolerations: []
# -- Affinity for all fluidos-node pods
affinity: {}
# -- Extra arguments for all fluidos-node pods
extraArgs: []

localResourceManager:
# -- The number of REAR Controller, which can be increased for active/passive high availability.
replicas: 0
pod:
# -- Annotations for the local-resource-manager pod.
annotations: {}
# -- Labels for the local-resource-manager pod.
labels: {}
# -- Extra arguments for the local-resource-manager pod.
extraArgs: []
# -- Resource requests and limits (https://kubernetes.io/docs/user-guide/compute-resources/) for the local-resource-manager pod.
resources:
limits: {}
requests: {}
imageName: "ghcr.io/fluidos-project/local-resource-manager"
config:
# -- Label used to identify the nodes from which resources are collected.
nodeResourceLabel: "node-role.fluidos.eu/resources"
# -- This flag defines the resource type of the generated flavours.
resourceType: "k8s-fluidos"
flavour:
# -- The minimum number of CPUs that can be requested to purchase a flavour.
cpuMin: "0"
# -- The minimum amount of memory that can be requested to purchase a flavour.
memoryMin: "0"
# -- The CPU step that must be respected when requesting a flavour through a Flavour Selector.
cpuStep: "1000m"
# -- The memory step that must be respected when requesting a flavour through a Flavour Selector.
memoryStep: "100Mi"

rearManager:
# -- The number of REAR Manager, which can be increased for active/passive high availability.
replicas: 1
pod:
# -- Annotations for the rear-manager pod.
annotations: {}
# -- Labels for the rear-manager pod.
labels: {}
# -- Extra arguments for the rear-manager pod.
extraArgs: []
# -- Resource requests and limits (https://kubernetes.io/docs/user-guide/compute-resources/) for the rear-manager pod.
resources:
limits: {}
requests: {}
imageName: "ghcr.io/fluidos-project/rear-manager"

rearController:
# -- The number of REAR Controller, which can be increased for active/passive high availability.
replicas: 1
pod:
# -- Annotations for the rear-controller pod.
annotations: {}
# -- Labels for the rear-controller pod.
labels: {}
# -- Extra arguments for the rear-controller pod.
extraArgs: []
# -- Resource requests and limits (https://kubernetes.io/docs/user-guide/compute-resources/) for the rear-controller pod.
resources:
limits: {}
requests: {}
imageName: "ghcr.io/fluidos-project/rear-controller"
service:
grpc:
name: "grpc"
# -- Kubernetes service used to expose the gRPC Server to liqo.
type: "ClusterIP"
# -- Annotations for the gRPC service.
annotations: {}
# -- Labels for the gRPC service.
labels: {}
# -- The gRPC port used by Liqo to connect with the Gateway of the rear-controller to obtain the Contract resources for a given consumer ClusterID.
port: 2710
# -- The target port used by the gRPC service.
targetPort: 2710
gateway:
name: "gateway"
# -- Kubernetes service to be used to expose the REAR gateway.
type: "NodePort"
# -- Annotations for the REAR gateway service.
annotations: {}
# -- Labels for the REAR gateway service.
labels: {}
# -- Options valid if service type is NodePort.
nodePort:
# -- Force the port used by the NodePort service.
port: 30000
# -- Options valid if service type is LoadBalancer.
loadBalancer:
# -- Override the IP here if service type is LoadBalancer and you want to use a specific IP address, e.g., because you want a static LB.
ip: ""
# -- The port used by the rear-controller to expose the REAR Gateway.
port: 3004
# -- The target port used by the REAR Gateway service.
targetPort: 3004

networkManager:
# -- The number of Network Manager, which can be increased for active/passive high availability.
replicas: 1
pod:
# -- Annotations for the network-manager pod.
annotations: {}
# -- Labels for the network-manager pod.
labels: {}
# -- Extra arguments for the network-manager pod.
extraArgs: []
# -- Resource requests and limits (https://kubernetes.io/docs/user-guide/compute-resources/) for the network-manager pod.
resources:
limits: {}
requests: {}
# -- The resource image to be used by the network-manager pod.
imageName: "ghcr.io/fluidos/network-manager"
configMaps:
providers:
# -- The name of the ConfigMap containing the list of the FLUIDOS Providers and the default FLUIDOS Provider (SuperNode or Catalogue).
name: "fluidos-network-manager-config"
# -- The IP List of Local knwon FLUIDOS Nodes separated by commas.
local:
# -- The IP List of Remote known FLUIDOS Nodes separated by commas.
remote:
# -- The IP List of SuperNodes separated by commas.
default:
nodeIdentity:
# -- The name of the ConfigMap containing the FLUIDOS Node identity info.
name: "fluidos-network-manager-identity"
# -- The domain name of the FLUIDOS closed domani: It represents for instance the Enterprise and it is used to generate the FQDN of the owned FLUIDOS Nodes
domain: "fluidos.eu"
# -- The IP address of the FLUIDOS Node. It can be public or private, depending on the network configuration and it corresponds to the IP address to reach the Network Manager from the outside of the cluster.
ip:
# -- The NodeID is a UUID that identifies the FLUIDOS Node. It is used to generate the FQDN of the owned FLUIDOS Nodes and it is unique in the FLUIDOS closed domain
nodeID:
151 changes: 151 additions & 0 deletions quickstart/utils/consumer-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# Default values for fluidos-node.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# -- Images' tag to select a development version of fluidos-node instead of a release
tag: ""
# -- The pullPolicy for fluidos-node pods.
pullPolicy: "IfNotPresent"

common:
# -- NodeSelector for all fluidos-node pods
nodeSelector: {
node-role.fluidos.eu/worker: "true"
}
# -- Tolerations for all fluidos-node pods
tolerations: []
# -- Affinity for all fluidos-node pods
affinity: {}
# -- Extra arguments for all fluidos-node pods
extraArgs: []

localResourceManager:
# -- The number of REAR Controller, which can be increased for active/passive high availability.
replicas: 1
pod:
# -- Annotations for the local-resource-manager pod.
annotations: {}
# -- Labels for the local-resource-manager pod.
labels: {}
# -- Extra arguments for the local-resource-manager pod.
extraArgs: []
# -- Resource requests and limits (https://kubernetes.io/docs/user-guide/compute-resources/) for the local-resource-manager pod.
resources:
limits: {}
requests: {}
imageName: "ghcr.io/fluidos-project/local-resource-manager"
config:
# -- Label used to identify the nodes from which resources are collected.
nodeResourceLabel: "node-role.fluidos.eu/resources"
# -- This flag defines the resource type of the generated flavours.
resourceType: "k8s-fluidos"
flavour:
# -- The minimum number of CPUs that can be requested to purchase a flavour.
cpuMin: "0"
# -- The minimum amount of memory that can be requested to purchase a flavour.
memoryMin: "0"
# -- The CPU step that must be respected when requesting a flavour through a Flavour Selector.
cpuStep: "1000m"
# -- The memory step that must be respected when requesting a flavour through a Flavour Selector.
memoryStep: "100Mi"

rearManager:
# -- The number of REAR Manager, which can be increased for active/passive high availability.
replicas: 1
pod:
# -- Annotations for the rear-manager pod.
annotations: {}
# -- Labels for the rear-manager pod.
labels: {}
# -- Extra arguments for the rear-manager pod.
extraArgs: []
# -- Resource requests and limits (https://kubernetes.io/docs/user-guide/compute-resources/) for the rear-manager pod.
resources:
limits: {}
requests: {}
imageName: "ghcr.io/fluidos-project/rear-manager"

rearController:
# -- The number of REAR Controller, which can be increased for active/passive high availability.
replicas: 1
pod:
# -- Annotations for the rear-controller pod.
annotations: {}
# -- Labels for the rear-controller pod.
labels: {}
# -- Extra arguments for the rear-controller pod.
extraArgs: []
# -- Resource requests and limits (https://kubernetes.io/docs/user-guide/compute-resources/) for the rear-controller pod.
resources:
limits: {}
requests: {}
imageName: "ghcr.io/fluidos-project/rear-controller"
service:
grpc:
name: "grpc"
# -- Kubernetes service used to expose the gRPC Server to liqo.
type: "ClusterIP"
# -- Annotations for the gRPC service.
annotations: {}
# -- Labels for the gRPC service.
labels: {}
# -- The gRPC port used by Liqo to connect with the Gateway of the rear-controller to obtain the Contract resources for a given consumer ClusterID.
port: 2710
# -- The target port used by the gRPC service.
targetPort: 2710
gateway:
name: "gateway"
# -- Kubernetes service to be used to expose the REAR gateway.
type: "NodePort"
# -- Annotations for the REAR gateway service.
annotations: {}
# -- Labels for the REAR gateway service.
labels: {}
# -- Options valid if service type is NodePort.
nodePort:
# -- Force the port used by the NodePort service.
port: 30000
# -- Options valid if service type is LoadBalancer.
loadBalancer:
# -- Override the IP here if service type is LoadBalancer and you want to use a specific IP address, e.g., because you want a static LB.
ip: ""
# -- The port used by the rear-controller to expose the REAR Gateway.
port: 3004
# -- The target port used by the REAR Gateway service.
targetPort: 3004

networkManager:
# -- The number of Network Manager, which can be increased for active/passive high availability.
replicas: 1
pod:
# -- Annotations for the network-manager pod.
annotations: {}
# -- Labels for the network-manager pod.
labels: {}
# -- Extra arguments for the network-manager pod.
extraArgs: []
# -- Resource requests and limits (https://kubernetes.io/docs/user-guide/compute-resources/) for the network-manager pod.
resources:
limits: {}
requests: {}
# -- The resource image to be used by the network-manager pod.
imageName: "ghcr.io/fluidos/network-manager"
configMaps:
providers:
# -- The name of the ConfigMap containing the list of the FLUIDOS Providers and the default FLUIDOS Provider (SuperNode or Catalogue).
name: "fluidos-network-manager-config"
# -- The IP List of Local knwon FLUIDOS Nodes separated by commas.
local:
# -- The IP List of Remote known FLUIDOS Nodes separated by commas.
remote:
# -- The IP List of SuperNodes separated by commas.
default:
nodeIdentity:
# -- The name of the ConfigMap containing the FLUIDOS Node identity info.
name: "fluidos-network-manager-identity"
# -- The domain name of the FLUIDOS closed domani: It represents for instance the Enterprise and it is used to generate the FQDN of the owned FLUIDOS Nodes
domain: "fluidos.eu"
# -- The IP address of the FLUIDOS Node. It can be public or private, depending on the network configuration and it corresponds to the IP address to reach the Network Manager from the outside of the cluster.
ip:
# -- The NodeID is a UUID that identifies the FLUIDOS Node. It is used to generate the FQDN of the owned FLUIDOS Nodes and it is unique in the FLUIDOS closed domain
nodeID:
Loading

0 comments on commit cf1adf5

Please sign in to comment.