Configuration of CPN UPN Communication using Ansible
To learn about the following, refer to Installation and Configuration of Subscriber Intelligence Solution using Ansible
System Requirement |
Installation of Gigamon Ansible Module |
Configuration of Pythonpath |
Rules and Notes |
To configure a CPN UPN Communication solution, where one CPN is communicating with one UPN, perform the following steps:
S.No | Steps | Refer to.. |
1. | Creating Inventory Directory | Creating Inventory Directory |
2. | Creating fmInfo.yml | |
3. | Creating ansible_inputs.json | Creating ansible_inputs.json |
4. | Creating CPN UPN Communication inventory file |
Creating CPN UPN Communication inventory file
|
5. | Creating host_vars directory | Creating host_vars directory |
6. | Creating host_vars files | Creating host_vars files |
Create an Inventory Directory to store all the CPN UPN Communication related configuration files.
username@fmreg26:~$ mkdir cupsSolution
username@fmreg26:~$ ls -l
drwxr-xr-x 2 ddaniel fmtaf 4096 May 11 11:59 cupsSolution
Create fmInfo.yml file inside the Inventory Directory that contains the information such as ip-address, username and password.
To create the file, refer to Schema.
Create 'ansible_inputs.json' file inside the Inventory Directory that contains the following information:
- fm_credential_file - Contains details of the GigaVUE-FM that was created in Step 2.
-
yaml_payload_path - Created automatically while running the CPN UPN Communication playbook. This file stores the payload sent to the GigaVUE-FM.
Create the mobility_inventory file inside Inventory Directory.
gigamon@fmreg26:~/cupsSolution$ touch mobility_inventory
gigamon@fmreg26:~/cupsSolution$ ls -l
-rw-r--r-- 1 gigamon fmtaf 355 May 11 12:24 ansible_inputs.json
-rw-r--r-- 1 gigamon fmtaf 396 May 11 14:22 mobility_inventory
-rw-r--r-- 1 gigamon fmtaf 172 May 11 12:10 fmInfo.yml
The file contains the details of the following groups and provide the inputs to the groups as shown in the following table:
S.No | Groups-Input |
Note: —You can provide the input or leave the field empty if you don't want to use the playbook to configure the following groups. |
|
1. |
Ports—Name of the Cluster or standalone device IP that contains the ports that need to be configured. |
2. |
IPInterfaceSolution—Name of the Cluster or standalone device IP on which the IPInterfacesolution needs to be configured. |
3. |
Tool Groups—Name of the Cluster or standalone device IP on which the Tool Group needs to be configured. |
4. |
Gigastreams—Name of the Cluster or standalone device IP on which the Gigastreams needs to be configured. |
5. |
GTPWhitelist—Name of the Cluster or standalone device IP on which the GTPWhitelist Data Base needs to be configured. |
6. |
Policies—Name of the Global policy or policies. |
7. |
GTP— Name of the GTP node or nodes. |
8 |
CPN—Name of the CPN or CPNs. |
9 |
UPN—Name of the UPN or UPNs. |
10 |
Sites—Name of the site or sites and the names of the CPN or UPN participating in the site or sites. |
11 |
CPN UPN Communication—Name of the file CPN UPN Communication solution along with lts_policy file name, 5g_policy file name, lte_policy file name and list of sites participating in the CPN UPN Communication solution. |
File name: cups_inventory (Single GigaVUE-FM instance)
[IPInterfaceSolution]
IpInterfaceSolutionConfig
[ToolGroups]
cluster-two
cluster-one
[Gigastreams]
cluster-two
cluster-one
[GTPWhitelist]
cluster-two
cluster-one
[Ports]
cluster-two
cluster-one
[Policies]
5g_policy_1
[CPN]
cpnUkLTE
[UPN]
upnDallas
[SAM]
[Sites]
UK cpn_list='["cpnUkLTE"]' upn_list='[]' sam_list='[]'
Dallas cpn_list='[]' upn_list='["upnDallas"]' sam_list='[]'
[MobilitySolution]
mobilitySolution1 cups_5g_global_policy=5g_policy_1 sites='["UK", "Dallas"]'
File name: cups_inventory (Multiple GigaVUE-FM instances)
[IPInterfaceSolution]
IpInterfaceSolutionConfig fm_ip=192.168.36.2
IpInterfaceSolutionConfig fm_ip=192.168.36.3
[ToolGroups]
cluster-two fm_ip=192.168.36.2
cluster-one fm_ip=192.168.36.3
[Gigastreams]
cluster-two fm_ip=192.168.36.2
cluster-one fm_ip=192.168.36.3
[GTPWhitelist]
cluster-two fm_ip=192.168.36.2
cluster-one fm_ip=192.168.36.3
[Ports]
cluster-two fm_ip=192.168.36.2
cluster-one fm_ip=192.168.36.3
[Policies]
5g_policy_1
[GTP]
gtp_CorrelationNode1
[CPN]
cpnUkLTE
[UPN]
upnDallas
[SAM]
[Sites]
UK cpn_list='["cpnUkLTE"]' upn_list='[]' sam_list='[]'
Dallas cpn_list='[]' upn_list='["upnDallas"]' sam_list='[]'
[MobilitySolution]
mobilitySolution1 cups_5g_global_policy=5g_policy_1 sites='["UK"]' fm_ip=192.168.36.2
mobilitySolution2 cups_5g_global_policy=5g_policy_1 sites='["Dallas"]' fm_ip=192.168.36.3
Create host_vars directory inside the Inventory Directory.
gigamon@fmreg26:~/cupsSolution$ mkdir host_vars
gigamon@fmreg26:~/cupsSolution$ ls -l
-rw-r--r-- 1 gigamon fmtaf 355 May 11 12:24 ansible_inputs.json
-rw-r--r-- 1 gigamon fmtaf 396 May 11 14:22 cups_inventory
-rw-r--r-- 1 gigamon fmtaf 172 May 11 12:10 fmInfo.yml
drwxr-xr-x 2 gigamon fmtaf 4096 May 11 14:48 host_vars
Every unique element under each group in the mobility_inventory file needs to have a file, with the same name as the element, inside host_vars directory. This file has properties of the groups that it belongs to.
Below are the templates of various host_vars files.
Prerequisite
---
validate_certs: false
Ports:
- port:
- 1/1/x1
- 1/1/x2
adminStatus: enable
type: network
GTPWhitelist:
- alias: gtp1
imsi: 310260564627811,310260564627812
state: present
- alias: gtp2
inputFile: './whitelistKeys/TenIMSIs_Valid.txt'
state: present
Gigastreams:
- alias: toolGS_C11
ports:
- 4/1/x1
- 4/1/x2
type: hybrid
state: present
- alias: toolGS_C12
ports:
- 4/1/x3..x4
type: hybrid
state: present
ToolGroups:
- alias: pgGrp_C11
ports:
- 2/1/x1
smartLb: false
type: tool
state: present
- alias: pgGrp_C12
ports:
- 2/1/x2
smartLb: false
type: tool
state: present
Site
For information about Site, refer to Schema.
A site is a collection of the following:
Network element functions |
Traffic access points for interfaces of such network element functions |
Visibility and Analytics Fabric (VAF) nodes |
Traffic monitoring or analysis tool devices (called probes) that are locally connected without using any IP routed tunnels |
cpNode
For information about cpNode, refer to Schema.
upNode
For information about upNode, refer to Schema.
5GPolicy
For information about 5GPolicy, refer to Schema
LTEPolicy
For information about LTEPolicy, refer to Schema
Deployment of CPN UPN Communication Solution
To deploy the CPN UPN Communication solution, follow these steps:
For a Single GigaVUE-FM instance deployment, you must set an additional environment variable as follows.
export ANSIBLE_FM_IP=192.168.36.2
It searches the login details of the GigaVUE-FM IP in fmInfo.yml file.
- You can execute the playbook and deploy the CPN UPN Communication solution using the following command:
- If the fmInfo file is encrypted, use the following command to execute and deploy the CPN UPN Communication solution:
/usr/bin/ansible-playbook -e ‘@~/cupsSolution/ansible_inputs.json’ -i ~/cupsSolution/cups_inventory /usr/local/share/gigamon-ansible/playbooks/cups/deploy_cups.yml
/usr/bin/ansible-playbook -e ‘@~/cupsSolution/ansible_inputs.json’ --ask-vault-pass -i ~/cupsSolution/cups_inventory /usr/local/share/gigamon-ansible/playbooks/cups/deploy_cups.yml
To navigate to the CPN UPN Communication solution:
1. In the GigaVUE‑FM, click Traffic.
2. Click Orchestrated Flows listed under Physical.
3. Click Mobility
4. Click the Alias.
The following image shows the CPN UPN Communication solution:
To remove the CPN UPN Communication solution, follow these steps:
Execute the playbook and use the following command: |
/usr/local/bin/ansible-playbook -e '@~/<Path to Inventory directory>/ansible_inputs.json' -i ~/<Path to Inventory directory>/mobility_inventory /<Path to Ansible playbook>/delete_mobility_solution.yml
Note: The multiple YML files created inside the host_vars are concatenated, converted into JSON format and sent to GigaVUE-FM.