-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Modify default release * Explicit characters for custom name * Deployment site in TN_DESTROY is now string type * Markdown with error posted to MinIO * Correct text in pipelines * Fix typo * Nokia Radio UMA (#16) * Update README.md * copy of folder nokia_radio_uma * first version * update nokia component * typo variable route_manager * typo variable route_manager * Update sample_input_file.yaml --------- Co-authored-by: root <[email protected]> * Update changelog.md * Update TN_DESTROY.groovy * Update TN_DEPLOY.groovy --------- Co-authored-by: Álvaro Curto Merino <[email protected]> Co-authored-by: root <[email protected]>
- Loading branch information
1 parent
1781e18
commit 5cd45b9
Showing
14 changed files
with
260 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
###################################################### | ||
## | ||
## Component public variables | ||
## | ||
## Variables accesible to the experimenter. | ||
## | ||
## They are contained inside 3 global variables | ||
## with all required info: | ||
## | ||
## 1. metadata: General information like mantainers, | ||
## component dependencies and allowed platforms | ||
## | ||
## 2. input: Customizable variables for each | ||
## deployment to be filled by the experimenter | ||
## or the TNLCM | ||
## | ||
## 3. output: Values sent to the TNLCM callback to | ||
## keep track of the TN deployments | ||
## | ||
###################################################### | ||
|
||
|
||
#################################### | ||
## Component metadata | ||
#################################### | ||
metadata: | ||
maintainers: | ||
- Jesus Macias Portela <[email protected]> | ||
- Ana Isabel Lara García <[email protected]> | ||
- Álvaro Curto Merino <[email protected]> | ||
short_description: Enables the capability of using Nokia Radio in a Trial Network. | ||
long_description: | | ||
This component enables the integration of Nokia Airscale physical equipment located at UMA with a 5G core deployed in the Trial Network. | ||
It is done by enabling the necessary routing path through the use of the element called ‘Route Manager’ (already deployed in the site). | ||
The configuration exposed by this component should be synchronized with the 5G core and the UE to be used in conjunction: | ||
- 'mcc': "214" | ||
- 'mnc': "702" | ||
- 'apn': "internet" | ||
- 'tac': "0001" | ||
- 's_nssai_sst': "1" | ||
- 's_nssai_sd': "000009" | ||
- 'amf_ip': "10.10.12.200" | ||
- 'upf_ip': "10.10.12.201" | ||
NOTE: Currently this component is only available in the site "uma". | ||
hypervisors: [one] | ||
|
||
#################################### | ||
## Component input | ||
#################################### | ||
|
||
input: | ||
one_nokia_main_ip: | ||
description: Address of Nokia Airscale. | ||
type: str | ||
required_when: false | ||
one_nokia_reservation_time: | ||
description: Time in minutes for the Nokia Airsale reservation | ||
type: int | ||
default_value: 60 | ||
required_when: true | ||
one_nokia_route_manager_ip: | ||
description: Address of the route manager that will enable routing between Nokia Airscale and 5G Core. | ||
type: str | ||
default_value: "10.11.28.134" | ||
required_when: true | ||
one_nokia_oneKE: | ||
description: Name of the oneKE cluster to route Nokia traffic. | ||
type: "oneKE" | ||
required_when: true | ||
|
||
#################################### | ||
## Component output | ||
#################################### | ||
output: | ||
nokia_metadata_dict: Dictionary with multiple parameters used in the component bootstrap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# NOKIA RADIO UMA | ||
|
||
Component that enables the capability of access physical Nokia Radio in a Trial Network | ||
|
||
NOTE: Currently this component is only available in the site "uma" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changelog | ||
|
||
## [v0.2.0] - 2024-06-06 | ||
|
||
### Added | ||
|
||
- New component | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- name: Add routes in bastion | ||
ansible.builtin.shell: "ip route add {{ item }}" | ||
with_items: | ||
- "{{ one_nokia_routable_network }} via {{ hostvars['localhost']['node_ips'].vnf_0 }}" | ||
- "{{ one_nokia_main_ip }} via {{ one_nokia_route_manager_ip }}" | ||
become: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- name: Execute manage_route script in Router Manager | ||
ansible.builtin.shell: | ||
args: | ||
executable: /bin/bash | ||
cmd: "nohup /root/route-manager.sh {{ tn_id }} {{ one_nokia_routable_network }} {{ hostvars['localhost']['bastion_ip'] }} {{ one_nokia_reservation_time }} > /tmp/route-manager.log 2>&1 &" | ||
async: 0 | ||
poll: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--- | ||
- name: "STAGE 1: Prepare to access a previous target component" | ||
hosts: localhost | ||
gather_facts: false | ||
connection: local | ||
tasks: | ||
- name: Load enviromental variables from different sources | ||
ansible.builtin.include_tasks: "{{ workspace }}/.global/cac/load_variables.yaml" | ||
|
||
- name: Prepare terraform working directory | ||
ansible.builtin.include_tasks: "{{ workspace }}/.global/cac/terraform_workdir.yaml" | ||
|
||
- name: Retrieve terraform outputs | ||
ansible.builtin.shell: | ||
args: | ||
chdir: "{{ workspace }}/.terraform/" | ||
cmd: "set -o pipefail && terraform output --json | jq 'with_entries(.value |= .value)'" | ||
executable: /bin/bash | ||
register: terraform_outputs | ||
changed_when: false | ||
|
||
- name: Set Terraform outputs as playbook facts | ||
ansible.builtin.set_fact: | ||
bastion_ip: "{{ (terraform_outputs.stdout | from_json)['tn_bastion-ips'][site_networks_id.default | string] }}" | ||
node_ips: "{{ (terraform_outputs.stdout | from_json)[one_nokia_oneKE + '-node_ips'] }}" | ||
|
||
- name: Add Route Manager to Ansible Inventory | ||
ansible.builtin.add_host: | ||
hostname: "routemanager" | ||
ansible_host: "{{ one_nokia_route_manager_ip }}" | ||
ansible_user: "root" | ||
ansible_ssh_private_key_file: "/var/lib/jenkins/.ssh/id_ed25519" | ||
|
||
- name: Add the bastion to Ansible Inventory | ||
ansible.builtin.add_host: | ||
hostname: "bastion" | ||
ansible_host: "{{ bastion_ip }}" | ||
ansible_user: "jenkins" | ||
|
||
|
||
- name: "STAGE 2: Apply IaC to deploy the component - STEP 1" | ||
hosts: "routemanager" | ||
gather_facts: false | ||
tasks: | ||
- name: Load enviromental variables from different sources inside the component | ||
ansible.builtin.include_tasks: "{{ workspace }}/.global/cac/load_variables.yaml" | ||
|
||
- name: Enable routing path in Route Manager | ||
ansible.builtin.include_tasks: "{{ workspace }}/{{ component_type }}/code/all/cac/enable_routing_manager.yaml" | ||
|
||
- name: "STAGE 2: Apply IaC to deploy the component - STEP 2" | ||
hosts: "bastion" | ||
gather_facts: false | ||
tasks: | ||
- name: Load enviromental variables from different sources inside the component | ||
ansible.builtin.include_tasks: "{{ workspace }}/.global/cac/load_variables.yaml" | ||
|
||
- name: Enable routing path in Bastion | ||
ansible.builtin.include_tasks: "{{ workspace }}/{{ component_type }}/code/all/cac/enable_routing_bastion.yaml" | ||
|
||
|
||
- name: "STAGE 3: Publish execution results" | ||
hosts: localhost | ||
gather_facts: false | ||
connection: local | ||
tasks: | ||
- name: Define Nokia metadata dictionary | ||
ansible.builtin.set_fact: | ||
nokia_metadata_dict: >- | ||
{ | ||
'one_nokia_reservation_time': '{{ one_nokia_reservation_time }}', | ||
'one_nokia_route_manager_ip': '{{ one_nokia_route_manager_ip }}' | ||
} | ||
- name: Publish Nokia metadata as terraform outputs" | ||
ansible.builtin.include_tasks: "{{ workspace }}/.global/cac/custom_tf_outputs.yaml" | ||
vars: | ||
custom_outputs: | ||
- key: "{{ entity_name }}-metadata" | ||
value: "{{ nokia_metadata_dict }}" | ||
|
||
- name: Publish execution results to TNLCM | ||
ansible.builtin.include_tasks: "{{ workspace }}/.global/cac/publish_ok_results.yaml" | ||
vars: | ||
output: | ||
open5gs_metadata_dict: "{{ nokia_metadata_dict | b64encode }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
There was an error. Detailed info: | ||
|
||
``` | ||
{{ terraform_apply.stderr }} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# NOKIA RADIO UMA | ||
|
||
NOKIA RADIO UMA ( {{ one_nokia_main_ip }} ) component has been successfully addded to the Trial Network `{{ tn_id }}`. | ||
|
||
Important information: | ||
|
||
This component will be available for `{{ one_nokia_reservation_time }}` minutes from now. The Route Manager used for enabling the routing path is `{{ one_nokia_route_manager_ip }}`. | ||
|
||
|
||
### Relevant information about Radio Configuration: | ||
|
||
* PLMN ID (MCC): {{ one_nokia_mcc }} | ||
* PLMN ID (MNC): {{ one_nokia_mnc }} | ||
* TAC: {{ one_nokia_tac }} | ||
* S-NSSAI (SST): {{ one_nokia_s_nssai_sst }} | ||
* S-NSSAI (SD): {{ one_nokia_s_nssai_sd }} | ||
* AMF_IP: {{ one_nokia_amf_ip }} | ||
* UPF_IP: {{ one_nokia_upf_ip }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# THIS IS AN INPUT FILE EXAMPLE. Values may not be valid for your enviroment | ||
|
||
one_nokias_oneKE: "oneKE-main" | ||
one_nokia_main_ip: "your_nokia_ip" | ||
one_nokia_route_manager_ip: "10.19.98.000" | ||
one_nokia_reservation_time: "60" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
###################################################### | ||
## | ||
## Component private variables | ||
## | ||
## Variables required for the deployment | ||
## and their default value. | ||
## Some of them are modifiable through input variables | ||
## | ||
###################################################### | ||
|
||
one_nokia_routable_network: "10.10.12.0/24" | ||
one_nokia_mcc: "214" | ||
one_nokia_mnc: "702" | ||
one_nokia_tac: "0001" | ||
one_nokia_s_nssai_sst: "1" | ||
one_nokia_s_nssai_sd: "000009" | ||
one_nokia_amf_ip: "10.10.12.200" | ||
one_nokia_upf_ip: "10.10.12.201" |