diff --git a/additional-info/inter-cluster.md b/additional-info/inter-cluster.md index 33a5cbd25198b02e19b50264c2e97c82076b02d5..7a30adcc059c5741ba93ce1d5c394332835b8e6d 100644 --- a/additional-info/inter-cluster.md +++ b/additional-info/inter-cluster.md @@ -1,13 +1,16 @@ -# 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"> <img src="../assets/inter-cluster-arch.svg" width="600"> </p> -## Sequence Diagram +### Sequence Diagram <p align="center"> <img src="../assets/inter-cluster-diagram.svg" width="600"> @@ -67,63 +70,3 @@ spec: 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. diff --git a/build/README.md b/build/README.md index ffa43964f7ee0d68fda73a6f51befcecac19bc2f..84b128a5a93b73af0c04a82be9cef9ac5a226843 100644 --- a/build/README.md +++ b/build/README.md @@ -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/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/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: ### 1. Build Images: ```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. @@ -23,7 +23,7 @@ This command will build Docker images for l2sm-switch, l2sm-controller, and l2sm ### 2. Push Images: ```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. @@ -31,7 +31,7 @@ This command will push previously built Docker images to the specified DockerHub ### 3. Build and Push Images: ```bash -./build/build_and_push_images.sh build_push +./build/build_images.sh build_push ``` This command will both build and push Docker images. diff --git a/build/build_images.sh b/build/build_images.sh index 6ae024488e3686a8a14e0fc104949922c13122b4..6a2759b64228ad8e4c861a49e326eddb6c50091b 100755 --- a/build/build_images.sh +++ b/build/build_images.sh @@ -2,7 +2,7 @@ set -e # Set environment variables -export VERSION="2.2" +export VERSION="2.3" export DOCKERHUB_REPO="alexdecb" # Function to build image diff --git a/deployments/custom-installation/README.md b/deployments/custom-installation/README.md index 50d2600c421663c32135cab309c7b6b426fd9562..138c60419c4ab11cd35a47d003b2d6c9042c4bb0 100644 --- a/deployments/custom-installation/README.md +++ b/deployments/custom-installation/README.md @@ -37,6 +37,7 @@ kubectl create -f ./deployments/custom-installation/mysql/ kubectl get nodes kubectl label nodes [your-master-node] dedicated=master ``` + 5. Deploy the L2S-M Controller by using the following command: ```bash @@ -49,7 +50,7 @@ kubectl create -f ./deployments/custom-installation/deployController.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: @@ -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``` +8. And launch the CRD definition by: +```bash +kubectl create -f ./deployments/custom-installation/l2sm-network-crd.yaml +``` + ## 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. diff --git a/deployments/inter-cluster/l2sm-network-crd.yaml b/deployments/custom-installation/l2sm-network-crd.yaml similarity index 100% rename from deployments/inter-cluster/l2sm-network-crd.yaml rename to deployments/custom-installation/l2sm-network-crd.yaml diff --git a/deployments/l2sm-deployment.yaml b/deployments/l2sm-deployment.yaml index 8511d72427bb7e8b30b127d590aaccbea85bd76c..16f26552dde13b88ba1d64fa3a604b49079167ee 100644 --- a/deployments/l2sm-deployment.yaml +++ b/deployments/l2sm-deployment.yaml @@ -416,5 +416,44 @@ spec: add: ["NET_ADMIN"] nodeSelector: 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