...
- Clone the integration project: git clone http://gerrit.onap.org/r/integration/devtool.
- The next stages have to be done before trying to run the vagrant:
- 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. - In the virtualbox you need to set the networking settings as followed: (Need to add screenshots to each stage)
- Open oracle VM VirtualBox Manager and click on file→Preferences
- Go to Network tab and there click on Host-only Networks tab
- Click on the icon for adding a new network adapter
- After the new adapter has been created click select in from the list, right-click->edit
- Change the IPv4 Address to Be: 192.168.50.1
- 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.
- 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). - 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 - 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
- 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?)
- 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)In the Vagrantfile in the main folder in the bottom of the configuration clause change the next values to the following:
Code Block language ruby configuration = { 'build_image' => 'False', 'clone_repo' => 'False', 'compile_repo' => 'False', 'skip_get_images' => 'True', 'skip_install' => 'False' }
- In the script file lib\sdc the following changes should be applied:
In the function install_sdc after the call to init_data_folders replace the cp and chmod commands block to the following:
Code Block language bash 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
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 language bash #bash /data/scripts/docker_run.sh -e $ENV_NAME -l
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 language bash if [[ "$skip_get_images" == "False" ]]; then get_sdc_images if [[ "$skip_install" == "False" ]]; then install_sdc fi fi
This is after:
Code Block language bash 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.
...