This project aims to bring a simple CI/CD experience to end users from building to deploying a Cloud application on Kubernets (or Knative). We offer some CRDs/Controllers and a cli (may be changed to a plugin of Knative cli in future) which talk to Tekton (a underlying pipeline system) to track and manage the lifecycle of buiding and deplying the application.
Jordan is a developer of a startup company, he is trying to develop a new cloud application and plan to deploy on Kubernetes. He has a Kubernets cluster sitting on IBM Cloud. He created 3 name spaces dev
, staing
and production
, and he followed the installation guide to enabled Knative and installed Tekton and this project knap
. At the very early phase, he quickly rolled out the code and just wanted to build and deploy the application on the Kubernete cluster automatically for each new git commit. To archive this, with knap
, he just needed to run few commands to get knap to watch his git project and help build and run the application in dev
namespace when a new commit shown up.
knap create --watch https://github.com/bluebosh/jordan_app --template push --git-token xxxxxx --docker-token xxxxxx
After that, when a new commit is pushed in that git project, it's acknowedged by knap and knap will build the source code to an image and deploy into dev
name space of that cluster as a new revision.
After some development interation cycles, the application got mature, Jordan would like to onboard the 1st production version and hoped to continuous integration and delivery. He needs a CI/CD solution to help on that. What Jordan needs to do with knap is as simple as follows:
- Define a manifest under app root to specify trigger type (PR or tag), pipeline template, service bind, where to run test, namespace names for staging and production, update stratergy and etc. (Can we define it as a git workflow?), manually or thourgh knap-console?
- Put regression test case in place
Knap needs to do the followings for registering the application into knap:
- Generate webhook in the application repo and set the trigger type
- Generate the pipeline instance from the template and input values
Knap will lanuch the pipeline when it's triggered
- Build image from the source code (PR or tag)
- Service bind
- Provision in staging name space
- Run regression test
- Provision in production name space as a new revision
- Run regression test for this revision
- Gradually move request to this revision from 0% to 100%
- Remove the old revision and corresponding images after upgrade
What things you need to install the software and how to install them
Give examples
A step by step series of examples that tell you how to get a development env running
Say what the step will be
Give the example
And repeat
until finished
End with an example of getting some data out of the system or using it for a little demo
Explain how to run the automated tests for this system
Explain what these tests test and why
Give an example
Explain what these tests test and why
Give an example
Add additional notes about how to deploy this on a live system
- Dropwizard - The web framework used
- Maven - Dependency Management
- ROME - Used to generate RSS Feeds
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Jordan Zhang - cheif committer
- Grace Zhang - major contributor
- Edward Xiao - major contributor
- Matt Cui - project Manager
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
- Hat tip to anyone whose code was used
- Inspiration
- etc