Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Commit dbb412c

Browse files
Add docs
Signed-off-by: michal.gubricky <michal.gubricky@dnation.cloud>
1 parent e8dc966 commit dbb412c

File tree

3 files changed

+97
-0
lines changed

3 files changed

+97
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# CSCTL plugin for OpenStack
2+
3+
## Table of Contents
4+
5+
- [CSCTL plugin for OpenStack](#csctl-plugin-for-openstack)
6+
- [Table of Contents](#table-of-contents)
7+
- [Introduction](#introduction)
8+
- [Features of csctl plugin for OpenStack](#features-of-csctl-plugin-for-openstack)
9+
- [Docs](#docs)
10+
11+
## Introduction
12+
13+
Cluster Stacks are intended to be well-tested bundles of Kubernetes manifests designed to bootstrap productive Kubernetes clusters using the CAPI approach.
14+
15+
In the case of OpenStack as the infrastructure layer, several custom components, in addition to the CAPI and CAPO (Cluster API provider OpenStack) operators, are involved in the Kubernetes cluster lifecycle management (LCM):
16+
17+
- CSO (Cluster Stack Operator)
18+
- CSPO (Cluster Stack Provider OpenStack)
19+
- CSCTL (CLI for Cluster Stacks management)
20+
21+
**CSO** is the provider-agnostic component that handles the core processes.
22+
**CSPO** is the provider-specific component responsible for uploading the node images to the OpenStack project, for later consumption by the CAPO.
23+
**CSCTL** facilitates the Cluster Stack creation and versioning process.
24+
25+
This project facilitates building node images that can be used with the Cluster Stack Operator.
26+
27+
## Features of csctl plugin for OpenStack
28+
29+
1. The fully automated building and uploading process for node images, which can be referenced in the Cluster Stack (using the templating logic for versioning).
30+
31+
## Docs
32+
[Docs](./docs/README.md)

docs/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# csctl plugin for OpenStack documentation
2+
3+
## Using csctl plugin for OpenStack
4+
Do you have your Cluster Stack configured already? Then check out [how to use](./how_to_use_csctl_plugin_openstack.md) the this plugin!
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Using the csctl plugin for OpenStack
2+
3+
## What does the csctl plugin for OpenStack do?
4+
5+
As a user, you can create clusters based on Cluster Stacks with the help of the Cluster Stack Operators (CSO and CSPO). The operators need certain files, such as those required to apply the necessary Helm charts and to obtain information about the versions in the cluster stack.
6+
7+
To avoid generating these files manually, you can use [CSCTL](https://github.com/SovereignCloudStack/csctl). In the case of provider-specific Cluster Stacks, the `CSCTL` tool invokes the provider-specific CSCTL plugin. Therefore, the CSCTL plugin for OpenStack is essential if the user intends to build, upload node images to an S3 bucket, and then import them into Glance.
8+
9+
## Different methods of csctl plugin for OpenStack
10+
11+
The csctl plugin for OpenStack offers two methods that can be used for different use cases.
12+
13+
### Get method
14+
15+
This method can be used when the creator of cluster-stacks has already built and stored image(s) in some S3 storage. Then, they need to insert the URL to those image(s) in the `config.yaml`. The plugin, based on the configuration file, then generates `node-images.yaml` in the release directory.
16+
17+
### Build method
18+
19+
The use case for this method is the opposite of the `Get` method. It means that the cluster-stack creator intends to use an image that has not yet been built. The plugin then builds image(s) based on Packer scripts in the `node-images` folder and pushes these image(s) to an S3 bucket. In this mode, you need to provide the path to your S3 storage credentials using the `--node-image-registry` flag, see [registry.yaml](./example/cluster-stacks/openstack/ferrol/node-images/registry.yaml). The URL does not need to be set in `config.yaml`, plugin can creates for you based on this pattern:
20+
21+
```bash
22+
https://<endpoint>/<bucket-name>/<image-dir-name>
23+
```
24+
25+
Be aware of that in this method you need to specify `imageDir` in `config.yaml` file.
26+
27+
> [!NOTE]
28+
> URL creation does not work for OpenStack Swift.
29+
30+
## Installing csctl plugin for OpenStack
31+
32+
You can click on the respective release of the csctl plugin for OpenStack on GitHub and download the binary.
33+
34+
Assuming, you have downloaded the `<release-name>` binary in your Downloads directory, you will need the following commands to rename the binary and to give it executable permissions.
35+
36+
```bash
37+
sudo chmod u+x ~/Downloads/<release-name>
38+
sudo mv ~/Downloads/<release-name> /usr/local/bin/csctl-openstack # or use any bin directory from your PATH
39+
```
40+
41+
If you're using `gh` CLI then you can also use the following to download it.
42+
43+
```bash
44+
gh release download -p <release-name> -R SovereignCloudStack/csctl-plugin-openstack
45+
```
46+
47+
## Creating node-images file in release directory of cluster-stacks
48+
49+
The most important subcommand is `create-node-images`. This command takes a path to the directory where you configured your Cluster Stack and generates the `node-images.yaml` file in the output directory.
50+
51+
```bash
52+
csctl-openstack create-node-images cluster-stack-directory cluster-stack-release-directory
53+
```
54+
55+
If you choose `build` method you need to provide the path to your node image registry credentials like this:
56+
57+
```bash
58+
create-node-images cluster-stack-directory cluster-stack-release-directory node-image-registry-path
59+
```
60+
61+
Then the plugin push created node image(s) to the appropriate S3 bucket.

0 commit comments

Comments
 (0)