@@ -110,6 +111,7 @@ cd devops/descriptor-packages/tools
```
- Modify the VNFD (at ~/vEPC/vEPC_vnfd/vEPC_vnfd.yaml), to replace the names of our first VDU and its connection points.
```
...
vdu:
@@ -142,6 +144,7 @@ cd devops/descriptor-packages/tools
```
- Add the second VDU, you can copy and paste the first one, adapting the number of interfaces and VM Flavor.
```
...
vdu:
@@ -170,6 +173,7 @@ cd devops/descriptor-packages/tools
```
- Modify the s6a connection point to be 'internal' one, mapped to internal CPs and VLD to interconnect both VDUs.
```
...
vdu:
@@ -212,6 +216,7 @@ cd devops/descriptor-packages/tools
```
- Modify the external connection points that will be exposed to the Network Service level, and set the management one.
```
...
connection-point:
@@ -225,6 +230,7 @@ cd devops/descriptor-packages/tools
```
- We will set a particular subnet prefix for our internal VLD, to be able to set our own IP addresses at instantiation time.
```
...
ip-profiles:
@@ -243,6 +249,7 @@ cd devops/descriptor-packages/tools
```
- Now, let's add the EPA requirements to the SPGW VDU.
```
...
vdu:
@@ -267,6 +274,7 @@ cd devops/descriptor-packages/tools
```
- Finally, let's specify the cloud-init file names in the descriptor, and copy them to the corresponding folder (~/vEPC/vEPC_vnfd/cloud_init/)
```
...
vdu:
@@ -284,6 +292,7 @@ cd devops/descriptor-packages/tools
- Let's start with the SPGW day-1 operations by populating the descriptor with 'initial config primitives'. The management interface is already set at the "spgw_mgmt" CP, so OSM will connect to this machine when defining a configuration at the VNF level. A 'config' primitive is required to pass the parameters for SSH connection.
The only parameter that is auto-populated is 'rw_mgmt_ip' (the management IP address), the other ones will need to be provided at instantiation time.
Note that we are setting names for primitives (operations), order of execution, parameters, and the juju charm that will implement all of them.
```
...
vnf-configuration:
@@ -314,6 +323,7 @@ Note that we are setting names for primitives (operations), order of execution,
```
- Now, let's modify the descriptor to include operations for the HSS VDU. For this, we will use a configuration block at the VDU level, and specify the management interface for this particular VDU.
```
...
vdu:
@@ -353,6 +363,7 @@ Note that we are setting names for primitives (operations), order of execution,
```
- Finally, we need to build the 'spgwcharm' and 'hsscharm' that will implement these operations. Let's start with the SPGW.
```
# Prepare the environment
snap install charm --classic
@@ -488,6 +499,7 @@ def restart_spgw():
```
- Proceed in a similar way for the HSS, and provide the following contents to the reactive file:
```
from charms.reactive import when, when_not, set_flag
@@ -532,6 +544,7 @@ def restart_hss():
## Building the VNF Package for Day-2
- As defined earlier, the only VDU containing reconfiguration primitives is the SPGW. Let's add it to the descriptor first. We can define default values in this kind of primitive.
```
...
vnf-configuration:
@@ -548,6 +561,7 @@ def restart_hss():
```
- Back to the SPGW charm folder, modify the actions.yaml file to include this new primitive, ading the respective executable file at the 'actions' folder, and finally adding the primitive at the 'reactive' file.
```
# Modify the actions.yaml file
...
@@ -600,6 +614,7 @@ def add_route():
```
- Build both charms and copy them to the VNF folder
- To test the VNF package, you need to first include it into a NS Package created in an earlier stage. Its content should be similar to the following one, where VLDs are mapped to the external connection points of the VNF, and external networks are expected to be already present at the VIM ('vim-network-name' attribute)
Note that, for this example, we are setting some IP address values, to be requested to the VIM's IPAM (subnet should match at the VIM), to match some pre-existing configurations inside the VNF.
```
nsd:nsd-catalog:
nsd:
@@ -692,6 +709,7 @@ nsd:nsd-catalog:
```
- Compress both packages and upload them to OSM.
```
tar -cvzf vepc_vnfd.tar.gz vepc_vnfd/
tar -cvzf vepc_nsd.tar.gz vepc_nsd/
@@ -700,6 +718,7 @@ osm nsd-create vepc_nsd.tar.gz
```
- Prepare a file with the instantiaton parameters. Note that it also includes a 'vnf' block that modifies the internal VLD at instantiation time to set its IP addresses (at VIM IPAM level) so they match with the ones we are providing.
```
additionalParamsForVnf:
- member-vnf-index: '1'
@@ -720,11 +739,13 @@ vnf:
```
- Instantiate the VNF! Make sure you have registered a VIM with the compute and EPA requirements you need for the VNF.
- Monitor the primitives execution status and NS status with the following commands. Remember that the instantiation flow from Release 6 onwards is as follows: (1) Charm execution enviroment preparation, (2) VM Instantiation, (3) Primitives execution
```
osm ns-list
juju switch [NS_ID]
@@ -733,6 +754,7 @@ juju debug-log
```
- When the NS reaches the 'configured' state, ssh to the HSS or SPGW/MME, and check if the HSS - MME session is established. This means that Day-1 operations worked.
@@ -740,6 +762,7 @@ sctp 0 0 10.0.6.15:3868 10.0.6.20:55662 ESTABLISHED
```
- We can also test Day-2 reconfiguration operations by running the primitive that adds routes to the SPGW (no host routes allowed in this example). This can be done through the OSM UI or the CLI, for example: