Changes for page Rancher 2
Last modified by Diana Strebkova on 2025/12/12 14:23
From version 6.2
edited by Diana Strebkova
on 2025/12/08 15:39
on 2025/12/08 15:39
Change comment:
There is no comment for this version
To version 20.1
edited by Diana Strebkova
on 2025/12/12 14:21
on 2025/12/12 14:21
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 3 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -159,7 +159,7 @@ 159 159 == Add public helm chart == 160 160 161 161 {{warning width="70" title="Chartmuseum Deprecation"}} 162 -Chartmuseum is deprecated in new Harbor versions, we are migrating all helm charts to oci-compatible repositories in Harbor !New approach to add chart repositories in rancher.162 +Chartmuseum is deprecated in new Harbor versions, we are migrating all helm charts to oci-compatible repositories in Harbor with "PKEY-helm" naming convention. For internal harbor repos, use new approach to add OCI chart repositories in rancher. 163 163 {{/warning}} 164 164 165 165 In this section, we describe (% style="color:#172b4d" %)how to add public helm charts like the one of DevOps-as-a-Service to a cluster to allow manual deployments. ... ... @@ -220,7 +220,7 @@ 220 220 221 221 ==== Target: OCI Repository ==== 222 222 223 -To add public oci-repository, navigate to repository create button and click it. 223 +To add public oci-repository, navigate to repository create button and click it. For target, use OCI Repository like shown below: 224 224 225 225 [[image:1765207154466-828.png||height="298" width="821"]] 226 226 ... ... @@ -245,13 +245,17 @@ 245 245 |=((( 246 246 Index URL 247 247 )))|((( 248 -oci: [[~~/~~/registry.sdc.t-systems.net/chartrepo/devopsaas-helm/>>url:https://registry.sdc.t-systems.net/chartrepo/devopsaas/||shape="rect"]]chartname,for example:248 +oci:~/~/registry.sdc.t-systems.net/devopsaas-helm/**<chartname>**, for example: 249 249 250 -oci:[[~~/~~/registry.sdc.t-systems.net/>>url:https://registry.sdc.t-systems.net/chartrepo/devopsaas/||shape="rect"]][[devopsaas-helm/jenkins-lib>>url:https://registry-manoni.devops.t-systems.net/harbor/projects/139/repositories/jenkins-lib]] 250 +oci:~/~/registry.sdc.t-systems.net/devopsaas-helm/jenkins-lib 251 + 252 +{{box}} 253 +Take into account, that all internal harbor repositories with helm charts have PKEY-helm naming convention, adding repo with both docker images and helm charts is not supported in rancher. 254 +{{/box}} 251 251 ))) 252 252 253 253 {{info}} 254 -Now all internal helm charts are stored in harbor folders with -helm suffix. Adding the whole public project doesn't work natively anymore, so each separate chart should be added as a separate repo. 258 +Now all internal helm charts are stored in harbor folders with -helm suffix. Adding the whole public project doesn't work natively anymore, so each separate chart should be added as a separate repo. //**If you have a need in adding the whole project with many repositories, please contact support for finding a possible solution.**// 255 255 {{/info}} 256 256 257 257 === Deploy Helm charts === ... ... @@ -264,7 +264,6 @@ 264 264 265 265 == Add private chart repository == 266 266 267 - 268 268 === Create a robot account in Harbor === 269 269 270 270 To add project specific helm charts to Rancher, a Harbor robot account is needed, that is able to read helm charts and pull repositories. If you don't have such an account yet, please follow the instructions given in the [[Create Robot Account section of the Harbor documentation>>doc:Harbor.Harbor 2\.7 Robot Accounts.WebHome||anchor="create_robot_account"]] and make sure to grant at least the following permissions: ... ... @@ -277,17 +277,21 @@ 277 277 278 278 (% class="p1" %) 279 279 In Rancher UI, switch to the intended cluster and go to Apps/Repositories using the left side menu. 283 + 284 + 280 280 [[image:attach:Screenshot 2023-04-25 at 13.11.48.png||data-xwiki-image-style-border="true" queryparams="effects=drop-shadow" height="400" width="209"]] 281 281 282 282 (% class="p1" %) 283 283 Create a new Repository by pressing the Create button. 284 284 290 +(% class="p1" id="HTarget:http28s29URL-1" %) 291 +[[image:attach:Screenshot 2023-04-25 at 13.30.33.png||data-xwiki-image-style-border="true" queryparams="effects=drop-shadow" height="127" width="1100"]] 292 + 285 285 (% id="HTarget:http28s29URL-1" class="p1" %) 286 -==== [[image:attach:Screenshot 2023-04-25 at 13.30.33.png||data-xwiki-image-style-border="true" queryparams="effects=drop-shadow" height="127" width="1100"]] 287 -Target: http(s) URL ==== 294 +==== Target: http(s) URL ==== 288 288 289 289 {{warning title="Chartmuseum Deprecation"}} 290 -Chartmuseum in Harbor is deprecated, meaning we won't be able to add repositories to Rancher that way anymore. Instead use Target: OCI repository. 297 +Chartmuseum in Harbor is deprecated, meaning we won't be able to add internal harbor repositories to Rancher that way anymore. Instead use Target: OCI repository. 291 291 {{/warning}} 292 292 293 293 (% class="p1" %) ... ... @@ -304,18 +304,141 @@ 304 304 (% class="p1" %) 305 305 Click Create. 306 306 314 +(% id="HTarget:OCIRepository-1" class="p1" %) 307 307 ==== Target: OCI Repository ==== 308 308 309 309 {{info}} 310 -Now all internal helm charts are stored in harbor folders with -helm suffix. Adding the whole public project doesn't work natively anymore, so each separate chart should be added as a separate repo. 318 +Now all internal helm charts are stored in harbor folders with -helm suffix. Adding the whole public project doesn't work natively anymore, so each separate chart should be added as a separate repo.//** If you have a real need to add the whole project, please contact support for finding a possible solution.**// 311 311 {{/info}} 312 312 321 +(% class="p1" %) 322 +Choose OCI repository in Target and for url, use ##oci:~/~/registry-<domain>.devops.t-systems.net/<project>-helm/<chartname>## 313 313 324 +(% class="box" %) 325 +((( 326 +Replace ##<domain>## , ##<project>## and ##<chartname> ##as necessary to match your set-up. Your charts should be stored in ##<project>-helm ##repository in Harbor, which is created by default when project is created in portal. 327 +))) 328 + 329 +(% class="p1" %) 330 +For Authentication, select "Create a HTTP Basic Auth Secret" and provide the Username and Password of the Harbor robot account from the previous section. 331 + 314 314 (% class="wikigeneratedid" %) 315 315 [[image:1765208347952-345.36.18.png||height="449" width="849"]] 316 316 317 -= Automated deployments with Jenkins = 335 +(% class="wikigeneratedid" %) 336 +Click Create. 318 318 338 +(% class="wrapped" %) 339 +|=((( 340 +Field 341 +)))|=((( 342 +Value 343 +))) 344 +|=((( 345 +Name 346 +)))|((( 347 +sdcloud-sdportal 348 +))) 349 +|=((( 350 +Description 351 +)))|((( 352 +Sdportal charts of sdcloud project 353 +))) 354 +|=((( 355 +Index URL 356 +)))|((( 357 +oci:~/~/registry.sdc.t-systems.net/sdcloud-helm/sdportal 358 + 359 +{{info}} 360 +Now we should target a chart repo directly, not the whole project. In you need to reference the whole project with a lot of repos, please contact support to find a possible solution. 361 +{{/info}} 362 +))) 363 + 364 +=== Migrating chart repositories in rancher to new OCI Repository format === 365 + 366 +(% class="box warningmessage" %) 367 +((( 368 +ChartMuseum is being deprecated. After the migration is complete, **all harbor charts will be removed from ChartMuseum**, and **old HTTP(S)-based chart repositories will no longer work in Rancher (for internal harbor charts)**. 369 +))) 370 + 371 +(% class="box" %) 372 +((( 373 +**We will make your charts available in the corresponding new `<pkey>-helm` OCI projects. During migration, please adapt your helm push commands and url's for new oci-compatible repository.** 374 +))) 375 + 376 +There are two ways to migrate your repositories: 377 + 378 +1. ##Direct Transition (Editing the Existing Repository)## 379 +1*. Change the target to “OCI Repository”. 380 +1*. Update the URL as required (the repository name cannot be changed). 381 +1*. After saving, installed apps will automatically start using the updated repository. 382 +1*. (% class="box" %) 383 +((( 384 +Important limitation: OCI repositories must point directly to a single chart repository, not to a parent folder. 385 +If your old repository included several charts (for example “bitbucket” and “jira”), then after switching to OCI you can only target one chart (e.g. “bitbucket”). 386 +The other charts will no longer receive updates through this repo, and you will still need to create additional repositories for each individual chart. 387 +))) 388 +1. Add New Repositories One by One (Recommended), preserve the old one till the end. This approach allows a smooth transition while the old ChartMuseum repository continues to function. You can: 389 +1*. Create a new OCI repository for each chart, 390 +1*. Keep the old ChartMuseum repo enabled during the migration, 391 +1*. Migrate applications gradually following the steps described here. 392 +1*. This avoids disruptions and allows controlled migration. 393 +1. //Special Case: Old Repo Targeting Multiple Chart Repos// 394 +If your existing repository targets multiple chart repositories and you need the new OCI setup to behave the same way, please **contact support.** 395 + 396 +To ensure a smooth transition, we recommend to **add an OCI-based repository alongside the existing ChartMuseum repository** during the migration phase. If you don't w 397 + 398 +| Term | Meaning 399 +| **Old Repository** | The existing HTTP/HTTPS Harbor ChartMuseum repository. 400 +| **New Repository** | The new OCI-based Helm chart repository created for your project (e.g. `<chart-repo-name>` in `<pkey>-helm`). 401 + 402 +##__**Why This Migration Is Required:**__## 403 + 404 +* ##ChartMuseum is deprecated and will be removed.## 405 +* ##Applications deployed from old repos keep a reference to that repo inside their labels.## 406 +* ##Without updating the application to point to the new OCI repo, **Rancher will not detect new chart versions from new repository**.## 407 + 408 +## Migration Steps:## 409 + 410 +1. ##Create the New OCI Repository in Rancher## 411 +11. Go to **Apps → Repositories**. 412 +11. Add a new repository of type **OCI**. 413 +11. Name it similarly to your old repo name (e.g. `<chart-repo-name>-oci`). __**You can't name it the same and can't rename it later.**__ 414 +11. Point it to the new OCI endpoint. 415 +1. ##Disable the Old ChartMuseum Repository Temporarily## 416 +##This step ensures that Rancher resolves charts from the new OCI repo.## 417 +11. Go to **Apps → Repositories**. 418 +11. Disable the old HTTP(S)-based repository. 419 +11. Keep it disabled until the migration is done. 420 +[[image:1765548124989-482.59.06.png||height="152" width="485"]] 421 +1. ##Update Existing Applications to Use the New OCI Repo## 422 +Applications deployed with the old repository still contain the old repo name in their metadata. You must upgrade them once to transition. 423 +11. Go to **Apps → Installed Apps**. 424 +11. Open the application that was deployed using the old repo. 425 +11. Click **Edit/Upgrade**. 426 +[[image:1765548598644-830.png||height="138" width="811"]] 427 +11. In the list of available chart repositories (scroll to the bottom), select the **new OCI repository**. Or enter the chart name in search bar: 428 +[[image:1765548750604-334.png||height="293" width="308"]] 429 +11. Choose the chart version you want to deploy (same or newer). 430 +11. Click **Upgrade**. 431 +1. ##Re-enable the Old Repository (Optional) ## 432 +If you still need the old repo for other apps, re-enable it after the migration steps above. 433 +**Note:** Even if a newer chart version exists in the old repository, your migrated app **will not see it**, because it is no longer connected to that repo 434 + 435 +## 436 +If you want to move an app back to the old repository:## 437 + 438 +1. Temporarily disable the new OCI repo. 439 +1. Enable the old ChartMuseum repo. 440 +1. Open the application → **Upgrade**. 441 +1. Select the chart from the old repo. 442 +1. Save. 443 + 444 +This will reconnect the app to the old repository. 445 + 446 += 447 +Automated deployments with Jenkins = 448 + 319 319 In this section, we describe(% style="color:#172b4d" %) how to set-up **automated builds, tests and deployments** for Jenkins. 320 320 321 321 == Prerequisites ==
- 1765548124989-482.59.06.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dianastrebkovat-systemscom - Size
-
... ... @@ -1,0 +1,1 @@ 1 +64.4 KB - Content
- 1765548598644-830.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dianastrebkovat-systemscom - Size
-
... ... @@ -1,0 +1,1 @@ 1 +153.4 KB - Content
- 1765548750604-334.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dianastrebkovat-systemscom - Size
-
... ... @@ -1,0 +1,1 @@ 1 +103.0 KB - Content