Step 1: In the DC/OS dashboard navigate to 'Services - Services'. To run a new Service click the '+' button at the top right of the Services screen.
Step 2: We will 'Run a Service' by copy & pasting a 'JSON Configuration' so select the 'JSON Configuration option.
Step 3: Copy the contents of map-webapp/map-webapp.json to your clipboard, paste the contents to the 'JSON Configuration' area and click the 'REVIEW & RUN' button.
Step 4: Click 'RUN SERVICE' to install the Map web application.
Step 5: In the DC/OS dashboard navigate to 'Services - Services'. Notice a new service running named 'map-webapp'.
Step 6: Click on the 'map-webapp' service to see it's deployment information.
Step 7: To do a quick verification that the webapp is running open a web browser to your public agent 'DNS name' or 'IP address', e.g. https://adamdcos04.westus.cloudapp.azure.com or https://40.78.20.221. The default response is an acknowledgment back from the elastic coordinator node describing the elasticsearch cluster.
Step 8: The webapp serves as a proxy for elasticsearch queries so it is possible to 'curl' queries to elasticsearch. For example:
- To check the health of the elasticsearch cluster:
curl -XGET http://adamdcos04.westus.cloudapp.azure.com/_cat/health?v
- To list all indices in the elasticsearch cluster:
curl -XGET http://adamdcos04.westus.cloudapp.azure.com/_cat/indices?v
- To query a specific index named 'taxi':
curl -XGET http://adamdcos04.westus.cloudapp.azure.com/taxi
- For more information about querying elasticsearch, see the Elasticsearch 5.5 Reference Guide.
Step 9: The webapp's primary function is to serve as a map application that queries elasticsearch and visualizes the results via a map. The map application can be accessed on the public agent node at /map/index.html, e.g. https://adamdcos04.westus.cloudapp.azure.com/map/index.html
Congratulations: You now have a Map web application in place ... Next, we will walk through how to ....