Skip to content
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

doc : Add steps to remove CRC pull secret from OS provided tools (#2572) #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rohanKanojia
Copy link
Contributor

@rohanKanojia rohanKanojia commented Jan 6, 2025

Description

Fix crc-org/crc#2572

Add steps for Windows, Linux (GNOME), and MacOS to instruct users on removing the CRC pull secret from credential managers on the abovementioned Operating Systems.

I've tested these steps on:

  • Windows 11
  • GNOME Desktop Linux
  • KDE Desktop Linux

For MacOS I got help from Anjan who verified steps there.

@@ -23,6 +23,66 @@ Only one preset can be active at a time.
* xref:installing.adoc#minimum-system-requirements[Minimum system requirements].
* xref:configuring.adoc#changing-the-selected-preset[Changing the selected preset].

[id='about-pullsecrets']
== About Pull Secrets
While starting cluster configured with {openshift} or {ushift} preset, {prod} would request you to provide a pull secret. It's required to pull some {ocp} specific container images.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
While starting cluster configured with {openshift} or {ushift} preset, {prod} would request you to provide a pull secret. It's required to pull some {ocp} specific container images.
While starting cluster configured with {openshift} or {ushift} preset, {prod} would request you to provide a pull secret. It's required to pull container images from Red Hat container registries.

Copy link
Contributor

@gbraad gbraad Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sentence itself is confusing (too long?) as the "While"-statement is not correctly used here as a conjunction.

@praveenkumar
Copy link
Member

/assign @anjannath

Copy link
Contributor

@gbraad gbraad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"While... [clause] would... [but no reason until the next line]. It's... [subordinate clause]"

the first comma before 'would' is not necessary, but there should be one before 'it's' (subordinate clause)

@rohanKanojia rohanKanojia force-pushed the pr/issue2572 branch 2 times, most recently from 27f2efd to cf78d15 Compare January 17, 2025 06:29
@@ -95,6 +95,66 @@ $ crc setup # Initialize environment for cluster
$ crc start # Start the cluster
----

[id='about-pullsecrets']
== About Pull Secrets
While starting cluster configured with {openshift} or {ushift} preset {prod} would request you to provide a pull secret, it's required to pull some {ocp} specific container images.
Copy link
Contributor

@themr0c themr0c Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider rewriting this sentence for clarity. If I understand well:

Suggested change
While starting cluster configured with {openshift} or {ushift} preset {prod} would request you to provide a pull secret, it's required to pull some {ocp} specific container images.
When using the {openshift} or {ushift} preset, {prod} requires your pull secret:
* To pull the virtual machine bundle.
* To pull {ocp} container images from the Red Hat registry.
When you run `crc start` the first time, when the pull secret has not been provisioned, {prod} prompts you to provide your pull secret.


Once you provide this pull secret, it gets stored in Operating System's credential manager so that {prod} doesn't ask for pull secret again in case you delete existing cluster and create
a new one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this command to find the pull secret location OS agnostic?

crc config get pull-secret-file

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(In case CRC has stopped to use this config file: what happens if you have already provisioned this file?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, pull secret can be provided to CRC via these options (in decreasing order of precedence) :

  1. Pull Secret from Path --pull-secret-file
  2. Pull Secret from config pull-secret-file
  3. Pull Secret from OS Credential Manager

Pull Secret is stored in OS Credential manager only when CRC is not able to resolve it from source 1 and 2. Whenever user enters pull secret via prompt it's stored in the operating system's keyring.

(In case CRC has stopped to use this config file: what happens if you have already provisioned this file?)

Sorry, I don't understand your question completely. What do you mean by provisioning the file?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My question, indeed, makes no more sense with the information you provided. I missed the information that crc has multiple possible sources for the pull secret, with order of precedence (and continue to have them). It might be good to add this info to the docs. (See other comments)


Please note that this pull secret would only be removed from the Operating System's credential manager when user runs [command]`{bin} cleanup` command.

If you manually want to remove/update pull secret from your Operating System's credential manager configuration.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you manually want to remove/update pull secret from your Operating System's credential manager configuration.
If you manually want to remove or update the pull secret from your Operating System's credential manager configuration.

Comment on lines 116 to 121
1. Open the Control Panel.
2. Go to `User Accounts` > `Credential Manager`.
3. Choose `Windows Credentials`.
4. Find the {prod} pull secret entry you want to delete.
5. Click on the entry to expand it.
6. Click `Remove` to delete the credential.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asciidoc syntax for ordered lists. See https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/#lists

Suggested change
1. Open the Control Panel.
2. Go to `User Accounts` > `Credential Manager`.
3. Choose `Windows Credentials`.
4. Find the {prod} pull secret entry you want to delete.
5. Click on the entry to expand it.
6. Click `Remove` to delete the credential.
. Open the Control Panel.
. Go to `User Accounts` > `Credential Manager`.
. Choose `Windows Credentials`.
. Find the {prod} pull secret entry you want to delete.
. Click on the entry to expand it.
. Click `Remove` to delete the credential.

Comment on lines 127 to 132
1. Open the `Activities` overview and start typing `Passwords`.
2. Click on `Passwords and Keys` to open https://wiki.gnome.org/Projects/GnomeKeyring[GNOME Keyring].
3. Click on `Login` entry under `Passwords`
4. Find the {prod} pull secret entry you want to delete.
5. Right-click the entry you want to delete.
6. Select `Delete` and confirm the deletion.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asciidoc syntax for ordered lists. See https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/#lists

Suggested change
1. Open the `Activities` overview and start typing `Passwords`.
2. Click on `Passwords and Keys` to open https://wiki.gnome.org/Projects/GnomeKeyring[GNOME Keyring].
3. Click on `Login` entry under `Passwords`
4. Find the {prod} pull secret entry you want to delete.
5. Right-click the entry you want to delete.
6. Select `Delete` and confirm the deletion.
. Open the `Activities` overview and start typing `Passwords`.
. Click on `Passwords and Keys` to open https://wiki.gnome.org/Projects/GnomeKeyring[GNOME Keyring].
. Click on `Login` entry under `Passwords`
. Find the {prod} pull secret entry you want to delete.
. Right-click the entry you want to delete.
. Select `Delete` and confirm the deletion.

Comment on lines 143 to 148
1. Open the `Application Launcher` and start typing `KWalletManager`.
2. Under `Contents` tab, click on `Secret Service` and expand it.
3. Under expanded `Secret Service` entry, click on `Passwords` and expand it.
4. Find the {prod} pull secret entry you want to delete.
5. Right-click the entry you want to delete.
6. Select `Delete` and confirm the deletion.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asciidoc syntax for ordered lists. See https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/#lists

Suggested change
1. Open the `Application Launcher` and start typing `KWalletManager`.
2. Under `Contents` tab, click on `Secret Service` and expand it.
3. Under expanded `Secret Service` entry, click on `Passwords` and expand it.
4. Find the {prod} pull secret entry you want to delete.
5. Right-click the entry you want to delete.
6. Select `Delete` and confirm the deletion.
. Open the `Application Launcher` and start typing `KWalletManager`.
. Under `Contents` tab, click on `Secret Service` and expand it.
. Under expanded `Secret Service` entry, click on `Passwords` and expand it.
. Find the {prod} pull secret entry you want to delete.
. Right-click the entry you want to delete.
. Select `Delete` and confirm the deletion.

Comment on lines 152 to 193
1. Open `Keychain Access` from the `Applications` > `Utilities` folder.
2. Select the keychain where the credential is stored (e.g., `login`, `iCloud`).
3. Find the {prod} pull secret entry you want to delete.
4. Right-click the entry and select `Delete`.
5. Confirm the deletion when prompted.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asciidoc syntax for ordered lists. See https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/#lists

Suggested change
1. Open `Keychain Access` from the `Applications` > `Utilities` folder.
2. Select the keychain where the credential is stored (e.g., `login`, `iCloud`).
3. Find the {prod} pull secret entry you want to delete.
4. Right-click the entry and select `Delete`.
5. Confirm the deletion when prompted.
. Open `Keychain Access` from the `Applications` > `Utilities` folder.
. Select the keychain where the credential is stored (e.g., `login`, `iCloud`).
. Find the {prod} pull secret entry you want to delete.
. Right-click the entry and select `Delete`.
. Confirm the deletion when prompted.


. To pull the virtual machine bundle.
. To pull {ocp} container images from the Red Hat registry.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{prod} searches for an existing pull secret in these locations, by order of precedence:
. `--pull-secret-file` CLI argument value.
. `pull-secret-file` configuration option.
. Your Operating System Credential Manager.

Comment on lines 107 to 110
You need to download it from the Pull Secret section of the link:https://console.redhat.com/openshift/create/local[{prod} page on the {rh} Hybrid Cloud Console].

Once you provide this pull secret, it gets stored in Operating System's credential manager so that {prod} doesn't ask for pull secret again in case you delete existing cluster and create
a new one.
Copy link
Contributor

@themr0c themr0c Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: usual Prerequisites / Procedure anchors. Deliver information in logical order. Explain the alternatives in TIP admonitions. Hopefully I am not introducing too many tech mistakes here:

Suggested change
You need to download it from the Pull Secret section of the link:https://console.redhat.com/openshift/create/local[{prod} page on the {rh} Hybrid Cloud Console].
Once you provide this pull secret, it gets stored in Operating System's credential manager so that {prod} doesn't ask for pull secret again in case you delete existing cluster and create
a new one.
=== Providing your pull secret to {prod}
.Prerequisites
. Download your pull secret from the Pull Secret section of the link:https://console.redhat.com/openshift/create/local[{prod} page on the {rh} Hybrid Cloud Console] to _<your_pull_secret_file>_ location.
.Procedure
* Enter your pull secret value when {prod} prompts you to provide your pull secret.
{prod} stores the pull secret in the Operating System's credential manager so that {prod} doesn't ask for pull secret again in case you delete existing cluster and create a new one.
+
[subs="+attributes,+quotes"]
----
$ {bin} start
...
? Please enter the pull secret
----
+
[TIP]
====
Alternatively, specify your pull secret file location by using the `--pull-secret-file` CLI argument.
[subs="+attributes,+quotes"]
----
$ {bin} start --pull-secret-file=_<your_pull_secret_file>_
----
====
+
[TIP]
====
Alternatively, specify your pull secret file location by setting the `pull-secret-file` configuration.
[subs="+attributes,+quotes"]
----
$ {bin} config set pull-secret-file _<your_pull_secret_file>_
$ {bin} start
----
====

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested and updated: the prompt requires the json content, not the file location.

Copy link
Contributor Author

@rohanKanojia rohanKanojia Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the suggestion! Sorry for the informal style of writing. I learned something new :-)

Add steps for Windows, Linux (GNOME) and MacOS to instruct user on how
to remove the CRC pull secret from credential managers on abovementioned
Operating Systems.

Signed-off-by: Rohan Kumar <[email protected]>
@gbraad
Copy link
Contributor

gbraad commented Jan 27, 2025

Hopefully I am not introducing too many tech mistakes here:

The 'official' documentation needs to see more scrutiny.
Otherwise, we can use the engineering docs to describe something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] No easy way to change (or remove) pull-secret
5 participants