New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MCO-664: adds on-cluster build dev preview docs #3885
MCO-664: adds on-cluster build dev preview docs #3885
Conversation
@cheesesashimi: This pull request references MCO-664 which is a valid jira issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Skipping CI for Draft Pull Request. |
/test unit |
docs/OnClusterBuildInstructions.md
Outdated
global-pull-secret-copy -n openshift-machine-config-operator | ||
--from-file=.dockerconfigjson=<(oc get secret/pull-secret | ||
-n openshift-config -o json | jq -r | ||
'.data\[".dockerconfigjson"\] | @base64d'`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Escaping didn't work for me. Is it needed?
'.data\[".dockerconfigjson"\] | @base64d'`). | |
'.data[".dockerconfigjson"] | @base64d') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. I had the same problem, and it seems that it lacks a ")" at the end, doesn't it? or maybe the first "(" should not exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a Pandoc thing. Will fix!
docs/OnClusterBuildInstructions.md
Outdated
2. The name of a pull secret for the base OS image and the | ||
extensions container. This must be created as a Secret within | ||
the MCO namespace. One can clone the global pull secret, if | ||
desired: (`$ oc create secret docker-registry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can put the command as code block for better formatting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's a great idea!
docs/OnClusterBuildInstructions.md
Outdated
## Building the image | ||
|
||
1. Label the MachineConfigPool to opt it into layering: `$ oc label | ||
mcp/layered 'machineconfiguration.openshift.io/layering-enabled='`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mcp/layered 'machineconfiguration.openshift.io/layering-enabled='`. | |
mcp/layering 'machineconfiguration.openshift.io/layering-enabled='`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
add QE for review |
I've made some minor formatting changes. Other than that, the docs should still be up-to-date. EDIT: I've reverted the Mermaid diagram change because it was getting too difficult to manage. |
docs/OnClusterBuildInstructions.md
Outdated
global-pull-secret-copy -n openshift-machine-config-operator | ||
--from-file=.dockerconfigjson=<(oc get secret/pull-secret | ||
-n openshift-config -o json | jq -r | ||
'.data\[".dockerconfigjson"\] | @base64d'`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. I had the same problem, and it seems that it lacks a ")" at the end, doesn't it? or maybe the first "(" should not exist.
docs/OnClusterBuildInstructions.md
Outdated
'.data\["machineconfig.json.gz"\] | @base64d' | gunzip -`. However, if | ||
the build is successful, this ConfigMap will be deleted upon completion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command is not working. It seems that the escaped "[" and "]" are not working fine.
On top of that, if I fix the escaped characters I get this error
$ oc get configmap/mc-rendered-layering-a5dfd76db247a1787fecb955e2280c8a -n openshift-machine-config-operator -o json | jq -r '.data["machineconfig.json.gz"] | @base64d' | gunzip -
gzip: stdin: not in gzip format
This is what worked for me:
$ oc get configmap/mc-rendered-layering-a5dfd76db247a1787fecb955e2280c8a -n openshift-machine-config-operator -o json | jq -r '.data["machineconfig.json.gz"]' |base64 -d | gunzip | jq |head
{
"metadata": {
"name": "rendered-layering-a5dfd76db247a1787fecb955e2280c8a",
"uid": "d36d7a89-b6b9-4e35-bdd4-0f12b3bd8e59",
"resourceVersion": "111607",
"generation": 1,
....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another version that worked for me
$ oc get configmap/mc-rendered-layering-a5dfd76db247a1787fecb955e2280c8a -n openshift-machine-config-operator --template='{{index .data "machineconfig.json.gz" | base64decode}}' | gunzip | jq |head
{
"metadata": {
"name": "rendered-layering-a5dfd76db247a1787fecb955e2280c8a",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this was another example of Pandoc escaping things that shouldn't have been escaped. I think another issue may be that I've got a Mac which has different versions of common userland utilities such as gunzip
. I'll use your second option since it's the closest to the version that I have.
It looks good to me. Once we fix the commands, we can add the qe-approved label. Thank you so much for such a detailed documentation, it has been really helpful for us in QE. i very much appreciate it. Thanks! |
389946b
to
26fcc35
Compare
I've fixed more formatting issues and decided that the Mermaid version of the SVG diagram was too difficult to produce. |
26fcc35
to
756f74d
Compare
docs/OnClusterBuildInstructions.md
Outdated
that is stored within the ConfigMap may be viewed by running: | ||
|
||
```console | ||
$ oc get configmap/mc-<rendered MachineConfig name> -n openshift-machine-config-operator -o json | jq -r '.data["machineconfig.json.gz"]' | base64 -d | gunzip | jq | head |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oc get configmap/mc-<rendered MachineConfig name> -n openshift-machine-config-operator -o json | jq -r '.data["machineconfig.json.gz"]' | base64 -d | gunzip | jq | head
I'm sorry, I pasted the "|head" part of the command that I used to cut the output so that it would be easier to read. We should remove it, or anyone copying the command will not get the full configuration.
Sorry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, I'll fix it!
756f74d
to
b72e625
Compare
/label qe-approved |
@cheesesashimi: This pull request references MCO-664 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Thanks Zack. Any further changes can be added as follow-up. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cheesesashimi, sinnykumari The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@cheesesashimi: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
[ART PR BUILD NOTIFIER] This PR has been included in build openshift-proxy-pull-test-container-v4.15.0-202311302048.p0.gff30882.assembly.stream for distgit openshift-proxy-pull-test. |
Connecting the two Markdown files added in b72e625 (adds machine-os-builder documentation, 2023-08-23, openshift#3885).
Connecting the two Markdown files added in b72e625 (adds machine-os-builder documentation, 2023-08-23, openshift#3885).
- What I did
Adds on-cluster build docs. There are two docs and a diagram as described below:
MachineOSBuildDesign.md
- This doc is primarily for MCO developers to understand how the on-cluster builds mechanism works. It includes a description of the various components such as BuildController, ImageBuilder, and CustomPodBuilder as well as an SVG version of my diagram outlining these things.OnClusterBuildInstructions.md
- This doc is primarily for cluster admins wishing to give on-cluster builds a try in their dev preview clusters.MachineOSBuilderDiagram.svg
- This is the aforementioned diagram in SVG format.- How to verify it
Run through the instructions and see if you can bring up a 4.14 cluster with a custom layered OS.
- Description for the changelog
Adds on-cluster build dev preview docs