Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To find all of your changes, you can type in "is:closed(owner:self)" in the Search field at Gerrit self dashboard, then click on the Search button.


Deployment

Deploying a Minimal ONAP SDN-C Environment

This tutorial is based on ONAP-integration project[1] which utilizes Vagrant[2], a deployment tool to build an ONAP environment.

...

Info
titleONAP-integration

"Integration framework, automated tools, code and scripts, best practice guidance related to cross-project Continuous System Integration Testing (CSIT), and delivery of ONAP."

...

Setup

ToolVersionIntroduction
Vagrant 1.9.5https://www.vagrantup.com/
Virtualbox5.1.20https://www.virtualbox.org/

Git

2.14.3https://git-scm.com/

...

(2) Instead of using Git bash, Cygwin could be also used and make sure "dos2unix" package is installed which will be used during setup

Basic Installations

Windows 10

Download the exe of the following (from the link listed in the above table) and install:

Ubuntu 16.04

Do the following:

...

sudo apt install dos2unix


Integration Project

Download The Project

Clone the intergration project with the following command:

...

Hint:  More information could be found under integration\bootstrap\vagrant-onap\README.md

Convert Line Endings

If in windows, open Gitbash As Administrator.

...

Hint: This issue might be fixed later

Configure Deployment Mode

There is an settings.yaml.development under integration\bootstrap\vagrant-onap\etc used for different deployment scenarios.

...

  • Under integration\bootstrap\vagrant-onap\doc\source\features\configure_execution.rst, it talks about the functionality of these attributes.
  • Under integration\bootstrap\vagrant-onap\doc\source\features\example_usage.rst, it talks about the use cases of using this tool.

Modify Vagrantfile

vim integration/bootstrap/vagrant-onap/Vagrantfile

...

Code Block
themeDJango
...
configuration = {
	...
	'docker_version' => '1.2-STAGING-latest',
	...
}
...

Modify the SDN-C Deployment Script

vim integration/bootstrap/vagrant-onap/lib/sdnc

...

Code Block
themeDJango
...
# get_sdnc_images() - Build or retrieve necessary images
function get_sdnc_images {
    if [[ "$build_image" == "True" ]]; then
        _build_sdnc_images
    else
        # pull_openecomp_image sdnc-image openecomp/sdnc-image:latest
        # pull_openecomp_image admportal-sdnc-image openecomp/admportal-sdnc-image:latest
        # pull_openecomp_image dgbuilder-sdnc-image openecomp/dgbuilder-sdnc-image:latest
        pull_onap_image sdnc-image onap/sdnc-image:latest
        pull_onap_image admportal-sdnc-image onap/admportal-sdnc-image:latest
        pull_docker_image nexus3.onap.org:10001/onap/ccsdk-dgbuilder-image:latest onap/ccsdk-dgbuilder-image:latest
    fi
    pull_docker_image mysql/mysql-server:5.6
}
...

Deployment

Start Deployment

cd integration/bootstrap/vagrant-onap
./tools/run.sh sdnc

Configure Port Forwarding

This could be replaced by adding scripts in Vagrantfile.

Open RestConf Page

http://127.0.0.1:8282/apidoc/explorer/index.html

Credentials: admin/Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U

Basic Usage of Vagrant and Docker

// check running vm instances

...

[4] Virtualbox Download link: https://www.virtualbox.org/wiki/Linux_Downloads

Deploying New Code (based on the standard ONAP lab setup)

This tutotial talks about one way to deploy new sdnc code into the corresponding docker image which is based on the prevjous chapter "Deploying a Minimal ONAP SDN-C Environment"

Example: Deploy feature.zip

...

File into

...

Docker Image

The example is about adding a new rpc in the generic-resource-api which is a sub-module of northbound project.

...

This step is not necssary which is used to align with the folder path where ONAP-integeration clone, complie project.

Add

...

a New RPC

Edit northinboud/generic-resources-api/model/src/main/yang/GENERIC-RESOURCES-API.yang

...

Code Block
...
rpc haok-sdnc-test {
    output {
      leaf hello-world {
         type string;
         mandatory true;
      }
    }
}
...


Use

...

Maven to

...

Build Project

build generic-resources-api/model

Write a

...

Simple Implemenation

Implement the new rpc generated by YANG model in GenericResourcesApiProvider

...