-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add quickstart demo application (#158)
- Loading branch information
Showing
4 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
|
||
[dependencies] | ||
kam = { git = "https://github.com/KusionStack/kam.git", tag = "0.2.0" } | ||
service = { oci = "oci://ghcr.io/kusionstack/service", tag = "0.1.0" } | ||
mysql = { oci = "oci://ghcr.io/kusionstack/mysql", tag = "0.2.0" } | ||
network = { oci = "oci://ghcr.io/kusionstack/network", tag = "0.2.0" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# The configuration codes in perspective of developers. | ||
import kam.v1.app_configuration as ac | ||
import service | ||
import service.container as c | ||
import network as n | ||
import mysql | ||
|
||
# Please replace the ${APPLICATION_NAME} with the name of your application, and complete the | ||
# 'AppConfiguration' instance with your own workload and accessories. | ||
quickstart: ac.AppConfiguration { | ||
workload: service.Service { | ||
containers: { | ||
quickstart: c.Container { | ||
image: "kusionstack/kusion-quickstart:latest" | ||
env: { | ||
"DB_HOST": "$(KUSION_DB_HOST_QUICKSTART_DEFAULT_QUICKSTART_MYSQL)" | ||
"DB_USERNAME": "$(KUSION_DB_USERNAME_QUICKSTART_DEFAULT_QUICKSTART_MYSQL)" | ||
"DB_PASSWORD": "$(KUSION_DB_PASSWORD_QUICKSTART_DEFAULT_QUICKSTART_MYSQL)" | ||
} | ||
} | ||
} | ||
} | ||
accessories: { | ||
"network": n.Network { | ||
ports: [ | ||
n.Port { | ||
port: 8080 | ||
} | ||
] | ||
} | ||
"mysql": mysql.MySQL { | ||
type: "local" | ||
version: "8.0" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# The metadata information of the stack. | ||
name: default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
name: quickstart |