ONAP deployment in kubernetes is modeled in the oom project as an one to one set of service to pod sets (One pod per docker container).
You can do the under cloud set up by following Quickstart Installation in ONAP on Kubernetests or the following steps described in the page:
Install Rancher
Following the steps below to install and configure Rancher:
# | Purpose | Command and Example |
---|---|---|
1 | Add host name to /etc/hosts file 1 | sudo vi /etc/hosts |
2 | Clone OOM project from ONAP gerrit | git clone http://gerrit.onap.org/r/oom |
3 | Install docker 1.12 2 | curl https://releases.rancher.com/install-docker/1.12.sh | sh |
4 | Install/start rancher server 3 | Only on master node (if you are installing more than one Kubernetes nodes), Use port 8880 instead of 8080. docker run -d --restart=unless-stopped -p 8880:8080 rancher/server |
Notes:
- Optional to add all cluster nodes to /etc/hosts file on each node
- Check out compartible versions among rancher, kubernetes and docker
- There may be issues with the DNS pod in Rancher after a reboot or when running clustered hosts as described in ONAP bug OOM-236 (Rancher DNS pod non-functional after system reboot - only in cluster mode). A clean system is OK.
Configure Rancher Client
You can access Rancher UI through http:<master host IP>:8880, it takes you to the apps/stacks page.
For example,
you can access rancher from http://10.147.132.10:8880/ , the page will be opened at http://10.147.132.10:8880/env/1a5/apps/stacks.
From here, following the steps below to configure the rancher:
# | Purpose | Script shots illustrated steps |
---|---|---|
1 | Create Rancher environment: |
|
2 | Add host to INFRASTRUCTURE |
|
3 | Confirm add host process completed | The end of adding host operation is indicated by the CLI option shows under KUBERNETES dropdown menu. |
Install kubectl
kubectl is a command line interface for running commands against Kubernetes clusters.
Follow the steps below to install kubectrl:
# | Purpose | Command and Example |
---|---|---|
1 | Download kubectl on the server | curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl |
2 | Enable kubectl command | chmod +x ./kubectl sudo mv ./kubectl /usr/local/bin/kubectl |
3 | Generate Config from Rancher UI |
|
4 | Create kube config on the server | mkdir ~/.kube vi ~/.kube/config Paste the generated config from rancher UI (from last step) to this file, then save the file. |
5 | Validate kube config | kubectl cluster-info |
Install Helm
Helm is used by OOM for package and configuration management, hence we are installing Helm (use 2.3.0 not current 2.6.0) on the server where we have mounted OOM project.
Follow the steps below to download and enable helm on the server:
# | Purpose | Command and Example |
---|---|---|
1 | Download helm tar file | wget http://storage.googleapis.com/kubernetes-helm/helm-v2.3.0-linux-amd64.tar.gz |
2 | Untar helm tar file | tar -zxvf helm-v2.3.0-linux-amd64.tar.gz |
3 | enable helm command | sudo mv linux-amd64/helm /usr/local/bin/helm |
Tip of viewing helm command menu |
Confirm Setup Done
Wait until all hosts in rancher show green, It indicates it's done :)