Example usage to bring up a developer environment

In the example, we will bring up a single ONAP component using the Devtool ONAP tool.

There are multiple scenarios in which this tool can be made use of by a developer, they usually fall in the following use cases.

Example steps for setting up a development environment for VFC project.

In this example we will be using Devtool ONAP to get all the source code of VFC project and the developer can point the IDE to the cloned repo in the ./opt directory and start the development process.

$ ./tools/run.sh vfc

At the end of the setup process, all the VFC related source code will be present in the devtool/opt/ directory. The developer can point an IDE to this directory and start contributing. When the changes are done, the developer can SSH into the VM running VFC and tests can be executed by running Maven for Java and Tox for Python from the ~/opt/vfc directory.

$ vagrant ssh vfc
$ cd ~/opt/onap/vfc/<vfc-subrepo>
$ tox -e py27

This way the tool helps the developer to clone repos of a particular project, without having to manually search for repos and setup an environment.

Also, if something gets messed up in the VM, the developer can tear down the VM and spin a fresh one without having to lose the changes made to the source code since the ./opt files are in sync from the host to the VM.

$ vagrant destroy vfc

Testing

Use the run.sh script to test if the provisioning scripts run without errors.

And example test to check the number of covered repositories with this tool.

$ ./tools/run.sh testing -y -c coverity_repos -s functions