Skip to content
Snippets Groups Projects
Commit eeccc09d authored by Luca Morandini's avatar Luca Morandini
Browse files

Merge branch 'fix/minor-fix' into 'master'

fix: Remove Node.js from required; update instruction for Fission client

See merge request feit-comp90024/comp90024!40
parents e87a0990 9060861f
Branches
No related tags found
No related merge requests found
......@@ -2,13 +2,11 @@
## Pre-requirements
- Node.js 12.x or newer is installed
- OpenStack RC file and API password obtained and sourced in current shell (see [here](../installation/README.md#client-configuration))
- A Kubernetes cluster created on NeCTAR (see [here](../installation/README.md#elasticsearch))
- Connect to [Campus network](https://studentit.unimelb.edu.au/wifi-vpn#uniwireless) if on-campus or [UniMelb Student VPN](https://studentit.unimelb.edu.au/wifi-vpn#vpn) if off-campus
- Kubernetes cluster is accessible (see [here](../installation/README.md#accessing-the-kubernetes-cluster))
- ElasticSearch is installed (see [here](../installation/README.md#elasticsearch))
> Note: the code used here is for didactic purposes only. It has no error handling, no testing, and is not production-ready.
......@@ -252,7 +250,6 @@ curl -XGET -k "https://127.0.0.1:9200/students/_search"\
## Use of ElasticSearch as a vector DBMS
### Data setup
Create an ElasticSearch Index to hold temperatures
......@@ -295,7 +292,6 @@ Load temperatures data
node loadTemperature.js
```
### Vector search
Search for the most similar temperature vector to a vector of typical Vancouver temperatures in the month of January (expressed in Kelvin).
......
......@@ -12,7 +12,6 @@
> Note: the code used here is for didactic purposes only. It has no error handling, no testing, and is not production-ready.
## Basic Fission
### Create a Fission Function and Expose it as a Service
......@@ -161,7 +160,7 @@ a `build.sh` command must be created to install the libraries and finally the fu
cd functions/addobservations
zip -r addobservations.zip .
mv addobservations.zip ../
)
)
```
Creation of a function with dependencies (this function depends on the ElasticSearch client package to add data to ElasticSearch):
......@@ -401,12 +400,10 @@ curl "http://localhost:9090/temperature/days/2024-01-25/stations/95936" | jq '.'
(The port forwarding from the Fission router must be running.)
## Development of an Event-driven architecture with Fission
NOTE: This is not needed for Assignment 2, it is provided for didactic purposes only.
### Installation of Kafka and Keda
```shell
......@@ -471,7 +468,6 @@ kubectl --namespace default port-forward $POD_NAME 8080:8080
Point your browser to `http://localhost:8080`
### Application development
Functions can be composed for added flexibility and reuse (message queues are used to bind them together).
......@@ -485,7 +481,6 @@ Let's create a mini-application that:
Since AIRQ and BoM data have different structures, we need to have an intermediate function that filters and splits the data
into a standardized structure that can be added to ElasticSearch.
#### Functions
We would reuse the `wharvester` and `addobservation` functions we introduced earlier, but have also to add:
......@@ -503,7 +498,7 @@ fission function create --name aprocessor --env nodejs --code ./functions/aproce
(
cd functions/enqueue
zip -r enqueue.zip .
mv enqueue.zip ../
mv enqueue.zip ../
)
fission package create --sourcearchive functions/enqueue.zip \
......@@ -634,7 +629,6 @@ curl -XGET -G "https://naqd.eresearch.unimelb.edu.au/geoserver/wfs"\
| jq '.'
```
### Mastodon harvester
This is just a basic example of a Mastodon harvester. It is not meant to be used in production.
......@@ -642,14 +636,13 @@ This is just a basic example of a Mastodon harvester. It is not meant to be used
The function takes the last status from the Mastodon server, wait for a few seconds, then harvests the
statuses that have been posted in the meantime.
A possible design for a Mastodon harvester could use a timer trigger to call the function at regular intervals and store the
A possible design for a Mastodon harvester could use a timer trigger to call the function at regular intervals and store the
statuses in ElasticSearch, with the `lastid` variable value taken from an ElasticSearch query looking for the latest status.
Even better, the Mastodon harvester could use a WebSocket to communicate with Mastodon in streaming mode and have the function
executed whenever there are new posts.
executed whenever there are new posts.
```python
````python
```shell
......@@ -660,7 +653,7 @@ Create the archive, the package, and the function:
(
cd functions/mharvester
zip -r mharvester.zip .
mv mharvester.zip ../
mv mharvester.zip ../
)
fission package create --sourcearchive functions/mharvester.zip \
......@@ -672,11 +665,10 @@ fission fn create --name mharvester \
--pkg mharvester \
--env python \
--entrypoint "mharvester.main"
```
````
Test the harvester:
```shell
fission fn test --name mharvester
```
......@@ -353,7 +353,17 @@ curl -Lo fission https://github.com/fission/fission/releases/download/v$FISSION_
Windows:
For Windows, you can use the linux binary on WSL, or you can download this windows executable: `https://github.com/fission/fission/releases/download/v$FISSION_VERSION/fission-v$FISSION_VERSION-windows-amd64.exe`
For Windows, please use the Linux binary on WSL.
asdf:
Alternatively, you can install the Fission CLI using asdf:
```shell
asdf plugin add fission
asdf install fission $FISSION_VERSION
asdf local fission $FISSION_VERSION
```
## Stack installation test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment