User Tools
development:applications:gis_integration
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| development:applications:gis_integration [2019/05/22 16:52] – adowling | development:applications:gis_integration [2021/06/25 10:09] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | --- // | ||
| + | |||
| + | ====== Gis Integration ====== | ||
| + | |||
| + | The following wiki details the gis_integration application which handles api calls for transferring kmz files from a specified endpoint to the NocPortal. | ||
| + | |||
| + | ===== Use Case ===== | ||
| + | Extenet wanted to automate the retrieval and storage of kmz files in the NocPortal | ||
| + | Previously this was a manual task : | ||
| + | * Extenet would export any updated KMZ's from ArcGis | ||
| + | * Ops Request | ||
| + | * Manual load of KMZ's into portal via Manage overlays. | ||
| + | |||
| + | ===== Architecture Diagram ===== | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | |||
| + | ===== Technology Stack ===== | ||
| + | * Springboot 2.1.4 | ||
| + | * Gradle | ||
| + | * Apache camel 2.23.2 (starter, http, jackson) | ||
| + | * Okhttp 3.12.0 | ||
| + | * mysql-connector 5.1.47 (setup for db but not used currently) | ||
| + | |||
| + | ===== Key Configuration Points ===== | ||
| + | |||
| + | **Cron job Scheduler configurable via / | ||
| + | |||
| + | < | ||
| + | scheduler.cronTrigger.expression=0 0 3 * * * | ||
| + | </ | ||
| + | |||
| + | |||
| + | **Mail Setup for Success / Failure Notifications configurable via / | ||
| + | |||
| + | (Differ per environment - templated in env-configuration) | ||
| + | |||
| + | < | ||
| + | spring.mail.enabled=true | ||
| + | spring.mail.port=587 | ||
| + | spring.mail.host=smtp.gmail.com | ||
| + | spring.mail.username=rightofway@errigal.com | ||
| + | spring.mail.password=# | ||
| + | |||
| + | gis.mail.from=kevin.fan@errigal.com | ||
| + | gis.mail.replyTo=support@errigal.com | ||
| + | gis.mail.recipients=kevin.fan@errigal.com | ||
| + | </ | ||
| + | |||
| + | **NocPortal API endpoints configurable via / | ||
| + | |||
| + | (Differ per environment - templated in env-configuration) | ||
| + | < | ||
| + | nocportal.integration.states.url=http:// | ||
| + | nocportal.integration.overlay.url=http:// | ||
| + | nocportal.integration.upload.timeout=30000 | ||
| + | nocportal.api.userName=userapiadmin | ||
| + | nocportal.api.password=notsame1 | ||
| + | </ | ||
| + | |||
| + | **KMZ File Storage configurable via / | ||
| + | |||
| + | < | ||
| + | file.directory.location=kmzfiles/ | ||
| + | file.directory.retention.period=-7 | ||
| + | </ | ||
| + | |||
| + | **ArcGis API endpoints configurable via / | ||
| + | |||
| + | (Differ per environment - templated in env-configuration) | ||
| + | < | ||
| + | remote.timeout=60000 | ||
| + | remote.tokenUrl=https:// | ||
| + | remote.username=mzubal_errigal | ||
| + | remote.password=mzubal_errigal123 | ||
| + | remote.client=remoteip | ||
| + | remote.expiration=60 | ||
| + | remote.request.format=json | ||
| + | remote.request.referer=https:// | ||
| + | remote.queryUrl=https:// | ||
| + | remote.whereQuery=where=ProjectState='' | ||
| + | </ | ||
| + | |||
| + | ==== NocPortal API ==== | ||
| + | < | ||
| + | * GET / | ||
| + | * POST / | ||
| + | </ | ||
| + | |||
| + | ==== Log Location ==== | ||
| + | < | ||
| + | * / | ||
| + | </ | ||
| + | |||
| + | ====Prometheus setup ==== | ||
| + | Monitoring is configured for the following servers: | ||
| + | - sfqaapps1 | ||
| + | - qaextapps1 | ||
| + | - extapps1 | ||
| + | |||
| + | ==== Springboot 2 Prometheus Setup ==== | ||
| + | Actuator setup tutorial: | ||
| + | https:// | ||
| + | |||
| + | Metrics setup tutorial: | ||
| + | https:// | ||
| + | |||
| + | Added dependencies to build.gradle: | ||
| + | < | ||
| + | | ||
| + | |||
| + | // Micrometer + Prometheus exporter | ||
| + | compile(group: | ||
| + | compile(group: | ||
| + | </ | ||
| + | |||
| + | Added config to application.properties: | ||
| + | < | ||
| + | # Metrics related configurations | ||
| + | management.endpoint.metrics.enabled=true | ||
| + | management.endpoints.web.exposure.include=* | ||
| + | management.endpoint.prometheus.enabled=true | ||
| + | management.metrics.export.prometheus.enabled=true | ||
| + | management.metrics.tags.application=gis_integration | ||
| + | </ | ||
| + | |||
| + | prometheus--monitoring-config: | ||
| + | * gis_integration-sd.yml | ||
| + | * prometheus.yml (GIS INTEGRATION entry) | ||
| + | |||
| + | |||
| + | |||
| + | ==== Troubleshooting ==== | ||
| + | - Check failure email for exception - This will be emailed to operations | ||
| + | - Check endpoints are reachable (ArcGis and NocPortal) | ||
| + | - Restart Application if necessary or wait for the next cron schedule to run. | ||
| + | - ensure gis_integration app is running on apps1 handler | ||
| + | - Check developer console for errors with KMZ file when loading | ||
| + | |||
| + | ==== EXT GIS Contacts ==== | ||
| + | |||
| + | * Sunday Aiyash < | ||
| + | * Vishal Shah < | ||
| + | * Ahmad Saleh < | ||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | ==== GIS Endpoint Manual KMZ Download ==== | ||
| + | If for some reason you need to login to the gis application and manually download a state kmz file you can do so as follows: | ||
| + | |||
| + | Login to the following url using the credentials in application.properties (remote.username, | ||
| + | |||
| + | Use the following field population in the form to export the kmz (things to note: ProjectState = ' | ||
| + | |||
| + | {{ : | ||