-
Notifications
You must be signed in to change notification settings - Fork 4
/
README.txt
105 lines (77 loc) · 4.69 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
====
Copyright (c) 2008-${year}, Massachusetts Institute of Technology (MIT)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
====
NICS Database Setup
====================
There are 2 main scripts to note, along with the sql files they import:
- create_db.sh: A script file that can be executed to create the database as of a certain version. This script
should be updated for each release to include any incremental change SQL script file that is required for the
corresponding NICS version. The incremental change scripts should go into the 'changes' directory.
- create_data_dbs.sh: A script file that can be executed to create the following data related databases:
- nics_datalayers_postgis
- nics_datafeeds
- nics_shapefiles
- baseline.sql: Specifies the baseline schema. This is as of NICS 6.0.
- baseline_data.sql: Specifies the baseline data for the NICS database.
- baseline_datalayers.sql: Sets up the dynamic_kmz schema
- baseline_datafeeds.sql: Creates the default mdt schema and associated view in the nics_datafeeds database.
Executing the 'create_db.sh' requires that database name and username parameters are passed in
(e.g. "./create_db.sh integration nics"). The script will create the database with the
specified name, create the baseline schema for that database, insert the baseline data for that database,
and will execute any of the SQL change scripts (as long as they have been added to the 'create_db.sh' script file).
Executing the 'create_data_dbs.sh' script requires a database name parameter (e.g. "./create_data_dbs.sh nics"). This
parameter is used as a prefix for the data databases, e.g., nics_datafeeds and nics_shapefiles. This script also
creates the default schema for the MDT table as required for using the Mobile Device Tracking functionality of NICS.
NICS System Setup
====================
There are 5 scripts that will help to set up a basic system
- /scripts/create_workspace.sh:
(1) Database to create workspace on
(2) A workspace name - this will appear as a button on the main page, for example "Incident"
(3) A unique workspace ID - recommend starting with 1
- /scripts/create_system.sh:
(1) Database to create the system on
(2) Name of the system - this usually corresponds to the application's hostname. For instance, if the site is hosted at "nics.ll.mit.edu", this system name would be "nics"
(3) A description of the system
(4) A unique system ID - recommend starting with 1
- /scripts/create_org.sh:
(1) Database to create org on
(2) Name of the organization
(3) County
(4) State
(5) Prefix
(6) The orgtype ID - this will allow users to register with this organization. The IDs can be found in the orgtype table
- /scripts/create_default_user.sh: The password is set to TestPassword1!
(1) Username
(2) Organization Id (query org table)
(3) Workspace Id (query workspace table)
- /scripts/create_default_folders.sh: Creates folders Maps, Data, Tracking, Weather, and Uploads for specified workspace.
(1) Name of database
(2) Workspace ID to create folders under
These 2 scripts will add base layers and weather layers
- /datalayers/maps/maps_layers.sh - NOTE: Places the layers in Workspace 1
(1) Database to create layers on
- /datalayers/weather/weather_layers.sh
(1) Database to create layers on
(2) Workspace ID to place the layers in