This flder includes the code for the MTP Core. It is released open source under GPLv3 license
Tools needed to compile and run MTP:
- JAVA JRE 1.8.x or higher
- Maven
- NETBEANS 9.x or higher (optional)
- MySQL 8.0 server
- JDBC SQL connector
- MySQL Workbench (optional)
MTP is a maven project that can be compiled via command line or via a Java IDE ( Netbeans is recommended)
Compile the swagger java rest client (used by MTP as library)
- enter in the
sbi-client
directory - execute
mvn install package
- enter in the
pa_lib
directory - execute
mvn install package
- enter in the
mon-client
directory - execute
mvn install package
Compile the mtp
- enter in the
mtp
directory - execute
mvn install package
Compile the swagger java rest client (used by MTP as library)
- Open
sbi-client
in Netbeans (underFile->Open Project
) - Compile the java rest client (click on build button)
- Open
pa_lib
in Netbeans (underFile->Open Project
) - Compile the java rest client (click on build button)
- Open
mon-client
in Netbeans (underFile->Open Project
) - Compile the java rest client (click on build button)
Compile the mtp
- Open
mtp
in Netbeans (underFile->Open Project
) - Compile the mtp (click on build button)
MTP needs some sql scripts to configure specific aspects. Below is described how to configure properly the MySQL server and how to prepare the sql script.
Install MySQL DB server (refer to MySQL online wiki for installation according the Operative System)
MTP is configured to access the MySQL DB with login "mtp" and pwd "mtp"). The server installation provides a "root@localhost" access, with a generated temporary password; so after the installation you need to change the root password to "mtp" (please refer to MySQL wiki for this operation as it depends from the Operative System)
MTP needs a file containing all interdomain links, i.e. the physical links connecting VIM and WIM domains. Each link has the following format:
INSERT INTO mtpdomdb.interdomainlink
(srcDomId, /* Source domain Id of the link */
dstDomId, /* Destination domain Id of the link */
srcGwId, /* Source node Id of the link */
dstGwId, /* Destination node Id of the link */
srcGWIp, /* Source interface IP of the link */
dstGwIp, /* Destination interface IP of the link */
delay, /* Delay associated to the link */
availableBandwidth, /* Available BW of the link */
reservedBandwidth, /* Reserved BW of the link */
totalBandwidth, /* Total BW of the link */
allocatedBandwidth) /* Allocated BW of the link */
VALUES
(1,
5,
"16842753", /* 32 bit representation of Ip 1.1.0.1*/
"83951617", /* 32 bit representation of Ip 5.1.0.1*/
"15.1.0.1",
"15.1.0.5",
"10",
"10000000",
"0",
"10000000",
"0");
An example of interdomainlinks.sql script is already present. The file represents the interdomain links of the reference topology (ReferenceTopology.pptx under the folder dbscripts/test_topology
)
that is used for test.
MTP needs a file containing all compute flavours available for each NfviPop. Each flavour has the following format (refer to IFA005 Section 8.4.2 for the description of the fields):
INSERT INTO mtpdomdb.computeflavour
(computeFlavourId, /* Unique key to identify the flavor (used by SO) */
flavourId, /* Datacenter local identifier of the flavor */
accelerationCapability, /* See IFA005 */
NfviPopId) /* Identifier of the NfviPop using the flavor */
VALUES (1,1,"accCapability1",11);
INSERT INTO mtpdomdb.virtualstoragedata
(typeOfStorage, /* See IFA005 */
sizeOfStorage, /* See IFA005 */
computeFlavourId) /* Key used in mtpdomdb.computeflavour table */
VALUES ("typeStorage1",10,1);
INSERT INTO mtpdomdb.virtualcpu
(cpuArchitecture, /* See IFA005 */
numVirtualCpu, /* See IFA005 */
cpuClock, /* See IFA005 */
virtualCpuOversubscriptionPolicy, /* See IFA005 */
computeFlavourId) /* Key used in mtpdomdb.computeflavour table */
VALUES ("x86",4,1,"policy1",1);
INSERT INTO mtpdomdb.virtualmemorydata
(virtualMemSize, /* See IFA005 */
virtualMemOversubscriptionPolicy, /* See IFA005 */
numaEnabled, /* See IFA005 */
computeFlavourId) /* Key used in mtpdomdb.computeflavour table */
VALUES (100,"policy1",true, 1);
INSERT INTO mtpdomdb.virtualnetworkinterfacedata
(networkId, /* See IFA005 */
networkPortId, /* See IFA005 */
typeVirtualNic, /* See IFA005 */
typeConfiguration, /* See IFA005 */
bandwidth, /* See IFA005 */
accelerationCapability, /* See IFA005 */
metadata, /* See IFA005 */
computeFlavourId) /* Key used in mtpdomdb.computeflavour table */
VALUES (0,0,0,"",100,"","",1);
An example of computeFlavour.sql script is already present. The file represents the flavours of the NfviPoPs of the reference topology (ReferenceTopology.pptx
under the folder dbscripts/test_topology
)
that is used for test.
MTP needs a file containing all MEC service descriptors (appD) that are used by MEC plugin. The scheme follows the [ETSI MEC 0-10-2] (https://www.etsi.org/deliver/etsi_gs/MEC/001_099/01002/01.01.01_60/gs_MEC01002v010101p.pdf) standard. Plese refer to this standard for details
AppD examples are present in MECAppD
folder.
as input MTP needs to know the list of VIM and WIM domains that can controls, configuration policy for placement and monitoring configuration file. The syntax is:
<?xml version="1.0" encoding="UTF-8"?>
<MTPConfig>
<Domains>
<Domain>
<Type>VIM</Type>
<Name>vimdummy</Name>
<Id>1</Id>
<MecId>-1</MecId>
<Ip>127.0.0.1</Ip>
<Port>51000</Port>
</Domain>
<Domain>
<Type>T-WIM</Type>
<Name>wimdummy</Name>
<Id>3</Id>
<MecId>-1</MecId>
<Ip>127.0.0.1</Ip>
<Port>53000</Port>
</Domain>
<Domain>
<Type>VIM</Type>
<Name>vimdummy</Name>
<Id>2</Id>
<MecId>-1</MecId>
<Ip>127.0.0.1</Ip>
<Port>52000</Port>
</Domain>
</Domains>
<LocalPAConfig>
<Compute>
<Status>disable</Status>
<Name>PAalg1</Name>
<Ip>127.0.0.1</Ip>
<Port>81000</Port>
</Compute>
<Network>
<Status>disable</Status>
<Name>PAalg2</Name>
<Ip>127.0.0.1</Ip>
<Port>82000</Port>
</Network>
</LocalPAConfig>
<MonitoringConfig>
<Name>Prometheus</Name>
<Ip>127.0.0.1</Ip>
<Port>91000</Port>
</MonitoringConfig>
<AppDConfig>
</AppDConfig>
</MTPConfig>
XML file contains list of "Domain" entries where each entry represent the information for a specific domain. Specifically: : identifies the domain type ("T-WIM" or "VIM") : identifies the domain name (same reported in IFA005) : identifies the domain id (same reported in IFA005) : identifies the MEC domain Id associated to this domain (valid only for VIM domain, "-1" for other domains). : identifies the IP of the server HTTP (use for REST call) : identifies the port of the server HTTP (use for REST call)
XML file contains Placement Algorithm configuration policy. There are two entries, one is applied to the compute resource and the other to the networking. Specifically: : identifies if MTP has to use PA policy algorithm for optimization of the resources. : identifies the PA algorithm name : identifies the IP of the PA algorithm server HTTP (use for REST call) : identifies the port of the PA algorithm server HTTP (use for REST call)
XML file contains Monitoring specific information. Specifically: : identifies the monitoring platform name. : identifies the IP of the monitoring server HTTP (use for REST call) : identifies the port of the monitoring server HTTP (use for REST call)
MTP can run in two ways:
- Normal mode: It expects to have for each domain a corresponding MTP plugin to contact (detail of contact described in xml file)
- Stub mode: The domains are simulated as Stub threads (useful for test and debug). The reference domain topology is shown in
ReferenceTopology.ppt
file underdbscripts/test_topology
The mode is enabled by a System properties (STUB_ENABLE
) configured at the startup (see below)
Output of the compilation is a self-contained jar file. So to run it, just type java -D"STUB_ENABLE=<yes/no>" -jar <jarfile> <xmlfilename> <ip> <port>
where:
- is the name of the jar file (with the local path to reach it)
- is the the file xml describing in Section 1.3
- is the ip address where MTP is listening for HTTP REST calls (used for SO communication)
- is the port number where MTP is listening for HTTP REST calls (used for SO communication)
- STUB_ENABLE=<yes/no> is a flag that enable/disable the stub mode