FlightTicket is a serverless application benchmark running on top of OpenWhisk on Kubernetes. The application is architectured based on the AirplaneTicket benchmark. Different from AirplaneTicket, FlightTicket is implemented in Python and runs as a serverless application on OpenWhisk.
One key feature of FlightTicket is that, instead of using a synthetic input generator, FlightTicket uses the US-airlines dataset from the US Department of transport.
- A kubernetes cluster (could also be minikube) with helm installed
OpenEBS is a prerequisite for deploying OpenWhisk. If OpenEBS is not already installed, you can install it using Helm. Run the following commands to install OpenEBS and set the default storage class:
helm repo add openebs https://openebs.github.io/charts
helm repo update
helm install openebs openebs/openebs --namespace openebs --create-namespace
kubectl patch storageclass openebs-hostpath -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
Install and initialize helm for deploying openwhisk, follow the Helm tutorial
From this directory, install the pinned OpenWhisk chart with the same multiarch images on Linux AMD64 and ARM64 (including Apple Silicon KIND clusters):
bash setup_openwhisk.sh --set whisk.ingress.apiHostName=<reachable-cluster-host>The script uses openwhisk/values.yaml and openwhisk/runtimes.json. The runtime
catalog enables Node.js 14 and Python 3.7 for OpenWhisk's system actions, plus
FlightTicket's custom Python runtime. The invocation limits are already configured;
there is no need to edit an upstream checkout. The three optional Swift demo
actions are omitted; the remaining system packages and event providers are kept.
Additional arguments are passed to Helm. For a cluster without a default storage
class, select an existing class with --set k8s.persistence.hasDefaultStorageClass=false --set k8s.persistence.explicitStorageClass=standard.
Watch OpenWhisk deployment, wait for owdev-install-packages to be Completed meaning OW was deployed successfully.
kubectl get pods -n openwhisk --watch
Update values.yaml so that the apiHost matches the OpenWhisk endpoint selected above.
Now, all that's left is to helm install flight-ticket!
helm install flight-ticket ./flight-ticket --namespace openwhisk # or any namespace name where openwhisk is installed
flight-ticket is ready when the load generator starts running.
We have three kubernetes jobs that handle setup and running the load generator:
templates/deploy-actions-job.yamlbuilds and deploys the OpenWhisk actionstemplates/populate-redis-job.yamldownloads the dataset and populates redistemplates/load-generator-job.yamlruns the load generator
There are also a couple of helper jobs that create a service account so that deploy-actions has the permissions it needs for the deployment.
Each of these jobs is a docker image and has it's own directory, deploy_ow_actions, populate_redis, and load_generator. You can rebuild the docker images
using these commands:
docker build -t jacksonarthurclark/flight-ticket-load-generator:latest .
docker push jacksonarthurclark/flight-ticket-load-generator:latest
Just be sure to update to a dockerhub that you have permissions on, and to update the images used in the helm chart.
If you make changes to the FlightTicket benchmark or its associated jobs, update and publish the Helm chart to reflect those changes. Follow these steps:
-
Package the Helm Chart
Create a.tgzpackage of the Helm chart:helm package ./flight-ticket -
Switch to the
gh-pagesBranch
Publish the Helm chart by adding it to thegh-pagesbranch of your repository:git checkout gh-pages -
Copy the
.tgzPackage to thegh-pagesBranch
Move or copy the Helm chart package to thegh-pagesbranch:mv ../flight-ticket-<version>.tgz . -
Generate the
index.yamlFile
Use the Helm CLI to generate or update theindex.yamlfile for the repository:helm repo index . --url https://xlab-uiuc.github.io/flight-ticket -
Commit and Push the Changes
Commit the.tgzfile and the updatedindex.yamlfile:git add . git commit -m "Update Helm chart for FlightTicket" git push origin gh-pages -
Helm Installation Using Published Chart
After publishing, users can install FlightTicket directly from the Helm repository:helm repo add flight-ticket https://xlab-uiuc.github.io/flight-ticket/ helm repo update helm install flight-ticket flight-ticket/flight-ticket --namespace openwhisk