Skip to content

Commit c1d327e

Browse files
DEiseltjschoone
andauthoredAug 22, 2024
📖 149 update docs for use in docsscscommunity (#150)
* fixed: md formatting causing docs build to fail Signed-off-by: Danny Eiselt <eiselt@b1-systems.de> * added: updated quickstart.md Signed-off-by: Danny Eiselt <eiselt@b1-systems.de> * added: overview.md Signed-off-by: Danny Eiselt <eiselt@b1-systems.de> * changed: getting_started file Signed-off-by: Danny Eiselt <eiselt@b1-systems.de> * added: deprecation note for how_to_use_csctl.md Signed-off-by: Danny Eiselt <eiselt@b1-systems.de> * Update getting_started.md Signed-off-by: Jan Schoone <6106846+jschoone@users.noreply.github.com> --------- Signed-off-by: Danny Eiselt <eiselt@b1-systems.de> Signed-off-by: Jan Schoone <6106846+jschoone@users.noreply.github.com> Co-authored-by: Jan Schoone <6106846+jschoone@users.noreply.github.com>
1 parent 0a58860 commit c1d327e

File tree

4 files changed

+105
-25
lines changed

4 files changed

+105
-25
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Configuring a Cluster Stack
1+
# Getting started
22

33
A [Cluster Stack](https://github.com/SovereignCloudStack/cluster-stacks) is full template of a Kubernetes cluster. A Cluster Stack can be configured on every provider that supports Cluster API.
44

5-
The Cluster Stack Operator facilitates using Cluster Stacks by automating all steps that users would have to do manually given they have a Cluster API management cluster.
5+
The Cluster Stack Operator facilitates using Cluster Stacks by automating all steps that users would have to do manually given they have a Cluster API management cluster.
66

77
The csctl helps to generate all files and build node images based on provided scripts in a format that the Cluster Stack Operator can use.
88

@@ -18,7 +18,7 @@ You should must have the following content inside your directory:
1818
- node-image directory (optional): the directory containing config and associated scripts to build node images
1919

2020

21-
## Configuring csctl
21+
## Configuring csctl
2222
The configuration of csctl has to be specified in the `csctl.yaml`. It needs to follow this structure:
2323

2424
```yaml
@@ -32,22 +32,8 @@ config:
3232
config:
3333
```
3434
35-
The apiVersion specifies the version of this configuration. Currently, there is only the version `csctl.clusterstack.x-k8s.io/v1alpha1`.
35+
The apiVersion specifies the version of this configuration. Currently, there is only the version `csctl.clusterstack.x-k8s.io/v1alpha1`.
3636

37-
Furthermore, the Kubernetes version in the format "v<major>.<minor>.<patch>" (e.g. 1.27.5) has to be specified as well as the name that should be given to the Cluster Stack.
37+
Furthermore, the Kubernetes version in the format 'v<major>.<minor>.<patch>' (e.g. 1.27.5) has to be specified as well as the name that should be given to the Cluster Stack.
3838

3939
Depending on your plugin, there might be a provider-specific configuration.
40-
41-
42-
## Templating the versions
43-
44-
There are three different versions in a Cluster Stack that can be templated by `csctl`:
45-
46-
```markdown
47-
- << .ClusterAddonVersion >>
48-
- << .ClusterClassVersion >>
49-
- << .NodeImageVersion >>
50-
```
51-
If you want to specify one of these versions in your Helm chart or other configuration files, then use the one of the above mentioned templated versions.
52-
53-
To reference your node images, you will also need << .NodeImageRegistry >>.

‎docs/how_to_use_csctl.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1+
> Obsolete, content moved to overview.md and quickstart.md for use in docs.scs.community
2+
13
# Using csctl
24

35

4-
## What does csctl do?
6+
## What does csctl do?
57

68
As a user, you can create clusters based on Cluster Stacks with the help of the Cluster Stack Operator. The operator needs certain files, e.g. to apply the required Helm charts, and to get the necessary information about the versions in the cluster stack.
79

810
In order to not generate these files manually, this CLI tool takes a certain pre-defined directory structure, in which users can configure all necessary Helm charts and build scripts for node images, and generates the assets that the Cluster Stack Operator can process.
911

1012
Therefore, this tool can be used to configure Cluster Stacks and to test them with the Cluster Stack Operator. It can also be used to release stable releases of Cluster Stacks that can be published for a broader community.
1113

12-
## Different modes of csctl
14+
## Different modes of csctl
1315

1416
The csctl has multiple modes that can be used for different use cases.
1517

@@ -51,7 +53,7 @@ commit: f252304eb013014b35f8a91abf1f61aff2062601
5153
If you don't see a version there, then something has gone wrong. Re-check above steps and open an issue if it still does not work!
5254

5355

54-
If you're using `gh` CLI then you can also use the following to download it.
56+
If you're using `gh` CLI then you can also use the following to download it.
5557
```bash
5658
$ gh release download -p csctl_0.0.2_linux_amd64 -R SovereignCloudStack/csctl
5759
```
@@ -61,10 +63,10 @@ $ gh release download -p csctl_0.0.2_linux_amd64 -R SovereignCloudStack/csctl
6163
The most important subcommand is `create`. This command takes a path to the directory where you configured your Cluster Stack and generates the necessary files in the output directory via the `--output` flag:
6264

6365
```bash
64-
$ csctl create <path-to-cluster-stack-configuration-directory> --output <path-to-output-directory>
66+
$ csctl create <path-to-cluster-stack-configuration-directory> --output <path-to-output-directory>
6567
```
6668

67-
You can specify your node image registry with the flag `--node-image-registry`. The plugin of your provider will update the node images in the respective container registry.
69+
You can specify your node image registry with the flag `--node-image-registry`. The plugin of your provider will update the node images in the respective container registry.
6870

6971
You can use the `--mode` flag to specify the mode you want to use.
7072

@@ -74,4 +76,4 @@ For example:
7476
$ csctl create <path-to-cluster-stack-directory> --output <path-to-output-directory> --mode hash --node-image-registry <url-of-registry>
7577
```
7678

77-
You have to be authenticated to your cloud provider and container registry to which you want to upload the node images.
79+
You have to be authenticated to your cloud provider and container registry to which you want to upload the node images.

‎docs/overview.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Overview
2+
3+
## Introduction
4+
5+
The [Cluster Stack Operator](https://github.com/SovereignCloudStack/cluster-stack-operator) facilitates the usage of [Cluster Stacks](https://github.com/SovereignCloudStack/cluster-stacks) by automating all steps that can be automated. It takes Cluster Stacks release assets that consist mainly of two Helm charts, one to deploy in the management cluster, the other one to deploy in the workload clusters, as well as provider-specific node image (build) information.
6+
7+
Users can take existing releases of Cluster Stacks and the operator and will be able to create clusters easily.
8+
9+
This project facilitates building node image artifacts and release assets that can be used with the Cluster Stack Operator.
10+
11+
## What does csctl do?
12+
13+
As a user, you can create clusters based on Cluster Stacks with the help of the Cluster Stack Operator. The operator needs certain files, e.g. to apply the required Helm charts, and to get the necessary information about the versions in the cluster stack.
14+
15+
In order to not generate these files manually, this CLI tool takes a certain pre-defined directory structure, in which users can configure all necessary Helm charts and build scripts for node images, and generates the assets that the Cluster Stack Operator can process.
16+
17+
Therefore, this tool can be used to configure Cluster Stacks and to test them with the Cluster Stack Operator. It can also be used to release stable releases of Cluster Stacks that can be published for a broader community.
18+
19+
## Features of csctl
20+
1. Testing and quick iterations
21+
csctl is created with a single focus of building Cluster Stacks and testing them with Cluster Stack Operator quickly. This tool helps in doing quick iterations and facilitates testing Cluster Stacks.
22+
23+
2. Versioning
24+
When configuring Cluster Stacks, it is necessary to put versions in the configuration, e.g. to version a Helm chart or node images. This process is facilitated by the csctl through its own templating and mechanism to generate the right version, based on the content hash (for testing) or on a previous version (stable or beta channel). Users only have to use the right templating and the csctl will do all the versioning automatically.
25+
26+
3. Plugin mechanism for providers
27+
The plugin mechanism of csctl allows providers to implement all provider-specific steps that are needed for this provider. This can contain a fully automated building and uploading process for node images, which can be referenced in the Cluster Stack (using the templating logic for versioning).
28+
29+
4. Automated testing of Cluster Stacks
30+
The csctl enables automated testing of Cluster Stacks if integrated in a CI process that first builds all necessary files as well as node images (if needed) and then uses them to create a workload cluster based on the Cluster Stack.

‎docs/quickstart.md

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Quickstart
2+
3+
## Installation
4+
To download `csctl` there are two ways.
5+
Go to https://github.com/SovereignCloudStack/csctl/releases/latest and then click on the binary. The name of the binary looks similar to this `csctl_0.0.3_linux_amd64.tar.gz` for Linux amd64 architecture.
6+
7+
This will download the binary in your `~/Downloads` directory. Use the following commands to move it to your PATH.
8+
```bash
9+
tar xvzf ~/Downloads/csctl_<version>_linux_amd64.tar.gz
10+
chmod u+x ~/Downloads/csctl
11+
sudo mv ~/Downloads/csctl /usr/local/bin/csctl
12+
```
13+
14+
Alternative way of installing the binary is to use `[gh](https://github.com/cli/cli)` command line tool.
15+
Use the following command to download the latest binary from GitHub.
16+
```bash
17+
gh release download -p 'csctl_<version>_linux_amd64.tar.gz' -R SovereignCloudStack/csctl
18+
tar xvzf csctl_<version>_linux_amd64.tar.gz
19+
chmod u+x csctl
20+
sudo mv ./csctl /usr/local/bin/csctl
21+
```
22+
For darwin based systems, the steps are similar, you'll have to choose darwin based binaries instead of linux one mentioned above. You'll also need to update your destination directory.
23+
24+
## Creating Cluster Stacks
25+
26+
The most important subcommand is `create`. This command takes a path to the directory where you configured your Cluster Stack and generates the necessary files in the output directory via the `--output` flag:
27+
28+
```bash
29+
$ csctl create <path-to-cluster-stack-configuration-directory> --output <path-to-output-directory>
30+
```
31+
32+
You can specify your node image registry with the flag `--node-image-registry`. The plugin of your provider will update the node images in the respective container registry.
33+
34+
You can use the `--mode` flag to specify the mode you want to use.
35+
36+
For example:
37+
38+
```bash
39+
$ csctl create <path-to-cluster-stack-directory> --output <path-to-output-directory> --mode hash --node-image-registry <url-of-registry>
40+
```
41+
42+
You have to be authenticated to your cloud provider and container registry to which you want to upload the node images.
43+
44+
## Different modes of csctl
45+
46+
The csctl has multiple modes that can be used for different use cases.
47+
48+
### Hash mode
49+
50+
This mode is the most used one, as it allows quick iterations and testing of a cluster stack. It takes the hash of the content of the cluster stack and generates a semver version on this. You can combine it with the `custom` channel of Cluster Stack Operator and test your Cluster Stacks easily!
51+
52+
### Stable mode
53+
54+
This mode checks for existing releases of cluster stacks and versions your cluster stack accordingly. If you have an existing release of "v1", then it would use "v2" for the new one. It also checks whether the node images and cluster addons have changed or not and will only update the versions if something actually changed.
55+
56+
### Beta mode
57+
58+
Similar to stable mode, but for a beta release channel. It versions according to "v0-beta.1", etc.
59+
60+
### Custom mode
61+
62+
The custom mode can be used to define your own version. You can input any semver version and your cluster stack will be versioned accordingly.

0 commit comments

Comments
 (0)
Please sign in to comment.