You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/dev/deployment.md
+90-27Lines changed: 90 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,16 @@
2
2
3
3
## Prerequisites
4
4
5
-
The application consists of two repositories: a [Spark-powered Java backend](https://github.com/conveyal/datatools-server) and a [Javascript frontend written with React and Redux](https://github.com/conveyal/datatools-ui). To install and deploy the application, you will need Java 8, Maven, Node/npm, yarn, and [mastarm](https://github.com/conveyal/mastarm).
5
+
The application consists of two repositories: a [Spark-powered Java backend](https://github.com/conveyal/datatools-server)
6
+
and a [Javascript frontend written with React and Redux](https://github.com/conveyal/datatools-ui).
7
+
To install and deploy the application, you will need Java 8, Maven, Node/npm,
8
+
yarn, and [mastarm](https://github.com/conveyal/mastarm).
6
9
7
-
User authentication is done via [Auth0](http://auth0.com). You will need an Auth0 account and application to use the Data Manager.
10
+
User authentication is done via [Auth0](http://auth0.com). You will need an
11
+
Auth0 account and application to use the Data Manager.
12
+
13
+
Two databases are required for the application: [MongoDB](https://www.mongodb.com/)
14
+
and a SQL database ([PostgreSQL](https://www.postgresql.org/) is recommended).
You'll then need to supply Auth0 account information (see below) and API keys for various services used in the application.
32
+
You'll then need to supply Auth0 account information (see below) and API keys
33
+
for various services used in the application.
26
34
27
-
The default `server.yml` (for `datatools-server`) and `settings.yml` (for `datatools-ui`) should work out of the box, but you may want to specify alternative settings files outside of these repositories. These can be specified as a directory during `datatools-ui` build with mastarm:
35
+
The default `server.yml` (for `datatools-server`) and `settings.yml` (for
36
+
`datatools-ui`) should work out of the box, but you may want to specify
37
+
alternative settings files outside of these repositories. These can be specified
38
+
as a directory during `datatools-ui` build with mastarm:
Application data storage (i.e., where projects, feed sources, and feed versions
80
+
are stored) is handled by MongoDB. There is no need to manually initialize a
81
+
database in MongoDB (MongoDB will handle this automatically if you prefer).
82
+
Connection details for MongoDB are also set in the server's `env.yml`:
83
+
```yaml
84
+
MONGO_URI: # defaults to localhost:27017 (MongoDB default) if empty
85
+
MONGO_DB_NAME: application_db
86
+
```
87
+
48
88
### Setting up Auth0
49
89
50
90
#### Creating account and application (client)
51
91
1. Create an [Auth0](https://auth0.com) account (free).
52
-
2. Once you've created an Auth0 account, create an application (client) in Auth0 to use with the Data Manager with the following settings:
53
-
- enable only `Username-Password-Authentication` connections (i.e., turn off Google)
92
+
2. Once you've created an Auth0 account, create an application (client) in Auth0
93
+
to use with the Data Manager with the following settings:
94
+
- enable only `Username-Password-Authentication` connections (i.e., turn off
95
+
Google)
54
96
- set `Use Auth0 instead of the IdP to do Single Sign On` to true
55
-
- update the following application- and account-level settings to include `http://localhost:9000` (or the domain where the application will be hosted):
97
+
- update the following application- and account-level settings to include
98
+
`http://localhost:9000` (or the domain where the application will be hosted):
56
99
- Account level (Account Settings > Advanced)
57
100
- Allowed logout URLs
58
101
- Application level
@@ -61,7 +104,10 @@ application:
61
104
- keep all other default settings
62
105
63
106
#### Creating your first user
64
-
Create your first Auth0 user through Auth0 web console (Users > Create User). In addition to an email and password, you'll need to supply the user with the following default application admin `app_metadata` (`user_metadata` should remain empty):
107
+
Create your first Auth0 user through Auth0 web console (Users > Create User). In
108
+
addition to an email and password, you'll need to supply the user with the
109
+
following default application admin `app_metadata` (`user_metadata` should
110
+
remain empty):
65
111
66
112
```json
67
113
{
@@ -78,7 +124,7 @@ Create your first Auth0 user through Auth0 web console (Users > Create User). In
78
124
}
79
125
```
80
126
81
-
#### Update `env.yml` for both
127
+
#### Update `env.yml` for server and UI repos
82
128
Update the following properties in **both** `env.yml` files to reflect the public Auth0 application settings:
83
129
84
130
```yaml
@@ -116,7 +162,6 @@ Build and deploy the frontend to s3 using npm script (which calls [mastarm](http
The application back-end should now be running at `http://localhost:9000` (or whatever port you specified in `server.yml`).
136
-
The front-end assets are pointed to by the back end at whatever s3 bucket name is specified in `server.yml` at `application.assets_bucket`.
180
+
The application back-end should now be running at `http://localhost:9000` (or
181
+
whatever port you specified in `server.yml`). The front-end assets are pointed
182
+
to by the back end at whatever s3 bucket name is specified in `server.yml` at
183
+
`application.assets_bucket`.
137
184
138
185
## Configuring Modules
139
186
140
-
The application contains a number of optional modules that each require their own configuration settings and resources. At minimum, each module must be set to `enabled: true` and may require additional configuration.
187
+
The application contains a number of optional modules that each require their
188
+
own configuration settings and resources. At minimum, each module must be set to
189
+
`enabled: true` and may require additional configuration.
190
+
191
+
**Note:** for `datatools-server` `v3.0.0`, the `editor` and `r5_network` should be
192
+
disabled because they have not been refactored to handle updates to the loading
193
+
of GTFS data into an RDBMS. Please use `v2.0.0` or wait for releases following
194
+
`v3.0.0`.
141
195
142
196
### Editor
143
197
@@ -150,13 +204,16 @@ Enables the GTFS Editor module.
150
204
- `MAPBOX_ACCESS_TOKEN`
151
205
- `R5_URL`(optional parameter for r5 routing in editor pattern drawing)
152
206
153
-
### Validator
207
+
### R5 network validation
154
208
155
-
While the application handles basic validation even without the validator module enabled, the validator allows for enhanced accessibility- and map-based validation.
209
+
While the application handles basic validation even without the `r5_network`
210
+
module enabled, this module allows for enhanced accessibility- and map-based
211
+
validation.
156
212
157
213
#### List of configuration settings
158
214
159
-
- `OSM_VEX`- `datatools-server:env.yml` the validator requires the URL of a running instance of the [OSM vex server](https://github.com/conveyal/vanilla-extract).
215
+
- `OSM_VEX`- `datatools-server:env.yml` the validator requires the URL of a
216
+
running instance of the [OSM vex server](https://github.com/conveyal/vanilla-extract).
160
217
161
218
162
219
### Sign Configurations
@@ -189,26 +246,31 @@ Enables the OTP automated deployments module.
189
246
190
247
#### List of configuration settings
191
248
192
-
- `OSM_VEX`- `datatools-server:env.yml` the validator requires the URL of a running instance of the [OSM vex server](https://github.com/conveyal/vanilla-extract).
249
+
- `OSM_VEX`- `datatools-server:env.yml` the validator requires the URL of a
250
+
running instance of the [OSM vex server](https://github.com/conveyal/vanilla-extract).
193
251
194
252
### GTFS API
195
253
196
-
Supports other modules with API endpoints for getting GTFS entities (routes, stops, etc.)
254
+
Supports other modules with API endpoints for getting GTFS entities (routes,
255
+
stops, etc.)
197
256
198
257
#### List of configuration settings
199
258
200
259
- `load_on_fetch`- whether to load GTFS feeds when new feed is detected
201
260
- `load_on_startup`- whether to load GTFS feeds on application startup
202
261
- `use_extension`- which extension to connect to
203
-
- `update_frequency`- update frequency for GTFS API (in seconds). Comment out to disable updates.
262
+
- `update_frequency`- update frequency for GTFS API (in seconds). Comment
263
+
out to disable updates.
204
264
205
265
## Configuring Extensions
206
266
207
-
The application supports integration with several third-party resources for retrieving feeds.
267
+
The application supports integration with several third-party resources for
268
+
retrieving feeds.
208
269
209
270
### Integration with [transit.land](https://transit.land/)
210
271
211
-
Ensure that the `extensions:transitland:enabled` flag is set to `true` in `config.yml`:
272
+
Ensure that the `extensions:transitland:enabled` flag is set to `true` in
273
+
`config.yml`:
212
274
213
275
```yaml
214
276
extensions:
@@ -219,7 +281,8 @@ extensions:
219
281
220
282
### Integration with [TransitFeeds](http://transitfeeds.com/)
221
283
222
-
Ensure that the `extensions:transitfeeds:enabled` flag is set to `true` in `config.yml`, and provide your API key:
284
+
Ensure that the `extensions:transitfeeds:enabled` flag is set to `true` in
0 commit comments