Skip to content

Commit

Permalink
Merge pull request #196 from Nordix/clean_up_porch_guides
Browse files Browse the repository at this point in the history
Clean up porch guides
  • Loading branch information
radoslawc authored Dec 13, 2024
2 parents 7acc09a + 508c12f commit 5f65f74
Show file tree
Hide file tree
Showing 14 changed files with 117 additions and 222 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/check-links-md.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: "Check links of plain md files"
on:

on:
pull_request:
workflow_dispatch:

jobs:
docs:
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/guides/install-guides/install-on-byoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,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](/content/en/docs/porch/using-porch/porchctl-cli-guide.md) on your workstation
- *porchctl* [installed](/content/en/docs/porch/user-guides/porchctl-cli-guide.md) 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ weight: 7
* Kubernetes version 1.26+
* *kubectl* [installed ](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/)
* *kpt* [installed](https://kpt.dev/installation/kpt-cli) (version v1.0.0-beta.43 or later)
* *porchctl* [installed](/content/en/docs/porch/using-porch/porchctl-cli-guide.md) on your workstation
* *porchctl* [installed](/content/en/docs/porch/user-guides/porchctl-cli-guide.md) on your workstation

## Installation of the management cluster

Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/porch/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ description: Documentation of Porch

## Overview

Porch is “kpt-as-a-service”, providing opinionated package management, manipulation, and lifecycle operations in a
Kubernetes-based API. This allows automation of these operations using standard Kubernetes controller techniques.
Porch is “kpt-as-a-service”, providing opinionated package management, manipulation, and lifecycle operations in a
Kubernetes-based API. This allows automation of these operations using standard Kubernetes controller techniques.

"Porch" is short for "Package Orchestration".

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description:
This tutorial gives short instructions on how to set up a development environment for Porch on a Nephio VM. It outlines the steps to
get a [kind](https://kind.sigs.k8s.io/) cluster up and running to which a Porch instance running in Visual Studio Code
can connect to and interact with. If you are not familiar with how porch works, it is highly recommended that you go
through the [Starting with Porch tutorial](../using-porch/install-and-using-porch.md) before going through this one.
through the [Starting with Porch tutorial](../user-guides/install-and-using-porch.md) before going through this one.

## Setting up the environment

Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/porch/contributors-guide/environment-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description:
This tutorial gives short instructions on how to set up a development environment for Porch on your local machine. It outlines the steps to
get a [kind](https://kind.sigs.k8s.io/) cluster up and running to which a Porch instance running in Visual Studio Code
can connect to and interact with. If you are not familiar with how porch works, it is highly recommended that you go
through the [Starting with Porch tutorial](../using-porch/install-and-using-porch.md) before going through this one.
through the [Starting with Porch tutorial](../user-guides/install-and-using-porch.md) before going through this one.

{{% alert title="Note" color="primary" %}}

Expand Down Expand Up @@ -123,7 +123,7 @@ packages porch.kpt.dev/v1alpha1

## Create Repositories using your local Porch server

To connect Porch to Gitea, follow [step 7 in the Starting with Porch](../using-porch/install-and-using-porch.md)
To connect Porch to Gitea, follow [step 7 in the Starting with Porch](../user-guides/install-and-using-porch.md)
tutorial to create the repositories in Porch.

You will notice logging messages in VS Code when you run the `kubectl apply -f porch-repositories.yaml` command.
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/porch/package-orchestration.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ At the high level, the Core CaD functionality comprises:
* package repository management
* package discovery, authoring and lifecycle management

* [porchctl](using-porch/porchctl-cli-guide.md) - a Git-native, schema-aware, extensible client-side tool for managing KRM packages
* [porchctl](user-guides/porchctl-cli-guide.md) - a Git-native, schema-aware, extensible client-side tool for managing KRM packages
* a GitOps-based deployment mechanism (for example [Config Sync][]), which distributes and deploys configuration, and
provides observability of the status of deployed resources
* a task-specific UI supporting repository management, package discovery, authoring, and lifecycle
Expand Down
33 changes: 6 additions & 27 deletions content/en/docs/porch/running-porch/running-on-GKE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ need:
* A [GCP Project](https://console.cloud.google.com/projectcreate)
* [gcloud](https://cloud.google.com/sdk/docs/install)
* [kubectl](https://kubernetes.io/docs/tasks/tools/); you can install it via `gcloud components install kubectl`
* [kpt](https://kpt.dev/)
* [porchctl](https://github.com/nephio-project/porch/releases/download/main/porchctl.tgz)
* Command line utilities such as *curl*, *tar*

To build and run Porch on GKE, you will also need:

* A container registry which will work with your GKE cluster.
[Artifact Registry](https://console.cloud.google.com/artifacts) or
[Container Registry](https://console.cloud.google.com/gcr) work well though you can use others too.
* [go 1.17](https://go.dev/dl/) or newer
* [go 1.21](https://go.dev/dl/) or newer
* [docker](https://docs.docker.com/get-docker/)
* [Configured docker credential helper](https://cloud.google.com/sdk/gcloud/reference/auth/configure-docker)
* [git](https://git-scm.com/)
Expand Down Expand Up @@ -75,14 +75,14 @@ gcloud container clusters get-credentials --region us-central1 porch-dev
To run a released version of Porch, download the release config bundle from
[Porch release page](https://github.com/nephio-project/porch/releases).

Untar and apply the *deployment-blueprint.tar.gz* config bundle. This will install:
Untar and apply the *porch_blueprint.tar.gz* config bundle. This will install:

* Porch server
* [Config Sync](https://kpt.dev/gitops/configsync/)

```bash
mkdir porch-install
tar xzf ~/Downloads/deployment-blueprint.tar.gz -C porch-install
tar xzf ~/Downloads/porch_blueprint.tar.gz -C porch-install
kubectl apply -f porch-install
kubectl wait deployment --for=condition=Available porch-server -n porch-system
```
Expand Down Expand Up @@ -136,7 +136,7 @@ IMAGE_TAG=$(git rev-parse --short HEAD) make push-and-deploy-no-sa
```

If you want to use a different repository, you can set IMAGE_REPO variable
(see [Makefile](https://github.com/nephio-project/porch/blob/main/Makefile#L32) for details).
(see [Makefile](https://github.com/nephio-project/porch/blob/main/Makefile#L33) for details).

The `make push-and-deploy-no-sa` target will install Porch but not Config Sync. You can install Config Sync in your k8s
cluster manually following the
Expand Down Expand Up @@ -190,11 +190,7 @@ kubectl annotate serviceaccount porch-server -n porch-system \
iam.gke.io/gcp-service-account=porch-server@${GCP_PROJECT_ID}.iam.gserviceaccount.com
```

<<<<<<< HEAD
Build Porch, push images, and deploy Porch server and controllers using the `make` target that adds workload identity
=======
Build Porch, push images, and deploy porch server and controllers using the make target that adds workload identity
>>>>>>> main
service account annotations:

```bash
Expand All @@ -210,7 +206,7 @@ kubectl api-resources | grep porch
To register a repository, use the following command:

```bash
kpt alpha repo register --repo-workload-identity --namespace=default https://source.developers.google.com/p/<project>/r/<repo>
porchctl repo register --repo-workload-identity --namespace=default https://source.developers.google.com/p/<project>/r/<repo>
```

#### OCI
Expand Down Expand Up @@ -248,20 +244,3 @@ gcloud iam service-accounts add-iam-policy-binding porch-sync@${GCP_PROJECT_ID}.
--role roles/iam.workloadIdentityUser \
--member "serviceAccount:${GCP_PROJECT_ID}.svc.id.goog[porch-system/porch-controllers]"
```

<<<<<<< HEAD
Build Porch, push images, and deploy Porch server and controllers using the `make` target that adds workload identity
=======
Build Porch, push images, and deploy porch server and controllers using the make target that adds workload identity
>>>>>>> main
service account annotations:

```bash
IMAGE_TAG=$(git rev-parse --short HEAD) make push-and-deploy
```

As above, you can verify that Porch is running by querying the api-resources:

```bash
kubectl api-resources | grep porch
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Using Porch"
title: "Porch user guides"
type: docs
weight: 6
description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: "A tutorial to install and use Porch"

This tutorial is a guide to installing and using Porch. It is based on the
[Porch demo produced by Tal Liron of Google](https://github.com/tliron/klab/tree/main/environments/porch-demo). Users
should be very comfortable with using *git*, *docker*, and *kubernetes*.
should be comfortable using *git*, *docker*, and *kubernetes*.

See also [the Nephio Learning Resource](https://github.com/nephio-project/docs/blob/main/learning.md) page for
background help and information.
Expand Down Expand Up @@ -1954,7 +1954,7 @@ In these packages, you will see that:
network-function-auto-namespace-y-cumulonimbus respectively in the *pckage-context.yaml* files

This has all been performed automatically; we have not had to perform the
`porchctl rpkg pull/kpt fn render/porchctl rpkg push` combination of commands to make these chages as we had to in the
`porchctl rpkg pull/kpt fn render/porchctl rpkg push` combination of commands to make these changes as we had to in the
*simple-variant.yaml* case above.

Now, let us explore the packages further:
Expand Down
Loading

0 comments on commit 5f65f74

Please sign in to comment.