Skip to content
Snippets Groups Projects
Commit 8979a153 authored by Alex ubuntu vm's avatar Alex ubuntu vm
Browse files

adjusted installation guide so the reference directory is L2S-M/ instead of the parent one

parent dabed3e3
No related branches found
No related tags found
1 merge request!2repo: added new directory where utils scripts will be
...@@ -13,7 +13,7 @@ This guide details the necessary steps to install the L2S-M Kubernetes operator ...@@ -13,7 +13,7 @@ This guide details the necessary steps to install the L2S-M Kubernetes operator
You can create all the vEth interfaces with the provided script using the following command: You can create all the vEth interfaces with the provided script using the following command:
```bash ```bash
sudo sh ./L2S-M/K8s/provision/veth.sh sudo sh ./K8s/provision/veth.sh
``` ```
**IMPORTANT** In order to keep the configuration after the host has been rebooted, a cron job should be written in order to use this script to create and configure the virtual interfaces. To enable its use, open (or create) a new crontab in the host: **IMPORTANT** In order to keep the configuration after the host has been rebooted, a cron job should be written in order to use this script to create and configure the virtual interfaces. To enable its use, open (or create) a new crontab in the host:
...@@ -42,7 +42,7 @@ kubectl taint nodes --all node-role.kubernetes.io/control-plane- node-role.kuber ...@@ -42,7 +42,7 @@ kubectl taint nodes --all node-role.kubernetes.io/control-plane- node-role.kuber
1. Create the virtual interface definitions using the following command: 1. Create the virtual interface definitions using the following command:
```bash ```bash
kubectl create -f ./L2S-M/K8s/interfaces_definitions kubectl create -f ./K8s/interfaces_definitions
``` ```
**NOTE:** If you are using interfaces whose definitions are not present in the virtual interfaces definitions in the folder, you must create the corresponding virtual definition in the same fashion as the VXLANs. For example, if you want to use a VPN interface called "tun0", first write the descriptor "tun0.yaml": **NOTE:** If you are using interfaces whose definitions are not present in the virtual interfaces definitions in the folder, you must create the corresponding virtual definition in the same fashion as the VXLANs. For example, if you want to use a VPN interface called "tun0", first write the descriptor "tun0.yaml":
...@@ -65,12 +65,12 @@ kubectl create -f tun0.yaml ...@@ -65,12 +65,12 @@ kubectl create -f tun0.yaml
``` ```
2. Create the Kubernetes account Service Account and apply their configuration by applying the following command: 2. Create the Kubernetes account Service Account and apply their configuration by applying the following command:
```bash ```bash
kubectl create -f ./L2S-M/operator/deploy/config/ kubectl create -f ./operator/deploy/config/
``` ```
3. Create the Kubernetes Persistent Volume by using the following kubectl command: 3. Create the Kubernetes Persistent Volume by using the following kubectl command:
```bash ```bash
kubectl create -f ./L2S-M/operator/deploy/mysql/ kubectl create -f ./operator/deploy/mysql/
``` ```
4. Before deploying the L2S-M operator, it is neccessary to label your master node as the "master" of the cluster. To do so, get the names of your Kubernetes nodes, select the master and apply the "master" label with the following command: 4. Before deploying the L2S-M operator, it is neccessary to label your master node as the "master" of the cluster. To do so, get the names of your Kubernetes nodes, select the master and apply the "master" label with the following command:
...@@ -82,13 +82,13 @@ kubectl label nodes [your-master-node] dedicated=master ...@@ -82,13 +82,13 @@ 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
kubectl create -f ./L2S-M/operator/deploy/controller/ kubectl create -f ./operator/deploy/controller/
``` ```
You can check that the deployment was successful if the pod enters the "running" state using the *kubectl get pods* command. You can check that the deployment was successful if the pod enters the "running" state using the *kubectl get pods* command.
6. After the previous preparation, (make sure the controller is running) you can deploy the operator in your cluster using the YAML deployment file: 6. After the previous preparation, (make sure the controller is running) you can deploy the operator in your cluster using the YAML deployment file:
```bash ```bash
kubectl create -f ./L2S-M/operator/deploy/deployOperator.yaml kubectl create -f ./operator/deploy/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
...@@ -97,7 +97,7 @@ Once these two pods are in running state, you can finally deploy the virtual swi ...@@ -97,7 +97,7 @@ Once these two pods are in running state, you can finally deploy the virtual swi
**First deploying the virtual OVS Daemonset:** **First deploying the virtual OVS Daemonset:**
```bash ```bash
kubectl create -f ./L2S-M/operator/daemonset kubectl create -f ./operator/daemonset
``` ```
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```
...@@ -106,7 +106,7 @@ And check there is a pod running in each node, with ```kubectl get pods -o wide` ...@@ -106,7 +106,7 @@ And check there is a pod running in each node, with ```kubectl get pods -o wide`
In order to connect the switches between themselves, an additional configuarion must be done. A configuration file specifying which nodes we want to connect and which IP addresses their switches have will be made, and then a script will be run in each l2sm switch, using this configuration file. In order to connect the switches between themselves, an additional configuarion must be done. A configuration file specifying which nodes we want to connect and which IP addresses their switches have will be made, and then a script will be run in each l2sm switch, using this configuration file.
a. Create a file anywhere or use the reference in ./L2S-M/operator/src/switch/sampleFile.json. In this installation, this file will be used as a reference. a. Create a file anywhere or use the reference in ./operator/src/switch/sampleFile.json. In this installation, this file will be used as a reference.
b. In this file, you will specify, using the template shown in the reference file, the name of the nodes in the cluster and the IP addresses of **the switches** running on them. For example: b. In this file, you will specify, using the template shown in the reference file, the name of the nodes in the cluster and the IP addresses of **the switches** running on them. For example:
```bash ```bash
$ kubectl get pods -o wide $ kubectl get pods -o wide
...@@ -118,7 +118,7 @@ In order to connect the switches between themselves, an additional configuarion ...@@ -118,7 +118,7 @@ In order to connect the switches between themselves, an additional configuarion
``` ```
In this example we have two nodes: l2sm1 and l2sm2, with two switches, with IP addresses 10.1.14.58 and 10.1.72.111. In this example we have two nodes: l2sm1 and l2sm2, with two switches, with IP addresses 10.1.14.58 and 10.1.72.111.
We want to connect them directly, so we modify the reference file, ./L2S-M/operator/src/switch/sampleFile.json: We want to connect them directly, so we modify the reference file, ./operator/src/switch/sampleFile.json:
```json ```json
[ [
{ {
...@@ -139,7 +139,7 @@ Note: Any number of nodes can be configured, as long as the entry is in this fil ...@@ -139,7 +139,7 @@ Note: Any number of nodes can be configured, as long as the entry is in this fil
Once this file is created, we inject it to each node using the kubectl cp command: Once this file is created, we inject it to each node using the kubectl cp command:
```bash ```bash
kubectl cp ./L2S-M/operator/src/switch/sampleFile.json <pod-name>:/etc/l2sm/switchConfig.json kubectl cp ./operator/src/switch/sampleFile.json <pod-name>:/etc/l2sm/switchConfig.json
``` ```
And then executing the script in the pod: And then executing the script in the pod:
```bash ```bash
......
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