Versions Compared

Key

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

This is a guide on how to work with the vagrant-onap as a locall deployment vagrant and not as intended by the creator.

In order to work with the vagrant as intended you can contact me ia096e.intl.att.com or the SDC project PTL ml636r@intl.att.com and we'll be happy to provide you with the info you need

Table of Contents

Table of Contents
excludeTable of Contents

...


Before starting working with the vagrant-onap you'll need to following versions of vagrant and virtualbox:

  1. vagrant version 12.90.51. Download it from here: https://releaseswww.hashicorpvagrantup.com/vagrant/?_ga=2.74767696.373821479.1506869076-1225456615.1499750393

    Info

    There is a problem with network configuration on some windows machines so to make sure the install will work as it should install the virtualbox from the cmd window with the following command:

    ..\VirtualBox-5.1.20-114628-Win.exe -msiparams NETWORKTYPE=NDIS5

    downloads.html


  2. virtualbox version5.2.2 r119230 (Qt5.6.3). virtualbox version 5.1.20. Download it from here: https://www.virtualbox.org/wiki/Download_Old_Builds_5_1Downloads

Make sure to restart your computer in order for all the necessary configuration to be configured on your system.

Note

Note: this versions were tested by us, newer versions may work as well but were not tested.



Initial Setup


  1. Clone the integration project: git clone http://gerrit.onap.org/r/integration/devtool.
  2. The next stages have to be done before trying to run the vagrant:
    1. If you're going through proxy in your network you'll have to configure it as an environment variable under http_proxy and htttps_proxy (What about no_proxy?)
      Restart your cmd for the changes to take affect. You can type set <ENV_VAR_NAME> and see if the environment variables were saved.
    2. In the virtualbox you need to set the networking settings as followed: (Need to add screenshots to each stage)
      1. Open oracle VM VirtualBox Manager and click on file→Preferences
      2. Go to Network tab and there click on Host-only Networks tab
      3. Click on the icon for adding a new network adapter
      4. After the new adapter has been created click select in from the list, right-click->edit
      5. Change the IPv4 Address to Be: 192.168.50.1
    3. Go to the folder you've cloned the vagrant to and type in the command: vagrant plugin install vagrant-proxyconf. This is the plugin that will take care of the proxy configuration inside the vagrant.
    4. The following files in the project needs to be changed from Windows style(CR LF) to Unix style(LF): lib/_composed_functions, lib/_onap_functions, lib/commons, lib/functions, lib/sdc.
      You can do the following by using on windows for example by using notepad++ and right clicking on the lower right bottom where it writes Windows(CR LF) and select Unix(LF).
    5. Copy the scripts, environments folders from the sdc-os-chef project in the sdc repository(What if they don't have it on their computer?) to vagrant-onap/opt folder
      Also in the utils folder in sdc there is the webseal-simulator project. From there also copy the contents of the scripts folder to vagrant-onap/opt/scripts
      Download the config.zip file from here and extract the contents to vagrant-onap/opt/config
      config.zip
    6. Edit the Template.json in /sdc-os-chef/environments/Template.json fill relevant fields for chef environment JSON.
      Latest Template.json https://gerrit.onap.org/r/gitweb?p=sdc.git;a=blob;f=sdc-os-chef/environments/Template.json;hb=HEAD
  3. The next changes needs to be applied to the code in order for the vagrant to work as we want it:
    (Some of the changes here should be merged in the code in future updates so We'll update this guide accordingly)
    1. In the Vagrantfile in the main folder in the bottom of the configuration clause change the next values to the following:

      Code Block
      languageruby
      configuration = {
      	'build_image' => 'False',
      	'clone_repo' => 'False',
      	'compile_repo' => 'False',
      	'skip_get_images' => 'True',
      	'skip_install' => 'False'
      }
    2. In the script file lib\sdc the following changes should be applied:
      1. In the function install_sdc after the call to init_data_folders replace the cp and chmod commands block  to the following:

        Code Block
        languagebash
        cp /opt/environments/Template.json /data/environments
        cp /opt/scripts/docker_run.sh /data/scripts
        cp /opt/scripts/docker_health.sh /data/scripts
        cp /opt/scripts/docker_login.sh /data/scripts
        cp /opt/scripts/docker_clean.sh /data/scripts
        cp /opt/scripts/simulator_docker_run.sh /data/scripts
        chmod +x /data/scripts/docker_run.sh
        chmod +x /data/scripts/docker_health.sh
        chmod +x /data/scripts/docker_login.sh
        chmod +x /data/scripts/docker_clean.sh
        chmod +x /data/scripts/simulator_docker_run.sh

...