Skip to content
Lucas Rebscher edited this page Feb 2, 2021 · 48 revisions

drawing

CloudHarness

CloudHarness is a base infrastructure facilitator for micro-service based applications deployed on Kubernetes.

What building your cluster application with CloudHarness gives to you:

  • Common framework and utilities to develop and deploy micro-service application
    • REST-API scaffolding building based on OpenApi (Python-Flask)
    • Helm chart automatic generation
    • Automatic build and push of images
    • Continuous deployment script generation (Codefresh)
  • Prebuilt support applications and shared library to:
    • Log in and user management - based on Keycloak
    • Submit batch and asynchronous workflows - based on Argo
    • Orchestrate Micro-services - based on Kafka

Command line tools

CloudHarness provides the following command line tools to help application scaffolding and deployment.

  • harness-deployment - generate the helm chart to deploy on Kubernetes.
  • harness-application - create a new CloudHarness REST application.
  • harness-generate - generates server and client code for all CloudHarness REST applications.

Get started

Prerequisites

Python 3.7+ must be installed.

It is recommended to setup a virtual environment. With conda:

conda create --name ch python=3.7
conda activate ch

Install requirements:

pip install -r requirements.txt

Local Development

For local development you need to run your own Kubernetes cluster, we recommend to use minikube and follow their Get Started guide.

Additionally, you need to install the CLI tool kubectl to interact with the cluster.

Further reading: Working with Minikube

Generate deployment

To generate a deployment, run harness-deployment.

Further reading: Deployment

Create new REST application

To create a new REST application, run harness-application from the root.

Further reading: Application Templates

Generate server and client code from openapi

To (re)generate the code for your applications, run harness-generate from the root. The script will look for all openapi applications, and regenerate the Flask server code and documentation.

Note: the script will eventually override any manually modified file. To avoid that, define a .openapi-generator-ignore file.

Examples

Further readings