You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: keps/sig-release/1731-publishing-packages/README.md
+79-20Lines changed: 79 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,12 @@
19
19
-[Package Sources](#package-sources)
20
20
-[Package Specs](#package-specs)
21
21
-[Integrating OBS with our current release pipeline](#integrating-obs-with-our-current-release-pipeline)
22
+
-[Recovering from a failed build](#recovering-from-a-failed-build)
22
23
-[Authentication to OBS and User Management](#authentication-to-obs-and-user-management)
24
+
-[Ownership of OBS infrastructure and commitments](#ownership-of-obs-infrastructure-and-commitments)
25
+
-[GPG key ownership as part of the OBS infrastructure](#gpg-key-ownership-as-part-of-the-obs-infrastructure)
26
+
-[Clarification on the community-owned infrastructure](#clarification-on-the-community-owned-infrastructure)
27
+
-[Risks of vendor-lock in](#risks-of-vendor-lock-in)
23
28
-[How are packages used?](#how-are-packages-used)
24
29
-[Test Plan](#test-plan)
25
30
-[Graduation Criteria](#graduation-criteria)
@@ -185,15 +190,15 @@ Scenario: [...]
185
190
186
191
### Risks and Mitigations
187
192
188
-
-_Risk_: The OBS installation provided by openSUSE is unable to serve the load generated by the Kubernetes project
189
-
_Mitigation_: We can host our own mirrors and take some load from openSUSE (e.g. on Equinix Metal)
193
+
-_Risk_: The OBS installation provided by SUSE is unable to serve the load generated by the Kubernetes project
194
+
_Mitigation_: We can host our own mirrors and take some load from SUSE (e.g. on Equinix Metal)
190
195
-_Risk_: Building all the packages for all the distributions and their version takes too long to be done nightly or via cutting the release
191
196
_Mitigation_: We do not deliver nightly packages or wait for packages to be published in the release pipeline.
192
197
193
198
## Design Details
194
199
195
-
Packages will be built and published using [Open Build Service (OBS)][obs]. openSUSE will sponsor the Kubernetes
196
-
project by giving us access to the [OBS instance hosted by openSUSE][obs-build].
200
+
Packages will be built and published using [Open Build Service (OBS)][obs]. SUSE will sponsor the Kubernetes
201
+
project by giving us access to the [OBS instance hosted by SUSE][obs-build].
197
202
198
203
[obs]: https://openbuildservice.org/
199
204
[obs-build]: https://build.opensuse.org/
@@ -206,7 +211,7 @@ The reasons for using Open Build Service (OBS) instead of building and hosting p
206
211
- Managing GPG keys ourselves represents a security risk. For example, if a Release Manager with access to the GPG key
207
212
steps down, we might need to rotate the key. This is a process that affects End Users, therefore
208
213
we want to avoid it
209
-
- In this case, GPG keys are securely managed by the OBS platform hosted by openSUSE. No one from the Kubernetes
214
+
- In this case, GPG keys are securely managed by the OBS platform hosted by SUSE. No one from the Kubernetes
210
215
project will have direct access to the key, mitigating one of the main risks of this proposal
211
216
- We want to avoid managing the infrastructure ourselves, including buckets, mirrors/CDNs...
212
217
- We want to provide 'as a service' access to the packages infrastructure to Release Managers and eventually other
@@ -242,17 +247,20 @@ architectures:
242
247
*`ppc64le`
243
248
*`s390x`
244
249
245
-
We'll **build** packages for those architectures on the following Operating Systems:
250
+
It's important to note that we should build packages in a way to ensure the best compatibility with both newer and older versions of operating systems and package managers. That can be done by building packages on OS versions that has the appropriate build toolchain. For example, the latest OS version might have the latest build toolchain version which doesn't produce packages compatible with older operating systems and package managers. We refer to OS-es used for building packages as **builders**.
251
+
252
+
Builders we'll be changed over time as operating systems reach End-of-Life (EOL) and new versions are becoming widely adopted. At the time of writing this KEP, we're looking at using following builders:
- CentOS Stream 8 doesn't support `armv7l` and `s390x` on OBS, hence, we use OpenSUSE Factory which does support
250
-
those architectures
251
-
- OpenSUSE Factory (`armv7l`, `s390x`)
256
+
- CentOS Stream 8 doesn't support `armv7l` and `s390x`, hence, we need to use another builder for those architectures
257
+
- SUSE Linux Enterprise (SLE) 12 SP5 (`armv7l`, `s390x`)
258
+
259
+
[The following discussion][kep-1731-builders] has more details on reasoning behind looking at those builders.
252
260
253
-
Those operating systems are used as **builders**. The resulting packages are supposed to work on any Debian-based
254
-
and RPM-based distribution, respectively. Those distributions were chosen based on recommendations from the OBS team
255
-
to provide the best compatibility with all all Debian-based and RPM-based distributions.
261
+
**Note: this is a non-binding list of builders that can change at any time without prior notification. This list should be used only as a guidance for the initial implementation.**
The following packages will be published for all operating system and architectures listed earlier. For simplicity,
258
266
we'll refer to those as packages as the **core packages**:
@@ -284,10 +292,7 @@ Speaking of OBS, **Packages** are located in **Projects**. We'll use two differe
284
292
- Building/Staging project - we'll build packages in a project of this type
285
293
- Publishing/Maintenance project - we'll publish packages from a project of this type
286
294
287
-
The reason for using two different types of projects is that OBS doesn't keep previously published packages.
288
-
For example, if we publish v1.26.0, and then v1.26.1, after v1.26.1 is published, the v1.26.0 package is removed.
289
-
To be able to keep all packages/versions (e.g. v1.26.0 and v1.26.1), we need to publish packages from the
290
-
maintenance project.
295
+
The reason for using two different types of projects is that in the default OBS projects, which are of build-type, only one set of binaries is kept at any point in time and used to provide build dependencies for all the artifacts to build. By releasing built binaries into a maintenance-type project, they can be snapshot-ed and stored together. The published repository includes all snapshotted binaries.
291
296
292
297
The repository layout mentioned earlier replicates in OBS as:
293
298
@@ -386,13 +391,13 @@ As described above, currently, it's up to the Release Manager to create the subp
386
391
before releasing the first alpha release. This should be the only manual steps required by Release Managers (besides
387
392
the user management, described below). We'll consider automating those steps in the future if possible.
388
393
389
-
The workflow for publishing packages is:
390
-
394
+
`krel` should be extended with the following workflow for publishing packages:
395
+
391
396
- Authenticate to OBS via `osc` and pull existing packages from the appropriate **building subproject**
392
397
- Update specs and generate the sources tarball using `kubepkg`
393
398
- Commit changes and push them to the **building subproject**
394
399
- Wait for packages to be built
395
-
- There's [RabbitMQ][obs-rabbitmq]available that we can use to listen for events
400
+
- There's [RabbitMQ][obs-rabbitmq]hosted by SUSE that we can use to listen for events
396
401
- This might not be feasible for all architectures, for example, building for `s390x` can take quite a while
397
402
- Once packages are built, release those packages by running `osc release`
398
403
- Releasing (or publishing) packages means taking them from the **building subproject** and publishing them
@@ -432,6 +437,10 @@ we'll use `osc` directly (by exec-ing), which also requires adding `osc` to our
432
437
433
438
[obs-rabbitmq]: https://rabbit.opensuse.org/
434
439
440
+
#### Recovering from a failed build
441
+
442
+
In case a build fails for any reason, the Release Manager handling the release needs to take manual steps to recover that build. That might include logging in to the OBS platform and retriggering the build. If it's not possible to recover the build by restarting the build job, the Release Manager should bring it up to the appropriate channel for discussion on how should we proceed with that build. This is very similar to how we handle Kubernetes releases in general.
443
+
435
444
#### Authentication to OBS and User Management
436
445
437
446
The concept of API tokens in OBS is very limited and provides access only to a very few endpoints. In other words,
@@ -442,6 +451,51 @@ Users are managed manually via the OBS web interface. SIG Release Leads must hav
442
451
our OBS project. Release Managers should be given read/write access, so they can maintain and create projects and
443
452
packages.
444
453
454
+
We'll consider automating the user management in the future by integrating with the `osc` tool or by building a Go library/tool for that ourselves.
455
+
456
+
#### Ownership of OBS infrastructure and commitments
457
+
458
+
Packages will be hosted, published, and served from the [OpenBuildService instance hosted and maintained by SUSE][obs-build]. The instance is under the full ownership and control of SUSE. SUSE provide us:
459
+
460
+
- access to the instance to build, publish, and maintain packages form their instance
461
+
-[best-effort based support][obs-support] (commercial/business support is not included and might be negotiated if needed)
462
+
463
+
OBS consists of multiple parts and [its architecture is described in their docs][obs-arch]. If we want to take ownership of the infrastructure we have two options:
464
+
465
+
- Partial ownership: Host the Download Infrastructure ourselves. The Download Infrastructure is used to serve packages to the end users. Depending on load that the Kubernetes project is generating, we might need to do it in order to take some load from the SUSE OBS instance (this is documented as a risk)
466
+
- Full ownership: OBS platform is open source under the GPL license and we can completely run it on our own servers, however, we want to avoid this if possible
467
+
- We want to avoid this because of increased costs, problems with managing the GPG key, and efforts needed to maintain the infrastructure ourselves
468
+
469
+
As per [comments from the OBS team][obs-installation], OBS is serving 25 TB over several hundred thousand request per day at the time of writing this KEP. The SUSE OBS Download Infrastructure is geo-replicated in various places on the planet, and can be scaled up if needed. As stated in the Risks section, we don't know how much load is generated by Kubernetes packages currently and that's why we might need to take some of load generated by the Kubernetes project by hosting a part of Download Infrastructure ourselves.
#### GPG key ownership as part of the OBS infrastructure
476
+
477
+
One of the main reasons we want to use OBS is to handover managing the GPG key to the platform instead of doing it ourselves. Reasons for that are described at the beginning of this KEP.
478
+
479
+
OBS handles GPG keys in the following way:
480
+
481
+
- The signing keys are generated on the signing server automatically
482
+
- The signing keys are backed-up in the encrypted form on the OBS backend servers
483
+
484
+
This means that there's no way to get the decrypted private key outside of the isolated signing server.
485
+
486
+
#### Clarification on the community-owned infrastructure
487
+
488
+
The initial version of this KEP insisted on the completely community owned infrastructure. However, due to all the challenges described above and time constraints, we decided to change this and integrate with a platform that can take most of those tasks from us. With OBS, we get much more control then we had before, because we can trigger build ourselves, we completely control spec files ourselves, what packages we want to publish, who should have access to the platform, and more.
489
+
490
+
#### Risks of vendor-lock in
491
+
492
+
It's important to clarify that there are no risks of vendor lock-in by using the OBS platform. Under the hood, the OBS platform is using upstream/standard tooling to build and publish packages (`dpkg-buildpackage` and `rpmbuild`). This also means that the package spec files can be used outside of OBS out-of-box.
493
+
494
+
We'll take additional steps to ensure that we don't depend on the platform as an implementation detail:
495
+
496
+
- We'll use a vanity domain pointing to the SUSE OBS platform, so in case we change the platform, users don't need to change the URL
497
+
- Redistribution of the new GPG key can be done from the current platform, so that users don't need to take manual steps to update their GPG key
498
+
445
499
#### How are packages used?
446
500
447
501
The End Users can configure their systems’ package managers to use
@@ -554,6 +608,11 @@ It's up to the user what package repository (OBS or Google) they want to use.
554
608
In case OBS doesn't work for them, they can reconfigure their systems to use
555
609
the Google package repository.
556
610
611
+
Once we graduate this KEP to beta, we'll strongly recommend using OBS
612
+
instead of Google repos in order to migrate the load from Google to OBS as soon
613
+
as possible. We also plan to deprecate and stop publishing to Google repos
614
+
once the OBS implementation graduates to stable.
615
+
557
616
###### How can this feature be enabled / disabled in a live cluster?
558
617
559
618
N/A. This is configured on the operating system (i.e. package manager) level.
@@ -613,7 +672,7 @@ previous answers based on experience in the field.
613
672
614
673
###### How can an operator determine if the feature is in use by workloads?
615
674
616
-
We'll ask openSUSE to provide us with metrics on the repository usage. We don't
675
+
We'll ask SUSE to provide us with metrics on the repository usage. We don't
617
676
have any metrics for the Google repository and there's no way that we can
0 commit comments