From ccea25133cbd6896a2cd082a12f0954e0d01e90e Mon Sep 17 00:00:00 2001 From: Matthew Grove Date: Fri, 10 Feb 2023 16:00:21 +0000 Subject: [PATCH] [DOCS] Add "choosing how to deploy" section Also tidy up formatting and remove old comments --- docs/source/deployment.md | 71 +++++++++++++-------------------------- 1 file changed, 23 insertions(+), 48 deletions(-) diff --git a/docs/source/deployment.md b/docs/source/deployment.md index 436a17a..6608063 100644 --- a/docs/source/deployment.md +++ b/docs/source/deployment.md @@ -1,9 +1,15 @@ +# Deployment The BRECcIA Network Mapper can be deployed in a variety of ways, most of which utilise Docker. Ansible deployment has been tested on RHEL7 and RHEL8. +## Choosing How to Deploy -# Ansible +If you are an organisation deploying the app on a server, [Ansible](#ansible) is recommended. If Ansible is not used with your server, [Docker Compose](#docker-compose) or [][Vagrant](#vagrant) are recommended. + +If you are an individual deploying the app on your local machine, [Docker Desktop](#docker-desktop) is recommended. However, if you are planning on making the app accessible to other people (outside your computer), we advise deploying the app on a server. + +## Ansible Prerequisites: @@ -15,22 +21,10 @@ Deployment with Ansible has been tested on RHEL7 and RHEL8, but is compatible wi To deploy the BRECcIA Network Mapper with Ansible: - - 1. Download and extract the deployment files from [the latest release](https://github.com/Southampton-RSG/breccia-mapper/releases/latest): ```bash - curl https://github.com/Southampton-RSG/breccia-mapper/releases/latest/download/deploy-ansible.tar | tar xzv && cd deploy-ansible + curl https://github.com/Southampton-RSG/breccia-mapper/releases/latest/download/deploy-ansible.tar | tar xzv && cd network-mapper ``` 2. Copy your logo (192x192 pixels) to `icon-192x192.png` in this folder. @@ -49,9 +43,9 @@ set provision_superuser to false if was changed ``` 6. Edit this file to reflect your Ansible setup: - - Use your server's hostname instead of `example.com` + - Use your server's hostname instead of `example.com` 7. If you would like a new superuser to be provisioned (e.g. during initial install), edit the `provision_superuser` variable in `playbook.yml` to `true`. - - Then change the `superuser_*` options below it as desired. + - Then change the `superuser_*` options below it as desired. 8. Run the Ansible playbook `playbook.yml` with this inventory file using: ```bash @@ -66,7 +60,7 @@ If you changed the `provision_superuser` variable in `playbook.yml` to `true`, r ::: -# Docker Compose +## Docker Compose Prerequisites: @@ -76,23 +70,12 @@ Prerequisites: Deployment with Docker has been tested on RHEL7, RHEL8, and Ubuntu 22.04 LTS ::: - - To deploy the BRECcIA Network Mapper with Docker: 1. Download and extract the deployment files from [the latest release](https://github.com/Southampton-RSG/breccia-mapper/releases/latest): ```bash - curl https://github.com/mgrove36/Southampton-RSG/releases/latest/download/deploy-docker.tar | tar xzv && cd deploy-docker + curl https://github.com/mgrove36/Southampton-RSG/releases/latest/download/deploy-docker.tar | tar xzv && cd network-mapper ``` 2. Copy your logo (192x192 pixels) to `icon-192x192.png` in this folder. @@ -125,30 +108,19 @@ To deploy the BRECcIA Network Mapper with Docker: If you don't create a superuser when you first deploy the app, you will be unable to log in. ::: -# Vagrant +## Vagrant Prerequisites: - [Vagrant](https://www.vagrantup.com/) - [Ansible](https://www.ansible.com/) - - To deploy the BRECcIA Network Mapper with Vagrant: 1. Download and extract the deployment files from [the latest release](https://github.com/Southampton-RSG/breccia-mapper/releases/latest): ```bash - curl https://github.com/mgrove36/Southampton-RSG/releases/latest/download/deploy-vagrant.tar | tar xzv && cd deploy-vagrant + curl https://github.com/mgrove36/Southampton-RSG/releases/latest/download/deploy-vagrant.tar | tar xzv && cd network-mapper ``` 2. Copy your logo (192x192 pixels) to `icon-192x192.png` in this folder. @@ -160,12 +132,12 @@ To deploy the BRECcIA Network Mapper with Vagrant: 4. Edit this file as desired. Note that some variables are required. 5. If you would like a new superuser to be provisioned (e.g. during initial install), edit the `provision_superuser` variable in `playbook.yml` to `true`. - - Then change the `superuser_*` options below it as desired. + - Then change the `superuser_*` options below it as desired. 6. To change where the app is accessible from, edit the `config.vm.network` line in `Vagrantfile`. - - By default, the app is accessible only from `http://localhost:8080`. - - To make it available from any IP address, replace `host: 8080, host_ip: "127.0.0.1"` with `host: 8080`. - - To change the port the app is available on, edit `host: 8080`. - - More details are available in the [Vagrant docs](https://developer.hashicorp.com/vagrant/docs/networking). + - By default, the app is accessible only from `http://localhost:8080`. + - To make it available from any IP address, replace `host: 8080, host_ip: "127.0.0.1"` with `host: 8080`. + - To change the port the app is available on, edit `host: 8080`. + - More details are available in the [Vagrant docs](https://developer.hashicorp.com/vagrant/docs/networking). 6. Start the virtual machine: ```bash @@ -183,4 +155,7 @@ To deploy the BRECcIA Network Mapper with Vagrant: To stop the virtual machine, run `vagrant halt` in this directory. More commands are explained in the [Vagrant docs](https://developer.hashicorp.com/vagrant/docs/cli). ::: - +## Docker Desktop + +Coming soon. +