Skip to content

Commit 161013a

Browse files
stevsmitSteven Smith
andauthored
Adds post install procedure to deploying red hat quay (quay#1452)
Co-authored-by: Steven Smith <[email protected]>
1 parent b3e459e commit 161013a

14 files changed

+138
-321
lines changed

deploy_red_hat_quay_operator/master.adoc

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,24 @@ include::modules/deploying-quay-registry.adoc[leveloffset=+1]
3333
//registry deployment
3434
include::modules/registry-deploy-console.adoc[leveloffset=+2]
3535
//cli
36-
include::modules/operator-deploy-cli.adoc[leveloffset=+2]
36+
include::modules/registry-deploy-cli.adoc[leveloffset=+2]
3737

38-
//post installation configuration
38+
//creating the first user
39+
include::modules/creating-first-user.adoc[leveloffset=+1]
40+
include::modules/first-user-ui.adoc[leveloffset=+2]
41+
include::modules/first-user-api.adoc[leveloffset=+2]
3942

43+
//post installation configuration
44+
include::modules/enabling-features-after-deployment.adoc[leveloffset=+1]
45+
include::modules/operator-config-cli.adoc[leveloffset=+2]
46+
include::modules/operator-config-cli-download.adoc[leveloffset=+2]
4047

41-
include::modules/first-user-api.adoc[leveloffset=+3]
42-
include::modules/operator-deploy-view-pods-cli.adoc[leveloffset=+3]
43-
include::modules/operator-deploy-hpa.adoc[leveloffset=+3]
48+
//Advanced configuration
4449

4550

46-
//preconfiguration
47-
include::modules/operator-preconfigure.adoc[leveloffset=+1]
48-
include::modules/config-preconfigure-automation.adoc[leveloffset=+2]
51+
include::modules/operator-deploy-hpa.adoc[leveloffset=+1]
4952

53+
//Advanced configuration options
5054

5155
//traffic ingress
5256
[id="configuring-traffic-ingress"]
@@ -84,22 +88,15 @@ include::modules/creating-project-node-selector-toleration.adoc[leveloffset=+2]
8488
include::modules/installing-quay-operator-namespace.adoc[leveloffset=+2]
8589
include::modules/creating-registry-infra-node.adoc[leveloffset=+2]
8690

87-
[role="_additional-resources"]
88-
.Additional resources
89-
For more information on pre-configuring your {productname} deployment, see the section xref:config-preconfigure-automation[Pre-configuring {productname} for automation]
9091

9192
include::modules/operator-monitor-deploy-cli.adoc[leveloffset=+1]
9293
//ui
9394
include::modules/operator-deploy-ui.adoc[leveloffset=+2]
94-
include::modules/operator-first-user-ui.adoc[leveloffset=+3]
9595

9696
//quayregistry status
9797
include::modules/operator-quayregistry-status.adoc[leveloffset=+1]
9898

99-
//configuring
100-
include::modules/operator-config-cli.adoc[leveloffset=+1]
101-
include::modules/operator-config-cli-access.adoc[leveloffset=+2]
102-
include::modules/operator-config-cli-download.adoc[leveloffset=+2]
99+
103100

104101
//SSL/TLS
105102
include::modules/operator-custom-ssl-certs-config-bundle.adoc[leveloffset=+1]

modules/config-updates-36.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ The following configuration fields have been introduced with {productname} 3.6:
1313
|Parameter |Description
1414
|**FEATURE_EXTENDED_REPOSITORY_NAMES** |Support for nested repositories and extended repository names has been added. This change allows the use of `/` in repository names needed for certain {ocp} use cases. For more information, see xref:config-fields-nested-repositories[Configuring nested repositories].
1515

16-
|**FEATURE_USER_INITIALIZE** |If set to true, the first `User` account can be created by the API `/api/v1/user/initialize`. For more information, see xref:config-preconfigure-automation[Pre-configuring {productname} for automation].
16+
|**FEATURE_USER_INITIALIZE** |If set to true, the first `User` account can be created by the API `/api/v1/user/initialize`.
1717

18-
| **ALLOWED_OCI_ARTIFACT_TYPES** |Helm, cosign, and ztsd compression scheme artifacts are built into {productname} 3.6 by default. For any other Open Container Initiative (OCI) artifact types that are not supported by default, you can add them to the `ALLOWED_OCI_ARTIFACT_TYPES` configuration in Quay's `config.yaml` For more information, see xref:other-oci-artifacts-with-quay[Adding other OCI media types to Quay].
18+
| **ALLOWED_OCI_ARTIFACT_TYPES** |Helm, cosign, and ztsd compression scheme artifacts are built into {productname} 3.6 by default. For any other Open Container Initiative (OCI) artifact types that are not supported by default, you can add them to the `ALLOWED_OCI_ARTIFACT_TYPES` configuration in Quay's `config.yaml`.
1919

2020
| **CREATE_PRIVATE_REPO_ON_PUSH** |Registry users now have the option to set `CREATE_PRIVATE_REPO_ON_PUSH` in their `config.yaml` to `True` or `False` depending on their security needs.
2121

modules/creating-first-user.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
:_mod-docs-content-type: CONCEPT
2+
[id="creating-first-user"]
3+
= Creating the first user
4+
5+
This section guides you through creating the initial administrative user for your {productname} registry. Completing this step confirms that your deployment is fully operational and grants you the necessary credentials to begin using and managing your registry. This can be completed by using the {productname} UI or by leveraging the API.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
:_mod-docs-content-type: REFERENCE
2+
[id="enabling-features-after-deployment"]
3+
= Enabling features after deployment
4+
5+
After deployment, you can customize to the {productname} registry to enable new features and better suit the needs of your organization. This entails editing the {productname} configuration bundle secret (`spec.configBundleSecret`) resource. You can use the {ocp} web console or the command-line interface to enable features after deployment. Using the {ocp} web console is generally considered a simpler method.

modules/first-user-api.adoc

Lines changed: 18 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,76 +2,62 @@
22
[id="using-the-api-to-create-first-user"]
33
= Using the API to create the first user
44

5-
Use the following procedure to create the first user in your {productname} organization.
5+
You can use the API to create the first user with administrative privileges for your registry.
66

77
.Prerequisites
88

9-
* The config option `FEATURE_USER_INITIALIZE` must be set to `True`.
10-
* No users can already exist in the database.
11-
12-
.Procedure
13-
14-
[NOTE]
15-
====
16-
This procedure requests an OAuth token by specifying `"access_token": true`.
17-
====
18-
19-
. Open your {productname} configuration file and update the following configuration fields:
9+
* You have set `FEATURE_USER_INITIALIZE: true` and established a superuser in your `config.yaml` file. For example:
2010
+
2111
[source,yaml]
2212
----
13+
# ...
2314
FEATURE_USER_INITIALIZE: true
2415
SUPER_USERS:
25-
- quayadmin
16+
- <username>
17+
# ..
2618
----
27-
28-
. Stop the {productname} service by entering the following command:
2919
+
30-
[source,terminal]
31-
----
32-
$ sudo podman stop quay
33-
----
20+
If you did not configure these settings upon registry creation, and need to re-configure your registry to enable these settings, see. . .
3421
35-
. Start the {productname} service by entering the following command:
36-
+
37-
[source,terminal]
38-
----
39-
$ sudo podman run -d -p 80:8080 -p 443:8443 --name=quay -v $QUAY/config:/conf/stack:Z -v $QUAY/storage:/datastorage:Z {productrepo}/{quayimage}:{productminv}
40-
----
22+
* You have not created a user by using the {productname} UI.
4123
42-
. Run the following `CURL` command to generate a new user with a username, password, email, and access token:
24+
.Procedure
25+
26+
. On the command-line interface, generate a new user with a username, password, email, and access token by entering the following `CURL` command:
4327
+
4428
[source,terminal]
4529
----
46-
$ curl -X POST -k http://quay-server.example.com/api/v1/user/initialize --header 'Content-Type: application/json' --data '{ "username": "quayadmin", "password":"quaypass12345", "email": "quayadmin@example.com", "access_token": true}'
30+
$ curl -X POST -k http:/</quay-server.example.com>/api/v1/user/initialize --header 'Content-Type: application/json' --data '{ "username": "<username>", "password":"<password>", "email": "<email>@example.com", "access_token": true}'
4731
----
4832
+
4933
If successful, the command returns an object with the username, email, and encrypted password. For example:
5034
+
5135
[source,yaml]
5236
----
53-
{"access_token":"6B4QTRSTSD1HMIG915VPX7BMEZBVB9GPNY2FC2ED", "email":"[email protected]","encrypted_password":"1nZMLH57RIE5UGdL/yYpDOHLqiNCgimb6W9kfF8MjZ1xrfDpRyRs9NUnUuNuAitW","username":"quayadmin"} # gitleaks:allow
37+
{"access_token":"6B4QTRSTSD1HMIG915VPX7BMEZBVB9GPNY2FC2ED", "email":"[email protected]","encrypted_password":"<password>","username":"quayadmin"} # gitleaks:allow
5438
----
5539
+
56-
If a user already exists in the database, an error is returned:
40+
If a user already exists in the database, an error is returned. For example::
5741
+
5842
[source,terminal]
5943
----
6044
{"message":"Cannot initialize user in a non-empty database"}
6145
----
6246
+
63-
If your password is not at least eight characters or contains whitespace, an error is returned:
47+
If your password is not at least eight characters or contains whitespace, an error is returned. For example:
6448
+
6549
[source,terminal]
6650
----
6751
{"message":"Failed to initialize user: Invalid password, password must be at least 8 characters and contain no whitespace."}
6852
----
6953

70-
. Log in to your {productname} deployment by entering the following command:
54+
. You can log in to your registry by navigating to the UI or by leveraging Podman on the CLI.
55+
56+
.. Log in to the registry by running the following `podman` command:
7157
+
7258
[source,terminal]
7359
----
74-
$ sudo podman login -u quayadmin -p quaypass12345 http://quay-server.example.com --tls-verify=false
60+
$ podman login -u <username> -p <password> http://<quay-server.example.com>
7561
----
7662
+
7763
.Example output

modules/first-user-ui.adoc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
[id="first-user-ui"]
3+
= Creating the first user by using the UI
4+
5+
Creating the first user by using the UI offers a visual workflow and is often preferred after initial setup to ensure that the user interface is functional. For most users, the UI offers a simpler path to creating the first user, as it does not require additional configuration in the `config.yaml` file.
6+
7+
.Prerequisites
8+
9+
* You have deployed the {productname} registry.
10+
11+
.Procedure
12+
13+
. On the {ocp} web console, click *Operators* -> *Installed Operators* -> *{productname}*.
14+
15+
. On the *{productname}* Operators page, click *Quay Registry*, and then the name of your registry.
16+
17+
. On the *QuayRegistry details* page, click the *Registry Endpoint* link, for example, *example-registry-quay.username-cluster-new.gcp.quaydev.org*. You are navigated to the registry's main page.
18+
19+
. Click *Create Account*.
20+
21+
. Enter the details for *Username*, *Password*, *Email*, and then click *Create Account*. After creating the first user, you are automatically logged in to the {productname} registry.

modules/operator-config-cli-access.adoc

Lines changed: 0 additions & 96 deletions
This file was deleted.

modules/operator-config-cli-download.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ $ oc describe quayregistry -n <quay_namespace>
2626
[source,terminal]
2727
----
2828
# ...
29-
Config Bundle Secret: example-registry-config-bundle-v123x
29+
Config Bundle Secret: example-registry-config-bundle-v123x
3030
# ...
3131
----
3232

@@ -100,7 +100,6 @@ $ oc patch quayregistry <registry_name> -n <namespace> --type=merge -p '{"spec":
100100
quayregistry.quay.redhat.com/example-registry patched
101101
----
102102

103-
104103
.Verification
105104

106105
. Verify that the `QuayRegistry` CR has been updated with the new `configBundleSecret`:

modules/operator-config-cli.adoc

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
11
:_mod-docs-content-type: PROCEDURE
22
[id="operator-config-cli"]
3-
= Customizing {productname} on {ocp}
3+
= Enabling features by using the {ocp} web console
44

5-
After deployment, you can customize the {productname} application by editing the {productname} configuration bundle secret `spec.configBundleSecret`. You can also change the managed status of components and configure resource requests for some components in the `spec.components` object of the `QuayRegistry` resource.
5+
To enable features in the {ocp} web console, you can edit the `configBundleSecret` resource.
66

7-
[id="editing-config-bundle-secret-in-ocp-console"]
8-
== Editing the config bundle secret in the {ocp} console
7+
.Prerequisites
98

10-
Use the following procedure to edit the config bundle secret in the {ocp} console.
9+
* You have have administrative privileges to the cluster.
1110
1211
.Procedure
1312

14-
. On the {productname} Registry overview screen, click the link for the *Config Bundle Secret*.
15-
+
16-
image:operator-quay-registry-overview.png[{productname} Registry overview]
13+
. On the {ocp} web console, click *Operators* -> *Installed Operators* -> *Red Hat Quay*.
1714

18-
. To edit the secret, click **Actions** -> **Edit Secret**.
19-
+
20-
image:operator-config-bundle-edit-secret.png[Edit secret]
15+
. Click *Quay Registry* and then the name of your registry.
2116

22-
. Modify the configuration and save the changes.
23-
+
24-
image:operator-save-config-changes.png[Save changes]
17+
. Under *Config Bundle Secret*, click the name of your secret, for example, `quay-config-bundle`.
2518

26-
. Monitor the deployment to ensure successful completion and that the configuration changes have taken effect.
19+
. On the *Secret details* page, click *Actions* -> *Edit secret*.
20+
21+
. In the *Value* text box, add the new configuration fields for the features that you want to enable. For a list of all configuration fields, see link:https://docs.redhat.com/en/documentation/red_hat_quay/3/html/configure_red_hat_quay/index[Configure {productname}].
22+
23+
. Click *Save*. The {productname} Operator automatically reconciles the changes by restarting all Quay-related pods. After all pods are restart, the features are enabled.

modules/operator-deploy-view-pods-cli.adoc

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)