Skip to content

Commit 7a7e2dc

Browse files
committed
update
1 parent d0133fc commit 7a7e2dc

File tree

1 file changed

+269
-17
lines changed

1 file changed

+269
-17
lines changed

docs/operators/01-boostrapping.md

Lines changed: 269 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,8 @@ spec:
11211121
The gardener landscape configuration requires a secret that contains the kubeconfig to access the Gardener project. For that purpose, create a secret named `gardener-landscape-kubeconfig` in the `openmcp-system` namespace of the platform cluster that contains the kubeconfig file that has access to the Gardener installation.
11221122

11231123
```shell
1124-
kubectl create secret generic gardener-landscape-kubeconfig --from-file=kubeconfig=/path/to/service-account-kubeconfig -n openmcp-system
1124+
kubectl --kubeconfig ./kubeconfigs/platform.kubeconfig create namespace openmcp-system
1125+
kubectl --kubeconfig ./kubeconfigs/platform.kubeconfig create secret generic gardener-landscape-kubeconfig --from-file=kubeconfig=/path/to/service-account-kubeconfig -n openmcp-system
11251126
```
11261127

11271128
The kubeconfig content can be retrieved from the Gardener dashboard or by creating a service account in the Gardener project. See the [Gardener documentation](https://gardener.cloud/docs/getting-started/project/#service-accounts) for more information on how to create a service account.
@@ -1196,8 +1197,7 @@ spec:
11961197

11971198
<TabItem value="AWS" label="AWS" >
11981199
```yaml title="config/extra-manifests/gardener-cluster-provider-shoot-small.yaml"
1199-
apiVersion: gardener.clusters.openmcp.cloud/v1alpha1
1200-
kind: ProviderConfig
1200+
text: TBD
12011201
```
12021202
</TabItem>
12031203

@@ -1241,8 +1241,7 @@ spec:
12411241

12421242
<TabItem value="AWS" label="AWS" >
12431243
```yaml title="config/extra-manifests/gardener-cluster-provider-shoot-small.yaml"
1244-
apiVersion: gardener.clusters.openmcp.cloud/v1alpha1
1245-
kind: ProviderConfig
1244+
text: TBD
12461245
```
12471246
</TabItem>
12481247

@@ -1255,35 +1254,288 @@ Replace also `<kubernetes-version>` with the desired Kubernetes version (e.g. `1
12551254
Now run the `openmcp-bootstrapper` CLI tool to update the Git repository and deploy openMCP to the `platform` Gardener Shoot cluster:
12561255

12571256
```shell
1258-
docker run --rm --network kind -v ./config:/config -v ./kubeconfigs:/kubeconfigs ghcr.io/openmcp-project/images/openmcp-bootstrapper:${OPENMCP_BOOTSTRAPPER_VERSION} manage-deployment-repo --git-config /config/git-config.yaml --kubeconfig /kubeconfigs/platform-int.kubeconfig /config/bootstrapper-config.yaml
1257+
docker run --rm -v ./config:/config -v ./kubeconfigs:/kubeconfigs ghcr.io/openmcp-project/images/openmcp-bootstrapper:${OPENMCP_BOOTSTRAPPER_VERSION} manage-deployment-repo --git-config /config/git-config.yaml --kubeconfig /kubeconfigs/platform.kubeconfig --extra-manifest-dir /config/extra-manifests /config/bootstrapper-config.yaml
12591258
```
12601259

12611260
You should see output similar to the following:
12621261

12631262
```shell
1264-
Info: Downloading component ghcr.io/openmcp-project/components//github.com/openmcp-project/openmcp:v0.0.20
1263+
Info: Downloading component ghcr.io/openmcp-project/components//github.com/openmcp-project/openmcp:v0.0.25
12651264
Info: Creating template transformer
12661265
Info: Downloading template resources
1267-
/tmp/openmcp.cloud.bootstrapper-2402093624/transformer/download/fluxcd: 9 file(s) with 691073 byte(s) written
1268-
/tmp/openmcp.cloud.bootstrapper-2402093624/transformer/download/openmcp: 8 file(s) with 6625 byte(s) written
1266+
/tmp/openmcp.cloud.bootstrapper-245193548/transformer/download/fluxcd: 9 file(s) with 691073 byte(s) written
1267+
/tmp/openmcp.cloud.bootstrapper-245193548/transformer/download/openmcp: 8 file(s) with 6625 byte(s) written
12691268
Info: Transforming templates into deployment repository structure
12701269
Info: Fetching openmcp-operator component version
1271-
Info: Cloning deployment repository https://github.com/reshnm/template-test
1272-
Info: Checking out or creating branch kind
1270+
Info: Cloning deployment repository https://github.com/reshnm/openmcp-deployment
1271+
Info: Checking out or creating branch gardener
12731272
Info: Applying templates from "gitops-templates/fluxcd"/"gitops-templates/openmcp" to deployment repository
1274-
Info: Templating providers: clusterProviders=[{kind [123 34 101 120 116 114 97 86 111 108 117 109 101 77 111 117 110 116 115 34 58 91 123 34 109 111 117 110 116 80 97 116 104 34 58 34 47 118 97 114 47 114 117 110 47 100 111 99 107 101 114 46 115 111 99 107 34 44 34 110 97 109 101 34 58 34 100 111 99 107 101 114 34 125 93 44 34 101 120 116 114 97 86 111 108 117 109 101 115 34 58 91 123 34 104 111 115 116 80 97 116 104 34 58 123 34 112 97 116 104 34 58 34 47 118 97 114 47 114 117 110 47 104 111 115 116 45 100 111 99 107 101 114 46 115 111 99 107 34 44 34 116 121 112 101 34 58 34 83 111 99 107 101 116 34 125 44 34 110 97 109 101 34 58 34 100 111 99 107 101 114 34 125 93 44 34 118 101 114 98 111 115 105 116 121 34 58 34 100 101 98 117 103 34 125] map[extraVolumeMounts:[map[mountPath:/var/run/docker.sock name:docker]] extraVolumes:[map[hostPath:map[path:/var/run/host-docker.sock type:Socket] name:docker]] verbosity:debug]}], serviceProviders=[], platformServices=[], imagePullSecrets=[]
1273+
Info: Templating providers: clusterProviders=[{gardener [] map[]}], serviceProviders=[], platformServices=[], imagePullSecrets=[]
12751274
Info: Applying Custom Resource Definitions to deployment repository
1276-
/tmp/openmcp.cloud.bootstrapper-2402093624/repo/resources/openmcp/crds: 8 file(s) with 475468 byte(s) written
1277-
/tmp/openmcp.cloud.bootstrapper-2402093624/repo/resources/openmcp/crds: 1 file(s) with 1843 byte(s) written
1278-
Info: No extra manifest directory specified, skipping
1275+
/tmp/openmcp.cloud.bootstrapper-245193548/repo/resources/openmcp/crds: 8 file(s) with 484832 byte(s) written
1276+
/tmp/openmcp.cloud.bootstrapper-245193548/repo/resources/openmcp/crds: 3 file(s) with 198428 byte(s) written
1277+
Info: Applying extra manifests from /config/extra-manifests to deployment repository
12791278
Info: Committing and pushing changes to deployment repository
1280-
Info: Created commit: 287f9e88b905371bba412b5d0286ad02db0f4aac
1281-
Info: Running kustomize on /tmp/openmcp.cloud.bootstrapper-2402093624/repo/envs/dev
1279+
Info: Created commit: ee2b6ef079808fbc198b4f6eced1afb89f64d1d1
1280+
Info: Running kustomize on /tmp/openmcp.cloud.bootstrapper-245193548/repo/envs/dev
12821281
Info: Applying Kustomization manifest: default/bootstrap
12831282
```
12841283

1284+
### Inspect the Git repository
1285+
1286+
The desired state of the openMCP landscape has now been created in the Git repository and should look similar to the following structure:
1287+
1288+
```shell
1289+
.
1290+
├── envs
1291+
│   └── dev
1292+
│   ├── fluxcd
1293+
│   │   ├── flux-kustomization.yaml
1294+
│   │   ├── gitrepo.yaml
1295+
│   │   └── kustomization.yaml
1296+
│   ├── kustomization.yaml
1297+
│   ├── openmcp
1298+
│   │   ├── config
1299+
│   │   │   └── openmcp-operator-config.yaml
1300+
│   │   └── kustomization.yaml
1301+
│   └── root-kustomization.yaml
1302+
└── resources
1303+
├── fluxcd
1304+
│   ├── components.yaml
1305+
│   ├── flux-kustomization.yaml
1306+
│   ├── gitrepo.yaml
1307+
│   └── kustomization.yaml
1308+
├── kustomization.yaml
1309+
├── openmcp
1310+
│   ├── cluster-providers
1311+
│   │   └── gardener.yaml
1312+
│   ├── crds
1313+
│   │   ├── clusters.openmcp.cloud_accessrequests.yaml
1314+
│   │   ├── clusters.openmcp.cloud_clusterprofiles.yaml
1315+
│   │   ├── clusters.openmcp.cloud_clusterrequests.yaml
1316+
│   │   ├── clusters.openmcp.cloud_clusters.yaml
1317+
│   │   ├── gardener.clusters.openmcp.cloud_clusterconfigs.yaml
1318+
│   │   ├── gardener.clusters.openmcp.cloud_landscapes.yaml
1319+
│   │   ├── gardener.clusters.openmcp.cloud_providerconfigs.yaml
1320+
│   │   ├── openmcp.cloud_clusterproviders.yaml
1321+
│   │   ├── openmcp.cloud_platformservices.yaml
1322+
│   │   └── openmcp.cloud_serviceproviders.yaml
1323+
│   ├── deployment.yaml
1324+
│   ├── extra
1325+
│   │   ├── gardener-cluster-provider-shoot-small.yaml
1326+
│   │   ├── gardener-cluster-provider-shoot-workerless.yaml
1327+
│   │   └── gardener-landscape.yaml
1328+
│   ├── kustomization.yaml
1329+
│   ├── namespace.yaml
1330+
│   └── rbac.yaml
1331+
└── root-kustomization.yaml
1332+
```
1333+
1334+
The `envs/<environment-name>` folder contains the Kustomization files that are used by FluxCD to deploy openMCP to the platform cluster.
1335+
The `resources` folder contains the base resources that are used by the Kustomization files in the `envs/<environment-name>` folder.
1336+
1337+
## Inspect the Kustomizations in the platform cluster
1338+
1339+
Force an update of the GitRepository and Kustomization in the Kind cluster to pick up the changes made in the Git repository.
1340+
1341+
```shell
1342+
kubectl --kubeconfig ./kubeconfigs/platform.kubeconfig -n flux-system annotate gitrepository environments reconcile.fluxcd.io/requestedAt="$(date +%s)"
1343+
kubectl --kubeconfig ./kubeconfigs/platform.kubeconfig -n flux-system patch kustomization flux-system --type merge -p '{"spec":{"force":true}}'
1344+
```
1345+
1346+
Get the status of the GitRepository in the platform cluster.
12851347

1348+
```shell
1349+
kubectl --kubeconfig ./kubeconfigs/platform.kubeconfig get gitrepositories.source.toolkit.fluxcd.io -A
1350+
```
1351+
1352+
You should see output similar to the following:
12861353

1354+
```shell
1355+
NAMESPACE NAME URL AGE READY STATUS
1356+
flux-system environments https://github.com/<your-ourg>/<your-repo> 9m6s True stored artifact for revision 'docs@sha1:...'
1357+
```
1358+
So we have now successfully configured FluxCD to watch for changes in the specified GitHub repository, using the `environments` custom resource of kind `GitRepository`.
1359+
Now let's get the status of the Kustomization in the Kind cluster.
1360+
1361+
```shell
1362+
kubectl --kubeconfig ./kubeconfigs/platform.kubeconfig get kustomizations.kustomize.toolkit.fluxcd.io -A
1363+
```
1364+
1365+
You should see output similar to the following:
1366+
1367+
```shell
1368+
NAMESPACE NAME AGE READY STATUS
1369+
default bootstrap 5m31s True Applied revision: docs@sha1:...
1370+
flux-system flux-system 10m True Applied revision: docs@sha1:...
1371+
```
1372+
1373+
You can see that there are now two Kustomizations in the platform cluster.
1374+
The `flux-system` Kustomization is used to deploy the FluxCD controllers and the `bootstrap` Kustomization is used to deploy openMCP to the platform cluster.
1375+
1376+
### Inspect cluster profiles and clusters
1377+
1378+
Based on the provider configuration for the Gardener cluster provider, two cluster profiles should have been created: `dev.gardener.shoot-small` and `dev.gardener.shoot-workerless`.
1379+
1380+
```shell
1381+
kubectl --kubeconfig ./kubeconfigs/platform.kubeconfig get clusterprofiles.clusters.openmcp.cloud
1382+
```
1383+
1384+
You should see output similar to the following:
1385+
1386+
```shell
1387+
NAME PROVIDER CONFIG
1388+
dev.gardener.shoot-small gardener shoot-small
1389+
dev.gardener.shoot-workerless gardener shoot-workerless
1390+
```
1391+
1392+
As you can see, these names match the profile names used in the openmcp-operator configuration. The nameing convention is `<environment-name>.<cluster-provider-name>.<profile>`.
1393+
1394+
Inspecting a cluster profile, shows the supported kubernetes versions:
1395+
1396+
```shell
1397+
kubectl --kubeconfig ./kubeconfigs/platform.kubeconfig get clusterprofiles.clusters.openmcp.cloud dev.gardener.shoot-small -o yaml
1398+
```
1399+
1400+
You should see output similar to the following:
1401+
1402+
```yaml
1403+
apiVersion: clusters.openmcp.cloud/v1alpha1
1404+
kind: ClusterProfile
1405+
metadata:
1406+
creationTimestamp: "2025-10-01T06:38:48Z"
1407+
generation: 1
1408+
name: dev.gardener.shoot-small
1409+
resourceVersion: "173288"
1410+
uid: 926aa91c-f021-41f7-b97c-dc7eaf0e19bf
1411+
spec:
1412+
providerConfigRef:
1413+
name: shoot-small
1414+
providerRef:
1415+
name: gardener
1416+
supportedVersions:
1417+
- version: 1.33.3
1418+
- deprecated: true
1419+
version: 1.33.2
1420+
- version: 1.32.7
1421+
- deprecated: true
1422+
version: 1.32.6
1423+
- deprecated: true
1424+
version: 1.32.5
1425+
- deprecated: true
1426+
version: 1.32.4
1427+
- deprecated: true
1428+
version: 1.32.3
1429+
- deprecated: true
1430+
version: 1.32.2
1431+
- version: 1.31.11
1432+
- deprecated: true
1433+
version: 1.31.10
1434+
- deprecated: true
1435+
version: 1.31.9
1436+
- deprecated: true
1437+
version: 1.31.8
1438+
- deprecated: true
1439+
version: 1.31.7
1440+
- deprecated: true
1441+
version: 1.31.6
1442+
- deprecated: true
1443+
version: 1.31.5
1444+
- deprecated: true
1445+
version: 1.31.4
1446+
- deprecated: true
1447+
version: 1.31.3
1448+
- deprecated: true
1449+
version: 1.31.2
1450+
- version: 1.30.14
1451+
- deprecated: true
1452+
version: 1.30.13
1453+
- deprecated: true
1454+
version: 1.30.12
1455+
- deprecated: true
1456+
version: 1.30.11
1457+
- deprecated: true
1458+
version: 1.30.10
1459+
- deprecated: true
1460+
version: 1.30.9
1461+
- deprecated: true
1462+
version: 1.30.8
1463+
- deprecated: true
1464+
version: 1.30.7
1465+
- deprecated: true
1466+
version: 1.30.6
1467+
- deprecated: true
1468+
version: 1.30.5
1469+
- deprecated: true
1470+
version: 1.30.4
1471+
- deprecated: true
1472+
version: 1.30.3
1473+
- deprecated: true
1474+
version: 1.30.2
1475+
- deprecated: true
1476+
version: 1.30.1
1477+
```
1478+
1479+
You can also see the onboarding cluster that has been created by the openmcp-operator.
1480+
1481+
```shell
1482+
kubectl --kubeconfig ./kubeconfigs/platform.kubeconfig get clusters.clusters.openmcp.cloud -A
1483+
```
1484+
1485+
You should see output similar to the following:
1486+
1487+
```shell
1488+
NAMESPACE NAME PURPOSES PHASE VERSION PROVIDER AGE
1489+
openmcp-system onboarding ["onboarding"] Ready 1.32.7 gardener 30m
1490+
```
1491+
1492+
You can also get the shoot name of the onboarding cluster:
1493+
1494+
```shell
1495+
kubectl --kubeconfig ./kubeconfigs/platform.kubeconfig get clusters.clusters.openmcp.cloud --namespace openmcp-system onboarding -o jsonpath="{.status.providerStatus.shoot.metadata.name}"
1496+
```
1497+
1498+
You should see output similar to the following:
1499+
1500+
```shell
1501+
s-hl4uutd4
1502+
```
1503+
1504+
If you want, you can inspect the Gardener shoot in your Gardener project.
1505+
1506+
### Get Access to the Onboarding Cluster
1507+
1508+
In order to create resources on the onboarding cluster, you need to get access to the onboarding cluster.
1509+
To do so, create an access request that grants admin permissions on the onboarding cluster.
1510+
1511+
Create a file named `onboarding-access-request.yaml` in the configuration folder with the following content:
1512+
1513+
```yam title="config/onboarding-access-request.yaml"
1514+
apiVersion: clusters.openmcp.cloud/v1alpha1
1515+
kind: AccessRequest
1516+
metadata:
1517+
name: bootstrapper-onboarding
1518+
namespace: openmcp-system
1519+
spec:
1520+
clusterRef:
1521+
name: onboarding
1522+
namespace: openmcp-system
1523+
token:
1524+
permissions:
1525+
- rules:
1526+
- apiGroups:
1527+
- '*'
1528+
resources:
1529+
- '*'
1530+
verbs:
1531+
- '*'
1532+
```
1533+
1534+
Then apply the file to the platform cluster:
1535+
1536+
```shell
1537+
kubectl --kubeconfig ./kubeconfigs/platform.kubeconfig apply -f ./config/onboarding-access-request.yaml
1538+
```
12871539

12881540
<Tabs queryString="landscape" defaultValue="live">
12891541

0 commit comments

Comments
 (0)