|
2 | 2 |
|
3 | 3 | <!--- cSpell:ignore podman Dockerfiles toolset -->
|
4 | 4 |
|
| 5 | +!!!Warning |
| 6 | + This section is under construction |
| 7 | + |
5 | 8 | The source code for OKD is available on [github](https://github.com/openshift){target=_blank}. OKD is made up of many components bundled into a release. You can find the exact commit for each component included in a release using the `oc adm release info` command with the `--commit-urls` option, as outlined in the [overview](./index.md#okd-releases) section.
|
6 | 9 |
|
7 | 10 | To make a change to OKD you need to:
|
|
27 | 30 | ```
|
28 | 31 | FROM registry.ci.openshift.org/origin/4.10:base
|
29 | 32 | ```
|
30 |
| -Note that these may change as golang and release requirements change. |
| 33 | + |
| 34 | +!!!Note |
| 35 | + To original and replacement image may change as golang version and release requirements change. |
| 36 | + |
| 37 | +!!!Question |
| 38 | + Is there a way to find the correct base image for an OKD release? |
31 | 39 |
|
32 | 40 | The original images are unavailable to the public. There is an effort to update the Dockerfiles with publically available images.
|
33 | 41 |
|
34 |
| - Scenario: |
| 42 | +### Example Scenario: |
35 | 43 |
|
36 |
| - - Modify console-operator to have a link to the community site **okd.io** instead of **docs.okd.io** |
37 |
| - - add to pre-existing cluster |
38 |
| - - build a custom release to include the modified console-operator, then install a new cluster will custom release |
| 44 | +- Modify console-operator to have a link to the community site **okd.io** instead of **docs.okd.io** |
| 45 | +- add to pre-existing cluster |
| 46 | +- build a custom release to include the modified console-operator, then install a new cluster will custom release |
| 47 | + |
| 48 | +To complete the scenario the following steps need to be performed: |
39 | 49 |
|
40 | 50 | 1. Fork the console-operator repository
|
41 | 51 | 2. Clone the new fork locally: `git clone https://github.com/<username>/console-operator.git`
|
42 | 52 | 3. create new branch from master (or main): `git switch -c <branch name>`
|
43 | 53 | 4. Make needed modifications. Commit/squash as needed. Maintainers like to see 1 commit rather than several.
|
44 | 54 | 5. Create the image: `podman build -f <Dockerfile file> -t <target repo>/<username>/console-operator:4.11-<some additional identifier>`
|
45 | 55 | 6. Push image to external repository: `podman push <target repo>/<username>/console-operator:4.11-<some additional identifier>`
|
46 |
| -7. Create new release to test with. This requires the `oc` command to be available. I use the following script. It can be modified as needed: |
47 |
| -``` |
48 |
| -$ cat make_payload.sh |
49 |
| -server=https://api.ci.openshift.org |
50 |
| -
|
51 |
| -from_release=registry.ci.openshift.org/origin/release:4.11.0-0.okd-2022-04-12-000907 |
52 |
| -release_name=4.11.0-0.jef-2022-04-12-0 |
53 |
| -to_image=quay.io/fortinj66/origin-release:v4.11-console-operator |
54 |
| -
|
55 |
| -oc adm release new --from-release ${from_release} \ |
56 |
| - --name ${release_name} \ |
57 |
| - --to-image ${to_image} \ |
58 |
| - console-operator=<target repo>/<username>/console-operator:4.11-<some additional identifier> |
59 |
| -``` |
| 56 | +7. Create new release to test with. This requires the `oc` command to be available. I use the following script (make_payload.sh). It can be modified as needed, such as adding the correct container registry and username: |
| 57 | + |
| 58 | + ```shell |
| 59 | + server=https://api.ci.openshift.org |
| 60 | + |
| 61 | + from_release=registry.ci.openshift.org/origin/release:4.11.0-0.okd-2022-04-12-000907 |
| 62 | + release_name=4.11.0-0.jef-2022-04-12-0 |
| 63 | + to_image=quay.io/fortinj66/origin-release:v4.11-console-operator |
| 64 | + |
| 65 | + oc adm release new --from-release ${from_release} \ |
| 66 | + --name ${release_name} \ |
| 67 | + --to-image ${to_image} \ |
| 68 | + console-operator=<target repo>/<username>/console-operator:4.11-<some additional identifier> |
| 69 | + ``` |
60 | 70 |
|
61 |
| -`from_release`, `release_name`, `to_image` will need to be updated as needed |
| 71 | + `from_release`, `release_name`, `to_image` will need to be updated as needed |
62 | 72 |
|
63 | 73 | 8. Pull installer for cluster release: `oc adm release extract --tools <to_image from above>` (Make sure image is publically available)
|
64 | 74 |
|
|
0 commit comments