Skip to content

Commit

Permalink
Add configuration and docs on how to update Prow 
Browse files Browse the repository at this point in the history
Today I updated Prow as a step toward tektoncd/pipeline#922
- we need an updated version of Prow so that we can have support for
triggering Pipelines! :D

It turned out to be a bit of an ordeal to update Prow, mostly because:
- There were things we'd done a bit differently than the example Prow
  configs
- It turns out if you update Plank without updating the utility images
  it uses, it can get into a pretty bad state (e.g. reporting failed
  tests as passed)

These instructions are pretty messy and manual, but hopefully writing
this down will be a step toward making the process better!

This configuration has already been applied manually.
  • Loading branch information
bobcatfish authored and tekton-robot committed Aug 6, 2019
1 parent e6e74e9 commit 252a774
Show file tree
Hide file tree
Showing 3 changed files with 942 additions and 5 deletions.
48 changes: 47 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,53 @@ _[Prow docs](https://github.com/kubernetes/test-infra/tree/master/prow)._
_[See the community docs](../CONTRIBUTING.md#pull-request-process) for more on
Prow and the PR process._

### Updating Prow
### Updating Prow itself

Prow has been installed by taking the
[starter.yaml](https://github.com/kubernetes/test-infra/blob/master/prow/cluster/starter.yaml)
and modifying it for our needs.

Updating (e.g. bumping the versions of the images being used) requires:

0. If you are feeling cautious and motivated, manually backup the config values by hand
(see [prow.yaml](prow/prow.yaml) to see what values will be changed).
1. Manually updating the `image` values and applying any other config changes found in the
[starter.yaml](https://github.com/kubernetes/test-infra/blob/master/prow/cluster/starter.yaml)
to our [prow.yaml](prow/prow.yaml).
2. Updating the `utility_images` in our [config.yaml](prow/config.yaml) if the version of
the `plank` component is changed.
3. Applying the new configuration with:

```yaml
# Step 1: Configure kubectl to use the cluster, doesn't have to be via gcloud but gcloud makes it easy
gcloud container clusters get-credentials prow --zone us-central1-a --project tekton-releases

# Step 2: Update Prow itself
kubectl apply -f prow/prow.yaml

# Step 2: Update the configuration used by Prow
kubectl create configmap config --from-file=config.yaml=prow/config.yaml --dry-run -o yaml | kubectl replace configmap config -f -

# Step 3: Remember to configure kubectl to connect to your regular cluster!
gcloud container clusters get-credentials ...
```
4. Verify that the changes are working by opening a PR and **manually looking at the logs of each check**,
in case Prow has gotten into a state where failures are being reported as successes.

These values have been removed from the original
[starter.yaml](https://github.com/kubernetes/test-infra/blob/master/prow/cluster/starter.yaml):

- The `ConfigMap` values `plugins` and `config` because they are generated from
[config.yaml](prow/config.yaml) and [plugins.yaml](prow/plugins.yaml)
- The `Services` which were manually configured with a `ClusterIP` and other routing
information (`deck`, `tide`, `hook`)
- The `Ingress` `ing` - Configuration for this is in [ingress.yaml](prow/ingress.yaml)
- The `statusreconciler` Deployment, etc. - Created #54 to investigate adding this.
- The `Role` values give `pod` permissions in the `default` namespace as well as `test-pods` -
The intention seems to be that `test-pods` be used to run the pods themselves, but we
don't currently have that configured in our [config.yaml](prow/config.yaml).

### Updating Prow configuraiton

TODO(#1) Apply config.yaml changes automatically

Expand Down
8 changes: 4 additions & 4 deletions prow/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ plank:
timeout: 7200000000000 # 2h
grace_period: 15000000000 # 15s
utility_images:
clonerefs: "gcr.io/k8s-prow/clonerefs@sha256:b62ba1f379ac19c5ec9ee7bcab14d3f0b3c31cea9cdd4bc491e98e2c5f346c07"
initupload: "gcr.io/k8s-prow/initupload@sha256:58f89f2aae68f7dc46aaf05c7e8204c4f26b53ec9ce30353d1c27ce44a60d121"
entrypoint: "gcr.io/k8s-prow/entrypoint:v20180512-0255926d1"
sidecar: "gcr.io/k8s-prow/sidecar@sha256:8807b2565f4d2699920542fcf890878824b1ede4198d7ff46bca53feb064ed44"
clonerefs: "gcr.io/k8s-prow/clonerefs:v20190731-e3f7b9853"
initupload: "gcr.io/k8s-prow/initupload:v20190731-e3f7b9853"
entrypoint: "gcr.io/k8s-prow/entrypoint:v20190731-e3f7b9853"
sidecar: "gcr.io/k8s-prow/sidecar:v20190731-e3f7b9853"
gcs_configuration:
bucket: "tekton-prow"
path_strategy: "explicit"
Expand Down
Loading

0 comments on commit 252a774

Please sign in to comment.