-
Notifications
You must be signed in to change notification settings - Fork 1.8k
updating codeblocks for the rest of the installation files #24611
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,38 +30,84 @@ link:https://access.redhat.com/downloads/content/290/[{product-title} downloads | |
to determine the version of {product-title} that you want to install and determine the corresponding tag on the link:https://quay.io/repository/openshift-release-dev/ocp-release?tab=tags[Repository Tags] page. | ||
|
||
. Set the required environment variables: | ||
.. Export the release version: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ export OCP_RELEASE=<release_version> <1> | ||
$ export LOCAL_REGISTRY='<local_registry_host_name>:<local_registry_host_port>' <2> | ||
$ export LOCAL_REPOSITORY='<local_repository_name>' <3> | ||
$ export PRODUCT_REPO='openshift-release-dev' <4> | ||
$ export LOCAL_SECRET_JSON='<path_to_pull_secret>' <5> | ||
$ export RELEASE_NAME="ocp-release" <6> | ||
$ export ARCHITECTURE=<server_architecture> <7> | ||
$ REMOVABLE_MEDIA_PATH=<path> <8> | ||
$ OCP_RELEASE=<release_version> | ||
---- | ||
<1> For `<release_version>`, specify the tag that corresponds to the version of {product-title} to | ||
+ | ||
For `<release_version>`, specify the tag that corresponds to the version of {product-title} to | ||
install, such as `4.5.4`. | ||
<2> For `<local_registry_host_name>`, specify the registry domain name for your mirror | ||
|
||
.. Export the local registry name and host port: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ LOCAL_REGISTRY='<local_registry_host_name>:<local_registry_host_port>' | ||
---- | ||
+ | ||
For `<local_registry_host_name>`, specify the registry domain name for your mirror | ||
repository, and for `<local_registry_host_port>`, specify the port that it | ||
serves content on. | ||
<3> For `<local_repository_name>`, specify the name of the repository to create in your | ||
|
||
.. Export the local repository name: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ LOCAL_REPOSITORY='<local_repository_name>' | ||
---- | ||
+ | ||
For `<local_repository_name>`, specify the name of the repository to create in your | ||
registry, such as `ocp4/openshift4`. | ||
<4> The repository to mirror. For a production release, you must specify | ||
`openshift-release-dev`. | ||
<5> For `<path_to_pull_secret>`, specify the absolute path to and file name of | ||
the pull secret for your mirror registry that you created. | ||
<6> The release mirror. For a production release, you must specify | ||
`ocp-release`. | ||
<7> For `server_architecture`, specify the architecture of the server, such as `x86_64`. | ||
<8> For `<path>`, specify the path to the directory to host the mirrored images. | ||
|
||
.. Export the name of the repository to mirror: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ PRODUCT_REPO='openshift-release-dev' | ||
|
||
---- | ||
+ | ||
For a production release, you must specify `openshift-release-dev`. | ||
|
||
.. Export the path to your registry pull secret: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ LOCAL_SECRET_JSON='<path_to_pull_secret>' | ||
---- | ||
+ | ||
For `<path_to_pull_secret>`, specify the absolute path to and file name of the pull secret for your mirror registry that you created. | ||
|
||
.. Export the release mirror: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ RELEASE_NAME="ocp-release" | ||
---- | ||
+ | ||
For a production release, you must specify `ocp-release`. | ||
|
||
.. Export the type of architecture for your server, such as `x86_64`.: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ ARCHITECTURE=<server_architecture> | ||
---- | ||
|
||
.. Export the path to the directory to host the mirrored images: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ REMOVABLE_MEDIA_PATH=<path> | ||
|
||
---- | ||
|
||
. Mirror the version images to the internal container registry: | ||
** If your mirror host does not have internet access, take the following actions: | ||
... Connect the removable media to a system that is connected to the internet. | ||
... Review the images and configuration manifests to mirror: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc adm -a ${LOCAL_SECRET_JSON} release mirror \ | ||
--from=quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE}-${ARCHITECTURE} \ | ||
|
@@ -72,18 +118,21 @@ $ oc adm -a ${LOCAL_SECRET_JSON} release mirror \ | |
command. The information about your mirrors is unique to your mirrored repository, and you must add the `imageContentSources` section to the `install-config.yaml` file during installation. | ||
... Mirror the images to a directory on the removable media: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc adm release mirror -a ${LOCAL_SECRET_JSON} --to-dir=${REMOVABLE_MEDIA_PATH}/mirror quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE}-${ARCHITECTURE} | ||
---- | ||
... Take the media to the restricted network environment and upload the images to the local container registry. | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc image mirror -a ${LOCAL_SECRET_JSON} --from-dir=${REMOVABLE_MEDIA_PATH}/mirror 'file://openshift/release:${OCP_RELEASE}*' ${LOCAL_REGISTRY}/${LOCAL_REPOSITORY} | ||
---- | ||
|
||
** If the local container registry is connected to the mirror host, take the following actions: | ||
... Directly push the release images to the local registry by using following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc adm -a ${LOCAL_SECRET_JSON} release mirror \ | ||
--from=quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE}-${ARCHITECTURE} \ | ||
|
@@ -100,6 +149,7 @@ command. The information about your mirrors is unique to your mirrored repositor | |
. To create the installation program that is based on the content that you | ||
mirrored, extract it and pin it to the release: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc adm -a ${LOCAL_SECRET_JSON} release extract --command=openshift-install "${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}-${ARCHITECTURE}" | ||
---- | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,25 +19,43 @@ If you miss this step, the second boot will fail. | |
For example, to configure DHCP networking, identify `ip=dhcp` | ||
or set static networking when you add parameters to the kernel command line. | ||
|
||
. Generate the thumbprint. Install the clevis package, it is not already | ||
installed, and generate a thumbprint | ||
from the Tang server. Replace the value of `url` with the Tang server URL: | ||
. Install the clevis package, if it is not already installed: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ sudo yum install clevis -y | ||
---- | ||
|
||
. Generate a thumbprint from the Tang server. | ||
|
||
.. In the following command, replace the value of `url` with the Tang server URL: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ echo nifty random wordwords \ | ||
| clevis-encrypt-tang \ | ||
'{"url":"https://tang.example.org"}' | ||
|
||
---- | ||
+ | ||
.Example output | ||
|
||
[source,terminal] | ||
---- | ||
The advertisement contains the following signing keys: | ||
|
||
PLjNyRdGw03zlRoGjQYMahSZGu9 | ||
---- | ||
|
||
Do you wish to trust these keys? [ynYN] y | ||
.. When the `Do you wish to trust these keys? [ynYN]` prompt displays, type `Y`, and the thumbprint is displayed: | ||
+ | ||
.Example output | ||
[source,terminal] | ||
---- | ||
eyJhbmc3SlRyMXpPenc3ajhEQ01tZVJiTi1oM... | ||
---- | ||
|
||
. Create a Base64 encoded file, replacing the URL of the Tang server (`url`) and thumbprint (`thp`) you just generated: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ (cat <<EOM | ||
{ | ||
|
@@ -46,12 +64,18 @@ $ (cat <<EOM | |
} | ||
EOM | ||
) | base64 -w0 | ||
|
||
|
||
---- | ||
+ | ||
.Example output | ||
[source,terminal] | ||
---- | ||
ewogInVybCI6ICJodHRwczovL3RhbmcuZXhhbXBsZS5jb20iLAogInRocCI6ICJaUk1leTFjR3cwN3psVExHYlhuUWFoUzBHdTAiCn0K | ||
---- | ||
|
||
. Replace the “source” in the TPM2 example with the Base64 encoded file for one or both of these examples for worker and/or master nodes: | ||
. Replace the “source” in the TPM2 example with the Base64 encoded file for the type of node to update: | ||
** For worker nodes, use the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ cat << EOF > ./99-openshift-worker-tang-encryption.yaml | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
|
@@ -75,7 +99,9 @@ spec: | |
EOF | ||
---- | ||
|
||
** For master nodes, use the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ cat << EOF > ./99-openshift-master-encryption.yaml | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
|
@@ -88,7 +114,7 @@ spec: | |
config: | ||
ignition: | ||
version: 2.2.0 | ||
storage: | ||
storage: | ||
files: | ||
- contents: | ||
source: data:text/plain;base64,e30K | ||
|
Uh oh!
There was an error while loading. Please reload this page.