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
Install and Deploy OpenWhisk, grab the cluster's internal IP to add to the openwhisk deploy mycluster.yaml
config file.
git clone https://github.com/apache/openwhisk-deploy-kube.git
cd openwhisk-deploy-kube
Get the hostname using hostname -I
or minikube ip
if using minikube. Then, edit deploy/kind/mycluster.yaml
so that apiHostName
is the proper IP.
run deploy_wsk.sh
in flight-ticket to allow more than 60 function invocations per minute:
./deploy_wsk.sh
Now we are ready to deploy OpenWhisk, cd
back into openwhisk-deploy-kube
and run the following:
helm install owdev ./helm/openwhisk -n openwhisk --create-namespace -f ./deploy/kind/mycluster.yaml
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 hostname -I
and the value in mycluster.yaml
.
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.yaml
builds and deploys the OpenWhisk actionstemplates/populate-redis-job.yaml
downloads the dataset and populates redistemplates/load-generator-job.yaml
runs 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.tgz
package of the Helm chart:helm package ./flight-ticket
-
Switch to the
gh-pages
Branch
Publish the Helm chart by adding it to thegh-pages
branch of your repository:git checkout gh-pages
-
Copy the
.tgz
Package to thegh-pages
Branch
Move or copy the Helm chart package to thegh-pages
branch:mv ../flight-ticket-<version>.tgz .
-
Generate the
index.yaml
File
Use the Helm CLI to generate or update theindex.yaml
file for the repository:helm repo index . --url https://xlab-uiuc.github.io/flight-ticket
-
Commit and Push the Changes
Commit the.tgz
file and the updatedindex.yaml
file: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