Skip to content

Commit d1f2c6c

Browse files
committed
Create scripts to extract scripts, removing duplication
1 parent 0d7cc4f commit d1f2c6c

23 files changed

Lines changed: 379 additions & 1449 deletions

scripts/util/cks-samples/README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,27 @@ Example files that can be used when creating the CloudStack Kubernetes Service I
55

66
## Usage
77

8-
### The basic directory
8+
### The basic template - create-scripts.sh
99

10-
In the basic directory, there is a scripts directory that can be used as a template to start the customization. It is basically the original cloud-init scripts, but they can then be modified as needed for the CKS cluster. To start, just copy the scripts directory into the util directory, peer with the create-kubernetes-binaries-iso.sh script.
10+
If you want to override the CKS installation starting with the basic CKS installation scripts, just run:
1111

12-
### The cilium directory
12+
```
13+
bash create-scripts.sh ${CLOUDSTACK_REPO_HOME}/plugins/integrations/kubernetes-service/src/main/resources/conf ${CLOUDSTACK_REPO_HOME}/scripts/util/scripts
14+
```
1315

14-
In the cilium directory, there is a modified version of create-kubernetes-binaries-iso.sh which contains what would be needed to install Helm and install Cilium instead of Weave. Helm needs to be installed and in the path on the OS where the ISO build will be run. There is no need to customize anything under the cilium directory if you are only looking to run Cilium instead of Weave, but just like the basic directory, other aspects can be customized.
16+
You can make any adjustments to the scripts under ${CLOUDSTACK_REPO_HOME}/scripts/util/scripts as necessary. Then you can run create-kubernetes-binaries-iso.sh in the parent directory as you would normally to create your ISO.
17+
18+
### Cilium - create-scripts-cilium.sh
19+
20+
If you want a CKS installation that installs both Cilium (instead of Weave) and Helm, you can run the Cilium create script like so:
21+
22+
```
23+
bash create-scripts-cilium.sh ${CLOUDSTACK_REPO_HOME}/plugins/integrations/kubernetes-service/src/main/resources/conf ${CLOUDSTACK_REPO_HOME}/scripts/util/cks-samples/scripts
24+
```
25+
26+
You can make any adjustments to the scripts under ${CLOUDSTACK_REPO_HOME}/scripts/util/cks-samples/scripts as necessary, although by default, the scripts should install what is necessary to install Cilium. There are helm-overrides for Cilium under the helm-overrides directory that can be modified as well.
27+
28+
Once any adjustments are made (not required), you can run create-kubernetes-binaries-iso-cilium.sh in a similar fashion to how create-kubernetes-binaries-iso.sh would be run, replacing the Weave URL with the Cilium version and Helm version (see examples in the usage).
1529

1630

1731
## References in CloudStack

scripts/util/cks-samples/basic/scripts/control-node-add/deploy-kube-system.tmpl

Lines changed: 0 additions & 43 deletions
This file was deleted.

scripts/util/cks-samples/basic/scripts/control-node-add/setup-containerd.tmpl

Lines changed: 0 additions & 29 deletions
This file was deleted.

scripts/util/cks-samples/basic/scripts/control-node-add/setup-kube-system

Lines changed: 0 additions & 154 deletions
This file was deleted.

scripts/util/cks-samples/basic/scripts/control-node/deploy-kube-system.tmpl

Lines changed: 0 additions & 78 deletions
This file was deleted.

scripts/util/cks-samples/basic/scripts/control-node/setup-containerd.tmpl

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)