...
You can do the undercloud setup by following Quickstart Installation in ONAP on Kubernetes, or by following the steps described on this page - keep both pages in sync.
Table of Contents |
---|
Install Rancher
Follow the steps below to install and configure Rancher:
# | Purpose | Command and Example | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Add host name to /etc/hosts filenote-1 | sudo vi /etc/hosts
| ||||||||||
2 | Install Docker 1.12note-2 | curl https://releases.rancher.com/install-docker/1.12.sh | sh
sudo usermod -aG docker ubuntu logout log back in and validate docker command is usable
| ||||||||||
3 | Install/Start Rancher servernote-3 | Only on one node (if you are installing more than one Kubernetes nodes, choose one node to run the Rancher server). Use port 8880 instead of 8080. docker run -d --restart=unless-stopped -p 8880:8080 rancher/server:v1.6.10
|
...
- Adding all cluster nodes to /etc/hosts file on each node is optional
- 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 the Rancher UI through http:<master host IP>:8880 ; it takes you to the apps/stacks page.
...
# | Purpose | Script shots illustrated steps | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Create Rancher environment: |
| |||||||||||||||
2 | Add host to INFRASTRUCTURE |
| |||||||||||||||
3 | Confirm that the host process has completed | The end of adding the host operation is indicated by the CLI option shown under the KUBERNETES dropdown menu:
| |||||||||||||||
4 | Add more host(s) | Repeat step 2 and 3 to add more host
|
Install kubectl
kubectl is a command line interface for running commands against Kubernetes clusters.
...
# | 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 the kubectl command | chmod +x kubectl sudo mv kubectl /usr/local/bin/kubectl | |||||
3 | Generate Config from the Rancher UI |
| |||||
4 | Create the 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 the kube config | kubectl cluster-info | |||||
6 | Validate the nodes added | kubectl get nodes
|
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 the OOM project.
...
# | Purpose | Command and Example | |||||
---|---|---|---|---|---|---|---|
1 | Download the Helm tar file | wget http://storage.googleapis.com/kubernetes-helm/helm-v2.3.0-linux-amd64.tar.gz
| |||||
2 | Untar the Helm tar file | tar -zxvf helm-v2.3.0-linux-amd64.tar.gz
| |||||
3 | Enable the Helm command | sudo mv linux-amd64/helm /usr/local/bin/helm | |||||
Tip of viewing helm command menu |
|
Confirm that the Setup has Finished
Wait until all hosts in Rancher show green, indicating that setup is complete!