Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
MaxShapiro32 edited this page Oct 19, 2018 · 7 revisions

Short Name

Deploy Python Flask application in Kubernetes.

Short Description

Log and view different types of work days in a database with API calls.

Offering Type

Cloud

Summary

This code pattern creates a Python Flask application that incorporates MongoDB as microservices in Docker containers. These containers are deployed in Kubernetes.

Author

Max Shapiro

Code

Description

In this Code Pattern, we will create a Work Log web application using Flask, MongoDB, and Kubernetes. The Work Log application is used to keep track of and log different types of days that are associated with work. The different types of days include:

  • Working in the office
  • Working remotely
  • Vacation days
  • Holidays
  • Sick days

When the reader has completed this Code Pattern, they will understand how to:

  • Create a Python Flask application
  • Incorporate MongoDB into a Python application
  • Deploy and run microservices on Kubernetes

Flow

  1. User interacts with the App UI to initially create an account, login to account, or reset password for their account. Once User is logged in, they can view, add, and edit their work log data.
  2. The functionality of the App UI that the User interacts with is handled by React. React is where the API calls are initialized.
  3. The API calls are processed in the Flask API microservice on Kubernetes and are handled accordingly.
  4. The data is stored, gathered, and/or modified in MongoDB depending on the API calls.
  5. The response from the API calls are handled accordingly be the App UI.

Included components

  • IBM Cloud Container Service: IBM Bluemix Container Service manages highly available apps inside Docker containers and Kubernetes clusters on the IBM Cloud.
  • Swagger: A framework of API developer tools for the OpenAPI Specification that enables development across the entire API lifecycle.

Featured technologies

  • Container Orchestration: Automating the deployment, scaling and management of containerized applications.
  • Microservices: Collection of fine-grained, loosely coupled services using a lightweight protocol to provide building blocks in modern application composition in the cloud.
  • Python: Python is a programming language that lets you work more quickly and integrate your systems more effectively.
  • Flask: A microframework for Python for building APIs.
  • React: JavaScript library for building User Interfaces.
  • MongoDB: A document NoSQL database.

Blog

https://github.com/IBM/worklog/wiki/Blog

Links

Clone this wiki locally