diff --git a/Hackfest_Demos/OSM-13/magma_orc_onboarding/README.md b/Hackfest_Demos/OSM-13/magma_orc_onboarding/README.md new file mode 100644 index 0000000000000000000000000000000000000000..42a0c2312f4c9c93edf3f4bb1dbf8ec7ba84439b --- /dev/null +++ b/Hackfest_Demos/OSM-13/magma_orc_onboarding/README.md @@ -0,0 +1,125 @@ +# Magma Orchestrator NS + +Descriptors that installs magma-orc8r using [Charmhub magma-orc8r bundle](https://charmhub.io/magma-orc8r?channel=beta) +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. +For more information about Magma, see the official documentation [here](https://magmacore.org/). + +## Download Packages + +```bash +git clone --recurse-submodules -j8 https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git +``` + +## Create the VIM Account + +```bash +# This is dummy vim account +export VIM_ACCOUNT=openstack +osm vim-create --name $VIM_ACCOUNT \ + --account_type dummy \ + --user dummy \ + --password dummy \ + --auth_url "http://dummy" \ + --tenant dummy +# Check the VIM account availability +osm vim-list +osm vim-show $VIM_ACCOUNT +``` + +## Add K8s Cluster + +```bash +# kubeconfig.yaml exists in the HOME directory +export K8S_NET=osm-ext +export k8S_CLS_NAME=hackfest +osm k8scluster-add --creds ~/kubeconfig.yaml \ + --vim k8s-vim \ + --k8s-nets "{k8s_net: $K8S_NET}" \ + --version 1.24 \ + $K8S_CLS_NAME +# Check K8s cluster availability +osm k8scluster-list +osm k8scluster-show $K8S_K8S_CLS_NAME +``` + + +## Onboarding and instantiation + +```bash +# Define the NS name +export MAGMA_NS_NAME= +``` + +```bash +osm nfpkg-create magma_orc_cnf +osm nspkg-create magma_orc_ns +osm ns-create --ns_name $MAGMA_NS_NAME --nsd_name magma_orc_cnf_ns --vim_account $VIM_ACCOUNT --config "{vld: [ {name: mgmtnet, vim-network-name: $K8S_NET}]}" +# Check NS status +osm ns-list +``` + +## Download the Admin Operator Https Certificate + +```bash +export orc_model=juju models | grep -i magma-orc | awk -F " " '{print $1}' | tr -d \* +juju switch $orch_model +# admin_operator.pfx file should appear in the local path +juju scp --container="magma-orc8r-certifier" orc8r-certifier/0:/var/opt/magma/certs/admin_operator.pfx admin_operator.pfx +``` + +## Run Day2 actions + +### Get the Admin Operator Https Certificate credentials + +```bash +osm ns-action $MAGMA_NS_NAME --vnf_name magma_orc_cnf --kdu_name magma-orc-kdu --action_name get-pfx-package-password --wait +# pfx_package pass appears in the operation output, please save it +``` + +### Get the Magma Orchestrator GUI credentials + +```bash +osm ns-action $MAGMA_NS_NAME --vnf_name magma_orc_cnf --kdu_name magma-orc-kdu --action_name get-master-admin-credentials --wait +# admin-password and admin-username appear in the operation output, please save it +``` + +### Get Load Balancer Services + +```bash +LOAD_BALANCER_OP_ID=`osm ns-action $NS_NAME --vnf_name magma_orc_cnf --kdu_name magma-orc-kdu --action_name get-load-balancer-services` +osm ns-op-show $LOAD_BALANCER_OP_ID +# Load Balancer service names and External IP's are visible in the action output. +'nginx-proxy': -> master.nms.osm.magma.com +'orc8r-bootstrap-nginx': -> bootstrapper-controller.osm.magma.com +'orc8r-clientcert-nginx': -> controller.osm.magma.com +'orc8r-nginx-proxy': -> api.osm.magma.com +``` + +### User a DNS server register following Domains + +```bash +# Register the domains in PowerDNS server by running day2 actions: +ZONE=osm.magma.com. +# Sample registration for api.osm.magma.com +DOMAIN=api. +IP= +# Test your records availability +# DNS_IP is your DNS server ip which is available as an environment variable. +dig @${DNS_IP} api.osm.magma.com +# Resolve the domain name directly from your machine. +dig api.osm.magma.com +``` + + +## Access to Magma Orchestrator GUI + +Open the browser and import the admin_operator.pfx using certificate import. + +When it asks you a password, please enter pfx_package pass. + +Try to reach following URL using your browser: https://master.nms.osm.magma.com. + +Use the admin-username and admin-password to login. + + diff --git a/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/1-onboard-packages.sh b/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/1-onboard-packages.sh new file mode 100755 index 0000000000000000000000000000000000000000..68d98c9233ac642b6ec40c09e66c60fbd8516d99 --- /dev/null +++ b/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/1-onboard-packages.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +echo "========================================================================" +echo "Upload VNFD" +echo "========================================================================" +pushd ../../../OSM-13/ +osm nfpkg-create magma_orc_cnf + +echo "========================================================================" +echo "Upload NSD" +echo "========================================================================" +osm nspkg-create magma_orc_ns +popd diff --git a/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/2-onboard-ns.sh b/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/2-onboard-ns.sh new file mode 100755 index 0000000000000000000000000000000000000000..cac1af835518507525e130b9661f334eb28758f2 --- /dev/null +++ b/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/2-onboard-ns.sh @@ -0,0 +1,14 @@ +#!/bin/bash +export MAGMA_NS_NAME=magma_orc_ns +export VIM_ACCOUNT=openstack +export K8S_NET=osm-ext +echo "========================================================================" +echo "Creating MAGMA_NS: $MAGMA_NS_NAME" +echo "========================================================================" +osm ns-create --ns_name $MAGMA_NS_NAME --nsd_name magma_orc_cnf_ns --vim_account $VIM_ACCOUNT --config "{vld: [ {name: mgmtnet, vim-network-name: $K8S_NET}]}" +# Check NS status +osm ns-list + +echo "========================================================================" +echo "Check NS status using osm ns-list, osm ns-show $MAGMA_NS_NAME" +echo "========================================================================" diff --git a/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/3-download-admin-operator-cert.sh b/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/3-download-admin-operator-cert.sh new file mode 100755 index 0000000000000000000000000000000000000000..1eb13913e33ea79171e5b9a6651901254d046a7e --- /dev/null +++ b/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/3-download-admin-operator-cert.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +export orc_model=`juju models | grep -i magma-orc | awk -F " " '{print $1}' | tr -d \*` +juju switch $orc_model +echo $orch_model +echo "========================================================================" +echo "Dowloading admin_operator.pfx file to your current working directory" +echo "========================================================================" +juju scp --container="magma-orc8r-certifier" orc8r-certifier/0:/var/opt/magma/certs/admin_operator.pfx admin_operator.pfx + diff --git a/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/4-get-admin-operator-credential.sh b/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/4-get-admin-operator-credential.sh new file mode 100755 index 0000000000000000000000000000000000000000..0df8b3b7cfaa3f4c515b9d3f671aaa1176736c14 --- /dev/null +++ b/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/4-get-admin-operator-credential.sh @@ -0,0 +1,10 @@ +#!/bin/bash +export MAGMA_NS_NAME=magma_orc_ns +echo "========================================================================" +echo "Getting admin operator credentials" +echo "========================================================================" +output=`osm ns-action $MAGMA_NS_NAME --vnf_name magma_orc_cnf --kdu_name magma-orc-kdu --action_name get-pfx-package-password --wait` +echo "========================================================================" +echo "pfx_package pass appears in the operation output, please save it" +echo "========================================================================" +echo $output diff --git a/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/5-get-magma-orc-gui-credential.sh b/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/5-get-magma-orc-gui-credential.sh new file mode 100755 index 0000000000000000000000000000000000000000..fa7f199d62b869c95b8da6e6a2caad03194e0af9 --- /dev/null +++ b/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/5-get-magma-orc-gui-credential.sh @@ -0,0 +1,10 @@ +#!/bin/bash +export MAGMA_NS_NAME=magma_orc_ns +echo "========================================================================" +echo "Getting Magma orchestrator GUI credentials" +echo "========================================================================" +osm ns-action $MAGMA_NS_NAME --vnf_name magma_orc_cnf --kdu_name magma-orc-kdu --action_name get-master-admin-credentials --wait + +echo "========================================================================" +echo "admin-password and admin-username appear in the operation output, please save it" +echo "========================================================================" diff --git a/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/6-get-loadbalancer-services.sh b/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/6-get-loadbalancer-services.sh new file mode 100755 index 0000000000000000000000000000000000000000..cc65ba8aae7a6bdc222290647fec1cd607cf4cfa --- /dev/null +++ b/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/6-get-loadbalancer-services.sh @@ -0,0 +1,20 @@ +echo "========================================================================" +echo "Getting Loadbalancer services" +echo "========================================================================" +export MAGMA_NS_NAME=magma_orc_ns +osm ns-action $MAGMA_NS_NAME --vnf_name magma_orc_cnf --kdu_name magma-orc-kdu --action_name get-load-balancer-services --wait + +echo "========================================================================" +echo "Load Balancer service names and External IP's are visible in the action output." +echo "'nginx-proxy': -> master.nms.osm.magma.com" +echo "'orc8r-bootstrap-nginx': -> bootstrapper-controller.osm.magma.com" +echo "'orc8r-clientcert-nginx': -> controller.osm.magma.com" +echo "'orc8r-nginx-proxy': -> api.osm.magma.com" +echo "========================================================================" +echo "========================================================================" +echo "Register the domains in PowerDNS server by running day2 actions" +echo "ZONE=osm.magma.com." +echo "# Sample registration for api.osm.magma.com" +echo "DOMAIN=api." +echo "IP= " +echo "========================================================================" diff --git a/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/7-access-magma-orch-gui.sh b/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/7-access-magma-orch-gui.sh new file mode 100755 index 0000000000000000000000000000000000000000..7db78ec3c66ddefa718388afbe50390e835d79a6 --- /dev/null +++ b/Hackfest_Demos/OSM-MR13/2.1-KNF/magma-orc-scripts/7-access-magma-orch-gui.sh @@ -0,0 +1,7 @@ +#!/bin/bash +echo "========================================================================" +echo "Open the browser and import the admin_operator.pfx using certificate import." +echo "When it asks you a password, please enter pfx_package pass." +echo "Try to reach following URL using your browser: https://master.nms.osm.magma.com." +echo "Use the admin-username and admin-password to login" +echo "========================================================================" \ No newline at end of file