-
Notifications
You must be signed in to change notification settings - Fork 2
Instrumentation Prototyping Environment
Docker Desktop Download additional Instructions for Win 10/11 Home editions
Download the correct installer and run as normal.
- Download zip from: Superset -- This bypasses a common error (CRLF) during
git clone
you might otherwise run into when using docker on Windows devices. - Pull Docker Images:
docker-compose -f docker-compose-arlis.yml pull
- Build Docker Container(s)
docker-compose -f docker-compose-arlis.yml up
- Navigate to
localhost:8088
- For prototype env user/pass =
admin
These instructions are adapted from the Superset Startup Instructions
By default, Superset does not include UserALE on composition, but the ARLIS
build comes with a packaged implementation. We utilized a simple, 'script-tag' method to inject UserALE.js in all Superset windows:
- create a top-level directory @ master with the following structure In step three of the startup instructions, instead of entering:
Superset
-*custom
--*js
---*lib
- in the
js/lib
dir, add the UserALE.js 'minified' script from the Apache Flagon UserALE.js project. See below:
Superset
-custom
--js
---lib
----*userale-2.3.0.min.js
- then add a new
.html
file to yourcustom
folder--this will allow for injecting the UserALE.js script into Superset windows:
Superset
-custom
-*tail_js_custom_extra.html
--js
---lib
----userale-2.3.0.min.js
- add UserALE.js as a script tag to the .html file, along with custom settings:
<script
src="{{ url_for('static', filename='js/lib/userale-2.3.0.min.js') }}" #works out of the box if downloaded via source or npm (flagon-userale)
data-url="http://localhost:8000/" #custom settings for userale.js
data-user="superset-user"
data-version="2.3.0"
data-tool="Superset"
></script>
- you will also need to modify certain docker scripts so that the .html page is built along with the superset front-end resources. This includes mods to the docker templates and to the docker-compose file, see links for examples. Note that this is a one-time operations. Additional scripts, configurations can now be added directly through the custom .html page.
If your custom script doesn't appear to be working or is using an outdated version of itself, try cleaning out your browser's file cache. The issue may be due to your browser referencing an outdated version of your custom script stored in memory. Alternatively, if your browser offers an incognito mode or similar function which does not store caches, try using that to run Superset.
- to add a new custom script, add it to your
js/lib
folder:
Superset
-custom
-tail_js_custom_extra.html
--js
---lib
----userale-2.3.0.min.js
----*custom.js
- then point to it in your
.html
page"
<script
src="{{ url_for('static', filename='js/lib/userale-2.3.0.min.js') }}" #works out of the box if downloaded via source or npm (flagon-userale)
data-url="http://localhost:8000/" #custom settings for userale.js
data-user="superset-user"
data-version="2.3.0"
data-tool="Superset"
></script>
<script
src="{{ url_for('static', filename='js/lib/custom.js') }}"
></script>
- through your new custom.js script you can add additional UserALE functionality including filters and custom logging using the UserALE.js API:
#example filter
window.userale.filter(function (log) { #note: use `window` to call userale.* functions if UserALE.js is added as a script (vs. module)
var type_array = ['mouseup', 'mouseover', 'mousedown', 'keydown', 'dblclick', 'blur', 'focus', 'input', 'wheel'];
var logType_array = ['interval'];
return !type_array.includes(log.type) && !logType_array.includes(log.logType);
});
git clone https://github.com/UMD-ARLIS/docker-elk #clone local version
cd docker-elk
git fetch origin #pull all remote heads (makes all branches available)
git checkout flagon-configs (pull our branch with added instrumentation)
Elastic Stack Startup instructions
cd docker-elk
docker-compose up
ref to remove images, containers
see this guide: Register an index in Kibana to see the logs
not actually an issue with docker-elk As with Superset, use code>download ZIP
via GitHub to download the Elastic Stack, which includes Elasticsearch, Logstash, and Kibana.