Skip to content

Commit 17b0c81

Browse files
authored
Merge pull request #30 from Resgrid/develop
Updating documentation.
2 parents 11e9024 + ff5c438 commit 17b0c81

4 files changed

Lines changed: 169 additions & 29 deletions

File tree

docs/self-hosted/installation.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ sidebar_position: 2
66

77
The overall installation of Resgrid is tailored to your specific usage scenarios and will require first procuring the required numbers of servers or VM's and continuing the installation process. If your department will have 50 or less users and units utilizing it at one time, we recommend using the Quick Start.
88

9+
:::danger Warranty
10+
Resgrid's self hosted version is provided with no warranty, no guarantee of suitability and limited free support (Github Issues and Discussions only).
11+
Updates for our self hosted version are infrequent compared to our hosted version due to the additional cost in time to create those releases. We try
12+
our best to ensure an easy and working system that doesn't require a lot of tweaking, but due to it's complexity that is difficult.
13+
:::
14+
915
## Prerequisites
1016

1117
Resgrid's recommended install is on Ubuntu 24.04 with Docker to meet the Small sizing install requirements you will need a minimum of 5 servers:

docs/self-hosted/laptop.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ sidebar_position: 3
66

77
In this guide we will get Resgrid up in running via Docker Compose for local (single user) use on a Windows computer.
88

9+
:::danger Warranty
10+
Resgrid's self hosted version is provided with no warranty, no guarantee of suitability and limited free support (Github Issues and Discussions only).
11+
Updates for our self hosted version are infrequent compared to our hosted version due to the additional cost in time to create those releases. We try
12+
our best to ensure an easy and working system that doesn't require a lot of tweaking, but due to it's complexity that is difficult.
13+
:::
14+
915
## Use Case
1016

1117
This setup is intended to get Resgrid up and running on a single-user environment, like a laptop that will not be connected to or have internet access. No external users (i.e. from another machine or mobile device) will be connecting to this installation. For example you are coordinate rescue and recovery efforts for a hurricane from a location on your laptop, you are communicate with your field teams only via a radio as there is no power or cell phone data/WiFi Internet.

docs/self-hosted/quick-start.md

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ sidebar_position: 1
66

77
In this quick start we will get Resgrid up in running via Docker Compose for testing and evaluation. This quick start is valuable for getting the system up and running quickly for evaluation or testing purposed, but is not the recommended setup for production use.
88

9+
:::danger Warranty
10+
Resgrid's self hosted version is provided with no warranty, no guarantee of suitability and limited free support (Github Issues and Discussions only).
11+
Updates for our self hosted version are infrequent compared to our hosted version due to the additional cost in time to create those releases. We try
12+
our best to ensure an easy and working system that doesn't require a lot of tweaking, but due to it's complexity that is difficult.
13+
:::
14+
915
## Prerequisites
1016

1117
1.) Server or VM that meets the System Requirements below
@@ -73,41 +79,20 @@ We recommend using Docker (or Docker-CE) as the container system as it's what we
7379

7480
Download and Extract Package
7581

76-
1. Clone the setup scripts for the all-in-one QuickStart:
82+
Clone the setup scripts for the all-in-one QuickStart:
7783

7884
```bash
7985
git clone https://github.com/Resgrid/resgrid-setup.git resgrid
8086
```
8187

8288
You should now have a folder called resgrid in your current directory.
8389

84-
2. Open the resgrid directory:
90+
Open the resgrid directory:
8591

8692
```bash
8793
cd resgrid
8894
```
8995

90-
3. Verify and Set mmap counts
91-
92-
First run the command below to get your current mmap counts
93-
94-
```bash
95-
sysctl vm.max_map_count
96-
```
97-
98-
If the value returned is less then 262144 run the following commands
99-
100-
```bash
101-
sudo sysctl -w vm.max_map_count=262144
102-
sudo nano /etc/sysctl.conf
103-
```
104-
105-
Find the vm.max_map_count value and set to 262144 and save the file. If you can't find the value add it to the bottom of the file.
106-
107-
```
108-
vm.max_map_count=262144
109-
```
110-
11196
## Setting Environment Variables
11297

11398
Edit the environment file:
@@ -155,22 +140,29 @@ The Resgrid Event Hub (5153) is a SignalR hub that utilized Web Sockets for real
155140

156141
## Run the Docker Compose
157142

158-
Once you have setup the environment variables you can now run the docker compose file.:
143+
Once you have setup the environment variables you can now run the docker compose file:
159144

160145
```bash
161-
docker compose up
146+
./run.sh
162147
```
163148

164-
That will run the interactive version of the containers, Ctrl+C will stop the containers.
149+
:::tip Note
150+
The run script will require sudo. If you want to run without sudo just create a sql directory under the docker-data directory and you can use "docker compose up -d" command instead.
151+
:::
165152

166-
If you want to run the containers in the background, use the -d option:
153+
The Resgrid system will take about 5 minutes to start up fully, this is due to the startup order of the containers. The last container to startup will be the web container, once that one is ready, you can now access the system.
154+
155+
To get log output you can run:
167156

168157
```bash
169-
docker compose up -d
158+
docker compose logs
170159
```
171160

172-
The Resgrid system will take about 5 minutes to start up fully, this is due to the startup order of the containers. The last container to startup will be the web container, once that one is ready, you can now access the system.
161+
Or if you need to get output from a specific container just supply the name of the container from the docker-compose.yml file, for example:
173162

163+
```bash
164+
docker compose logs worker
165+
```
174166

175167
## Important Note About Support
176168

docs/self-hosted/rick.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
---
2+
sidebar_position: 4
3+
---
4+
5+
# Offline Multi-User
6+
7+
In this guide we will get Resgrid up in running in a Portable, Offline mode that
8+
9+
:::danger Warranty
10+
Resgrid's self hosted version is provided with no warranty, no guarantee of suitability and limited free support (Github Issues and Discussions only).
11+
Updates for our self hosted version are infrequent compared to our hosted version due to the additional cost in time to create those releases. We try
12+
our best to ensure an easy and working system that doesn't require a lot of tweaking, but due to it's complexity that is difficult.
13+
:::
14+
15+
## Use Case
16+
17+
This setup is intended to get Resgrid up and running on a single-user environment, like a laptop that will not be connected to or have internet access. No external users (i.e. from another machine or mobile device) will be connecting to this installation. For example you are coordinate rescue and recovery efforts for a hurricane from a location on your laptop, you are communicate with your field teams only via a radio as there is no power or cell phone data/WiFi Internet.
18+
19+
## System Requirements
20+
21+
1.) Windows 10 or Windows 11 Laptop with WSL2 (Windows Subsystem for Linux)
22+
2.) Docker Desktop with WSL2 Enabled
23+
3.) Enough HDD Space to handle Mapping Data (if you want a large region like North America you'll need 30+ GB)
24+
4.) 4 or more Core Processor
25+
5.) 16GB or more of RAM
26+
27+
## Setup Notice
28+
29+
There is no redundancy, backup or fail-over in this setup. Everything runs on the local computer and is not intended to be accessed by anyone off of the local computer. If the local computer gets damaged this could result in loss of data. It's recommend that you have a USB drive that you can backup the database to (ideally the whole resgrid directory) periodically during the operation.
30+
31+
## Prerequisites & Dependencies
32+
33+
1. Update Windows
34+
2. Install WSL2 and Ubuntu 22.04 <https://documentation.ubuntu.com/wsl/en/latest/guides/install-ubuntu-wsl2/>
35+
3. Open up your Ubuntu 22.04 instance and finalize the setup (set password).
36+
4. Install Docker <https://docs.docker.com/desktop/wsl/> and enable WSL2 backend.
37+
38+
## Docker Compose Setup
39+
40+
1. Open Notepad as Administrator and open C:\Windows\System32\drivers\etc\hosts file.
41+
42+
2. Add the following lines to the hosts file and save.
43+
```
44+
127.0.0.1 rg.mylocal
45+
127.0.0.1 rgapi.mylocal
46+
127.0.0.1 rgevents.mylocal
47+
127.0.0.1 rgtile.mylocal
48+
```
49+
50+
If you get a permissions error you didn't open up Notepad as Administrator, also don't use any RichText editor (Wordpad, Word, etc).
51+
52+
3. Navigate to Geofabrik <https://download.geofabrik.de/> and download the .osm.pbf file the region you will be operating in.
53+
54+
It is not recommend to try and pull an entire Sub Region (i.e. North America) as that will take quite a long time to import into the database. Instead it's recommended to import and additional Sub (Sub) Region, like a US State (i.e. Florida) or a Special Sub Region if they are available (i.e. US South).
55+
56+
4. Using the Windows File Explorer move the osm.pbf file into Linux (left side bar) Ubuntu-22.04, home and your username folder. This will put it in your home directory.
57+
58+
5. Start your Ubuntu-22.04 WSL2 Instance so the command prompt is visible.
59+
60+
6. Clone the setup scripts for the Laptop compose:
61+
62+
```bash
63+
git clone https://github.com/Resgrid/resgrid-setup.git -b laptop resgrid
64+
```
65+
66+
You should now have a folder called resgrid in your current directory.
67+
68+
7. Open the resgrid directory:
69+
70+
```bash
71+
cd resgrid
72+
```
73+
74+
8. Import the osm.pbf you downloaded and placed in your home directory into the tile server. Change /home/yourname/yourregion.osm.pbf in the command below to the correct home directory name (yourname) and the name of the region file you downloaded (yourregion).
75+
76+
```bash
77+
docker run \
78+
-v /home/yourname/yourregion.osm.pbf:/data/region.osm.pbf \
79+
-v ./docker-data/osm:/data/database/ \
80+
overv/openstreetmap-tile-server \
81+
import
82+
```
83+
84+
If the container exits without errors, then your data has been successfully imported and you are now ready to run the tile server. If you selected a very large region, like North America this process can take days.
85+
86+
87+
## Run the Docker Compose
88+
89+
Once you have setup the environment variables you can now run the docker compose file in the resgrid directory:
90+
91+
```bash
92+
docker compose up
93+
```
94+
95+
That will run the interactive version of the containers, Ctrl+C will stop the containers.
96+
97+
If you want to run the containers in the background, use the -d option:
98+
99+
```bash
100+
docker compose up -d
101+
```
102+
103+
The Resgrid system will take about 5 minutes to start up fully, this is due to the startup order of the containers. The last container to startup will be the web container, once that one is ready, you can now access the system.
104+
105+
106+
## Initial Web Login
107+
108+
Open up your web browser and navigate to **https://rg.mylocal**, **https://rgapi.mylocal**, **https://rgevents.mylocal** and **https://rgtile.mylocal**. You will need to accept the self-signed cert for each url and add exceptions in the browsers. You can follow this guide <https://it.nmu.edu/docs/adding-security-exception-your-browser> to add those exceptions.
109+
110+
Once you have completed the steps above you will be able to log into the web applications user interface. Open up a web browser and navigate to **https://rg.mylocal**, you will then be prompted by the login screen. Your default administrator credentials are **admin/changeme1234**. Once you log into the system it’s recommended that you change your admin password from the Edit Profile page by clicking on the Administrator name in the upper left hand corner.
111+
112+
## Updating
113+
114+
To update Resgrid you'll need to stop the system, clear the current containers and restart.
115+
116+
Stop all running containers.
117+
118+
```bash
119+
docker compose down
120+
```
121+
122+
Remove all cached images (to ensure we get new ones).
123+
124+
```bash
125+
docker rmi -f $(docker images -aq)
126+
```
127+
128+
Restart the containers and they will pull new containers.
129+
130+
```bash
131+
docker compose up -d
132+
```
133+
134+
## What's Next?
135+
136+
This Quick Start gets the system running via local host, but not externally or within your network. You will need to create DNS entries in your internal or external DNS server to point to the server that is running the containers. It's also recommend you change some default values in the resgrid.env file to ensure proper security.

0 commit comments

Comments
 (0)