-
Notifications
You must be signed in to change notification settings - Fork 5
Home
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
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.
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
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
To generate a deployment, run harness-deployment
.
Further reading: Deployment
To create a new REST application, run harness-application
from the root.
Further reading: Application Templates
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 file openapi-generator-ignore.
- How to create a new application - Create a new application consisting of a frontend, backend and database.
CloudHarness is born to be extended. In order to extend CloudHarness you just need to mirror the folder structure:
- applications: place here your custom applications, or override default ones
- deployment-configuration: override the helm chart default values and templates
- infrastructure: define base images to use in your application
or simply copy the blueprint folder
-
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.
- Add the application inside
applications/[APPLICATION_NAME]
with a Dockerfile in it - Define deploy/values.yaml inside the file in order to specify custom values for the application
- (optional) define specific helm templates on deploy/values.yaml
- Run
harness-deployment
- Define the helm templates for the application inside
deploy/templates
. In the helm template, it is recommended to use the automatically generated valueshelm/ch/values.yaml
See more about the Helm chart installation in the specific README.
A CloudHarness application can specify a Kubernetes deployment also using externally defined public images. Create a new CloudHarness application with the helm templates inside the deploy subdirectory