|
|
This page provides guidelines about the installation of the VM4SEC Dashboard. The dashboard is currently based on a free online template available at <https://mdbootstrap.com>.
|
|
|
This page provides guidelines about the installation of the VM4SEC Dashboard. The dashboard is currently based on a free online template available at https://mdbootstrap.com.
|
|
|
|
|
|
The dashboard relies on [React](https://reactjs.org/) for building dynamic web pages with shareable elements among different pages.
|
|
|
|
... | ... | @@ -9,6 +9,7 @@ Documentation for these frameworks can be found directly on their site. |
|
|
All of these libraries are provided under MIT License and thus are free to use in the VM4SEC project.
|
|
|
|
|
|
# Repository organization
|
|
|
|
|
|
Directories and files:
|
|
|
|
|
|
- `.` contains the license, the README, and some project-level configuration files used by NodeJS.
|
... | ... | @@ -22,49 +23,42 @@ Directories and files: |
|
|
- `.env-default` contains all environment variables that hold host configurations (e.g., URLS) for each backend service.
|
|
|
|
|
|
# Installation of VM4SEC Dashboard
|
|
|
|
|
|
- **Step 1**: Clone the latest VM4SEC Dashboard version that can be found in [this link](https://gitlab.seis.iti.gr/vm4sec/vm4sec-dashboard.git) and navigate to the root directory.
|
|
|
- **Step 2**: To deploy the application you have to first install all the dependencies used. Open cmd and run the following command:
|
|
|
|
|
|
```bash
|
|
|
npm install
|
|
|
```
|
|
|
|
|
|
- **Step 3**: Next, you must create an empty `.env` file in the root directory of the application. Then, copy the contents of the `.env-default` file (also found in root directory) inside the `.env` file.
|
|
|
|
|
|
> **Important Notice:** The `.env` file contains all environment variables that hold host configurations for each required backend service (i.e., the endpoints of the *Project Management*, the *Quantitative Security Assessment* and the *Vulnerability Prediction* services). In case you have installed these services locally on your premises, you will need to modify these environment variables accordingly, by providing the correct IP and PORT. Remember to restart the application each time you modify this file.
|
|
|
> **Important Notice:** The `.env` file contains all environment variables that hold host configurations for each required backend service (i.e., the endpoints of the _Project Management_, the _Quantitative Security Assessment_ and the _Vulnerability Prediction_ services). In case you have installed these services locally on your premises, you will need to modify these environment variables accordingly, by providing the correct IP and PORT. Remember to restart the application each time you modify this file.
|
|
|
|
|
|
- **Step 4**: Finally, you can start the VM4SEC Dashboard server and a web page should open on your favorite browser. Open cmd and run the following command:
|
|
|
|
|
|
```bash
|
|
|
npm start
|
|
|
```
|
|
|
- **Step 5**: Visit http://localhost:3000/ to navigate to the VM4SEC dashboard. You should be able to access the dashboard home page.
|
|
|
|
|
|
- **Step 5**: Visit [http://localhost:3000/](http://localhost:3000/) to navigate to the VM4SEC dashboard. You should be able to access the dashboard home page.
|
|
|
|
|
|
# Installation of SDK4ED Dashboard using Docker (recommended)
|
|
|
Alternatively, you can install the VM4SEC Dashboard using Docker.
|
|
|
- **Step 1**: Download and install [Docker](https://www.docker.com/).
|
|
|
- **Step 2**: Clone the latest VM4SEC Dashboard version that can be found in [this link](https://gitlab.seis.iti.gr/vm4sec/vm4sec-dashboard.git) and navigate to the root directory.
|
|
|
- **Step 3**: Open cmd and copy `.env-default` to `.env`:
|
|
|
- **Step 2**: Clone the latest VM4SEC Dashboard version that can be found in the present Gitlab repository and navigate to the root directory.
|
|
|
- **Step 3**: **Important** Configure `.env-default` file based on your needs. The `.env-default` file contains all environment variables that hold host configurations for each required backend service (i.e., the endpoints of the *Project Management*, the *Quantitative Security Assessment* and the *Vulnerability Prediction* services). In case you have installed these services locally on your premises, you will need to modify these environment variables accordingly, by providing the correct IP and PORT.
|
|
|
- **Step 4**: In the home directory of the VM4SEC Dashboard, open cmd and execute the following command:
|
|
|
```
|
|
|
cp ./.env-default ./.env
|
|
|
```
|
|
|
> **Important Notice:** The `.env` file contains all environment variables that hold host configurations for each required backend service (i.e., the endpoints of the *Project Management*, the *Quantitative Security Assessment* and the *Vulnerability Prediction* services). In case you have installed these services locally on your premises, you will need to modify these environment variables accordingly, by providing the correct IP and PORT. Remember to restart the application each time you modify this file.
|
|
|
- **Step 4**: Open cmd and run:
|
|
|
```
|
|
|
sudo docker run -it \
|
|
|
--publish 3000:3000 \
|
|
|
--name vm4sec-dashboard \
|
|
|
--mount src=<path_to_vm4sec-dashboard_folder>,target=/mounted_folder,type=bind \
|
|
|
node
|
|
|
docker build -t vm4sec-dashboard-image .
|
|
|
```
|
|
|
This command will result in the creation of a Docker Image named *vm4sec-dashboard-image*. In order to create and start a Docker Container from this image, execute the following command:
|
|
|
- **Step 5**: Open cmd and run:
|
|
|
```
|
|
|
sudo docker exec -it vm4sec-dashboard bash
|
|
|
```
|
|
|
This command will generate and run a Docker Container named vm4sec-dashboard in interactive session mode, i.e. it will open a command promt inside the Container.
|
|
|
- **Step 5**: While in interactive session mode run:
|
|
|
```
|
|
|
cd mounted_folder
|
|
|
npm install
|
|
|
npm start
|
|
|
docker run -t -d --name vm4sec-dashboard -p 3000:3000 vm4sec-dashboard-image
|
|
|
```
|
|
|
- **Step 6**: Visit http://localhost:3000/ to navigate to the VM4SEC dashboard (change the port accordingly in case you updated it in the `docker run` command). You should be able to access the dashboard home page.
|
|
|
This command will generate and run a Docker Container named *vm4sec-dashboard* in detach mode, i.e. the Node server hosting the dashboard will start in the background.
|
|
|
- **Step 6**: You can now visit http://localhost:3000/ to navigate to the VM4SEC dashboard (change the port accordingly in case you updated it in the `docker run` command). You should be able to access the dashboard home page.
|
|
|
|
|
|
# MongoDB
|
|
|
|
... | ... | @@ -80,4 +74,4 @@ docker run --detach \ |
|
|
mongo
|
|
|
```
|
|
|
|
|
|
It should be noted that a _volume _is necessary in order to permanently store the results of the analysis. If this parameter is not set, the results that are stored in the database are lost every time you restart the docker container. |
|
|
\ No newline at end of file |
|
|
It should be noted that a \_volume \_is necessary in order to permanently store the results of the analysis. If this parameter is not set, the results that are stored in the database are lost every time you restart the docker container. |
|
|
\ No newline at end of file |