...
Setting up the IDE
You can set up the SDNC SDN-C IDE by following instructions from Setting Up Your Development Environment.
...
Project Name | Project Description | has code |
---|---|---|
sdnc/adaptorsSDNC | SDN-C adaptors | |
sdnc/architecture | SDNC SDN-C architectural artifacts (e.g. blueprints) | |
sdnc/core | SDNC SDN-C core platform | |
sdnc/features | SDNC SDN-C Karaf features | |
sdnc/northbound | SDNC SDN-C northbound adaptors | |
sdnc/oam | SDNC SDN-C OA&M tools | |
sdnc/parent | Parent POMS to be used by SDNC SDN-C components | |
sdnc/plugin | SDNC SDN-C plugins |
Note: The ONAP SDNC SDN-C projects are more like a demo version of ECOMP's SDN-GC.
...
Select the Override of the User settings file, add the settings.xml file full path, the Apply button will be enabled. click on Apply to apply the change.
...
Build The Code
Projects Build Order
The SDNC SDN-C projects repos should be built in the following order:
...
The goal of this section is to guide how to quickly build an deploy a running ONAP SDNC SDN-C envrionment which is going to use the existed image in the ONAP Nexus3 server.
...
Info | ||
---|---|---|
| ||
"Integration framework, automated tools, code and scripts, best practice guidance related to cross-project Continuous System Integration Testing (CSIT), and delivery of ONAP." |
Set up
Prerequisites
Tool | versionVersion | Introduction | EXE Download Link |
---|---|---|---|
Vagrant | 1.9.5 | https://www.vagrantup.com/ | https://releases.hashicorp.com/vagrant/?_ga=2.74767696.373821479.1506869076-1225456615.1499750393 |
Virtualbox | 5.1.20 | https://www.virtualbox.org/ | https://www.virtualbox.org/wiki/Download_Old_Builds_5_1 |
Git | 2.14.3 | https://git-scm.com/ | https://git-scm.com/downloads |
...
(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 and install.of the following (from the link listed in the above table) and install:
- vagrant
- virtualbox
- git
Ubuntu 16.04
...
Do the following:
Anchor | ||||
---|---|---|---|---|
|
Add the following line to your /etc/apt/sources.list:
...
sudo apt-get install virtualbox-5.2
...
Anchor | ||||
---|---|---|---|---|
|
wget https://releases.hashicorp.com/vagrant/1.9.5/vagrant_1.9.5_x86_64.deb
sudo dpkg -i vagrant_1.9.5_x86_64.deb
...
Anchor | ||||
---|---|---|---|---|
|
sudo apt-get install git
...
Anchor | ||||
---|---|---|---|---|
|
sudo apt install dos2unix
Integration Project
Download The Project
Clone the intergration project with the following command:
git clone https://git.onap.org/integration
...
Hint: More information could be found under integration\bootstrap\vagrant-onap\README.md
...
Convert Line Endings
If in windows, open Gitbash As Administrator
...
.
Run the following commands:
...
cd integration/bootstrap/vagrant-onap/lib
find . -type f -print0 | xargs -0 dos2unix
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.
The goal
...
is to have a running
...
SDN-C environment, so in the configuration, it turns off clone and build project.
...
Only file name called settings.yaml will be picked-up by the deployment script.
Note: There is an issue in the sample file that "build_images" should be replaced by "build_image", otherwise, this configuration won't work.
Run the following command to create settings.yaml file from the repo's settings.yaml.development file:
cp settings.yaml.development settings.yaml
vim settings.yaml
The example shows below Here's the example of the outcoming settings.yaml file:
Code Block | ||
---|---|---|
| ||
build_image: "False" clone_repo: "False" compile_repo: "False" enable_oparent: "False" skip_get_images: "False" skip_install: "False" |
Hint:
- Under integration\bootstrap\vagrant-onap\doc\source\features\configure_execution.rst, it talks about the functionality of these attributes.
- Hint: 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 | ||
---|---|---|
| ||
... configuration = { ... 'docker_version' => '1.2-STAGING-latest', ... } ... |
Modify the SDN-C Deployment Script
vim integration/bootstrap/vagrant-onap/lib/sdnc
...
Code Block | ||
---|---|---|
| ||
... # 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
...
This is tutorial about how to turn on the remote debug for sdnc docker instance.
SSH to VM
vagrant ssh ${vm-id}
Pre-setup
export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' |sort -n | head -1)
...
//check the java process to make sure it's been killed, if not run "sudo kill -9 ${PID}"
ps aux | grep java
Update docker-compose yaml.file
vim /opt/openecomp/sdnc/oam/installation/src/main/yaml/docker-compose.yaml
...
Code Block |
---|
... sdnc: image: onap/sdnc-image:latest depends_on : - db container_name: sdnc_controller_container entrypoint: ["/opt/onap/sdnc/bin/startODL.sh"] ports: - "8282:8181" - "8201:8101" - "5005:5005" links: - db:dbhost - db:sdnctldb01 - db:sdnctldb02 environment: - MYSQL_ROOT_PASSWORD=openECOMP1.0 - SDNC_CONFIG_DIR=/opt/onap/sdnc/data/properties - KARAF_DEBUG=true dns: - ${DNS_IP_ADDR-10.0.100.1} logging: driver: "json-file" options: max-size: "30m" max-file: "5" ... |
Start
...
SDN-C docker-instance
cd /opt/openecomp/sdnc/oam/installation/src/main/yaml/
...