Installation of MicroK8s

Install Microk8s with the following instructions,

https://ubuntu.com/tutorials/install-a-local-kubernetes-with-microk8s#1-overview

It is possible to enable multi node setup with Microk8s, In this exploration single node Microk8s cluster is used.

Enable host-access add-on in Microk8s to allow the Kubernetes containers to access the host.

https://microk8s.io/docs/addon-host-access

NOTE: Once the host-access enabled, The host can be accessed using IP address "10.0.1.1" from kubernetes pods.

Installation of ONAP with Policy Clamp in Microk8s

Policy clamp kubernetes participant used in the charts doesn't support the http based chartmuseum servers. It is supported in later version of the k8sparticipant (6.3.0).

To enable the http based chartmuseum access, k8sparticipant participant image needs to be upgraded with the configuration change as shown below.

  • Update the image version to 6.3.0 in smo-install/onap_oom/kubernetes/policy/components/policy-clamp-ac-k8s-ppnt/values.yaml

           

  • Update the configuration(smo-install/onap_oom/kubernetes/policy/components/policy-clamp-ac-k8s-ppnt/resources/config/KubernetesParticipantParameters.yaml) to have the support for http with the chartmuseum configuration

           

  • By default, policy clamp gui service is not enabled, Enable the policy-gui services in helm-override (smo-install/helm-override/default/onap-override.yaml)

Install ONAP using it/dep repository and the instructions for the installation of ONAP is available in smo-install/README.md. This should create namespaces onap,nonrtric and network with all the containers running.

NOTE: Initial installation takes more time as the docker images are getting downloaded newly and the consequent installation will be faster.

Using Socks proxy to access the Microk8s cluster

Socks proxy can be used to access the containers/GUI from Microk8s cluster.

Creating ssh tunnel for Socks proxy

Once this tunnel is enabled, socks proxy can be configured in windows application/environment.


Enabling Socks proxy with Firefox

Socks proxy can be configured in Firefox as shown below,Go to, Settings → General → Network Settings → Manual Proxy Configuration and configure as shown below.


Enabling socks proxy in windows environment

Go to, Internet Options → Connections → LAN Settings → Proxy server

Enable the checkbox and click on Advanced,

Once the Socks proxy is configured, Kubernetes services in Microk8s can be accessed using Nodeport and ClusterIP.


Accessing policy clamp UI in Firefox.


Using Socks proxy in Kubernetes config

Socks proxy can be used to access the Kubernetes cluster. Get the kubeconfig file from the cluster which needs to be accessed and add the configuration as shown below,


proxy-url property should be configured based on the tunneling port.


Observations:

  • ClusterIP and Nodeport are assigned per deployment basis. So there is no guarantee that the same IP address will be assigned to the same service on new deployment.
  • Chrome doesn't have separate socks proxy configuration, instead it uses the windows environment proxy configuration.
  • Socks proxy can be configured in intellij and eclipse IDE.
  • Visual studio code doesn't have the support for socks proxy. It has the http based proxy configuration.
    • To enable the socks proxy support, pproxy(https://pypi.org/project/pproxy/) plugin can be used. This converts the socks proxy to http proxy and the http proxy can be configured in VS Code.
  • No labels

1 Comment

  1. Hi Aravindhan Ayyanathan / Team,

    We are following steps to setup ONAP using it/dep repository and the instructions for the installation of ONAP available in smo-install/README.md

    We are doing ## Quick Installation on existing kubernetes but getting error at below command:

    ```./dep/smo-install/scripts/layer-1/1-build-all-charts.sh``


    root@free5gnew:/home/azureuser/g-release/dep/smo-install/scripts/layer-1# ./1-build-all-charts.sh
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    make is already the newest version (4.2.1-1.2).
    The following packages were automatically installed and are no longer required:
      libprelude28 prelude-utils
    Use 'sudo apt autoremove' to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 37 not upgraded.
    Error: plugin already exists
    Error: plugin already exists
    ### Building ONAP part###
    Using Helm binary helm which is helm version v3.10.0

    [common]
    make[1]: Entering directory '/home/azureuser/g-release/dep/smo-install/onap_oom/kubernetes'
    make[2]: Entering directory '/home/azureuser/g-release/dep/smo-install/onap_oom/kubernetes/common'

    [common]
    make[3]: Entering directory '/home/azureuser/g-release/dep/smo-install/onap_oom/kubernetes/common'
    Skipping linting of common
    Error: unknown shorthand flag: 'f' in -f
    make[3]: *** [Makefile:68: package-common] Error 1
    make[3]: Leaving directory '/home/azureuser/g-release/dep/smo-install/onap_oom/kubernetes/common'
    make[2]: *** [Makefile:43: common] Error 2
    make[2]: Leaving directory '/home/azureuser/g-release/dep/smo-install/onap_oom/kubernetes/common'
    make[1]: *** [Makefile:73: make-common] Error 2
    make[1]: Leaving directory '/home/azureuser/g-release/dep/smo-install/onap_oom/kubernetes'
    make: *** [Makefile:48: common] Error 2
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    make is already the newest version (4.2.1-1.2).
    The following packages were automatically installed and are no longer required:
      libprelude28 prelude-utils
    Use 'sudo apt autoremove' to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 37 not upgraded.
    ### Building ORAN part ###
    Using Helm binary helm which is helm version v3.10.0

    [nonrtric-common]
    make[1]: Entering directory '/home/azureuser/g-release/dep/smo-install/oran_oom'
    ==> Linting nonrtric-common
    [INFO] Chart.yaml: icon is recommended

    1 chart(s) linted, 0 chart(s) failed
    Error: unknown shorthand flag: 'f' in -f
    make[1]: *** [Makefile:84: package-nonrtric-common] Error 1
    make[1]: Leaving directory '/home/azureuser/g-release/dep/smo-install/oran_oom'
    make: *** [Makefile:57: nonrtric-common] Error 2
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    make is already the newest version (4.2.1-1.2).
    The following packages were automatically installed and are no longer required:
      libprelude28 prelude-utils
    Use 'sudo apt autoremove' to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 37 not upgraded.
    ### Building ORAN tests part ###
    Using Helm binary helm which is helm version v3.10.0

    [actn-simulator]
    make[1]: Entering directory '/home/azureuser/g-release/dep/smo-install/tests_oom'
    ==> Linting actn-simulator
    [INFO] Chart.yaml: icon is recommended

    1 chart(s) linted, 0 chart(s) failed
    Error: unknown shorthand flag: 'f' in -f
    make[1]: *** [Makefile:84: package-actn-simulator] Error 1
    make[1]: Leaving directory '/home/azureuser/g-release/dep/smo-install/tests_oom'
    make: *** [Makefile:57: actn-simulator] Error 2


    Any solutions or suggestions are highly appreciated.