Configuration of Non-CUPS using Ansible
To configure a Non-CUPS solution, 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 Non-CUPS inventory file |
Creating Non-CUPS 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 Non-CUPS related configuration files.
username@fmreg26:~$ mkdir non-CupsSolution
username@fmreg26:~$ ls -l
drwxr-xr-x 2 ddaniel fmtaf 4096 May 11 11:59 non-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.
gigamon@fmreg26:~/non-cupsSolution$ ls -l
-rw-r--r-- 1 gigamon fmtaf 355 May 11 12:24 ansible_inputs.json
-rw-r--r-- 1 gigamon fmtaf 172 May 11 12:10 fmInfo.yml
File name: ansible_inputs.json
To create a file, refer to Schema.
Create the mobility_inventory file inside Inventory Directory.
gigamon@fmreg26:~/nonCupsSolution$ touch mobility_inventory
gigamon@fmreg26:~/nonCupsSolution$ 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. |
Too Groups—Name of the Cluster or standalone device IP on which the ToolGroup 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. |
6. |
CPN—Name of the CPN or CPNs. |
7. |
UPN—Name of the UPN or UPNs. |
8. |
SAM—Name of SAMs Exporter node or nodes. |
9. |
Sites—Name of the site or sites and the names of the CPN/UPN participating in the site or sites. |
10. |
CUPS—Name of the file containing information of the solution level RBAC Tags. |
File name: mobility_inventory (Single GigaVUE-FM instance)
[IPInterfaceSolution]
[ToolGroups]
cluster-two
cluster-one
[Gigastreams]
cluster-two
cluster-one
[GTPWhitelist]
cluster-two
cluster-one
[Ports]
cluster-two
cluster-one
[Policies]
5g_policy_1
[GTP]
gtp_CorrelationNode1
[CPN]
[UPN]
[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]
[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]
[UPN]
[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:~/nonCupsSolution$ mkdir host_vars
gigamon@fmreg26:~/nonCupsSolution$ 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.
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 Non-CUPS Solution
To deploy the Non-CUPS 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 CUPS solution using the following command:
- If the fmInfo file is encrypted, use the following command to execute and deploy CUPS 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
Note: The multiple YML files created inside the host_vars are concatenated, converted into JSON format and sent to GigaVUE-FM.