From 5d56e7bf73118eebbd429fada37212d247ace9ff Mon Sep 17 00:00:00 2001 From: efiacor Date: Thu, 15 Feb 2024 23:26:14 +0000 Subject: [PATCH] Update kpt alpha to porchctl cmd --- .../guides/install-guides/install-on-byoc.md | 1 + .../install-guides/install-on-multiple-vm.md | 2 +- .../install-guides/package-transformations.md | 22 +++++++------- .../guides/user-guides/exercise-1-free5gc.md | 30 +++++++++---------- 4 files changed, 28 insertions(+), 27 deletions(-) diff --git a/content/en/docs/guides/install-guides/install-on-byoc.md b/content/en/docs/guides/install-guides/install-on-byoc.md index 4ef4d3f3..f6de3999 100644 --- a/content/en/docs/guides/install-guides/install-on-byoc.md +++ b/content/en/docs/guides/install-guides/install-on-byoc.md @@ -31,6 +31,7 @@ your environment and choices. - `kubectl` [installed ](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/)on your workstation - `kpt` [installed](https://kpt.dev/installation/kpt-cli) on your workstation (version v1.0.0-beta.43 or later) + - `porchctl` [installed](https://github.com/nephio-project/porch/releases) on your workstation - Sudo-less `docker`, `podman`, or `nerdctl`. If using `podman` or `nerdctl`, you must set the [`KPT_FN_RUNTIME`](https://kpt.dev/reference/cli/fn/render/?id=environment-variables) diff --git a/content/en/docs/guides/install-guides/install-on-multiple-vm.md b/content/en/docs/guides/install-guides/install-on-multiple-vm.md index cd043fb7..6d82c0f1 100644 --- a/content/en/docs/guides/install-guides/install-on-multiple-vm.md +++ b/content/en/docs/guides/install-guides/install-on-multiple-vm.md @@ -73,7 +73,7 @@ Register the edge repository using kpt cli or nephio web-ui. GITHUB_USERNAME= GITHUB_TOKEN= -kpt alpha repo register \ +porchctl repo register \ --namespace default \ --repo-basic-username=${GITHUB_USERNAME} \ --repo-basic-password=${GITHUB_TOKEN} \ diff --git a/content/en/docs/guides/install-guides/package-transformations.md b/content/en/docs/guides/install-guides/package-transformations.md index 806683c2..9ae3d962 100644 --- a/content/en/docs/guides/install-guides/package-transformations.md +++ b/content/en/docs/guides/install-guides/package-transformations.md @@ -11,7 +11,7 @@ weight: 7 - [kpt pkg get](#kpt-pkg-get) - [kpt fn render](#kpt-fn-render) - [kpt live init](#kpt-live-init) -- [kpt alpha rpkg for the Workload clusters](#kpt-alpha-rpkg-for-workload-clusters) +- [porchctl rpkg for the Workload clusters](#porchctl-rpkg-for-workload-clusters) - [Create workload cluster package](#create-workload-cluster-package) - [Configure the package](#configure-the-package) - [Propose the package](#propose-the-package) @@ -189,9 +189,9 @@ metadata: labels: cli-utils.sigs.k8s.io/inventory-id: 0123456789abcdef0123456789abcdef01234567-0123456789abcdef012 ``` -# kpt alpha rpkg for Workload clusters +# porchctl rpkg for Workload clusters -The `kpt alpha rpkg` suite of commands that act on `Repository` resources on the +The `porchctl rpkg` suite of commands that act on `Repository` resources on the kubernetes cluster in scope. The packages in the `Repository` resources are *remote packages (rpkg)*. @@ -208,7 +208,7 @@ nephio-example-packages git Package false True https://github.c To see all the remote packages that are available:
-$ kpt alpha rpkg get +$ porchctl rpkg get ```bash NAME PACKAGE WORKSPACENAME REVISION LATEST LIFECYCLE REPOSITORY @@ -250,7 +250,7 @@ nephio-example-packages-dc0b55fb7a17d107e834417a2c9d8fb37f36d7cb vlanindex To see the versions of a particular package: ```bash -$ kpt alpha rpkg get --name nephio-workload-cluster +$ porchctl rpkg get --name nephio-workload-cluster NAME PACKAGE WORKSPACENAME REVISION LATEST LIFECYCLE REPOSITORY nephio-example-packages-05707c7acfb59988daaefd85e3f5c299504c2da1 nephio-workload-cluster main main false Published nephio-example-packages nephio-example-packages-781e1c17d63eed5634db7b93307e1dad75a92bce nephio-workload-cluster v1 v1 false Published nephio-example-packages @@ -275,7 +275,7 @@ creates the blueprint package for the workload cluster in the management repository. ```bash -kpt alpha rpkg clone -n default nephio-example-packages-7895e28d847c0296a204007ed577cd2a4222d1ea --repository mgmt regional +porchctl rpkg clone -n default nephio-example-packages-7895e28d847c0296a204007ed577cd2a4222d1ea --repository mgmt regional ``` During the clone operation, the command above performs the following operations: @@ -309,7 +309,7 @@ file](https://github.com/nephio-project/test-infra/tree/main/e2e/provision). 1. Get the name of the package: ```bash -kpt alpha rpkg get | egrep '(NAME|regional)' +porchctl rpkg get | egrep '(NAME|regional)' NAME PACKAGE WORKSPACENAME REVISION LATEST LIFECYCLE REPOSITORY mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 regional v1 false Draft mgmt ``` @@ -317,7 +317,7 @@ mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 regional v1 f 2. Pull the package to get a local copy of it ```bash -kpt alpha rpkg pull -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 regional +porchctl rpkg pull -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 regional ``` 3. Set the Nephio labels on the package @@ -337,7 +337,7 @@ labels: 5. Push the updated package back to the draft branch on the repository: ```bash -kpt alpha rpkg push -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 regional +porchctl rpkg push -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 regional [RUNNING] "gcr.io/kpt-fn/apply-replacements:v0.1.1" [PASS] "gcr.io/kpt-fn/apply-replacements:v0.1.1" ``` @@ -347,7 +347,7 @@ kpt alpha rpkg push -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 reg Propose the package: ```bash -kpt alpha rpkg propose -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 +porchctl rpkg propose -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 proposed ``` @@ -361,7 +361,7 @@ workload cluster using all the `PackageVariant` components specified in the `nephio-workload-cluster` kpt package. ```bash -kpt alpha rpkg approve -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 +porchctl rpkg approve -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 approved ``` diff --git a/content/en/docs/guides/user-guides/exercise-1-free5gc.md b/content/en/docs/guides/user-guides/exercise-1-free5gc.md index 5970cbd0..52eddb4d 100644 --- a/content/en/docs/guides/user-guides/exercise-1-free5gc.md +++ b/content/en/docs/guides/user-guides/exercise-1-free5gc.md @@ -90,13 +90,13 @@ oai-core-packages git Package false True https://github Since those are Ready, you can deploy a package from the [catalog-infra-capi](https://github.com/nephio-project/catalog/tree/main/infra/capi) repository into the mgmt -repository. To do this, you retrieve the Package Revision name using `kpt alpha rpkg get`, clone that specific Package -Revision via the `kpt alpha rpkg clone` command, then propose and approve the resulting package revision. You want to +repository. To do this, you retrieve the Package Revision name using `porchctl rpkg get`, clone that specific Package +Revision via the `porchctl rpkg clone` command, then propose and approve the resulting package revision. You want to use the latest revision of the nephio-workload-cluster package, which you can get with the command below (your latest revision may be different): ```bash -kpt alpha rpkg get --name nephio-workload-cluster +porchctl rpkg get --name nephio-workload-cluster ```
@@ -113,7 +113,7 @@ Then, use the NAME from that in the `clone` operation, and the resulting Package and `approve` operations: ```bash -kpt alpha rpkg clone -n default catalog-infra-capi-b0ae9512aab3de73bbae623a3b554ade57e15596 --repository mgmt regional +porchctl rpkg clone -n default catalog-infra-capi-b0ae9512aab3de73bbae623a3b554ade57e15596 --repository mgmt regional ```
@@ -131,7 +131,7 @@ and the `set-labels` function to do this. To pull the package to a local directory, use the `rpkg pull` command: ```bash -kpt alpha rpkg pull -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 regional +porchctl rpkg pull -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 regional ``` The package is now in the `regional` directory. So you can execute the `set-labels` function against the package @@ -160,7 +160,7 @@ In any case, you now can push the package with the labels applied back to the repository: ```bash -kpt alpha rpkg push -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 regional +porchctl rpkg push -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 regional ```
@@ -175,7 +175,7 @@ kpt alpha rpkg push -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 reg Finally, you propose and approve the package. ```bash -kpt alpha rpkg propose -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 +porchctl rpkg propose -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 ```
@@ -187,7 +187,7 @@ mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 proposed
```bash -kpt alpha rpkg approve -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 +porchctl rpkg approve -n default mgmt-08c26219f9879acdefed3469f8c3cf89d5db3868 ```
@@ -863,7 +863,7 @@ This way you retrieve the downstream target name of the package. You can also re Next create a new package revision from the existing UPF package. ```bash -kpt alpha rpkg copy -n default edge01-6b26ca0f4fdf83212a73faff159bd013b41207ee --workspace upf-scale-package +porchctl rpkg copy -n default edge01-6b26ca0f4fdf83212a73faff159bd013b41207ee --workspace upf-scale-package ```
The output is similar to: @@ -877,7 +877,7 @@ The output contains the package revision of our newly cloned upf package. Pull t choice (in the example you can use /tmp/upf-scale-package). ```bash -kpt alpha rpkg pull -n default edge01-40c616e5d87053350473d3ffa1387a9a534f8f42 /tmp/upf-scale-package +porchctl rpkg pull -n default edge01-40c616e5d87053350473d3ffa1387a9a534f8f42 /tmp/upf-scale-package ``` You can inspect the contents of the package in the chosen directory. The UPF configuration is located in the capacity.yaml file. @@ -953,9 +953,9 @@ Next, progress through the package lifecycle stages by pushing the changes to th the changes and approving them. ```bash -kpt alpha rpkg push -n default edge01-40c616e5d87053350473d3ffa1387a9a534f8f42 /tmp/upf-scale-package -kpt alpha rpkg propose -n default edge01-40c616e5d87053350473d3ffa1387a9a534f8f42 -kpt alpha rpkg approve -n default edge01-40c616e5d87053350473d3ffa1387a9a534f8f42 +porchctl rpkg push -n default edge01-40c616e5d87053350473d3ffa1387a9a534f8f42 /tmp/upf-scale-package +porchctl rpkg propose -n default edge01-40c616e5d87053350473d3ffa1387a9a534f8f42 +porchctl rpkg approve -n default edge01-40c616e5d87053350473d3ffa1387a9a534f8f42 ```
The output is similar to: @@ -988,9 +988,9 @@ edge01-40c616e5d87053350473d3ffa1387a9a534f8f42 approved ```
-You can check the current lifecycle stage of a package using the `kpt alpha rpkg get` command. +You can check the current lifecycle stage of a package using the `porchctl rpkg get` command. ```bash -kpt alpha rpkg get | grep free5gc-upf +porchctl rpkg get | grep free5gc-upf ```