...
- Clone the integration project: git clone httpshttp://gitgerrit.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
...
This is a link to list of common commands to run from the vagrant: SDC Vagrant Common Commands (Deprecated since Guilin)
In order to close the vagrant in safe state (saving all your deployed container and images) you need to open once again the oracle VM VirtualBox Manager, right click the sdc vagrant, move your cursor to the close option and there choose save state.
...
Add DOCKER_HOST to environment variables with the value: tcp://192.168.50.5:2375
(This is the ip of the vagrant, We're using private network settings in our vagrant to allow our dockers to comunicate with each other without using proxy configurations. The ip list can be found in the Vagrantfile int the nodes array)Run mvn clean install and build the whole project.
Code Block language bash mvn clean install -P docker
Note You'll have to make sure that your vagrant is up and running before doing so or else it won't work
- After this process is done go to your vagrant and run docker images to check that your local images are on the machine
In order to deploy your local images without pulling the latest images from the nexus you'll need to run the docker_run script with the local flag like so:
Code Block language bash /data/scripts/docker_run.sh -l
(This command and all other commands can be found here: SDC Vagrant Common Commands (Deprecated since Guilin))
Setting up the Webseal-Simulator
...