Table of Contents
ONAP installation
1. Configure Helm charts
1.1 ONAP configuration
1.2 Helm repo
osn/onap is not setup by LF yet so omit this step and create a local repo.
helm install osn/onap helm repo remove stable # helm repo add stable https://kubernetes-charts.storage.googleapis.com
To prepare your system for an installation of ONAP, you’ll need to:
git clone -b dublin http://gerrit.onap.org/r/oom cd oom/kubernetes
Pull and update submodules (aai, etc) if not cloned with “–recurse-submodules”
git submodule update --init --recursive Submodule 'kubernetes/aai' (http://gerrit.onap.org/r/aai/oom) registered for path 'aai' Cloning into '/home/ubuntu/onap/oom/kubernetes/aai'... warning: redirecting to https://gerrit.onap.org/r/aai/oom/ Submodule path 'aai': checked out '6509a172751b3c85995100e3d3a205abe73b116c' ubuntu@onap-k8s-h0:~/onap/oom/kubernetes$ git pull --recurse-submodules warning: redirecting to https://gerrit.onap.org/r/oom/ Fetching submodule kubernetes/aai warning: redirecting to https://gerrit.onap.org/r/aai/oom/ Already up to date.
To setup a local Helm server to server up the ONAP charts:
helm init helm serve &
Note the port number that is listed and use it in the Helm repo add as follows:
helm repo add local http://127.0.0.1:8879
To get a list of all of the available Helm chart repositories:
helm repo list NAME URL local http://127.0.0.1:8879
Then build your local Helm repository:
make all
Show all charts in local repo:
helm search -l
Next, install Helm Plugins required to deploy the ONAP Casablanca release:
sudo rm -rf ~/.helm/plubins/* # as user cp -R helm/plugins/ ~/.helm
1.3 Config and Deploy ONAP
- ONAP project/components and what they do: https://wiki.onap.org/display/DW/Active+and+Available+Inventory+Project
- Amsterdam project release dependency: https://wiki.onap.org/download/attachments/8231717/ONAP%20API%20DependenciesV1.pdf?version=1&modificationDate=1501195984000&api=v2
- ONAP components explain: http://localhost/~dang/wiki/doku.php?id=virtualization:k8s:onap_k8s:1.1_onap_subprojects
Copy overrides yaml and customize
cp -r ~/oom/kubernetes/onap/resources/overrides . cd overrides/ Edit the onap-all.yaml file # Copyright © 2019 Amdocs, Bell Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################### # This override file enables helm charts for all ONAP applications. ################################################################### cassandra: enabled: true mariadb-galera: enabled: true replicaCount: 1 aaf: enabled: true aai: enabled: true appc: enabled: false clamp: enabled: false cli: enabled: false consul: enabled: true contrib: enabled: false dcaegen2: enabled: true dmaap: enabled: true esr: enabled: false log: enabled: true sniro-emulator: enabled: true oof: enabled: true msb: enabled: true multicloud: enabled: false nbi: enabled: false policy: enabled: true pomba: enabled: false portal: enabled: true robot: enabled: true sdc: enabled: false sdnc: enabled: true replicaCount: 3 so: enabled: true uui: enabled: false vfc: enabled: false vid: enabled: false vnfsdk: enabled: false
1.4 Deploy ONAP
Helm deploy will copy stuffs in ~/.helm/plugins/deploy/* so do not run as root.
#helm deploy demo local/onap --namespace onap -f ~/overrides/onap-all.yaml --timeout 300 helm deploy development local/onap --namespace onap -f onap-k8s.yaml
For helm 2.7< <3.0 (https://stackoverflow.com/a/51780556/707704):
helm deploy dev local/onap --namespace onap -f onap-k8s-5.0.0-td.yaml --force
To deploy using charts in folder onap - the onap chart:
cd oom/kubernetes make all helm deploy demo ./onap --namespace onap
It will install onap with the config in value.yaml.
1.4.0.1 onap-k8s.yaml
# Copyright © 2019 Amdocs, Bell Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################### # This override file enables helm charts for all ONAP applications. ################################################################### cassandra: enabled: true mariadb-galera: enabled: true replicaCount: 1 aaf: enabled: true aai: enabled: true appc: enabled: true clamp: enabled: false cli: enabled: true consul: enabled: true contrib: enabled: false dcaegen2: enabled: true dmaap: enabled: true esr: enabled: false log: enabled: true sniro-emulator: enabled: true oof: enabled: true msb: enabled: true multicloud: enabled: true nbi: enabled: true policy: enabled: true pomba: enabled: false portal: enabled: true robot: enabled: true sdc: enabled: true sdnc: enabled: true replicaCount: 3 so: enabled: true uui: enabled: true vfc: enabled: true vid: enabled: true vnfsdk: enabled: false
1.5 Check installation
kubectl get pods --all-namespaces -o=wide
Now, we would like to see which charts are installed as what release. This command lets us query the named releases:
helm ls --all NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE hello-world 1 Mon Feb 25 15:29:59 2019 DEPLOYED hello-world-0.1.0 1.0 default
1.6 Undeploy
helm undeploy dev –purge
1.7 Troubleshooting
1.7.1 Taints & scheduling pods error
2. Add K8s site as VIM (alternative to VM)
2.1 Install k8s (KRD) components on VM or baremetal (with OS)
20190916T1352+0000:
Obsolate ??
Down load and run the script:
wget -O - https://raw.githubusercontent.com/electrocucaracha/krd/master/aio.sh | bash
The KRDACTIONS as array can not be parsed by the script aio.sh (issue here) so set the variables inside the aio.sh script KRDADDONS=nfd
KRD_ACTIONS=(install_k8s install_k8s_addons)
Using multicloud-k8s
git clone https://github.com/onap/multicloud-k8s.git cd /home/ubuntu/multicloud-k8s/kud/hosting_providers/vagrant sudo ./install.sh <------------ install k8s as root
note: vagrant installation will install the deployment scripts in vm and deploy from there?? I guess.
We install directly from the script here and require root. Ideally, k8s should be installed as non root.
2.1.1 etcd not starting
k8s not listening on 6443
systemctl status etcd journalctl -xeu etcd
–
> bump kubespray to 2.11.0 https://jira.onap.org/browse/MULTICLOUD-821
3. Similar efforts
-
- ONAP Architecture overview: https://www.onap.org/wp-content/uploads/sites/20/2018/11/ONAP_CaseSolution_Architecture_112918FNL.pdf
- Deploying vFw and EdgeXFoundry Services: https://wiki.onap.org/display/DW/Deploying+vFw+and+EdgeXFoundry+Services+on+Kubernets+Cluster+with+ONAP
- K8S based Cloud-region support: https://wiki.onap.org/display/DW/K8S+based+Cloud-region+support+-+Documents
- Mocana and EdgeXFoundry press release: https://www.mocana.com/press-releases/topic/edgex