Table of Contents
The official documentation for installation of ONAP with OOM / Kubernetes is located in readthedocs here (TBD). The supported versions of Kubernetes is as follows:
...
1) To start - pick your infrastructure - ONAP supports deployment to all the major public clouds such as:
2) On your VM in the above infrastructure - create a Kubernetes environment (a one time activity) follow one of these guides:
- Setting up Kubernetes with Rancher (recommended)
- Setting up Kubernetes with Kubeadm
- Setting up Kubernetes with Cloudify
3) Install ONAP - use the cd.sh script provided as a patch in review
Installation templates for Kubernetes and deploying ONAP via OOM for the master and amsterdam branches are in the following locations
Jira | ||||||
---|---|---|---|---|---|---|
|
Kubernetes devops / workarounds / troubleshooting content restored from version 378 - into the page ONAP on Kubernetes on Rancher
Example End to End Kubernetes based ONAP install and deployment
Scenario: installing Rancher on clean Ubuntu 16.04 64g VM (single collocated server/host)
clone rancher install script - until it is merged
https://gerrit.onap.org/r/#/c/32019
or a copy on the JIRA https://jira.onap.org/secure/attachment/11117/oom_rancher_setup.sh
Code Block |
---|
Either
git clone https://gerrit.onap.org/r/oom
cd oom
git pull https://gerrit.onap.org/r/oom refs/changes/19/32019/6
cd install/rancher
./oom_rancher_install.sh -b master -s 192.168.241.132 -e onap
or using temporary attachments until the gerrit review is done
wget https://jira.onap.org/secure/attachment/11117/oom_rancher_setup.sh
./oom_rancher_setup.sh -b master -s 10.12.5.168 -e onap
# wait about 15 min to completion |
clone continuous deployment script - until it is merged
Code Block |
---|
wget https://jira.onap.org/secure/attachment/11122/cd.sh
chmod 777 cd.sh
wget https://jira.onap.org/secure/attachment/11124/aaiapisimpledemoopenecomporg.cer
wget https://jira.onap.org/secure/attachment/11125/onap-parameters.yaml
wget https://jira.onap.org/secure/attachment/11126/aai-cloud-region-put.json
./cd.sh -b master
# wait about 25-60 min depending on the speed of your network pulling docker images |
Manual Quickstart Installation - Please use script instead
(Manual instructions) - try to use the script at Setting up Kubernetes with Rancher via https://gerrit.onap.org/r/#/c/32019
ONAP Minimum R1 Installation Helm Apps
oom/kubernetes/oneclick/setenv.bash maybe updated to the following reduce app set.
...
HELM_APPS=(
'mso'
'message-router'
'sdnc'
'vid'
'robot'
'portal'
'policy'
'appc'
'aai'
'sdc'
'log'
)
#HELM_APPS=(
'consul'
'msb'
'mso'
'message-router'
'sdnc'
'vid'
'robot'
'portal'
'policy'
'appc'
'aai'
'sdc'
'dcaegen2'
'log'
'cli'
'multicloud'
'clamp'
'vnfsdk'
'uui'
'aaf'
'vfc'
'kube2msb'
'esr'
)
is located in Read the Docs:
- OOM User Guide — onap master documentation
- OOM Quick Start Guide — onap master documentation)
- OOM Cloud Setup Guide — onap master documentation
1) install rancher, clone oom, run config-init pod, run one or all onap components
...
*****************
Note: uninstall docker if already installed - as Kubernetes 1.8 under rancher supports 17.03.2 as of 20180124
|
*****************
Install Rancher
ONAP deployment in kubernetes is modelled in the oom project as a 1:1 set of service:pod sets (1 pod per docker container). The fastest way to get ONAP Kubernetes up is via Rancher on any bare metal or VM that supports a clean Ubuntu 16.04 install and more than 55G ram.
TODO: REMOVE from table cell - wrapping is not working
(on each host) add to your /etc/hosts to point your ip to your hostname (add your hostname to the end). Add entries for all other hosts in your cluster.
For example on openlab - you will need to add the name of your host before you install docker - to avoid the error below
sudo: unable to resolve host onap-oom
|
Open Ports
On most hosts like openstack or EC2 you can open all the ports or they are open by default - on some environments like Rackspace VM's you need to open them
|
Fix virtual memory allocation (to allow onap-log:elasticsearch to come up under Rancher 1.6.11+)
|
clone oom (scp your onap_rsa private key first - or clone anon - Ideally you get a full gerrit account and join the community)
see ssh/http/http access links below
https://gerrit.onap.org/r/#/admin/projects/oom
|
(on each host (server and client(s) which may be the same machine)) Install only the 17.03.2 version of Docker (the only version that works with Kubernetes in Rancher 1.6.13+)
Install Docker
|
Pre pull docker images the first time you install onap. Currently the pre-pull will take 16-180 min depending on your network. Pre pulling the images will allow the entire ONAP to start in 3-8 min instead of up to 3 hours.
OOM-328 - Preload docker images script before createAll.bash will allow 7 min startup REOPENED
Use script above in oom/kubernetes/config once it is merged.
https://git.onap.org/oom/tree/kubernetes/config/prepull_docker.sh
|
To monitor when prepull is finished see section: Prepulldockerimages. It is advised to wait until pre pull has finished before continuing.
(on the master only) Install rancher (Optional: use 8880 instead of 8080 if there is a conflict) - note there may be issues with the dns pod in Rancher after a reboot or when running clustered hosts - a clean system will be OK -
|
In Rancher UI - dont use (http://127.0.0.1:8880) - use the real IP address - so the client configs are populated correctly with callbacks
You must deactivate the default CATTLE environment - by adding a KUBERNETES environment - and Deactivating the older default CATTLE one - your added hosts will attach to the default
- Default → Manage Environments
- Select "Add Environment" button
- Give the Environment a name and description, then select Kubernetes as the Environment Template
- Hit the "Create" button. This will create the environment and bring you back to the Manage Environments view
- At the far right column of the Default Environment row, left-click the menu ( looks like 3 stacked dots ), and select Deactivate. This will make your new Kubernetes environment the new default.
Register your host
Register your host(s) - run following on each host (including the master if you are collocating the master/host on a single machine/vm)
For each host, In Rancher > Infrastructure > Hosts. Select "Add Host"
The first time you add a host - you will be presented with a screen containing the routable IP - hit save only on a routable IP.
Enter IP of host: (if you launched racher with 127.0.0.1/localhost - otherwise keep it empty - it will autopopulate the registration with the real IP)
Copy command to register host with Rancher,
Execute command on each host, for example:
|
wait for kubernetes menu to populate with the CLI
Install Kubectl
The following will install kubectl (for Kubernetes 1.8.6 ) https://github.com/kubernetes/kubernetes/issues/57528 on a linux host. Once configured, this client tool will provide management of a Kubernetes cluster.
|
Paste kubectl config from Rancher (you will see the CLI menu in Rancher / Kubernetes after the k8s pods are up on your host)
Click on "Generate Config" to get your content to add into .kube/config
Verify that Kubernetes config is good
|
Install Helm
The following will install Helm - currently 2.8.0 on a linux host. Helm is used by OOM for package and configuration management.
https://lists.onap.org/pipermail/onap-discuss/2018-January/007674.html
Prerequisite: Install Kubectl (2.6.1 comes with Rancher 1.6.14 - for master)
|
...