RADAR Vagrant Virtual Machine

In order to make the development environment setup for RADAR easy, a blueprint for a provisioned Virtual Machine (VM) has been created using Vagrant.

You can find the files in the Bitbucket repository: radar-vagrant

The files needed are shown below:

They will need to be cloned from the repository to a local directory.

Starting the Virtual Machine

In order to start the VM Vagrant must be installed on your machine. The latest version can be downloaded from: https://www.vagrantup.com/

The VM software Vagrant uses for the RADAR machine is Oracles's VirtualBox which also needs to be installed. The latest version can be downloaded from: https://www.virtualbox.org/wiki/Downloads

Once these two dependencies are installed Vagrant needs to have a helper plugin installed, which can be downloaded and installed with the below command:

This plugin automatically detects and installs Guest Additions on the guest Operating System, if this is not done the VM will not boot. This due to having a shared folder implemented in the Vagrantfile file that requires Guest Additions.

Once this is done enter the directory you have cloned all the radar-vagrant repository to and start VM using below command:

   

This command will start the VM and if it is the first time provision it too. You will find a new window has been opened with the VM's Xfce GUI in it.

To login use the preset vagrant user with the password: vagrant

This is also the root password.

Whats on the box?

The current software that is provisioned through the Vagrantfile and bootstrap file is as follows:

  • CentOS 7
  • Xfce GUI
  • Postgres 11
  • Python 2.7
  • Python 3.6 with dependencies for RADAR installed
  • Python 3.6 Virtual Environment
  • NodeJS 12 with dependencies for RADAR installed
  • Visual Studio Code
RADAR Directory layout on VM

Both client and back-end repositories including a virtual environment have been created in a directory called radar:


In the directory you will find radar which houses the back-end repository, radar-client contains front-end and radar_env contains the Python 3.6 Virtual Environment:

Developing RADAR on the VM

Please read the Radar Code Base Development  page for further information.

Ending it All

To shutdown the VM simply use the GUI or the Terminal, you can however get vagrant to shutdown the machine from host using:

This will stop the machine, if you want to start it again simply change into your radar-vagrant directory and type:

Which will boot up the VM in the state you shut it down, since the VM is already provisioned it will not go through the provisioning process meaning a faster boot.

To completely remove the VM you can use: