-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update initializing-wis2box.md * Update configuring-station-metadata.md * add section on bulk station metadata loading * add section for instructor helpers * Addresses #103, links to FM-12 definition and OSCAR/Surface added. * editorial * subscribe only to cache * enumerate GDCs, fix pip3 text * enumerate GDCs, fix pip3 text * Update README.md update student VM info, add information about DNS --------- Co-authored-by: david-i-berry <dberry@wmo.int> Co-authored-by: Maaike <maaike.limper@gmail.com>
- Loading branch information
1 parent
8bc5d48
commit 7aef174
Showing
12 changed files
with
175 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Instructor helpers | ||
|
||
This directory contains resources that may be valuable for instructors as part of | ||
delivery of the training. Note that the below need to be run while connected to | ||
the **WIS2-training** Wi-Fi network. | ||
|
||
# Local global services | ||
|
||
Local global services provide a test environment to simulate WIS2 workflows using | ||
the classroom as a network of WIS2 nodes. | ||
|
||
## Global Broker | ||
|
||
TBD | ||
|
||
### Live map (`live.html`) | ||
|
||
Serve this webpage via HTTP on your VM. Ensure that the following line: | ||
|
||
```javascript | ||
const host = 'ws://tbd.wis2.training:8884/ws'; | ||
``` | ||
|
||
...is updated to point to the Global Broker installed above. | ||
|
||
## Global Cache | ||
|
||
[wis2-gc](https://github.com/wmo-im/wis2-gc) is a Reference Implememtation of | ||
a WIS2 Global Cache (GC). Follow the setup instructions, pointing | ||
to the Global Broker installed above. | ||
|
||
## Global Discovery Catalogue | ||
|
||
[wis2-gdc](https://github.com/wmo-im/wis2-gdc) is a Reference Implememtation of | ||
a WIS2 Global Discovery Catalogue (GDC). Follow the setup instructions, pointing | ||
to the Global Broker installed above. | ||
|
||
# Other | ||
|
||
* `instructor_bashrc.sh`: sample bash prompt to help with screen readability while | ||
displaying a termnial during a practical session. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>wis2box training live data and metadata notifications</title> | ||
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" /> | ||
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script> | ||
<script src="https://unpkg.com/mqtt@4.0.1/dist/mqtt.min.js"></script> | ||
<script> | ||
|
||
const host = 'ws://tbd.wis2.training:8884/ws'; | ||
const options = { | ||
username: 'everyone', | ||
password: 'everyone', | ||
keepalive: 60, | ||
protocolVersion: 5, | ||
reconnectPeriod: 1000, | ||
connectTimeout: 30 * 1000, | ||
}; | ||
|
||
console.log('Connecting mqtt client'); | ||
const client = mqtt.connect(host, options); | ||
|
||
client.on('connect', function () { | ||
client.subscribe('origin/#', function (err) { | ||
if (!err) { | ||
console.log('Connected!') | ||
} | ||
}) | ||
}) | ||
|
||
client.on('error', (err) => { | ||
console.log('Connection error: ', err) | ||
client.end() | ||
}); | ||
|
||
client.on('reconnect', () => { | ||
console.log('Reconnecting...') | ||
}); | ||
|
||
</script> | ||
</head> | ||
|
||
<body> | ||
<header> | ||
<h1>wis2box training live data and metadata notifications</h1> | ||
</header> | ||
<div id="map" style="height: 600px;"></div> | ||
<footer> | ||
Powered by WIS2 | ||
</footer> | ||
</body> | ||
<script> | ||
var map = L.map('map').setView([0, 0], 2); | ||
var tiles = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}', { | ||
maxZoom: 19, | ||
attributionControl: false | ||
}).addTo(map); | ||
map.attributionControl.setPrefix(''); | ||
|
||
client.on('message', function (topic, message) { | ||
const content = JSON.parse(message.toString()) | ||
addMarker(content); | ||
console.log(content); | ||
}) | ||
|
||
function addMarker(feature) { | ||
var marker = L.geoJSON(feature).addTo(map); | ||
marker.bindPopup('<h1><a target="_blank" href="' + feature.links[0].href + '">' + feature.id + '</a>'); | ||
setTimeout(removeMarker, 5000, marker); | ||
} | ||
function removeMarker(feature) { | ||
feature.removeFrom(map); | ||
} | ||
</script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters