diff options
author | Mike Elliott <mike.elliott@amdocs.com> | 2018-03-26 09:37:37 -0400 |
---|---|---|
committer | Alexis de Talhouët <alexis.de_talhouet@bell.ca> | 2018-03-26 20:37:55 +0000 |
commit | 6a84df34eabbdb1ca12ec005c9978082013eb7f9 (patch) | |
tree | 05d5d58d174c05ea0b26aafe73b4366483d1b382 /kubernetes | |
parent | bdcf44857f459c2f335a63dd33185194988f0263 (diff) |
Add ONAP Quickstart README for Bejing
This is largely a duplication of what will be in
the offical readthedocs documentation. It is put
here now as part of the README to provide immediate
help to those trying to deploy ONAP using an all
Helm deployment mechanism.
The README will later be amended to simply point to
the offical docs once it has been published for Beijing.
Change-Id: I5e3ec279e19617912d28d482e7818c01620d8945
Issue-ID: OOM-827
Signed-off-by: Mike Elliott <mike.elliott@amdocs.com>
Diffstat (limited to 'kubernetes')
-rw-r--r-- | kubernetes/Makefile | 7 | ||||
-rw-r--r-- | kubernetes/README.md | 133 | ||||
-rw-r--r-- | kubernetes/README_HELM | 20 |
3 files changed, 78 insertions, 82 deletions
diff --git a/kubernetes/Makefile b/kubernetes/Makefile index f3e50e4347..7ba5ba934a 100644 --- a/kubernetes/Makefile +++ b/kubernetes/Makefile @@ -52,5 +52,12 @@ clean: @rm -f */requirements.lock @rm -f *tgz */charts/*tgz @rm -rf $(PACKAGE_DIR) + +# start up a local helm repo to serve up +repo: + @mkdir -p $(PACKAGE_DIR) + @helm serve --repo-path $(PACKAGE_DIR) & + @helm repo index $(PACKAGE_DIR) + @helm repo add local http://127.0.0.1:8879 %: @: diff --git a/kubernetes/README.md b/kubernetes/README.md index dc49e5445b..9c315cbafe 100644 --- a/kubernetes/README.md +++ b/kubernetes/README.md @@ -1,78 +1,87 @@ -## **Quick Start Guide - ONAP on Kubernetes** +## **Quick Start Guide** -This is a quick start guide to help you get started on ONAP installation. Creating an ONAP deployment instance requires creating base configuration on the host node and then deploying the runtime containers. +This is a quick start guide describing how to deploy ONAP on Kubernetes using Helm. Pre-requisites: - Your Kubernetes environment must be available. For more information see, [ONAP on Kubernetes](https://wiki.onap.org/display/DW/ONAP+on+Kubernetes). - Deployment artifacts are customized for your location. -Step 1 -Review and optionally change configuration parameters: - -Setup the [/oom/kubernetes/config/onap-parameters.yaml](https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/onap-parameters.yaml;h=7ddaf4d4c3dccf2fad515265f0da9c31ec0e64b1;hb=refs/heads/master) file with key-value pairs specific to your OpenStack environment. - -OR - -There is a [sample](https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/onap-parameters-sample.yaml;h=3a74beddbbf7f9f9ec8e5a6abaecb7cb238bd519;hb=refs/heads/master) that may help you out or even be usable directly if you don't intend to actually use OpenStack resources. - - -Step 2 - -In-order to be able to support multiple ONAP instances within a single kubernetes environment, a configuration set is required. To do this, execute the [createConfig.sh](https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/createConfig.sh;h=f226ccae47ca6de15c1da49be4b8b6de974895ed;hb=refs/heads/master) script: - -> oom/kubernetes/config/createConfig.sh -n onap - -Where: -'onap' refers to the name of the instance. This serves as the Namespace prefix for each deployed ONAP component (for example, onap-mso). - -Step 3 - -The bash script [createAll.bash](https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/oneclick/createAll.bash;h=5e5f2dc76ea7739452e757282e750638b4e3e1de;hb=refs/heads/master) is used to create an ONAP deployment with kubernetes. It has two primary functions: - -- Creating the namespaces used to encapsulate the ONAP components, and -- Creating the services, pods and containers within each of these namespaces that provide the core functionality of ONAP. - -Before you execute the createAll.bash. script, pod config-init ([pod-config-init.yaml](https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/pod-config-init.yaml;h=b1285ce21d61815c082f6d6aa3c43d00561811c7;hb=refs/heads/master)) may need editing to match your environment and deployment into the default namespace. - -To deploy the containers and create your ONAP system, execute the following command: - -> oom/kubernetes/oneclick/createAll.bash -n onap - -#### **Additional information on usage of createAll.bash** - -Namespaces provide isolation between ONAP components as ONAP release 1.0 contains duplicate application (for example, mariadb) and port usage. - -As such createAll.bash requires the user to enter a namespace prefix string that can be used to separate multiple deployments of onap. The result will be set of 10 namespaces (for example, onap-sdc, onap-aai, onap-mso, onap-message-router, onap-robot, onap-vid, onap-sdnc, onap-portal, onap-policy, onap-appc) being created within the kubernetes environment. - - -#### **Deploying multiple ONAP instances within the same Kubernetes cluster** - -To deploy multiple ONAP instances, you must specify the number of Instances you would like to create in a Kubernetes cluster using createAllbash. - -This is currently required due to the use of NodePort ranges. NodePorts allow external IP:Port access to containers that are running inside a Kubernetes cluster. - -To create multiple instances of an ONAP deployment in the cluster, use the following commands: - -> oom/kubernetes/config/createConfig.sh -n onap - -> oom/kubernetes/oneclick/createAll.bash -n onap -i 2 - -Where: - -- 'onap' refers to the name of the instance. - -- ‘i 2’ refers to the number of instances of an ONAP deployment in the cluster. - -#### **To delete a deployed instance** +### **Deploy ONAP Instance** + +Step 1. Clone the OOM repository from ONAP gerrit: + +``` +> git clone http://gerrit.onap.org/r/oom +> cd oom/kubernetes +``` + +Step 2. Customize the oom/kubernetes/onap parent chart, like the values.yaml file, to suit your deployment. You may want to selectively enable or disable ONAP components by changing the subchart **enabled** flags to *true* or *false*. +``` +Example: +... +robot: # Robot Health Check + enabled: true +sdc: + enabled: false +sdnc: + enabled: false +so: # Service Orchestrator + enabled: true +... +``` + +Step 3. To setup a local Helm repository to serve up the local ONAP charts: +``` +> 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 +``` + +Step 4. Build a local Helm repository (from the kubernetes directory): +``` +> make all +``` + +Step 5. Display the charts that are available to be deployed: +``` +> helm search -l +NAME VERSION DESCRIPTION +local/appc 2.0.0 Application Controller +local/clamp 2.0.0 ONAP Clamp +local/onap 2.0.0 Open Network Automation Platform (ONAP) +local/robot 2.0.0 A helm Chart for kubernetes-ONAP Robot +local/so 2.0.0 ONAP Service Orchestrator +... +``` + +**Note:** +Setup of this Helm repository is a one time activity. If you make changes to your deployment charts or values be sure to use **make** to update your local Helm repository. + +Step 6. Once the repo is setup, installation of ONAP can be done with a single command: +``` +> helm install local/onap -name dev --namespace onap +``` +**Note:** the **--namespace onap** is currently required while all onap helm charts are migrated to version 2.0. After this activity is complete, namespaces will be optional. + +Use the following to monitor your deployment and determine when ONAP is ready for use: +``` +> kubectl get pods --all-namespaces -o=wide +``` + + +#### **Cleanup deployed ONAP instance** To delete a deployed instance, use the following command: +``` +> helm del dev --purge +``` -> oom/kubernetes/oneclick/deleteAll.bash -n onap -**Note:** Deleting the runtime containers does not remove the configuration created in step 2. For more information on OOM project documentation, refer to: diff --git a/kubernetes/README_HELM b/kubernetes/README_HELM deleted file mode 100644 index 0f65120397..0000000000 --- a/kubernetes/README_HELM +++ /dev/null @@ -1,20 +0,0 @@ -Prerequisites: -- K8s -- Helm - -In order to use Helm with Rancher, check the tiller version installed -by running "helm version" on the rancher CLI -and install the appropriate Helm. -Notice both tiller and helm are installed, -but you will need to install on your VM. - -charts were tested with the following setup: - Rancher Release v1.6.7 - k8s version 1.7.2 - Helm/Tiller version v2.3.0 -also tested on: - k8s version v1.5.2 - Helm/Tiller v2.6.0 - -Download Helm: -https://github.com/kubernetes/helm |