Skip to content
Snippets Groups Projects
Unverified Commit cf83402c authored by Alex's avatar Alex Committed by GitHub
Browse files

Merge pull request #5 from Networks-it-uc3m/inter-cluster

Inter cluster
parents 85f0dbb8 e86514b7
No related branches found
No related tags found
1 merge request!2repo: added new directory where utils scripts will be
# Work in progress :wrench::wrench: # L2S-M in a Inter-Cluster scenario
>**Note: Work in progress** :wrench::wrench:
> This feature and repository is under development, keep it in mind when testing the application. For a stable version, refer to the main branch in the [L2S-M official repository](https://github.com/Networks-it-uc3m/L2S-M).
## Components in inter-cluster scenario: ## How it works
### Components in inter-cluster scenario:
<p align="center"> <p align="center">
<img src="../assets/inter-cluster-arch.svg" width="600"> <img src="../assets/inter-cluster-arch.svg" width="600">
</p> </p>
## Sequence Diagram ### Sequence Diagram
<p align="center"> <p align="center">
<img src="../assets/inter-cluster-diagram.svg" width="600"> <img src="../assets/inter-cluster-diagram.svg" width="600">
...@@ -67,63 +70,3 @@ spec: ...@@ -67,63 +70,3 @@ spec:
secretName: spain-network-signature secretName: spain-network-signature
``` ```
Se avisa al operador, y este avisa a ambos controladores, siendo estos los que se encargan de comprobar la firma. -> Y ver si hay autorización
Si no es autorizado, el intent del NED no se crea en el controlador, si es autorizado, se hace intent desde NED, la interfaz veth que corresponda con la que el operador solicita.
Que habría que implementar->
IDCO:
Doy por hecho que el idco funciona.
Base de datos con: public keys asociados a users. permisos asociados a users. Usar plataforma externa o internamente se define en el controller? Hacer un portal de autorizaciones externo a ONOS?
L2SM-Switch:
interfaces veth adicionales que conecten a los NED
NED:
como l2sm switch, pero que pueden tener varios controladores. con hostNetwork, van generando interfaces en el host para conecarse con L2S-M switch. un cable por pod o un cable por red?
L2S-M Operator:
Cuando encienda que sepa si está en modo inter o no por un argumento.
Según lo descrito:
evento cuando se crea red inter
evento cuando se añade pod
L2S-M Client:
A través de este se crean los networks. Con docker por ejemplo? o programa instalado por línea de comandos?
Si alguien quiere unirse a la red, attachea al pod, utilizando
intercluster:
owner de la red en cada cluster crea la red con:
provider (idco concreto): campo de nombre y campo de dominio
nombre
accessList (diferente en cada cluster): se guarda clave pública de cada usuario. (el usuario tiene su clave privada guardada en su pc por ej)
clave: tiene identificador, hash, una firma digital.
timestamp
IDCO implementar:
cuando hay un request, ver si la clave está bien firmada.
guardar la de redes:
RED:
Cluster1
AccessList
Cluster2
AccessList
1. Se crea red inter
2 se pide al idco que red intra corresponde, (ahi se haria la utorizacion)
3 se guarda el mappeo de red inter a intra, y se juntan esos pares desde el operador
4 cuando alguien despliega, se usa la red intra
de momento security parameters, dejarlo en abierto.
hacer un dibujillo.
1.
...@@ -9,13 +9,13 @@ The files and scripts are meant to be run directly in the /L2S-M directory, as t ...@@ -9,13 +9,13 @@ The files and scripts are meant to be run directly in the /L2S-M directory, as t
- `./build/switch`: Dockerfile and related files for building the l2sm-switch Docker image. - `./build/switch`: Dockerfile and related files for building the l2sm-switch Docker image.
- `./build/controller`: Dockerfile and related files for building the l2sm-controller Docker image. - `./build/controller`: Dockerfile and related files for building the l2sm-controller Docker image.
- `./build/operator`: Dockerfile and related files for building the l2sm-operator Docker image. - `./build/operator`: Dockerfile and related files for building the l2sm-operator Docker image.
- `./build/build_and_push_images.sh`: Bash script for automating the build and push process of Docker images. - `./build/build_images.sh`: Bash script for automating the build and push process of Docker images.
## Script Usage: ## Script Usage:
### 1. Build Images: ### 1. Build Images:
```bash ```bash
./build/build_and_push_images.sh build ./build/build_images.sh build
``` ```
This command will build Docker images for l2sm-switch, l2sm-controller, and l2sm-operator. This command will build Docker images for l2sm-switch, l2sm-controller, and l2sm-operator.
...@@ -23,7 +23,7 @@ This command will build Docker images for l2sm-switch, l2sm-controller, and l2sm ...@@ -23,7 +23,7 @@ This command will build Docker images for l2sm-switch, l2sm-controller, and l2sm
### 2. Push Images: ### 2. Push Images:
```bash ```bash
./build/build_and_push_images.sh push ./build/build_images.sh push
``` ```
This command will push previously built Docker images to the specified DockerHub repository. This command will push previously built Docker images to the specified DockerHub repository.
...@@ -31,7 +31,7 @@ This command will push previously built Docker images to the specified DockerHub ...@@ -31,7 +31,7 @@ This command will push previously built Docker images to the specified DockerHub
### 3. Build and Push Images: ### 3. Build and Push Images:
```bash ```bash
./build/build_and_push_images.sh build_push ./build/build_images.sh build_push
``` ```
This command will both build and push Docker images. This command will both build and push Docker images.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
set -e set -e
# Set environment variables # Set environment variables
export VERSION="2.2" export VERSION="2.3"
export DOCKERHUB_REPO="alexdecb" export DOCKERHUB_REPO="alexdecb"
# Function to build image # Function to build image
......
...@@ -37,6 +37,7 @@ kubectl create -f ./deployments/custom-installation/mysql/ ...@@ -37,6 +37,7 @@ kubectl create -f ./deployments/custom-installation/mysql/
kubectl get nodes kubectl get nodes
kubectl label nodes [your-master-node] dedicated=master kubectl label nodes [your-master-node] dedicated=master
``` ```
5. Deploy the L2S-M Controller by using the following command: 5. Deploy the L2S-M Controller by using the following command:
```bash ```bash
...@@ -49,7 +50,7 @@ kubectl create -f ./deployments/custom-installation/deployController.yaml ...@@ -49,7 +50,7 @@ kubectl create -f ./deployments/custom-installation/deployController.yaml
kubectl create -f ./deployments/custom-installation/deployOperator.yaml kubectl create -f ./deployments/custom-installation/deployOperator.yaml
``` ```
Once these two pods are in running state, you can finally deploy the virtual switches Once these two pods are in running state, you can finally deploy the virtual switches and custom CRD
7. This is done by: 7. This is done by:
...@@ -60,6 +61,11 @@ kubectl create -f ./deployments/custom-installation/deploySwitch.yaml ...@@ -60,6 +61,11 @@ kubectl create -f ./deployments/custom-installation/deploySwitch.yaml
And check there is a pod running in each node, with ```kubectl get pods -o wide``` And check there is a pod running in each node, with ```kubectl get pods -o wide```
8. And launch the CRD definition by:
```bash
kubectl create -f ./deployments/custom-installation/l2sm-network-crd.yaml
```
## Configuring Vxlans ## Configuring Vxlans
Each node enables the creation of custom L2S-M networks, as can be seen in the [examples section](../../examples/) section. But for communicating pods that are in different Nodes of the cluster, additional configuration must be done, of configuring the Vxlan tunnels between them. Each node enables the creation of custom L2S-M networks, as can be seen in the [examples section](../../examples/) section. But for communicating pods that are in different Nodes of the cluster, additional configuration must be done, of configuring the Vxlan tunnels between them.
......
...@@ -416,5 +416,44 @@ spec: ...@@ -416,5 +416,44 @@ spec:
add: ["NET_ADMIN"] add: ["NET_ADMIN"]
nodeSelector: nodeSelector:
kubernetes.io/arch: amd64 kubernetes.io/arch: amd64
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: l2sm-networks.l2sm.k8s.local
spec:
group: l2sm.k8s.local
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
type:
type: string
config:
type: string
nullable: true
signature:
type: string
nullable: true
status:
type: object
properties:
connectedPods:
type: array
items:
type: string
scope: Namespaced
names:
plural: l2sm-networks
singular: l2sm-network
kind: L2SMNetwork
shortNames:
- l2sm-net
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment