BCH Star Registry Virtual Machine Documentation

This page and its children are part of the supporting documentation for the Virtual Machine developed for the BCH Star Registries version of RADAR to be deployed on.

What is on the VM

ItemSoftware
Operating SystemCentOS 7
Firewallfirewalld
Proxy ServerNGINX
DatabasePostgres 11
Front End NodeJS 11
Back EndPython 3.6

The current VM was built using Virtual Box however this is not what is going to be deployed when BCH RADAR enters production(which will be created using a VMware VM). 

The virtual machine is copied to the RR-SFTP server where it can be picked up by the BCH(details can be found on the Systems team KeePass password app (R:\0 Systems\KeePassX). The directory to copy it too is "/data/bch_star/outgoing/" at the moment there are several copies of the VM in the directory, one with config changes(which is the current VM) it can be identified as having "CONFIG" in the folder name. 

BCH RADAR

Both the BCH RADAR front and back end are in the same GitHub repositories that RADAR is in, the code for each is on the "bch" branch of each repository. The BCH RADAR code should ideally be in separate repositories as it has already diverged from the RADAR code base.

Deploying BCH RADAR is the same as deploying RADAR(RaDaR), the folder structure is slightly different however:

Above shows the "/root/bch_star_radar" directory on the VM this is where bot the front-end(radar-client) and back-end(radar) repositories are cloned from GitHub along with a Python 3.6(py36_env) and Python 2.7(py27_env) virtual environment. These can be used to do the deployment directly onto the VM rather than using fabric to do it remotely. 

Deployed Code

Above is where the built and deployed code is that is running(/srv/bch_star_radar). The "app" directory is the for the front-end and the "api" folder is for the back-end, again the same as RADAR inside each directory is a directory with the version number as the directory name and then a directory called "current" which is a symlink to the current running versions directory.

NGINX Proxy

NGINX is used as a proxy and its service needs to be running to enable the front-end to be served and traffic to the back-end to be routed back and forth as the the API runs on localhost. It's config files can be found at "/etc/nginx/" and "/etc/nginx/conf.d".

Configuration

BCH RADAR needs to have some configuration input into some of the database tables, either done by migrating a database or using the admin interface.  There is a version deployed at http://10.229.229.39/#/ you can use as a template for the database etc.

Starting BCH STAR RADAR

In the virtual machine there are a number of services that need to be running to enable BCH STAR RADAR to be served from the VM and function correctly these can be manipulated with systemctl/systemd.

Services

Currently there are three services that need to be running:

Creating a Virtual Machine

The current virtual machine is a VirtualBox virtual machine, using Vagrant allows you to easily create a Virtual Machine from a script. You will require both bits of software downloaded and installed onto your machine.

When both of these are installed you can create a directory and copy the below code into a file with no extension:

Accessing Virtual Machine

This page describes various ways of gaining access to the running BCH Star Registry Virtual Machine.

The two main ways of accessing the virtual machine are using a couple of free pieces of software, Putty and WinSCP:

Putty