Versions Compared

Key

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

...

Code Block
languagediff
themeDJango
diff --git a/bootstrap/vagrant-onap/Vagrantfile b/bootstrap/vagrant-onap/Vagrantfile
index 0664e5f..0032dd1667d3bf 100644
--- a/bootstrap/vagrant-onap/Vagrantfile
+++ b/bootstrap/vagrant-onap/Vagrantfile
@@ -13,7 +13,7 @@ configuration = {
   'nexus_password'      => 'docker',
   'dmaap_topic'         => 'AUTO',
   'artifacts_version'   => '1.0.0',
-  'docker_version'      => '1.0-STAGING-latest',
+  'docker_version'      => 'latest',
   # Parameters for DCAE instantiation
   'dcae_zone'           => 'iad4',
   'dcae_state'          => 'vi',
@@ -340302,6 +340302,711 @@ end
 
 Vagrant.configure("2") do |config|
 
+   if provider == :virtualbox  # Common Settings:
 
         nodeconfig.vm.provider "virtualbox" do |vbox|&& "sdnc".eql?(requested_machine)
+     config.vm.network "forwarded_port", guest: 8282, host: 8282, protocol: "tcp", auto_correct: true
+     config.vm.network "forwarded_port", guest: 8201,  vbox.customize ['modifyvm'host: 8201, protocol:id, '--natdnshostresolver1', 'on']
  "tcp", auto_correct: true
+   end
+
   # PROXY definitions
     vbox.customizeif ENV['modifyvm', :id, '--nictype1', 'virtio']
  http_proxy'] != nil and ENV['https_proxy'] != nil and ENV['no_proxy'] != nil
       if not vbox.customize ['modifyvm', :id, '--audio', 'none']Vagrant.has_plugin?('vagrant-proxyconf')
@@ -340,6 +345,7 @@ Vagrant.configure("2") do |config|
         # Common Settings:
 
         nodeconfig.vm.provider "virtualbox" do |vbox|
+          vbox.customize ['modifyvm', :id, '--vramnatdnshostresolver1', '1on']


Also 

Modify the SDN-C Deployment Script

The get_sdnc_images  function in the "integration/bootstrap/vagrant-onap/lib/sdnc" may need to be synchronized with the images defined in the docker compose file [sdnc/oam.git] / installation / src / main / yaml / docker-compose.yml.  If these are not synchroned you will get a 

pull access denied for [image name], repository does not exist or may require 'docker login'

In addition to the synchonizing the images the keyword openecomp has changed to onap.

Here is the diff that worked at the time of writting this.

Code Block
languagediff
themeDJango


diff --git a/bootstrap/vagrant-onap/Vagrantfile b/bootstrap/vagrant-onap/Vagrantfile
index 0664e5f..667d3bf 100644
--- a/bootstrap/vagrant-onap/Vagrantfile
+++ b/bootstrap/vagrant-onap/Vagrantfile
@@ -13,7 +13,7 @@ configuration = {
   'nexus_password'      => 'docker',
   'dmaap_topic'         => 'AUTO',
   'artifacts_version'   => '1.0.0',
-  'docker_version'      => '1.0-STAGING-latest',
+  'docker_version'      => 'latest',
   # Parameters for DCAE instantiation
   'dcae_zone'           => 'iad4',
   'dcae_state'          => 'vi',
@@ -302,6 +302,11 @@ end
 
 Vagrant.configure("2") do |config|
 
+   if provider == :virtualbox && "sdnc".eql?(requested_machine)
+     config.vm.network "forwarded_port", guest: 8282, host: 8181, protocol: "tcp", auto_correct: true
+     config.vm.network "forwarded_port", guest: 8281, host: 8101, protocol: "tcp", auto_correct: true
+   end
+
   # PROXY definitions
     if ENV['http_proxy'] != nil and ENV['https_proxy'] != nil and ENV['no_proxy'] != nil
       if not Vagrant.has_plugin?('vagrant-proxyconf')
@@ -340,6 +345,7 @@ Vagrant.configure("2") do |config|
         # Common Settings:
 
         nodeconfig.vm.provider "virtualbox" do |vbox|
+          vbox.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
           vbox.customize ['modifyvm', :id, '--nictype1', 'virtio']
           vbox.customize ['modifyvm', :id, '--audio', 'none']
           vbox.customize ['modifyvm', :id, '--vram', '1']




Deployment

Start Deployment

cd integration/bootstrap/vagrant-onap

./tools/run.sh sdnc

This will configur and start the guess VM

configure and start the sdnc docker resources on the guest VM. 

and finnaly the SDNC will start

Tip
titlewait

Once the vagrant has completed running it will still take some time for SDNC to come up.   Have patience.  

Connetion to you deployment

Basic Usage of Vagrant and Docker

check running vm instances

From the Base OS use the following command to see the running VM'  ID and name for of the running commands.  

vagrant global-status

Configure Port Forwarding

This could be replaced by adding scripts in Vagrantfile.

Image Removed

Open RestConf Page

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

Credentials: admin/Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U

ssh to the vm

The follow command  will open a ssh terminal to running vm.  The vm name or id can be used.   

vagrant ssh sdnc

For addition details use the -h options

vagrant ssh -h

check docker images

Once you have ssh to the running VM you execute the docker commands 

docker images

check running docker instances

docker ps -a

ssh to the docker instance

...

           vbox.customize ['modifyvm', :id, '--nictype1', 'virtio']
           vbox.customize ['modifyvm', :id, '--audio', 'none']
           vbox.customize ['modifyvm', :id, '--vram', '1']




Also 




Modify the SDN-C Deployment Script

The get_sdnc_images  function in the "integration/bootstrap/vagrant-onap/lib/sdnc" may need to be synchronized with the images defined in the docker compose file [sdnc/oam.git] / installation / src / main / yaml / docker-compose.yml.  If these are not synchroned you will get a 

pull access denied for [image name], repository does not exist or may require 'docker login'

In addition to the synchonizing the images the keyword openecomp has changed to onap.

Here is the diff that worked at the time of writting this.

Code Block
languagediff
themeDJango
diff --git a/bootstrap/vagrant-onap/lib/sdnc b/bootstrap/vagrant-onap/lib/sdnc
index a69ce18..ff582fe 100755
--- a/bootstrap/vagrant-onap/lib/sdnc
+++ b/bootstrap/vagrant-onap/lib/sdnc
@@ -3,7 +3,7 @@
 source /var/onap/functions
 source /var/onap/ccsdk
 
-sdnc_src_folder=$git_src_folder/openecomp/sdnc
+sdnc_src_folder=$git_src_folder/onap/sdnc
 sdnc_repos=("sdnc/adaptors" "sdnc/architecture" "sdnc/core" "sdnc/features" \
 "sdnc/northbound" "sdnc/oam" "sdnc/parent" "sdnc/plugins")
 
@@ -45,9 +45,11 @@ 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_onap_image ccsdk-dgbuilder-image onap/ccsdk-dgbuilder-image:latest
+        pull_onap_image sdnc-ueb-listener-image onap/sdnc-ueb-listener-image:latest
+        pull_onap_image sdnc-dmaap-listener-image onap/sdnc-dmaap-listener-image:latest
     fi
     pull_docker_image mysql/mysql-server:5.6
 }



Deployment

Start Deployment

cd integration/bootstrap/vagrant-onap

./tools/run.sh sdnc

This will configure and start the guess VM

configure and start the sdnc docker resources on the guest VM. 

and finnaly the SDNC will start

Gliffy Diagram
namevagrantSDNCDeployment


Tip
titlewait

Once the vagrant has completed running it will still take some time for SDNC to come up.   Have patience.  


Connetion to you deployment

Basic Usage of Vagrant

Vagrant is commags are executed on the Base OS.    

Get Detail about the vagrant Commands 

Print the usage use the '-h'  option

vagrant -h

vagrant <command> -h

check running vm instances

From the Base OS use the following command to see the running Guess VM'  ID and name.  

vagrant global-status

Port Forwarding

The Guess VM is running in its own private network and is using the NAT to get the the Base OS network.  To see the port forwarding run the following command.  

vagrant port sdnc

If you don't see any ports Oops.  Configuring port-forwarding should have been configured earlier when editing the [integration.git] / bootstrap / vagrant-onap / Vagrantfile.  Something must of went wrong.   Here is the example of a snipet that can be added to teh Vagrant file.  

 Vagrant.configure("2") do |config|

if provider == :virtualbox && "sdnc".eql?(requested_machine)
config.vm.network "forwarded_port", guest: 8282, host: 8282, protocol: "tcp", auto_correct: true
config.vm.network "forwarded_port", guest: 8281, host: 8202, protocol: "tcp", auto_correct: true
end


Port forwarding can also be configured in the Virtual Box Gui.   Here is an example


Image Added

ssh to the Guess OS

The follow command  will open a ssh terminal to the running guess vm.  The guess vm name or id can be used.   

vagrant ssh sdnch

Basic Usage of Docker

docker commands are excuted on the guess OS

Get Detail about the dockerCommands 

Print the usage use the '-h'  option

vagrant -h

vagrant <command> -h

List docker container images

On the Guess VM execute the docker commands 

docker images

List the running docker containers

The follwing command will list the running docker containers.  The containters' id, name and whihc ports are forwarded to the Guess OS can be found in this list.  

docker ps -a

open a terminal to a docker running docker container

Use the docker container id or name use the follwing command to open a terminal to that container.  

docker exec -i -t sdnc_controller_container bash

OpenDaylight RestConf API Web GUI

To connect to the runing sdnc Port forwarding must be configured correctly.   The port forwaded in the instruction above was 8282.  

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

The credentials to connect to the SDNC Web GUI are can be found in the file [sdnc/oam.git] / installation / sdnc / src / main / scripts / startODL.sh.  Look for the variable ODL_ADMIN_PASSWORD

Here is an example

Credentials: admin/Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U


Reference:

[1] ONAP integration: https://git.onap.org/integration/

...