Skip to content
This repository has been archived by the owner. It is now read-only.
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Large Events (Knative Proof of Portability)

Build Status Coverage Status


An app built as proof of portability for Knative that provides a platform for event organizers to share info during large events like concerts, parades, expos, etc. Key features of this app include:

  • Allow authorized event organizers to create and edit events
  • Handle uploading and serving multimedia posts made by attendees
  • Organize and filter multiple sub-events
  • Provide a clean front-end web UI for interaction with the service
  • Authenticate with OAuth 2.0

This app is built as part of a proof of portability project for Knative. It is meant to show the key features of Knative, to test the conformance across various cloud product implementations of Knative, and to document with functioning sample code how one might develop, build, and deploy with Knative. Key features of Knative this app demonstrates include:

  • Develop microservices independently that can be individually deployed, updated, and auto-scaled
  • Deploy containerized code with minimal configuration, allowing the developer to focus on features rather than infrastructure
  • Run serverless, stateful containers that enable pay-for-use billing

A note on microservices

This project is organized into microservices. Although this repository contains a few top level files such as this, each direct subfolder of this project is its own independent microservice. This means a few things:

  • Each microservice subfolder is meant to be built and deployed independently from each other
  • The microservices interact with each other in deployment through HTTP requests
  • You will need to supply environment variable to the microservices specifying each others' endpoints
  • Each subfolder has its own with more specific information regarding building, testing, deployment, etc.

There are 4 microservices in this project. They are:

  • events - Add, edit, and fetch events list.
  • pageserve - Serve web UI and act as an API gateway to other microservices.
  • posts - Add, edit, and fetch posts list.
  • users - Authenticate with Google Sign-In, edit and fetch authorization level of users.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. Because of this microservice architecture, each subfolder will need to be deployed as its own independent subfolder. For specific instructions, see the file in each subfolder, but generally, they all follow the following pattern:


These microservices are written in Python 3 and should run on Python 3.6+.


How to install and run each microservice for local development.

Each microservice has slightly different dependencies and thus slightly different installation procedures. Generally, installation for each microservice is as follows, but each subfolder's has an "Installing" section with more accurate instructions.

Install into a virtualenv:

cd events
python3 -m venv venv && . venv/bin/activate
pip3 install -r requirements.txt

Provision a MongoDB instance (e.g. via MongoDB Atlas), then provide the app with its endpoint via an environment variable (this step is not needed for the pageserve microservice).

export MONGODB_URI="mongodb+srv://[username]:[password]@[cluster-address]"

Set any other environment variables needed by the microservice.

export GAUTH_CLIENT_ID="123-my-google-oauth-service-client-id-456"
export FLASK_SECRET_KEY="some secure and unique byte-string"

Running the service

To locally run a microservice, execute with Python.


Running the tests

Testing again is handled on the microservice level. To test, ensure your working directory is the microservice's subfolder then use unittest.

python3 -m unittest discover

To see code coverage, use

# install coverage if you don't already have it
python3 -m pip install --upgrade coverage
# run coverage on all discovered tests analyzing the 'app' package
coverage run -m --source app unittest discover
# report coverage with line numbers
coverage report -m


This project is built for Knative and should be able to be deployed on any cloud product built on Knative or on any Kubernetes cluster. It has been tested on Google Cloud Run.

This project is set up for continuous deployment to Google Cloud Run (managed) via Cloud Build, and it will automatically be built and deployed on pushes to the master branch of this repository.

You can also manually deploy this project to a service like Cloud Run. For example, to deploy one of the microservices to the service [SERVICE] in the GCP project with ID [PROJECT-ID] run:

gcloud builds submit --tag[PROJECT-ID]/[SERVICE]
gcloud beta run deploy --image[PROJECT-ID]/[SERVICE] --platform managed

Built With


  • Python 3 - Python programming language
  • Flask - Python web service framework
  • pymongo - MongoDB Python client
  • GitHub - Development platform for open source
  • Travis CI - Hosted continuous integration service
  • Gunicorn - Python WSGI HTTP Server for UNIX


  • unittest - Python unit testing framework
  • - Python code coverage measurement tool
  • Coveralls - Test coverage history and statistics service



Please read for details on our code of conduct, and the process for submitting pull requests to us.


  • Gabriel Mukobi - Initial work - mukobi
  • Carolyn Mei - Initial work - cmei4444

See also the list of contributors who participated in this project.


This project is licensed under the Apache 2.0 License - see the file for details.


An app built as proof of portability for Knative that provides a platform for event organizers to share info during large events like concerts, parades, expos, etc.







No releases published


No packages published