Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ffforest committed Mar 28, 2024
1 parent edcc408 commit 8422e34
Show file tree
Hide file tree
Showing 31 changed files with 43 additions and 395 deletions.
63 changes: 43 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,56 @@
# Kusion Catalog

Kusion is a modern application delivery and management toolchain that enables developers to specify desired intent in a declarative way and then using a consistent workflow to drive continuous deployment through application lifecycle.
Kusion is an Intent-Driven Platform Orchestrator that enables developers to specify their desired intent in a declarative way and then using a consistent workflow to drive continuous delivery through the entire application lifecycle.

One of the core goals of Kusion is to build an open, inclusive and vibrant OSS developer community focused on solving real-world application delivery and management problems, sharing the reusable building blocks and best practices.
To achieve that, we've introduced the concept of [Kusion Modules](https://www.kusionstack.io/docs/kusion/concepts/kusion-module) for users to prescribe their intent in a structured way. Kusion Modules are modular building blocks that represent common and re-usable capabilities required during an application delivery.

This repository contains a catalog of community maintained, shared `Kusion Module` resources, which are designed to be usable out of box.
One of the core goals of Kusion is to build an open, inclusive and prosper open source community focused on solving real-world application delivery and management problems, in the meantime sharing the reusable building blocks and best practices.

This repository contains the source code for all the official `Kusion Modules` maintained by the KusionStack team (all contributions welcome), representing our understanding of a "golden path" and is designed to be used out-of-the-box.

## Catalog Structure

The `models/schema` directory contains all KCL schema definitions for application developers, and follows the following structure.
The `modules` directory contains all the out-of-the-box Kusion Module definitions, with the following directory structure.

```
./schema/v1
├── modules
│   ├── monitoring 👈 Module definition for Promethues
│   │   ├── example 👈 Example for using the Promethues module
│   │ ├── kcl.mod 👈 kcl.mod includes the KCL package metadata
│   │ ├── prometheus.k 👈 Schema definition for Promethues configuration
│   │   └── src 👈 Generator implementation for Promethues module in Go
│   ├── mysql 👈 Module definition for Mysql database
│   │   ├── ...
│   ├── network 👈 Module definition for Network
│   │   └── ...
│   ├── opsrule 👈 Module definition for Operational Rule
│   │   └── ...
│   └── postgres 👈 Module definition for Postgres database
│   └── ...
```

/accessories 👈 schema definition for various accessory resources
## Using the Catalog Modules

/monitoring 👈 schema definition for monitoring e.g. Promethues
/trait 👈 schema definition for various operation capabilities e.g. OpsRule
/workload 👈 default workload schema definition
app_configuration.k 👈 root AppConfiguration schema definition
```
The modules defined in the `catalog` repository are published to the [KusionStack GitHub container registry](https://github.com/orgs/KusionStack/packages).

Based on the schema definitions, `models/samples` directory contains plenty of useful sample code. Here is a simple explanation of those samples.
To reference and import the official Kusion Modules defined in this catalog repository, you can declare the dependencies in the corresponding `kcl.mod` file (Pick and choose the ones you need):

```
[package]
name = "my-project"
edition = "0.5.0"
version = "0.1.0"
[dependencies]
kam = { git = "https://github.com/KusionStack/kam.git", tag = "0.1.0" }
monitoring = { oci = "oci://ghcr.io/kusionstack/monitoring", tag = "0.1.0" }
mysql = { oci = "oci://ghcr.io/kusionstack/mysql", tag = "0.1.0" }
postgres = { oci = "oci://ghcr.io/kusionstack/postgres", tag = "0.1.0" }
network = { oci = "oci://ghcr.io/kusionstack/network", tag = "0.1.0" }
opsrule = { oci = "oci://ghcr.io/kusionstack/opsrule", tag = "0.1.0" }
[profile]
entries = ["../base/base.k", "main.k"]
```

* `hellocollaset` - demonstrates how to declare a long-running service, and the workload implementation of this service is `Collaset`, which is provided by [KusionStack Operating](https://github.com/KusionStack/operating).
* `helloworld` - also declare a long-running service, with default Kubernetes Deployment workload.
* `pgadmin` - declares a cloud provider managed Postgres resource, as well as a long-running service with `dpage/pgadmin4:latest` image.
* `samplejob` - demonstrates how to declare a periodic job.
* `wordpress` - declares a cloud provider managed MySQL resource, as well as a long-running service with `wordpress:6.3` image.
The `kam` repository referenced in the `kcl.mod` contains the definition for the `AppConfiguration` schema, which is a top layer concept for describing an application and may contains a collection of modules.
34 changes: 0 additions & 34 deletions samples/hellocollaset/base/base.k

This file was deleted.

5 changes: 0 additions & 5 deletions samples/hellocollaset/prod/kcl.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions samples/hellocollaset/prod/main.k

This file was deleted.

2 changes: 0 additions & 2 deletions samples/hellocollaset/prod/stack.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions samples/hellocollaset/project.yaml

This file was deleted.

46 changes: 0 additions & 46 deletions samples/helloworld/base/base.k

This file was deleted.

5 changes: 0 additions & 5 deletions samples/helloworld/prod/kcl.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions samples/helloworld/prod/main.k

This file was deleted.

2 changes: 0 additions & 2 deletions samples/helloworld/prod/stack.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions samples/helloworld/project.yaml

This file was deleted.

46 changes: 0 additions & 46 deletions samples/pgadmin/base/base.k

This file was deleted.

6 changes: 0 additions & 6 deletions samples/pgadmin/prod/kcl.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions samples/pgadmin/prod/main.k

This file was deleted.

1 change: 0 additions & 1 deletion samples/pgadmin/prod/stack.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions samples/pgadmin/project.yaml

This file was deleted.

42 changes: 0 additions & 42 deletions samples/prometheus/base/base.k

This file was deleted.

5 changes: 0 additions & 5 deletions samples/prometheus/prod/kcl.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions samples/prometheus/prod/main.k

This file was deleted.

2 changes: 0 additions & 2 deletions samples/prometheus/prod/stack.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions samples/prometheus/project.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions samples/samplejob/base/base.k

This file was deleted.

5 changes: 0 additions & 5 deletions samples/samplejob/prod/kcl.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions samples/samplejob/prod/main.k

This file was deleted.

2 changes: 0 additions & 2 deletions samples/samplejob/prod/stack.yaml

This file was deleted.

Loading

0 comments on commit 8422e34

Please sign in to comment.