Commit 7f34ec7d authored by calvinosanc1's avatar calvinosanc1
Browse files

Charmed Magma AGW packages


Signed-off-by: calvinosanc1's avatarcalvinosanc1 <guillermo.calvino@canonical.com>
parent 9dc92826
Pipeline #8045 failed with stage
in 5 minutes and 42 seconds
# Charmed Magma
This NS allows you to deploy either the Magma AGW VNF only, or the Magma AGW together with the Magma Orchestrator.
Magma AGW is deployed in a VM with a Native Charm while Magma Orchestrator is deployed in a K8s cluster with a Juju bundle.
## Upload the VNF packages
Following commands should be executed in the following folder: `osm-packages/charm-packages/charmed_magma`
### Magma Access GW VNF Package
```bash
osm nfpkg-create magma_agw_vnf/
```
### Magma Orchestrator VNF Package
```bash
osm nfpkg-create magma_orc_cnf/
```
## Upload the NS package
### Magma Access GW only
```bash
osm nspkg-create magma_agw_ns/
```
### Magma Access GW and Magma Orchestrator together
```bash
osm nspkg-create magma_ns/
```
## Configuration
The configuration file `params.yaml` need to be set in order to deploy the Access GW. This needs to be done no matter if you want to deploy the Access GW only or the Access GW and the Orchestrator.
Here is an example:
```yaml
vld:
- name: mgmtnet # Id of the virtual-link-desc where the SGI interface is
vim-network-name: osm-ext # Name of the network in the VIM (The network must exists)
vnfd-connection-point-ref:
- member-vnf-index-ref: "vnf1" # constituent-base-element-id (In the NSD)
vnfd-connection-point-ref: vnf-mgmt-ext # constituent-cpd-id (In the NSD)
ip-address: "172.21.248.153" # IP address that will be used in the mgmt interface in the VM
additionalParamsForVnf:
- member-vnf-index: "vnf1" # constituent-base-element-id (In the NSD)
additionalParams:
- sgi_ipv4_address: "172.21.248.153/22" # IP address and subnet that will be used in the mgmt interface in the VM, the format x.x.x.x/yy
sgi_interface: ens3 # Name of the SGI interface in the VM
sgi_ipv4_gateway: "172.21.248.1" # GW of the network used for SGI
s1_interface: ens4 # Name of the S1 interface in the VM
```
## Instantiation
### Magma Access GW only
```bash
osm ns-create --ns_name magma-agw-ns --nsd_name magma-agw-ns --vim_account <VIM_ACCOUNT> --config_file params.yaml
```
### Magma Access GW and Magma Orchestrator together
```bash
osm ns-create --ns_name magma-ns --nsd_name magma-ns --vim_account <VIM_ACCOUNT> --config_file params.yaml
```
\ No newline at end of file
nsd:
nsd:
- description: Deployment of Magma AGW connected by datanet and mgmtnet VLs
df:
- id: default-df
vnf-profile:
- id: magma-agw
virtual-link-connectivity:
- constituent-cpd-id:
- constituent-base-element-id: magma-agw
constituent-cpd-id: vnf-mgmt-ext
virtual-link-profile-id: mgmtnet
- constituent-cpd-id:
- constituent-base-element-id: magma-agw
constituent-cpd-id: vnf-data-ext
virtual-link-profile-id: datanet
vnfd-id: magma-agw-vnf
id: magma-agw-ns
name: magma-agw-ns
version: 1.0
virtual-link-desc:
- id: mgmtnet
mgmt-network: true
- id: datanet
vnfd-id:
- magma-agw-vnf
nsd:
nsd:
- description: Deployment of Magma AGW and Magma ORC
df:
- id: default-df
vnf-profile:
- id: magma-orc
virtual-link-connectivity:
- constituent-cpd-id:
- constituent-base-element-id: magma-orc
constituent-cpd-id: mgmtnet-ext
virtual-link-profile-id: mgmtnet
vnfd-id: magma_orc_cnf
- id: magma-agw
virtual-link-connectivity:
- constituent-cpd-id:
- constituent-base-element-id: magma-agw
constituent-cpd-id: vnf-mgmt-ext
virtual-link-profile-id: mgmtnet
- constituent-cpd-id:
- constituent-base-element-id: magma-agw
constituent-cpd-id: vnf-data-ext
virtual-link-profile-id: datanet
vnfd-id: magma-agw-vnf
- id: magma-agw2
virtual-link-connectivity:
- constituent-cpd-id:
- constituent-base-element-id: magma-agw2
constituent-cpd-id: vnf-mgmt-ext
virtual-link-profile-id: mgmtnet
- constituent-cpd-id:
- constituent-base-element-id: magma-agw2
constituent-cpd-id: vnf-data-ext
virtual-link-profile-id: datanet
vnfd-id: magma-agw-vnf
id: magma-ns
name: magma-ns
version: 1.0
virtual-link-desc:
- id: mgmtnet
mgmt-network: true
- id: datanet
vnfd-id:
- magma-agw-vnf
- magma_orc_cnf
ns-configuration:
relation:
- name: relation
provider:
vnf-profile-id: magma-orc
kdu-resource-profile-id: kdu-magma-orc-provides
endpoint: orchestrator
requirer:
vnf-profile-id: magma-agw
vdu-profile-id: mgmtVM
endpoint: magma-orchestrator
- name: relation2
provider:
vnf-profile-id: magma-orc
kdu-resource-profile-id: kdu-magma-orc-provides
endpoint: orchestrator
requirer:
vnf-profile-id: magma-agw2
vdu-profile-id: mgmtVM
endpoint: magma-orchestrator
\ No newline at end of file
#cloud-config
password: osm4u
chpasswd: { expire: False }
ssh_pwauth: True
write_files:
- content: |
# My new helloworld file
owner: root:root
permissions: '0644'
path: /root/helloworld.txt
vnfd:
description: A VNF consisting of 1 Magma AGW connected to two external VL, one for
data and another one for management
df:
- id: default-df
instantiation-level:
- id: default-instantiation-level
vdu-level:
- number-of-instances: 1
vdu-id: mgmtVM
vdu-profile:
- id: mgmtVM
min-number-of-instances: 1
lcm-operations-configuration:
operate-vnf-op-config:
day1-2:
- config-access:
ssh-access:
default-user: ubuntu
required: true
id: mgmtVM
execution-environment-list:
- id: magma-agw-ee
juju:
charm: magma-access-gateway-operator_ubuntu-20.04-amd64.charm
proxy: false
external-connection-point-ref: vnf-mgmt-ext
initial-config-primitive:
- name: config
execution-environment-ref: magma-agw-ee
parameter:
- data-type: STRING
name: sgi
value: <sgi_interface>
- data-type: STRING
name: sgi-ipv4-gateway
value: <sgi_ipv4_gateway>
- data-type: STRING
name: sgi-ipv4-address
value: <sgi_ipv4_address>
- data-type: STRING
name: s1
value: <s1_interface>
- data-type: STRING
name: dns
value: <dns>
seq: 1
config-primitive:
- name: get-access-gateway-secrets
execution-environment-ref: magma-agw-ee
- name: post-install-checks
execution-environment-ref: magma-agw-ee
ext-cpd:
- id: vnf-mgmt-ext
int-cpd:
cpd: mgmtVM-eth0-int
vdu-id: mgmtVM
- id: vnf-data-ext
int-cpd:
cpd: dataVM-xe0-int
vdu-id: mgmtVM
id: magma-agw-vnf
mgmt-cp: vnf-mgmt-ext
product-name: magma-agw-vnf
sw-image-desc:
- id: ubuntu20.04
image: ubuntu20.04
name: ubuntu20.04
vdu:
- cloud-init-file: cloud-config.txt
id: mgmtVM
int-cpd:
- id: mgmtVM-eth0-int
virtual-network-interface-requirement:
- name: mgmtVM-eth0
position: 1
virtual-interface:
type: PARAVIRT
- id: dataVM-xe0-int
virtual-network-interface-requirement:
- name: dataVM-xe0
position: 2
virtual-interface:
type: PARAVIRT
name: mgmtVM
sw-image-desc: ubuntu20.04
virtual-compute-desc: mgmtVM-compute
virtual-storage-desc:
- mgmtVM-storage
version: 1.0
virtual-compute-desc:
- id: mgmtVM-compute
virtual-cpu:
num-virtual-cpu: 2
virtual-memory:
size: 4.0
virtual-storage-desc:
- id: mgmtVM-storage
size-of-storage: 40
nsd:
nsd:
- description: Deployment of Magma AGW and Magma ORC
df:
- id: default-df
vnf-profile:
- id: magma-orc
virtual-link-connectivity:
- constituent-cpd-id:
- constituent-base-element-id: magma-orc
constituent-cpd-id: mgmtnet-ext
virtual-link-profile-id: mgmtnet
vnfd-id: magma_orc_cnf
- id: magma-agw
virtual-link-connectivity:
- constituent-cpd-id:
- constituent-base-element-id: magma-agw
constituent-cpd-id: vnf-mgmt-ext
virtual-link-profile-id: mgmtnet
- constituent-cpd-id:
- constituent-base-element-id: magma-agw
constituent-cpd-id: vnf-data-ext
virtual-link-profile-id: datanet
vnfd-id: magma-agw-vnf
id: magma-ns
name: magma-ns
version: 1.0
virtual-link-desc:
- id: mgmtnet
mgmt-network: true
- id: datanet
vnfd-id:
- magma-agw-vnf
- magma_orc_cnf
ns-configuration:
relation:
- name: relation
provider:
vnf-profile-id: magma-orc
kdu-resource-profile-id: kdu-magma-orc-provides
endpoint: orchestrator
requirer:
vnf-profile-id: magma-agw
vdu-profile-id: mgmtVM
endpoint: magma-orchestrator
\ No newline at end of file
bundle: kubernetes
name: magma-orc8r
description: |
Orchestrator is a Magma service that provides a simple and consistent way to
configure and monitor the wireless network securely. The metrics acquired through the platform
allows you to see the analytics and traffic flows of the wireless users through the Magma web UI.
applications:
nms-magmalte:
charm: magma-nms-magmalte
channel: beta
scale: 1
trust: true
nms-nginx-proxy:
charm: magma-nms-nginx-proxy
channel: beta
scale: 1
trust: true
orc8r-accessd:
charm: magma-orc8r-accessd
channel: beta
scale: 1
trust: true
orc8r-alertmanager:
charm: alertmanager-k8s
channel: edge
scale: 1
trust: true
orc8r-alertmanager-configurer:
charm: alertmanager-configurer-k8s
channel: edge
scale: 1
trust: true
options:
multitenant_label: "networkID"
orc8r-analytics:
charm: magma-orc8r-analytics
channel: beta
scale: 1
trust: true
orc8r-bootstrapper:
charm: magma-orc8r-bootstrapper
channel: beta
scale: 1
trust: true
orc8r-certifier:
charm: magma-orc8r-certifier
channel: beta
scale: 1
trust: true
options:
domain: osm.magma.com
orc8r-configurator:
charm: magma-orc8r-configurator
channel: beta
scale: 1
trust: true
orc8r-ctraced:
charm: magma-orc8r-ctraced
channel: beta
scale: 1
trust: true
orc8r-device:
charm: magma-orc8r-device
channel: beta
scale: 1
trust: true
orc8r-directoryd:
charm: magma-orc8r-directoryd
channel: beta
scale: 1
trust: true
orc8r-dispatcher:
charm: magma-orc8r-dispatcher
channel: beta
scale: 1
trust: true
orc8r-eventd:
charm: magma-orc8r-eventd
channel: beta
scale: 1
trust: true
options:
elasticsearch-url: "orc8r-elasticsearch:1234"
orc8r-ha:
charm: magma-orc8r-ha
channel: beta
scale: 1
trust: true
orc8r-lte:
charm: magma-orc8r-lte
channel: beta
scale: 1
trust: true
orc8r-metricsd:
charm: magma-orc8r-metricsd
channel: beta
scale: 1
trust: true
orc8r-nginx:
charm: magma-orc8r-nginx
channel: beta
scale: 1
trust: true
options:
domain: osm.magma.com
orc8r-obsidian:
charm: magma-orc8r-obsidian
channel: beta
scale: 1
trust: true
orc8r-orchestrator:
charm: magma-orc8r-orchestrator
channel: beta
scale: 1
trust: true
options:
elasticsearch-url: "orc8r-elasticsearch:1234"
orc8r-policydb:
charm: magma-orc8r-policydb
channel: beta
scale: 1
trust: true
orc8r-prometheus:
charm: prometheus-k8s
channel: edge
scale: 1
trust: true
orc8r-prometheus-cache:
charm: prometheus-edge-hub
channel: edge
scale: 1
trust: true
options:
metrics_count_limit: 500000
orc8r-prometheus-configurer:
charm: prometheus-configurer-k8s
channel: edge
scale: 1
trust: true
options:
multitenant_label: "networkID"
orc8r-service-registry:
charm: magma-orc8r-service-registry
channel: beta
scale: 1
trust: true
orc8r-smsd:
charm: magma-orc8r-smsd
channel: beta
scale: 1
trust: true
orc8r-state:
charm: magma-orc8r-state
channel: beta
scale: 1
trust: true
orc8r-streamer:
charm: magma-orc8r-streamer
channel: beta
scale: 1
trust: true
orc8r-subscriberdb:
charm: magma-orc8r-subscriberdb
channel: beta
scale: 1
trust: true
orc8r-subscriberdb-cache:
charm: magma-orc8r-subscriberdb-cache
channel: beta
scale: 1
trust: true
orc8r-tenants:
charm: magma-orc8r-tenants
channel: beta
scale: 1
trust: true
orc8r-user-grafana:
charm: grafana-k8s
channel: edge
options:
web_external_url: "/grafana"
enable_auto_assign_org: false
scale: 1
trust: true
postgresql-k8s:
charm: postgresql-k8s
series: kubernetes
channel: stable
scale: 1
trust: true
tls-certificates-operator:
charm: tls-certificates-operator
channel: edge
scale: 1
options:
generate-self-signed-certificates: true
ca-common-name: rootca.osm.magma.com
relations:
- - nms-magmalte
- orc8r-certifier
- - nms-magmalte:db
- postgresql-k8s:db
- - nms-nginx-proxy
- orc8r-certifier
- - nms-nginx-proxy:magma-nms-magmalte
- nms-magmalte:magma-nms-magmalte
- - orc8r-accessd:db
- postgresql-k8s:db
- - orc8r-alertmanager:remote-configuration
- orc8r-alertmanager-configurer:alertmanager
- - orc8r-certifier
- tls-certificates-operator
- - orc8r-certifier:db
- postgresql-k8s:db
- - orc8r-configurator:db
- postgresql-k8s:db
- - orc8r-ctraced:db
- postgresql-k8s:db
- - orc8r-device:db
- postgresql-k8s:db
- - orc8r-directoryd:db
- postgresql-k8s:db
- - orc8r-lte:db
- postgresql-k8s:db
- - orc8r-metricsd:alertmanager-k8s
- orc8r-alertmanager:alerting
- - orc8r-metricsd:alertmanager-configurer-k8s
- orc8r-alertmanager-configurer:alertmanager-configurer
- - orc8r-metricsd:magma-orc8r-orchestrator
- orc8r-orchestrator:magma-orc8r-orchestrator
- - orc8r-metricsd:prometheus-k8s
- orc8r-prometheus:self-metrics-endpoint
- - orc8r-metricsd:prometheus-configurer-k8s
- orc8r-prometheus-configurer:prometheus-configurer
- - orc8r-nginx:magma-orc8r-bootstrapper
- orc8r-bootstrapper:magma-orc8r-bootstrapper
- - orc8r-nginx:cert-certifier
- orc8r-certifier:cert-certifier
- - orc8r-nginx:cert-controller
- orc8r-certifier:cert-controller
- - orc8r-nginx:cert-root-ca
- orc8r-certifier:cert-root-ca
- - orc8r-nginx:magma-orc8r-obsidian
- orc8r-obsidian:magma-orc8r-obsidian
- - orc8r-orchestrator:cert-admin-operator
- orc8r-certifier:cert-admin-operator
- - orc8r-orchestrator:magma-orc8r-certifier
- orc8r-certifier:magma-orc8r-certifier
- - orc8r-orchestrator:magma-orc8r-accessd
- orc8r-accessd:magma-orc8r-accessd
- - orc8r-orchestrator:magma-orc8r-service-registry
- orc8r-service-registry:magma-orc8r-service-registry
- - orc8r-orchestrator:metrics-endpoint
- orc8r-prometheus-cache:metrics-endpoint
- - orc8r-policydb:db
- postgresql-k8s:db
- - orc8r-prometheus:alertmanager
- orc8r-alertmanager:alerting
- - orc8r-prometheus:metrics-endpoint
- orc8r-prometheus-cache:metrics-endpoint
- - orc8r-prometheus-configurer:prometheus
- orc8r-prometheus:receive-remote-write
- - orc8r-smsd:db
- postgresql-k8s:db
- - orc8r-state:db
- postgresql-k8s:db
- - orc8r-subscriberdb-cache:db
- postgresql-k8s:db
- - orc8r-subscriberdb:db
- postgresql-k8s:db
- - orc8r-tenants:db
- postgresql-k8s:db
- - orc8r-user-grafana:grafana-source
- orc8r-prometheus:grafana-source
- - orc8r-user-grafana:grafana-auth
- nms-magmalte:grafana-auth
vnfd:
product-name: magma_orc_cnf
version: "1.0"
provider: Canonical
description: "K8s container deployment of Magma Orchestrator"
id: magma_orc_cnf
mgmt-cp: mgmtnet-ext
ext-cpd:
- id: mgmtnet-ext
k8s-cluster-net: mgmtnet
kdu:
- name: magma-orc-kdu
juju-bundle: bundle.yaml
k8s-cluster:
nets:
- id: mgmtnet
df:
- id: default-df
kdu-resource-profile:
- id: kdu-magma-orc-provides
kdu-name: magma-orc-kdu
resource-name: orc8r-nginx
lcm-operations-configuration:
operate-vnf-op-config:
day1-2:
- id: magma-orc-kdu
config-primitive:
- name: get-master-admin-credentials
parameter:
- name: application-name
data-type: STRING
default-value: nms-magmalte
- name: get-pfx-package-password
parameter:
- name: application-name
data-type: STRING
default-value: orc8r-certifier
- name: get-load-balancer-services
parameter:
- name: application-name
data-type: STRING
default-value: orc8r-orchestrator
vld:
- name: mgmtnet # Id of the virtual-link-desc where the SGI interface is
vim-network-name: osm-ext # Name of the network in the VIM (The network must exists)
vnfd-connection-point-ref:
- member-vnf-index-ref: "magma-agw" # constituent-base-element-id (In the NSD)
vnfd-connection-point-ref: vnf-mgmt-ext # constituent-cpd-id (In the NSD)
ip-address: "IP" # IP address that will be used in the mgmt interface in the VM
additionalParamsForVnf:
- member-vnf-index: "magma-agw" # constituent-base-element-id (In the NSD)
additionalParams:
sgi_ipv4_address: "IP/subnet" # IP address and subnet that will be used in the mgmt interface in the VM, the format x.x.x.x/yy
sgi_interface: sgi_Interface # Name of the SGI interface in the VM
sgi_ipv4_gateway: "GW_IP" # GW of the network used for SGI
s1_interface: s1_Interface # Name of the S1 interface in the VM
dns: '["DNS_IP"]'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment