Rancher Installation - Single Node - Script/template version
Single collocated VM
Automation is currently only written for single VM that hosts both the rancher server and the deployed onap pods. Use the heat template below to deploy your VM (adjust your tenancy parameters)
Once the VM comes up run the oom_entrypoint.sh script - which will download the oom_rancher_setup.sh script to setup docker, rancher, kubernetes and helm - the entrypoint script will then run the cd.sh script to bring up onap based on your values.yaml config by running helm install on it.
# source your windriver tenant rc file source logging-openrc.sh # edit the env file with your own tenant config - then run the stack openstack stack create -t oom_openstack.yaml -e oom_openstack_oom.env obrien20180418b # wait for the VM (or add the following to the cloud-init section (coming)) - ssh into the VM and run the following # download and run the bootstrap and onap install script, the -s server name can be an IP, FQDN or hostname wget https://jira.onap.org/secure/attachment/11469/oom_entrypoint.sh chmod 777 oom_entrypoint.sh # edit the downloaded values.yaml (that is copied to oom/kubernetes/onap/ by the cd.sh script) with your onap preferences and openstack tenant config sudo ./oom_entrypoint.sh -b master -s devops.onap.info -e onap # wait 15 min for rancher to finish, then 30-90 min for onap to come up
- OOM-714Getting issue details... STATUS see https://jira.onap.org/secure/attachment/11455/oom_openstack.yaml and https://jira.onap.org/secure/attachment/11454/oom_openstack_oom.env
- OOM-710Getting issue details... STATUS see https://jira.onap.org/secure/attachment/11439/oom_entrypoint.sh
customize your template (true/false for any components, docker overrides etc...)
https://jira.onap.org/secure/attachment/11414/values.yaml
Run oom_entrypoint.sh after you verified values.yaml - it will run both scripts below for you - a single node kubernetes setup running what you configured in values.yaml will be up in 50-90 min. If you want to just configure your vm without bringing up ONAP - comment out the cd.sh line and run that separately.
- OOM-715Getting issue details... STATUS see https://jira.onap.org/secure/attachment/11438/oom_rancher_setup.sh
- OOM-716Getting issue details... STATUS see https://jira.onap.org/secure/attachment/11413/cd.sh
Verify your system is up by doing a kubectl get pods --all-namespaces and checking the 8880 port to bring up the rancher or kubernetes gui.
Rancher Installation - cluster
The following are instructions on how to create an Openstack VM running Rancher.
Launch new VM instance to host the Rancher Server
Select Ubuntu 16.04 as base image
Select Flavor
Known issues exist if flavor is too small for Rancher. Please select a flavor with at least 4 vCPU and 8GB ram.
Networking
Security Groups
Key Pair
Use an existing key pair (e.g. onap_key), import an existing one or create a new one to assign.
Apply customization script for the Rancher VM
This customization script will:
- setup root access to the VM (comment out if you wish to disable this capability and restrict access to ssh access only)
- install docker *
- install rancher *
- install kubectl *
- install helm *
- install nfs server
* ONAP release supported version
Launch Instance
Assign Floating IP for external access
Kubernetes Installation
Launch new VM instance(s) to create a Kubernetes single host or cluster
To create a cluster:
- do not append a '-1' suffix (e.g. sb4-k8s)
- increase count to the # of of kubernetes worker nodes you want (eg. 3)
Select Ubuntu 16.04 as base image
Select Flavor
The size of a Kubernetes host depends on the size of the ONAP deployment that will be installed.
As of the Beijing release a minimum of 3 x 32GB hosts will be needed to run a full ONAP deployment (all components).
If a small subset of ONAP components are being deployed for testing purposes, then a single 16GB or 32GB host should suffice.
Networking
Security Group
Key Pair
Use an existing key pair (e.g. onap_key), import an existing one or create a new one to assign.
Apply customization script for Kubernetes VM(s)
This customization script will:
- setup root access to the VM (comment out if you wish to disable this capability and restrict access to ssh access only)
- install docker *
- install kubectl *
- install helm *
- install nfs common (see configuration step here)
* ONAP release supported version
Launch Instance
Assign Floating IP for external access
Configuration (Rancher and Kubernetes)
Access Rancher server via web browser
(e.g. http://10.12.6.16:8080/env/1a5/apps/stacks)
Add Kubernetes Environment to Rancher
1. Select “Manage Environments”
2. Select “Add Environment”
3. Add unique name for your new Rancher environment
4. Select the Kubernetes template
5. Click "create"
6. Select the new named environment (ie. SB4) from the dropdown list (top left).
Rancher is now waiting for a Kubernetes Host to be added.
Add Kubernetes Host
1. If this is the first (or only) host being added - click on the "Add a host" link
and click on "Save" (accept defaults).
otherwise select INFRASTRUCTURE→ Hosts and click on "Add Host"
2. Enter the management IP for the k8s VM (e.g. 10.0.0.4) that was just created.
3. Click on “Copy to Clipboard” button
4. Click on “Close” button
Configure Kubernetes Host
1. Login to the new Kubernetes Host
2. Paste Clipboard content and hit enter to install Rancher Agent
Return to Rancher environment (e.g. SB4) and wait for services to complete (~ 10-15 mins)
Configure kubectl and helm
Note that in this example we are configuring kubectl and helm that have been installed (as a convience) onto the rancher and kubernetes hosts.
Typically you would install them both on your PC and remotely connect to the cluster. The following procedure would remain the same.
1. Click on CLI and then click on “Generate Config”
2. Click on “Copy to Clipboard”
3. Create a .kube directory in user directory (if one does not exist)
4. Paste contents of Clipboard into a file called “config” and save file
4. Validate that kubectl is able to connect to the kubernetes cluster
and show running pods
5. Validate helm is running at the right version.
If not, an error like this will be displayed:
6. Upgrade the server-side component of helm (tiller) via ‘helm init --upgrade’
ONAP Deployment via OOM
Now that kubernetes and Helm are installed and configured you can prepare to deploy ONAP.
Until an LF-hosted public ONAP repository is available (comping soon!), please clone the OOM repo (https://gerrit.onap.org/r/gitweb?p=oom.git;a=summary).
Follow the instructions in the oom/kubernetes/README.MD or look at the official documentation to get started
http://onap.readthedocs.io/en/latest/submodules/oom.git/docs/oom_user_guide.html