Note | ||
---|---|---|
| ||
This wiki is under construction |
Container Background
Linux containers allow for an application and all of its operating system dependencies to be packaged and deployed as a single unit without including a guest operating system as done with virtual machines. The most popular container solution is Docker which provides tools for container management like the Docker Host (dockerd) which can create, run, stop, move, or delete a container. Docker has a very popular registry of containers images that can be used by any Docker system; however, in the ONAP context, Docker images are built by the standard CI/CD flow and stored in Nexus repositories. OOM uses the "standard" ONAP docker containers and three new ones specifically created for OOM.
Containers are isolated from each other primarily via name spaces within the Linux kernel without the need for multiple guest operating systems. As such, multiple containers can be deployed with little overhead such as all of ONAP can be deployed on a single host. With some optimization of the ONAP components (e.g. elimination of redundant database instances) it may be possible to deploy ONAP on a single laptop computer.
Life Cycle Management via Kubernetes
As with the VNFs deployed by ONAP, the components of ONAP have their own life-cycle where the components are created, run, healed, scaled, stopped and deleted. These life-cycle operations are managed by the Kubernetes container management system which maintains the desired state of the container system as described by one or more deployment descriptors - similar in concept to OpenStack HEAT Orchestration Templates. The following sections describe the fundamental objects managed by Kubernetes, the network these components use to communicate with each other and other entities outside of ONAP and the templates that describe the configuration and desired state of the ONAP components.
ONAP Components to Kubernetes Object Relationships
Kubernetes deployments consist of multiple objects:
- nodes - a worker machine - either physical or virtual - that hosts multiple containers managed by kubernetes.
- services - an abstraction of a logical set of pods that provide a micro-service.
- pods - one or more (but typically one) container(s) that provide specific application functionality.
- permanent volumes - One or more permanent volumes need to be established to hold non-ephemeral configuration and state data.
OOM uses these kubernetes objects as follows.
...
OOM Networking with Kubernetes
- DNS
- Ports - Flattening the containers also expose port conflicts between the containers which need to be resolved.
- Name Spaces
Kubernetes Deployment Specifications for ONAP
Initialization Containers - ONAP has built-in temporal dependencies between containers on startup. Supporting these dependencies will likely result in multiple Kubernetes deployment specifications.
Container Dependencies
Deployment Specs
Development Deployments
Production Deployments
- Load Balancers
- Horizontal Scaling
- Stateless Pods
Kubernetes Deployments
The automated ONAP deployment depends on a fully functional kubernetes environment being available prior to ONAP installation. Fortunately, kubenetes is supported on a wide variety of systems such as Google Compute Engine, AWS EC2, Microsoft Azure, CenturyLink Cloud, IBM Bluemix and more. If you're setting up your own kubernetes environment, please refer to ONAP on Kubernetes
...
for a walk through of how to set this environment up on several platforms.
ONAP Deployment Customization
...
ONAP 'OneClick' Deployment Walk-though
Once a kubernetes environment is available and the deployment artifacts have been customized for your location, ONAP is ready to be installed.
The bash
...
script createAll.bash
...
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.
Namespaces provide isolation between ONAP components as ONAP release 1.0 contains duplicate application (e.g. MariaDB) and port usage. As
...
such createAll.bash
...
requires the user to enter a namespace prefix string (e.g. createAll.bash -n onap
) that can be used to separate multiple deployments of onap. The result will be set of 10 namespaces (e.g. 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.
Within the namespaces are kubernete's services that provide external connectivity to pods that host Docker containers. The following is a list of the namespace and the services within:
- onap-aai
- aai-service
- hbase
- model-loader-service
- onap-appc
- dbhost
- dgbuilder
- sdnctldb01
- sdnctldb02
- sdnhost
- onap-message-router
- dmaap
- global-kafka
- zookeeper
- onap-mso
- mariadb
- mso
- onap-policy
- brmsgw
- drools
- mariadb
- nexus
- pap
- pdp
- pypdp
- portalapps
- portaldb
- vnc-portal
- onap-robot
- robot
- onap-sdc
- sdc-be
- sdc-cs
- sdc-es
- sdc-fe
- sdc-kb
- onap-sdnc
- dbhost
- sdnc-dgbuilder
- sdnc-portal
- sdnctldb01
- sdnctldb02
- sdnhost
- onap-vid
- vid-mariadb
- vid-server
Note that services listed
...
in italics
...
are local to the namespace itself and not accessible from outside of the namespace.
Integration with MSB
The Microservices Bus Project provides facilities to integrate micro-services into ONAP and therefore needs to integrate into OOM - primarily through Consul which is the backend of MSB service discovery. The following is a brief description of how this integration will be done (thanks Huabing):
A registrator to push the service endpoint info to MSB service discovery.
- The needed service endpoint info is put into the kubernetes yaml file as Env variables, including service name, Protocol,version, visual range,LB method, IP, Port,etc.
- OOM deploy/start/restart/scale in/scale out/upgrade ONAP components
- Registrator watch the kubernetes event
- When an ONAP component instance has been started/destroyed by OOM, Registrator get the notification from kubernetes
- Registrator parse the service endpoint info from environment variables and register/update/unregister it to MSB service discovery
- MSB API Gateway uses the service endpoint info for service routing and load balancing.
Details of the registration service API can be found at Microservice Bus API Documentation.
A preliminary view of the OOM-MSB integration is as follows:
FAQ (Frequently Asked Questions)
Does OOM enable the deployment of VNFs on containers?
- No. OOM provides a mechanism to instantiate and manage the ONAP components themselves with containers but does not provide a Multi-VIM capability such that VNFs can be deployed into containers. The Multi VIM/Cloud Project
...
- may provide this functionality at some point.
DCAE has its own controller - how is this managed with OOM?
- The DCAE controller will merge with OOM during the Amsterdam release as described in the Data Collection Analytics & Events Project. In the short term the DCAE controller is problematic in a container environment as it directly interfaces to OpenStack and request multiple VMs (e.g. CDAP, etc). The short term proposal is to containerize the DCAE components and statically create them as part of the larger ONAP deployment. Advanced DCAE controller features like hierarchical and geographically diverse deployments need further investigation.
Related Tools
Current Limitations and Feature Requests
- DCAE - The DCAE component not only is not containerized but also includes its own VM orchestration system. A possible solution is to not use the DCAE Controller but port this controller's policies to Kubenetes directly, such as scaling CDAP nodes to match offered capacity.
- Single Name Space
- Deployment Parameter Optimization
Configuration Parameters
Currently ONAP configuration parameters are stored in multiple files; a solution to coordinate these configuration parameters is required. Kubernetes Config Maps may provide a solution or at least partial solution to this problem.
Centralized Parameter Control
- Component Rationalization
Duplicate containers - The VM structure of ONAP hides internal container structure from each of the components including the existence of duplicate containers such as Maria DB.
Jira Stories
References
Docker
Kubernetes