# B5 GEMINI: AI-Driven Network Digital Twin
## 3 B5 gemini Network Digital Twin
### B5 gemini Infrastructure
#### 3.3.2 Deployment Module  
Once the initial phase of collecting information for the generation of the DTs is finished, the implementation module is used, which, through the Terraform IaaS (Infrastructure as a Service) [23] tool, will oversee the implementation of the virtual infrastructure that will host the DTs. This module allows, through different providers, one to deploy the infrastructure in any available cloud (AWS, Google Cloud, Azure, IBM, etc.) or in its own virtualization infrastructures, using managers such as vSphere for VCenter (VMWare). Figure 3 shows an example of virtual machine provisioning associated with the 5G AMF element through the Terraform software using the vSphere provider. The main advantage of this technology is the abstraction and non-dependence on specific API for each cloud, since once the Terraform deployment file is generated, it is easily portable to any other cloud that offers a provider compatible with it. Added to the advantage of deployment over any type of infrastructure, is the resource management offered by Terraform, allowing the creation of multiple NDT deployments, isolated from each other, as well as their subsequent elimination, both at the full deployment level and for specific resources within a deployment. Finally, the deployment module makes use of a wide library of virtual machines and Docker [24] containers, which will serve as the basis for the provisioning and configuration of the different DTs to be implemented using technologies such as Kubernetes [25], Docker Swarm [26] or Docker Compose [27]. The NFs of the 5G core network are implemented using Docker containers, being able to deploy all the NFs in the same instance or deploy the NFs in a distributed manner, using the Docker bridge network for internal communications between each module or defining the Docker networks' overlay, respectively. Additionally, in the deployment phase, the docker interfaces are duplicated, allowing the capture of all traffic (signaling and user traffic) that is shared outside and inside the core network. Figure 4 shows the integration of the NDT 5G Core at Mouseworld Lab. In this case, Mouseworld Lab is used to apply real context to the DT 5G Core, since it is made up of several virtual devices that act as clients or servers for different types of traffic (streaming video, web pages, etc.). It also has an orchestrator that communicates with all DT devices within the NDT through a management network and the ability to monitor and capture traffic for analysis, statistics, and data set generation. It additionally allows the connection of the NDT to remote services through the Internet. B5 GEMINI devices added to existing infrastructure are marked in red in Figure 4. As can be observed in the figure, the 5G core infrastructure has been integrated into a single instance, using Docker containers, as explained above. However, B5 GEMINI allows one to establish an NDT with the different distributed 5G Core NFVs. To allow communication between the different DTs, virtual links are established to communicate the required containers (specifically the AMF and UPF) with other devices in the environment. UPF is connected to an internal network that allows user traffic to reach local or remote servers via the Internet. On the other hand, the traffic injection module is implemented as a virtual element within the NDT, which can communicate with the AMF through signaling traffic and can receive traffic from client users in the Mouseworld Lab environment. The traffic is piped and sent over the link connected to the UPF container in the dockerized 5G core.