Versions Compared

Key

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

...

  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
      2. Also in the install_sdc function after the call install_docker, comment out the following row like so(This is a temporary fix until a formal fix will be merged):

        Code Block
        languagebash
        #bash /data/scripts/docker_run.sh -e $ENV_NAME  -l
      3. In the init_sdc function at the end of the file you should cut the if clause that wraps the function install_sdc and paste it outside of the if clause that wraps the get_sdc_images function(This is a temporary fix until a formal fix will be merged):
        This is before the cut:
        Code Block
        languagebash
        if [[ "$skip_get_images" == "False" ]]; then
                get_sdc_images
                if [[ "$skip_install" == "False" ]]; then
                       install_sdc
                fi
        fi

        This is after:

        Code Block
        languagebash
        if [[ "$skip_get_images" == "False" ]]; then
               get_sdc_images 
        fi
        
        if [[ "$skip_install" == "False" ]]; then
               install_sdc
        fi

Using the vagrant


After you've finish configuring the vagrant rom the vagrant-onap folder you can run in the cmd: vagrant up sdc to start the booting sequence of the vagrant. It should take a couple of minutes.

...