Automating ONAP Deployment
The ONAP OOM project supports deploying ONAP using Kubernetes. This blog explains these steps and how they can be further automated.
Automation Leading to a Carefree Ops Engineer
The ONAP deployment is divided into the following logical steps:
Deploying OpenStack as a target NFVI cloud for ONAP. This step is optional, in case you already have a Openstack (public or private) deployment that you plan to use for ONAP.
Setting up Rancher for Kubernetes environment, which is used to deploy ONAP
Preparing OpenStack for ONAP, which includes creating the required Cloud resources
ONAP deployment using Kubernetes/OOM
Each of these steps can be automated, either for deployment in development environment or as part of Jenkins job in Continuous Integration (CI) process. In case of live deployments, the process obviously needs lot more automation and tuning of various components, which is not covered here.
The first step of ONAP deployment is Openstack installation and deployment which has been automated already as part of Openstack project. There are multiple installers that can be used but for the purpose of this blog, I will describe Apex installer which installs Openstack and OPNFV. This uses the functionality of OOO (Triple-O), which essentially installs one Openstack instance (overcloud) over another Openstack instance (undercloud). This process can be initiated by running a single Apex script from the shell (or from a Jenkins job) which sets up both the Openstack instances. For example, in case of OPNFV deployment using APEX installer, the steps to automate the process are:
Install the APEX packages using the appropriate package manager of the Linux distro
Use the deployment script to start the Openstack Undercloud & Overcloud
Set up Openstack credentials on the Jump host, so that Openstack CLI can be used from Jump host, instead of from Undercloud instance
These can be included in a single script that can be invoked on the system as part of init scripts or the Jenkins job.
The second step of setting up Kubernetes is more involved, since it requires automating Rancher or Cloudify (which are the recommended tools for Kubernetes set up of ONAP). There are multiple steps involved in either of them, which require UI interactions from the user to set this up. In case of Rancher, it does provide CLI, and all the steps can be automated using the equivalent CLI commands (which is supported in the training lab of the upcoming Beijing release, but can also be run on Amsterdam).
The step of preparing Openstack is essentially to create the required cloud resources for deploying ONAP and it is fairly straightforward. The resources of course will vary depending on the type of deployment (HA, Network configuration etc.), but the basic set of resources are fairly simple to create. Openstack provides CLI tool that can be run from the Undercloud instance. Alternatively, the SSH credentials can be copied to the Jump host (which is where all the other commands will be run), and a single script (with the required openstack CLI commands) can be created to run all the required Openstack resources.
The last step is the deployment of ONAP components itself (using the ONAP Operations Manager, or OOM), which involves downloading the correct version of Containers, and deploying them using Kubernetes. This process is already automated as part of OOM in the ONAP distribution, and the deployment script takes care of starting all the required containers. The only other customization of these scripts that could be done is to run only the required containers for your application/use case, to avoid resource crunch.
In summary, all the necessary steps to install and deploy ONAP on a system (for the purpose of development or Devops) can be automated.
Please refer to Aarna’s free cloud images for more details on these steps and the necessary scripts.