This section describes how to create a Vagrant Box, using the base virtual machine configured in [Oracle Virtual Box](#112-oracle-virtual-box).
<h3><u>Virtual Machine specifications</h3></u>
Most of the specifications can be as specified in the [Oracle Virtual Box](#112-oracle-virtual-box) page, however, there are a few particularities to Vagrant that must be accommodated, such as:
- ... <!-- Should create and host one at ETSI!! -->
To use them, you simply have to create a Vagrantfile and run `vagrant up controller` in the same directory. The following example Vagrantfile already allows you to do just that, with the bonus of exposing the multiple management GUIs to your `localhost`.
**Important**: Some TeraFlowSDN dependencies need to be executed on top of MicroK8s/Kubernetes v1.24. It is not guaranteed (by now) to run on newer versions.
**Important**: By default, Kubernetes uses CIDR 10.1.0.0/16 for pods and CIDR 10.152.183.0/24 for services. If they conflict with your internal network CIDR, you might need to change Kubernetes CIDRs at deployment time. To do so, check links below and ask for support if needed.
-[MicroK8s - How to configure network Dual-stack](https://microk8s.io/docs/how-to-dual-stack)
<h3><u>Add user to the docker and microk8s groups</h3></u>
...
...
@@ -898,23 +905,21 @@ EOF
```
The settings are organized in 4 sections:
- Section `TeraFlowSDN`:
-`TFS_REGISTRY_IMAGE` enables to specify the private Docker registry to be used, by default, we assume to use the Docker respository enabled in MicroK8s.
-`TFS_COMPONENTS` specifies the components their Docker image will be rebuilt, uploaded to the private Docker registry, and deployed in Kubernetes.
-`TFS_IMAGE_TAG` defines the tag to be used for Docker images being rebuilt and uploaded to the private Docker registry.
-`TFS_K8S_NAMESPACE` specifies the name of the Kubernetes namespace to be used for deploying the TFS components.
-`TFS_EXTRA_MANIFESTS` enables to provide additional manifests to be applied into the Kubernetes environment during the deployment. Typical use case is to deploy ingress controllers, service monitors for Prometheus, etc.
-`TFS_GRAFANA_PASSWORD` lets you specify the password you want to use for the `admin` user of the Grafana instance being deployed and linked to the Monitoring component.
-`TFS_SKIP_BUILD`, if set to `YES`, prevents rebuilding the Docker images. That means, the deploy script will redeploy existing Docker images without rebuilding/updating them.
- Section `CockroachDB`: enables to configure the deployment of the backend [CockroachDB](https://www.cockroachlabs.com/) database.
- Check example script [`my_deploy.sh`](https://labs.etsi.org/rep/tfs/controller/-/blob/master/my_deploy.sh) for further details.
- Section `NATS`: enables to configure the deployment of the backend [NATS](https://nats.io/) message broker.
- Check example script [`my_deploy.sh`](https://labs.etsi.org/rep/tfs/controller/-/blob/master/my_deploy.sh) for further details.
- Section `QuestDB`: enables to configure the deployment of the backend [QuestDB](https://questdb.io/) timeseries database.
- Check example script [`my_deploy.sh`](https://labs.etsi.org/rep/tfs/controller/-/blob/master/my_deploy.sh) for further details.
- Section `TeraFlowSDN`:
-`TFS_REGISTRY_IMAGE` enables to specify the private Docker registry to be used, by default, we assume to use the Docker respository enabled in MicroK8s.
-`TFS_COMPONENTS` specifies the components their Docker image will be rebuilt, uploaded to the private Docker registry, and deployed in Kubernetes.
-`TFS_IMAGE_TAG` defines the tag to be used for Docker images being rebuilt and uploaded to the private Docker registry.
-`TFS_K8S_NAMESPACE` specifies the name of the Kubernetes namespace to be used for deploying the TFS components.
-`TFS_EXTRA_MANIFESTS` enables to provide additional manifests to be applied into the Kubernetes environment during the deployment. Typical use case is to deploy ingress controllers, service monitors for Prometheus, etc.
-`TFS_GRAFANA_PASSWORD` lets you specify the password you want to use for the `admin` user of the Grafana instance being deployed and linked to the Monitoring component.
-`TFS_SKIP_BUILD`, if set to `YES`, prevents rebuilding the Docker images. That means, the deploy script will redeploy existing Docker images without rebuilding/updating them.
- Section `CockroachDB`: enables to configure the deployment of the backend [CockroachDB](https://www.cockroachlabs.com/) database.
- Check example script [`my_deploy.sh`](https://labs.etsi.org/rep/tfs/controller/-/blob/master/my_deploy.sh) for further details.
- Section `NATS`: enables to configure the deployment of the backend [NATS](https://nats.io/) message broker.
- Check example script [`my_deploy.sh`](https://labs.etsi.org/rep/tfs/controller/-/blob/master/my_deploy.sh) for further details.
- Section `QuestDB`: enables to configure the deployment of the backend [QuestDB](https://questdb.io/) timeseries database.
- Check example script [`my_deploy.sh`](https://labs.etsi.org/rep/tfs/controller/-/blob/master/my_deploy.sh) for further details.
<h3><u>Confirm that MicroK8s is running</h3></u>
...
...
@@ -949,29 +954,29 @@ source my_deploy.sh
The script performs the following steps:
- Executes script `./deploy/crdb.sh` to automate deployment of CockroachDB database used by Context component.
- The script automatically checks if CockroachDB is already deployed.
- If there are settings instructing to drop the database and/or redeploy CockroachDB, it does the appropriate actions to honor them as defined in previous section.
- Executes script `./deploy/nats.sh` to automate deployment of NATS message broker used by Context component.
- The script automatically checks if NATS is already deployed.
- If there are settings instructing to redeploy the message broker, it does the appropriate actions to honor them as defined in previous section.
- Executes script `./deploy/qdb.sh` to automate deployment of QuestDB timeseries database used by Monitoring component.
- The script automatically checks if QuestDB is already deployed.
- If there are settings instructing to redeploy the timeseries database, it does the appropriate actions to honor them as defined in previous section.
- Executes script `./deploy/tfs.sh` to automate deployment of TeraFlowSDN.
- Creates the namespace defined in `TFS_K8S_NAMESPACE`
- Creates secrets for CockroachDB, NATS, and QuestDB to be used by Context and Monitoring components.
- Builds the Docker images for the components defined in `TFS_COMPONENTS`
- Tags the Docker images with the value of `TFS_IMAGE_TAG`
- Pushes the Docker images to the repository defined in `TFS_REGISTRY_IMAGE`
- Deploys the components defined in `TFS_COMPONENTS`
- Creates the file `tfs_runtime_env_vars.sh` with the environment variables for the components defined in `TFS_COMPONENTS` defining their local host addresses and their port numbers.
- Applies extra manifests defined in `TFS_EXTRA_MANIFESTS` such as:
- Creating an ingress controller listening at port 80 for HTTP connections to enable external access to the TeraFlowSDN WebUI, Grafana Dashboards, and Compute NBI interfaces.
- Deploying service monitors to enable monitoring the performance of the components, device drivers and service handlers.
- Initialize and configure the Grafana dashboards (if Monitoring component is deployed)
- Report a summary of the deployment
- See [Show Deployment and Logs](#15-show-deployment-and-logs)
- Executes script `./deploy/crdb.sh` to automate deployment of CockroachDB database used by Context component.
- The script automatically checks if CockroachDB is already deployed.
- If there are settings instructing to drop the database and/or redeploy CockroachDB, it does the appropriate actions to honor them as defined in previous section.
- Executes script `./deploy/nats.sh` to automate deployment of NATS message broker used by Context component.
- The script automatically checks if NATS is already deployed.
- If there are settings instructing to redeploy the message broker, it does the appropriate actions to honor them as defined in previous section.
- Executes script `./deploy/qdb.sh` to automate deployment of QuestDB timeseries database used by Monitoring component.
- The script automatically checks if QuestDB is already deployed.
- If there are settings instructing to redeploy the timeseries database, it does the appropriate actions to honor them as defined in previous section.
- Executes script `./deploy/tfs.sh` to automate deployment of TeraFlowSDN.
- Creates the namespace defined in `TFS_K8S_NAMESPACE`
- Creates secrets for CockroachDB, NATS, and QuestDB to be used by Context and Monitoring components.
- Builds the Docker images for the components defined in `TFS_COMPONENTS`
- Tags the Docker images with the value of `TFS_IMAGE_TAG`
- Pushes the Docker images to the repository defined in `TFS_REGISTRY_IMAGE`
- Deploys the components defined in `TFS_COMPONENTS`
- Creates the file `tfs_runtime_env_vars.sh` with the environment variables for the components defined in `TFS_COMPONENTS` defining their local host addresses and their port numbers.
- Applies extra manifests defined in `TFS_EXTRA_MANIFESTS` such as:
- Creating an ingress controller listening at port 80 for HTTP connections to enable external access to the TeraFlowSDN WebUI, Grafana Dashboards, and Compute NBI interfaces.
- Deploying service monitors to enable monitoring the performance of the components, device drivers and service handlers.
- Initialize and configure the Grafana dashboards (if Monitoring component is deployed)
- Report a summary of the deployment
- See [Show Deployment and Logs](#15-show-deployment-and-logs)