Skip to content

Commit b85ac30

Browse files
authored
chore: move current user guides of kusion to a new dir for cli (#590)
* chore: move current user guides of kusion to a new dir for cli * fix: broken link error
1 parent 01a91b7 commit b85ac30

File tree

28 files changed

+74
-62
lines changed

28 files changed

+74
-62
lines changed

docs/kusion/3-concepts/4-workspace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ The `importedResources` block is designed to declare the import of existing clou
9393

9494
### secretStore
9595

96-
The `secretStore` field can be used to access the sensitive data stored in a cloud-based secrets manager. More details can be found in [here](../5-user-guides/4-secrets-management/1-using-cloud-secrets.md).
96+
The `secretStore` field can be used to access the sensitive data stored in a cloud-based secrets manager. More details can be found in [here](../5-user-guides/1-using-kusion-cli/4-secrets-management/1-using-cloud-secrets.md).
9797

9898
### context
9999

docs/kusion/4-configuration-walkthrough/8-monitoring.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ As of version 0.11.0, Kusion supports integration with Prometheus by managing sc
88

99
For the monitoring configuration to work (more specifically, consumed by Prometheus), this requires the target cluster to have installed Prometheus correctly, either as a Kubernetes operator or a server/agent.
1010

11-
More about how to set up Prometheus can be found in the [Prometheus User Guide for Kusion](../user-guides/observability/prometheus)
11+
More about how to set up Prometheus can be found in the [Prometheus User Guide for Kusion](../5-user-guides/1-using-kusion-cli/3-observability/1-prometheus.md)
1212
:::
1313

1414
## Import
@@ -26,7 +26,7 @@ import monitoring as m
2626

2727
In addition to the KCL configuration file, there are also workspace-level configurations that should be set first. In an ideal scenario, this step is done by the platform engineers.
2828

29-
In the event that they do not exist for you or your organization, e.g. if you are an individual developer, you can either do it yourself or use the [default values](#default-values) provided by the KusionStack team. The steps to do this yourself can be found in the [Prometheus User Guide for Kusion](../user-guides/observability/prometheus#setting-up-workspace-configs).
29+
In the event that they do not exist for you or your organization, e.g. if you are an individual developer, you can either do it yourself or use the [default values](#default-values) provided by the KusionStack team. The steps to do this yourself can be found in the [Prometheus User Guide for Kusion](../5-user-guides/1-using-kusion-cli/3-observability/1-prometheus.md#setting-up-workspace-configs).
3030

3131
:::info
3232

@@ -87,7 +87,7 @@ Note that numbered ports only work when your Prometheus is not running as an ope
8787

8888
Neither `path` and `port` are required fields if Prometheus runs as an operator. If omitted, `path` defaults to `/metrics`, and `port` defaults to the container port or service port, depending on which resource is being monitored. If Prometheus does not run as an operator, both fields are required.
8989

90-
Scraping scheme, interval and timeout are considered platform-managed configurations and are therefore managed as part of the [workspace configurations](../user-guides/observability/prometheus#setting-up-workspace-configs).
90+
Scraping scheme, interval and timeout are considered platform-managed configurations and are therefore managed as part of the [workspace configurations](../5-user-guides/1-using-kusion-cli/3-observability/1-prometheus.md#setting-up-workspace-configs).
9191

9292
More details about how the Prometheus integration works can be found in the [design documentation](https://github.com/KusionStack/kusion/blob/main/docs/prometheus.md).
9393

@@ -99,4 +99,4 @@ If no workspace configurations are found, the default values provided by the Kus
9999
- Scraping scheme defaults to http
100100
- Defaults to NOT running as an operator
101101

102-
If any of the default values does not meet your need, you can change them by [setting up the workspace configuration](../user-guides/observability/prometheus#setting-up-workspace-configs).
102+
If any of the default values does not meet your need, you can change them by [setting up the workspace configuration](../5-user-guides/1-using-kusion-cli/3-observability/1-prometheus.md#setting-up-workspace-configs).

docs/kusion/5-user-guides/1-cloud-resources/1-database.md renamed to docs/kusion/5-user-guides/1-using-kusion-cli/1-cloud-resources/1-database.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This tutorial will demonstrate how to deploy a WordPress application with Kusion
1111

1212
## Prerequisites
1313

14-
- Install [Kusion](../../2-getting-started/1-install-kusion.md).
14+
- Install [Kusion](../../../2-getting-started/1-install-kusion.md).
1515
- Install [kubectl CLI](https://kubernetes.io/docs/tasks/tools/#kubectl) and run a [Kubernetes](https://kubernetes.io/) or [k3s](https://docs.k3s.io/quick-start) or [k3d](https://k3d.io/v5.4.4/#installation) or [MiniKube](https://minikube.sigs.k8s.io/docs/tutorials/multi_node) cluster.
1616
- Prepare a cloud service account and create a user with at least **VPCFullAccess** and **RDSFullAccess** related permissions to use the Relational Database Service (RDS). This kind of user can be created and managed in the Identity and Access Management (IAM) console of the cloud vendor.
1717
- The environment that executes `kusion` needs to have connectivity to terraform registry to download the terraform providers.
@@ -125,7 +125,7 @@ kusion workspace show
125125
The `workspace.yaml` is a sample configuration file for workspace management, including `MySQL` module configs. Workspace configurations are usually declared by **Platform Engineers** and will take effect through the corresponding stack.
126126

127127
:::info
128-
More details about the configuration of Workspace can be found in [Concepts of Workspace](../../3-concepts/4-workspace.md).
128+
More details about the configuration of Workspace can be found in [Concepts of Workspace](../../../3-concepts/4-workspace.md).
129129
:::
130130

131131
## Create Project And Stack

docs/kusion/5-user-guides/1-cloud-resources/2-expose-service.md renamed to docs/kusion/5-user-guides/1-using-kusion-cli/1-cloud-resources/2-expose-service.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ tree
123123
```
124124

125125
:::info
126-
More details about the directory structure can be found in [Project](../../3-concepts/1-project/1-overview.md) and [Stack](../../3-concepts/2-stack/1-overview.md).
126+
More details about the directory structure can be found in [Project](../../../3-concepts/1-project/1-overview.md) and [Stack](../../../3-concepts/2-stack/1-overview.md).
127127
:::
128128

129129
### Update And Review Configuration Codes

docs/kusion/5-user-guides/1-cloud-resources/_category_.json renamed to docs/kusion/5-user-guides/1-using-kusion-cli/1-cloud-resources/_category_.json

File renamed without changes.

docs/kusion/5-user-guides/2-working-with-k8s/1-deploy-application.md renamed to docs/kusion/5-user-guides/1-using-kusion-cli/2-working-with-k8s/1-deploy-application.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ id: deploy-application
66

77
This guide shows you how to use Kusion CLIs to complete the deployment of an application running in Kubernetes.
88
We call the abstraction of application operation and maintenance configuration as `AppConfiguration`, and its instance as `Application`.
9-
It is essentially a configuration model that describes an application. The complete definition can be seen [here](../../reference/modules/developer-schemas/app-configuration).
9+
It is essentially a configuration model that describes an application. The complete definition can be seen [here](../../../6-reference/2-modules/1-developer-schemas/app-configuration.md).
1010

1111
In production, the application generally includes minimally several k8s resources:
1212

@@ -31,7 +31,7 @@ Before we start, we need to complete the following steps:
3131
1、Install Kusion
3232

3333
We recommend using HomeBrew(Mac), Scoop(Windows), or an installation shell script to download and install Kusion.
34-
See [Download and Install](../../getting-started/install-kusion) for more details.
34+
See [Download and Install](../../../2-getting-started/1-install-kusion.md) for more details.
3535

3636
2、Running Kubernetes cluster
3737

@@ -44,7 +44,7 @@ This guide is to deploy an app using Kusion, relying on the Kusion CLI and an ex
4444

4545
### Initializing workspace configuration
4646

47-
In version 0.10.0, we have introduced the new concept of [workspaces](../../concepts/workspace), which is a logical layer whose configurations represent an opinionated set of defaults, often appointed by the platform team. In most cases workspaces are represented with an "environment" in traditional SDLC terms. These workspaces provide a means to separate the concerns between the **application developers** who wish to focus on business logic, and a group of **platform engineers** who wish to standardize the applications on the platform.
47+
In version 0.10.0, we have introduced the new concept of [workspaces](../../../3-concepts/4-workspace.md), which is a logical layer whose configurations represent an opinionated set of defaults, often appointed by the platform team. In most cases workspaces are represented with an "environment" in traditional SDLC terms. These workspaces provide a means to separate the concerns between the **application developers** who wish to focus on business logic, and a group of **platform engineers** who wish to standardize the applications on the platform.
4848

4949
Driven by the discipline of Platform Engineering, management of the workspaces, including create/updating/deleting workspaces and their configurations should be done by dedicated platform engineers in a large software organizations to facilitate a more mature and scalable collaboration pattern.
5050

@@ -120,7 +120,7 @@ The project directory has the following files that are automatically generated:
120120
In general, the `.k` files are the KCL source code that represents the application configuration, and the `.yaml` is the static configuration file that describes behavior at the project or stack level.
121121

122122
:::info
123-
See [Project](../../concepts/project/overview) and [Stack](../../concepts/stack/overview) for more details about Project and Stack.
123+
See [Project](../../../3-concepts/1-project/1-overview.md) and [Stack](../../../3-concepts/2-stack/1-overview.md) for more details about Project and Stack.
124124
:::
125125

126126
The `kusion init` command will create a demo quickstart application, we may update the `dev/kcl.mod` and `dev/main.k` later.
@@ -189,7 +189,7 @@ cd simple-service/dev && kusion preview
189189
```
190190
191191
:::tip
192-
For instructions on the kusion command line tool, execute `kusion -h`, or refer to the tool's online [documentation](../../reference/commands).
192+
For instructions on the kusion command line tool, execute `kusion -h`, or refer to the tool's online [documentation](../../../6-reference/1-commands/index.md).
193193
:::
194194
195195
## Applying

docs/kusion/5-user-guides/2-working-with-k8s/10-customize-health-policy.md renamed to docs/kusion/5-user-guides/1-using-kusion-cli/2-working-with-k8s/10-customize-health-policy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Kusion now offers advanced customized health checks leveraging the power of `KCL
88

99
## Prerequisites
1010

11-
Please refer to the [prerequisites](deploy-application#prerequisites) in the guide for deploying an application.
11+
Please refer to the [prerequisites](1-deploy-application.md#prerequisites) in the guide for deploying an application.
1212

13-
The example below also requires you to have [initialized the project](deploy-application#initializing) using the `kusion workspace create` and `kusion init` command, which will create a workspace and also generate a [`kcl.mod` file](deploy-application#kclmod) under the stack directory.
13+
The example below also requires you to have [initialized the project](1-deploy-application.md#initializing) using the `kusion workspace create` and `kusion init` command, which will create a workspace and also generate a [`kcl.mod` file](1-deploy-application.md#kclmod) under the stack directory.
1414

1515
## Defining a Health Policy
1616

@@ -191,4 +191,4 @@ Ensure that the resource meets the conditions defined in your health policy.
191191

192192
Customized health checks provides a powerful way to ensure your Kubernetes resources are in the desired state before considering an `apply` operation complete. By defining health policies, you can automate the validation of your resources and ensure they meet specific criteria before being considered healthy. By leveraging KCL, you can create sophisticated health check logic tailored to your specific `project` needs.
193193

194-
For more details on KCL and its syntax, refer to the [KCL documentation](../../4-configuration-walkthrough/2-kcl-basics.md).
194+
For more details on KCL and its syntax, refer to the [KCL documentation](../../../4-configuration-walkthrough/2-kcl-basics.md).

docs/kusion/5-user-guides/2-working-with-k8s/2-container.md renamed to docs/kusion/5-user-guides/1-using-kusion-cli/2-working-with-k8s/2-container.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ id: container
66

77
You can manage container-level configurations in the `AppConfiguration` model via the `containers` field (under the `workload` schema). By default, everything defined in the `containers` field will be treated as application containers. Sidecar containers will be supported in a future version of kusion.
88

9-
For the full `Container` schema reference, please see [here](../../reference/modules/developer-schemas/workload/service#schema-container) for more details.
9+
For the full `Container` schema reference, please see [here](../../../6-reference/2-modules/1-developer-schemas/workload/service.md#schema-container) for more details.
1010

1111
## Pre-requisite
1212

13-
Please refer to the [prerequisites](deploy-application#prerequisites) in the guide for deploying an application.
13+
Please refer to the [prerequisites](1-deploy-application.md#prerequisites) in the guide for deploying an application.
1414

15-
The example below also requires you to have [initialized the project](deploy-application#initializing) using the `kusion workspace create` and `kusion init` command, which will create a workspace and also generate a [`kcl.mod` file](deploy-application#kclmod) under the stack directory.
15+
The example below also requires you to have [initialized the project](1-deploy-application.md#initializing) using the `kusion workspace create` and `kusion init` command, which will create a workspace and also generate a [`kcl.mod` file](1-deploy-application.md#kclmod) under the stack directory.
1616

1717
## Managing Workspace Configuration
1818

19-
In the last guide, we introduced a step to [initialize a workspace](deploy-application#initializing-workspace-configuration) with an empty configuration. The same empty configuration will still work in this guide, no changes are required there.
19+
In the last guide, we introduced a step to [initialize a workspace](1-deploy-application.md#initializing-workspace-configuration) with an empty configuration. The same empty configuration will still work in this guide, no changes are required there.
2020

2121
However, if you (or the platform team) would like to set default values for the workloads to standardize the behavior of applications in the `dev` workspace, you can do so by updating the `~/dev.yaml`:
2222

@@ -40,7 +40,7 @@ The workspace configuration need to be updated with the command:
4040
kusion workspace update dev -f ~/dev.yaml
4141
```
4242

43-
For a full reference of what can be configured in the workspace level, please see the [workspace reference](../../reference/modules/workspace-configs/workload/service).
43+
For a full reference of what can be configured in the workspace level, please see the [workspace reference](../../../6-reference/2-modules/2-workspace-configs/workload/service.md).
4444

4545
## Example
4646

@@ -89,7 +89,7 @@ import network as n
8989

9090
## Apply
9191

92-
Re-run steps in [Applying](deploy-application#applying), new container configuration can be applied.
92+
Re-run steps in [Applying](1-deploy-application.md#applying), new container configuration can be applied.
9393

9494
```
9595
$ kusion apply

docs/kusion/5-user-guides/2-working-with-k8s/3-service.md renamed to docs/kusion/5-user-guides/1-using-kusion-cli/2-working-with-k8s/3-service.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ You can determine how to expose your service in the `AppConfiguration` model via
88

99
Unless explicitly defined, each of the ports exposed is by default exposed privately as a `ClusterIP` type service. You can expose a port publicly by specifying the `public` field in the `Port` schema. At the moment, the implementation for publicly access is done via Load Balancer type service backed by cloud providers. Ingress will be supported in a future version of kusion.
1010

11-
For the `Port` schema reference, please see [here](../../reference/modules/developer-schemas/workload/service#schema-port) for more details.
11+
For the `Port` schema reference, please see [here](../../../6-reference/2-modules/1-developer-schemas/workload/service.md#schema-port) for more details.
1212

1313
## Prerequisites
1414

15-
Please refer to the [prerequisites](deploy-application#prerequisites) in the guide for deploying an application.
15+
Please refer to the [prerequisites](1-deploy-application.md#prerequisites) in the guide for deploying an application.
1616

17-
The example below also requires you to have [initialized the project](deploy-application#initializing) using the `kusion workspace create` and `kusion init` command, which will create a workspace and also generate a [`kcl.mod` file](deploy-application#kclmod) under the stack directory.
17+
The example below also requires you to have [initialized the project](1-deploy-application.md#initializing) using the `kusion workspace create` and `kusion init` command, which will create a workspace and also generate a [`kcl.mod` file](1-deploy-application.md#kclmod) under the stack directory.
1818

1919
## Managing Workspace Configuration
2020

21-
In the first guide in this series, we introduced a step to [initialize a workspace](deploy-application#initializing-workspace-configuration) with an empty configuration. The same empty configuration will still work in this guide, no changes are required there.
21+
In the first guide in this series, we introduced a step to [initialize a workspace](1-deploy-application.md#initializing-workspace-configuration) with an empty configuration. The same empty configuration will still work in this guide, no changes are required there.
2222

2323
However, if you (or the platform team) would like to set default values for the services to standardize the behavior of applications in the `dev` workspace, you can do so by updating the `~/dev.yaml`:
2424

@@ -40,7 +40,7 @@ The workspace configuration need to be updated with the command:
4040
kusion workspace update dev -f ~/dev.yaml
4141
```
4242

43-
For a full reference of what can be configured in the workspace level, please see the [workspace reference](../../reference/modules/workspace-configs/networking/network).
43+
For a full reference of what can be configured in the workspace level, please see the [workspace reference](../../../6-reference/2-modules/2-workspace-configs/networking/network.md).
4444

4545
## Example
4646

@@ -92,7 +92,7 @@ The code above changes the service port to expose from `80` in the last guide to
9292

9393
## Applying
9494

95-
Re-run steps in [Applying](deploy-application#applying), new service configuration can be applied.
95+
Re-run steps in [Applying](1-deploy-application.md#applying), new service configuration can be applied.
9696

9797
```
9898
$ kusion apply

docs/kusion/5-user-guides/2-working-with-k8s/4-image-upgrade.md renamed to docs/kusion/5-user-guides/1-using-kusion-cli/2-working-with-k8s/4-image-upgrade.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ id: image-upgrade
66

77
You can declare the application's container image via `image` field of the `Container` schema.
88

9-
For the full `Container` schema reference, please see [here](../../reference/modules/developer-schemas/workload/service#schema-container) for more details.
9+
For the full `Container` schema reference, please see [here](../../../6-reference/2-modules/1-developer-schemas/workload/service.md#schema-container) for more details.
1010

1111
## Pre-requisite
1212

13-
Please refer to the [prerequisites](deploy-application#prerequisites) in the guide for deploying an application.
13+
Please refer to the [prerequisites](1-deploy-application.md#prerequisites) in the guide for deploying an application.
1414

15-
The example below also requires you to have [initialized the project](deploy-application#initializing) using the `kusion workspace create` and `kusion init` command, which will create a workspace and also generate a [`kcl.mod` file](deploy-application#kclmod) under the stack directory.
15+
The example below also requires you to have [initialized the project](1-deploy-application.md#initializing) using the `kusion workspace create` and `kusion init` command, which will create a workspace and also generate a [`kcl.mod` file](1-deploy-application.md#kclmod) under the stack directory.
1616

1717
## Managing Workspace Configuration
1818

19-
In the first guide in this series, we introduced a step to [initialize a workspace](deploy-application#initializing-workspace-configuration) with an empty configuration. The same empty configuration will still work in this guide, no changes are required there.
19+
In the first guide in this series, we introduced a step to [initialize a workspace](1-deploy-application.md#initializing-workspace-configuration) with an empty configuration. The same empty configuration will still work in this guide, no changes are required there.
2020

2121
## Example
2222

@@ -40,7 +40,7 @@ Everything else in `main.k` stay the same.
4040

4141
## Applying
4242

43-
Re-run steps in [Applying](deploy-application#applying), update image is completed.
43+
Re-run steps in [Applying](1-deploy-application.md#applying), update image is completed.
4444

4545
```
4646
$ kusion apply

0 commit comments

Comments
 (0)