|
2 | 2 |
|
3 | 3 | ## Development environment |
4 | 4 |
|
5 | | -### requirements |
| 5 | +### Requirements |
6 | 6 |
|
7 | 7 | * [docker](https://docs.docker.com/engine/install/) |
8 | 8 | * [kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation) |
9 | 9 | * [sonobuoy](https://sonobuoy.io/docs/v0.57.1/#installation) |
10 | 10 |
|
11 | | -### setup for development |
| 11 | +### Setup for Development |
12 | 12 |
|
13 | | -1. Generate python 3.10 env |
| 13 | +1. **Generate python 3.10 env** |
14 | 14 |
|
15 | 15 | ```bash |
16 | 16 | sudo apt-get install python3.10-dev |
|
23 | 23 |
|
24 | 24 | ``` |
25 | 25 |
|
26 | | -2. Install dependencies: |
| 26 | +2. **Install dependencies:** |
27 | 27 |
|
28 | 28 | ```bash |
29 | 29 | (venv) pip install pip-tools |
30 | 30 | (venv) pip-compile requirements.in |
31 | 31 | (venv) pip-sync requirements.txt |
32 | 32 | ``` |
33 | 33 |
|
34 | | -3. Set environment variables and launch the process: |
| 34 | +3. **Create a Cluster** |
| 35 | + |
| 36 | + To create a cluster, run: |
35 | 37 |
|
36 | 38 | ```bash |
37 | | - (venv) export CLUSTER_PROVIDER="kind" |
38 | | - (venv) python run.py |
| 39 | + (venv) python run_plugin.py create <plugin-name> ../clusterspec.yaml |
39 | 40 | ``` |
| 41 | + |
| 42 | +## Setting up and running the cluster-stacks plugin |
| 43 | + |
| 44 | +This section covers how to configure and run the `cluster-stacks` plugin to provision Kubernetes clusters and perform conformance tests. |
| 45 | + |
| 46 | +### Requirements for cluster-stacks plugin |
| 47 | + |
| 48 | +In addition to the core requirements, ensure the following are set up: |
| 49 | + |
| 50 | +* An **OpenStack** environment configured and accessible. |
| 51 | +* A `clouds.yaml` file defining OpenStack credentials and endpoints. |
| 52 | +* An installing the envsubst via this command: |
| 53 | + ```bash |
| 54 | + GOBIN=/tmp go install github.com/drone/envsubst/v2/cmd/envsubst@latest |
| 55 | + ``` |
| 56 | + |
| 57 | +### Environment Variables |
| 58 | + |
| 59 | +Before running the `cluster-stacks` plugin, you need to set up the following environment variable: |
| 60 | + |
| 61 | +- **GIT_ACCESS_TOKEN**: This token is required for Git operations, especially if your repository is private. |
| 62 | + |
| 63 | +To set the `GIT_ACCESS_TOKEN`, run the following command in your terminal: |
| 64 | + |
| 65 | +```bash |
| 66 | +export GIT_ACCESS_TOKEN=<your-github-token> |
| 67 | +``` |
| 68 | + |
| 69 | +### Configuring clusterspec.yaml file |
| 70 | + |
| 71 | +The `clusterspec.yaml` file is used to set parameters for creating a Kubernetes cluster with the `cluster-stacks` plugin. This file allows you to specify details related to the cluster-stack, Git integration, and cluster configurations. |
| 72 | + |
| 73 | +### Mandatory Parameter |
| 74 | + |
| 75 | +The only mandatory parameter in `clusterspec.yaml` is `clouds_yaml_path` field, which points to the `clouds.yaml` file for OpenStack. If other parameters are omitted, the default values will be used. |
| 76 | + |
| 77 | +### Optional Parameters |
| 78 | + |
| 79 | +You can include additional parameters in `clusterspec.yaml` to customize the cluster setup. These optional parameters are grouped below by their category. |
| 80 | + |
| 81 | +#### Cluster-Stack Related Parameters |
| 82 | + |
| 83 | +These parameters configure specific settings for the cluster-stack: |
| 84 | + |
| 85 | +```yaml |
| 86 | +cs_name: <cs_name> # Default: "scs" |
| 87 | +cs_k8s_version: <cs_k8s_version> # Default: "1.29" |
| 88 | +cs_version: <cs_version> # Default: "v1" |
| 89 | +cs_channel: <cs_channel> # Default: "stable" |
| 90 | +cs_cloudname: <cs_cloudname> # Default: "openstack" |
| 91 | +``` |
| 92 | +
|
| 93 | +#### Git-Related Parameters |
| 94 | +
|
| 95 | +The [Cluster Stack Operator](https://github.com/sovereignCloudStack/cluster-stack-operator/) (CSO) utilizing the [Cluster Stack Provider OpenStack](https://github.com/SovereignCloudStack/cluster-stacks/tree/main/providers/openstack) (CSPO) must be directed to the Cluster Stacks repository housing releases for the OpenStack provider. Modify the following parameters if you wish to redirect CSO and CSPO to an alternative Git repository |
| 96 | +
|
| 97 | +```yaml |
| 98 | +git_provider: <git_provider> # Default: "github" |
| 99 | +git_org_name: <git_org_name> # Default: "SovereignCloudStack" |
| 100 | +git_repo_name: <git_repo_name> # Default: "cluster-stacks" |
| 101 | +``` |
| 102 | +
|
| 103 | +#### Cluster Parameters |
| 104 | +
|
| 105 | +Set these parameters to customize the configuration for your cluster. |
| 106 | +
|
| 107 | +```yaml |
| 108 | +cs_cluster_name: <cs_cluster_name> # Default: "cs-cluster" |
| 109 | +cs_pod_cidr: <cs_pod_cidr> # Default: "192.168.0.0/16" |
| 110 | +cs_service_cidr: <cs_service_cidr> # Default: "10.96.0.0/12" |
| 111 | +cs_external_id: <cs_external_id> # Default: A generated UUID |
| 112 | +cs_k8s_patch_version: <cs_k8s_patch_version> # Default: "6" |
| 113 | +``` |
0 commit comments