DEQ Environmental Data Viewer
Generic application for searching, viewing and downloading DEQ GIS data and related tables.
Dev - localhost:8001 (after running grunt)
Stage - test.mapserv.utah.gov/deqenviro/
Production - enviro.deq.utah.gov
Unit and functional tests are run via intern.
Unit tests URL after running grunt default
Run grunt intern-functional-dev to run functional tests.
Runs nightly on test and prod servers.
Builds DEQEnviro.json which the web app uses to configure itself. Part of building this json file is getting all of the map service layer indices so it needs to be rerun manually after adding, removing or reordering any of the map service layers.
Make sure that you have a latest version of pip before pip install -r requirements.txt.
This script requires settings/oauth2key.json. Check out the oauth2 gspread docs to learn how to generate it. Make sure to grant read permission to the email address in client_email to the config spreadsheets.
Updates related data in SGID10. Reads sources from the config spreadsheet.
-
Set up and install ArcGisServerPermissionsProxy.
- Import RavenDB and web.config from previous server.
-
Set up users & roles in ArcGIS Server
- Create new roles called
deq_water&deq_admin. - Create users with the same names as the roles. Use the password from the Permission Proxy
web.config.
- Create new roles called
-
Publish
maps/MapService.mxdandmaps/Secure.mxdto aDEQEnvirofolder in ArcGIS Server.Secureshould be locked down to just thedeq_adminanddeq_waterroles.
-
Publish ExportWebMap service to the
DEQEnvirofolder usingmaps/PrintTemplates/Portrait.mxdas the default template.- Make sure that the server can resolve the domain name that the app is hosted on (e.g. test.mapserv.utah.gov). If it can't you will need to edit the hosts file. This is required for the
ExportWebMapservice. - synchronous
- Make sure that the server can resolve the domain name that the app is hosted on (e.g. test.mapserv.utah.gov). If it can't you will need to edit the hosts file. This is required for the
-
Run and publish
scripts/download/DeqEnviro.pyt/downloadasToolbox/downloadin the sameDEQEnvirofolder.pip install xlsxwriteron the hosting servier fom the python installation that ArcGIS Server uses (x64).pip install xlsxwriteron the publishing server for the python installation that ArcGIS Desktop uses (x32).- You can use these inputs as a test:
{"BFNONTARGETED":["Pre5","Pre9","Pre8","Pre4","Pre7","Pre10","Pre12","Pre13","Pre14","Pre11","13","14"],"BFTARGETED":["2A","3","5","6","4","8","9","10","11","12","1","2","7"]} shp C:\MapData\deqquerylayers.gdb -
Configure and schedule
scripts/nightly/main.pyto run nightly. Will likely need to copyscripts/nightly/databasesandscripts/nightly/settings/__init__.pyfrom the previous server. -
Build and deploy the application by running
grunt build-prod && grunt deploy-prod.- You will need to run
scripts/nightly/build_json.pyto generateDEQEnviro.jsonbefore you can load the application for the first time.
- You will need to run
Tested with BrowserStack
