Skip to content

Commit 8db75c5

Browse files
authored
Add Porch Book Chapter (#3114)
The chapter has a basic introduction to Package Orchestration concepts and references the user guides.
1 parent ab3a997 commit 8db75c5

File tree

9 files changed

+75
-6
lines changed

9 files changed

+75
-6
lines changed

docs/design-docs/CaD Core Architecture.svg

Lines changed: 1 addition & 1 deletion
Loading

porch/docs/porch-roadmap.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ document outlining future direction and work in different Porch subsystems.
3131
* Support updating repository registration, for example when `Repository`
3232
resource is modified to point to a different repository, or even a different
3333
type of a repository (Git --> OCI).
34+
* Support read only repositories. Porch will allow package discovery in a read
35+
only repository but attempt to create/modify package in read only repository
36+
will result in an error. Consider supporting via RBAC so different principals
37+
can have different level of access to the same repository.
3438
* Implement repository cache eviction policy
3539
* Support `ObjectMeta.GenerateName` for `PackageRevision` creation. Currently
3640
package names are computed as <repository>-<sha>. Ideally Porch would accept
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
In this chapter, we are going to cover _package orchestration_ - management
2+
of package lifecycle supported by the kpt toolchain.
3+
4+
Package Orchestration encompasses management of the overall lifecycle of the
5+
configuration package, including:
6+
7+
* management of package repositories
8+
* discovery of configuration packages and kpt functions
9+
* creating, modifying, updating, and deleting packages
10+
* versioning packages
11+
* WYSIWYG package authoring and customization with _guardrails_
12+
* evaluation of functions on package data
13+
* approval flow to publish a change to a configuration package
14+
* deployment and rollouts
15+
16+
Package Orchestration enables [workflows](/book/02-concepts/02-workflows)
17+
similar to those supported by the kpt CLI, but makes them available as a
18+
service and enables creation of WYSIWYG user experiences, similar to the
19+
proof-of-concept [Backstage plugin](/guides/namespace-provisioning-ui).
20+
21+
## Package Orchestration Concepts
22+
23+
Package Orchestration relies on the already familiar concepts of
24+
[**Package**](/book/02-concepts/01-packages)
25+
and [**Function**](/book/02-concepts/03-functions).
26+
27+
Package Orchestrator supports several **lifecycle stages** of packages:
28+
* ***Draft*** - package is being created or edited. The package contents can be
29+
modified but package is not ready to be used (deployed or cloned)
30+
* ***Proposed*** - author of the package proposed that the package be published
31+
* ***Published*** - the changes to the package have been approved and the
32+
package is ready to be used. Published packages can be deployed or cloned.
33+
34+
A **Repository** containing kpt packages (for example a [git][] repository or
35+
an [OCI][] container registry) can be registered with the Package Orchestrator
36+
to enable package discovery or management.
37+
38+
An [OCI][] container registry containing kpt functions can be registered with
39+
the Package Orchestrator to enable discovery of kpt functions.
40+
41+
A repository containing *packages* can be designated as a
42+
***deployment repository***. *Published* packages in a deployment repository are
43+
considered deployment-ready.
44+
45+
<!-- Reference links -->
46+
[git]: https://git-scm.org/
47+
[oci]: https://opencontainers.org/
48+
[config sync]: https://cloud.google.com/anthos-config-management/docs/config-sync-overview
49+
50+
The following image illustrates how Package Orchestration fits into the overall
51+
configuration management ecosystem. Package Orchestration service enables
52+
management of packages in registered repositories and enables WYSIWYG UI
53+
experience of package authoring.
54+
A separate GitOps deployment mechanism (for example [Config Sync][]) is used to
55+
deploy published packages to realize the live state from the configuration and
56+
provides observability of the status of deployed resources.
57+
58+
![Package Orchestration](/static/images/package-orchestration.svg)
59+
60+
Dedicated user guides are available for the use of Porch with
61+
* the [Backstage UI](/guides/namespace-provisioning-ui)
62+
* the [kpt cli](/guides/porch-user-guide)

site/book/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This book is organized as follows:
1414
- [Chapter 5] guides you through developing custom functions.
1515
- [Chapter 6] covers how to deploy a package to a Kubernetes cluster.
1616
- [Chapter 7] covers effective customizations techniques.
17+
- [Chapter 8] covers package orchestration concepts and support in kpt toolchain.
1718

1819
Let's get started!
1920

@@ -24,3 +25,4 @@ Let's get started!
2425
[chapter 5]: /book/05-developing-functions/
2526
[chapter 6]: /book/06-deploying-packages/
2627
[chapter 7]: /book/07-effective-customizations/
28+
[chapter 8]: /book/08-package-orchestration/

site/guides/namespace-provisioning-cli.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,10 @@ Now that we have a basic namespace package in place, let's publish it so that
329329
other users can consume it.
330330

331331
```shell
332-
$cd .. && git add basens && git commit -am "initial pkg"
333-
$git push origin main
332+
$ cd .. && git add basens && git commit -am "initial pkg"
333+
$ git push origin main
334334

335-
$git tag basens/v0 && git push origin basens/v0
335+
$ git tag basens/v0 && git push origin basens/v0
336336
```
337337

338338
So, now the package should be available in the `blueprint` repo. Consumers

site/guides/porch-user-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ The command `kpt alpha repo unregister` can be used to unregister a repository:
126126

127127
```sh
128128
# Unregister a repository
129-
$ kpt alpha repo unregister deployments
129+
$ kpt alpha repo unregister deployments --namespace default
130130
```
131131

132132
## Package Discovery And Introspection

site/guides/wysiwyg.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

site/sidebar.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
- [7.1 Single Value Replacement](book/07-effective-customizations/01-single-value-replacement.md)
3535
- [7.2 Limiting Package Changes](book/07-effective-customizations/02-limiting-package-changes.md)
3636
- [7.3 Generation](book/07-effective-customizations/03-generation.md)
37+
- [8 Package Orchestration](book/08-package-orchestration/)
3738
- [Reference](reference/)
3839
- [Annotations](reference/annotations/)
3940
- [apply-time mutation](reference/annotations/apply-time-mutation/)

site/static/images/package-orchestration.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)