diff --git a/modules/images-samples-operator-deprecated-image-stream.adoc b/modules/images-samples-operator-deprecated-image-stream.adoc index c7df0260dbed..07fe5e1b31f3 100644 --- a/modules/images-samples-operator-deprecated-image-stream.adoc +++ b/modules/images-samples-operator-deprecated-image-stream.adoc @@ -8,6 +8,7 @@ [id="images-samples-operator-deprecated-image-stream_{context}"] = Removing deprecated image stream tags from the Cluster Samples Operator +[role="_abstract"] The Cluster Samples Operator leaves deprecated image stream tags in an image stream because users can have deployments that use the deprecated image stream tags. You can remove deprecated image stream tags by editing the image stream with the `oc tag` command. @@ -19,11 +20,11 @@ Deprecated image stream tags that the samples providers have removed from their .Prerequisites -* You installed the `oc` CLI. +* You installed the {oc-first}. .Procedure -* Remove deprecated image stream tags by editing the image stream with the `oc tag` command. +* Remove deprecated image stream tags by editing the image stream with the following `oc tag` command: + [source,terminal] ---- diff --git a/modules/installation-images-samples-disconnected-mirroring-assist.adoc b/modules/installation-images-samples-disconnected-mirroring-assist.adoc index 5c89dfb0bd77..bebe9e6979bb 100644 --- a/modules/installation-images-samples-disconnected-mirroring-assist.adoc +++ b/modules/installation-images-samples-disconnected-mirroring-assist.adoc @@ -8,7 +8,10 @@ [id="installation-images-samples-disconnected-mirroring-assist_{context}"] = Cluster Samples Operator assistance for mirroring -During installation, {product-title} creates a config map named `imagestreamtag-to-image` in the `openshift-cluster-samples-operator` namespace. The `imagestreamtag-to-image` config map contains an entry, the populating image, for each image stream tag. +[role="_abstract"] +During installation, {product-title} creates a config map named `imagestreamtag-to-image` in the `openshift-cluster-samples-operator` namespace. + +The `imagestreamtag-to-image` config map contains an entry, the populating image, for each image stream tag. The format of the key for each entry in the data field in the config map is `_`. @@ -16,11 +19,11 @@ ifndef::openshift-rosa;openshift-dedicated[] During a disconnected installation of {product-title}, the status of the Cluster Samples Operator is set to `Removed`. If you choose to change it to `Managed`, it installs samples. [NOTE] ==== -The use of samples in a network-restricted or discontinued environment may require access to services external to your network. Some example services include: Github, Maven Central, npm, RubyGems, PyPi and others. There might be additional steps to take that allow the cluster samples operators's objects to reach the services they require. +The use of samples in a network-restricted or discontinued environment might require access to services external to your network. Some example services include: Github, Maven Central, npm, RubyGems, PyPi and others. There might be additional steps to take that allow the Cluster Samples Operators objects to reach the services they require. ==== endif::openshift-rosa;openshift-dedicated[] -You can use this config map as a reference for which images need to be mirrored for your image streams to import. +Use the following principles to determine which images you need to mirror for your image streams to import: * While the Cluster Samples Operator is set to `Removed`, you can create your mirrored registry, or determine which existing mirrored registry you want to use. * Mirror the samples you want to the mirrored registry using the new config map as your guide. diff --git a/modules/samples-operator-bootstrapped.adoc b/modules/samples-operator-bootstrapped.adoc new file mode 100644 index 000000000000..8f4b7e7a4e21 --- /dev/null +++ b/modules/samples-operator-bootstrapped.adoc @@ -0,0 +1,48 @@ +// Module included in the following assemblies: +// +// * openshift_images/configuring_samples_operator.adoc + +:_mod-docs-content-type: CONCEPT +[id="samples-operator-bootstrapped_{context}"] += Cluster Samples Operator use of management state + +[role="_abstract"] +The Cluster Samples Operator is bootstrapped as `Managed` by default or if global proxy is configured. + +In the `Managed` state, the Cluster Samples Operator is actively managing its resources and keeping the component active to pull sample image streams and images from the registry and ensure that the requisite sample templates are installed. + +Certain circumstances result in the Cluster Samples Operator bootstrapping itself as `Removed` including: + +* If the Cluster Samples Operator cannot reach the registry after three minutes on initial startup after a clean installation. +* If the Cluster Samples Operator detects that it is on an IPv6 network. +// cannot configure the Samples Operator +ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] +* If the image controller configuration parameters prevent the creation of image streams by using the default image registry, or by using the image registry specified by `samplesRegistry` setting. For more information, see the following links: + +** link:https://docs.redhat.com/en/documentation/openshift_container_platform/{product-version}/html/images/image-configuration-classic#images-configuration-parameters_image-configuration[Image controller configuration parameters] +** link:https://docs.redhat.com/en/documentation/openshift_container_platform/{product-version}/html/images/configuring-samples-operator#samples-operator-configuration_configuring-samples-operator[Cluster Samples Operator configuration parameters] +endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] + +[NOTE] +==== +For {product-title}, the default image registry is +ifdef::openshift-enterprise[] +`registry.redhat.io`. +endif::[] +ifdef::openshift-rosa,openshift-dedicated,openshift-rosa-hcp,openshift-origin[] +`registry.access.redhat.com` or `quay.io`. +endif::[] +==== + +ifdef::openshift-enterprise,openshift-dedicated,openshift-origin[] +However, if the Cluster Samples Operator detects that it is on an IPv6 network and an {product-title} +endif::[] +ifdef::openshift-rosa,openshift-rosa-hcp[] +However, if the Cluster Samples Operator detects that it is on an IPv6 network and a {product-title} +endif::[] +global proxy is configured, then the IPv6 check supersedes all the checks. As a result, the Cluster Samples Operator bootstraps itself as `Removed`. + +[IMPORTANT] +==== +IPv6 installations are not currently supported by the registry. The Cluster Samples Operator pulls most of the sample image streams and images from the registry. +==== diff --git a/modules/samples-operator-configuration.adoc b/modules/samples-operator-configuration.adoc index 5f1b4f3b300f..4054821310ed 100644 --- a/modules/samples-operator-configuration.adoc +++ b/modules/samples-operator-configuration.adoc @@ -6,6 +6,7 @@ [id="samples-operator-configuration_{context}"] = Cluster Samples Operator configuration parameters +[role="_abstract"] The samples resource offers the following configuration fields: [cols="3a,8a",options="header"] @@ -42,18 +43,20 @@ Creation or update of RHEL content is not gated by the existence of the pull sec Secret, image stream, and template watch events can come in before the initial samples resource object is created, the Cluster Samples Operator detects and re-queues the event. +[id="samples-operator-config-restrictions_{context}"] == Configuration restrictions -When the Cluster Samples Operator starts supporting multiple architectures, the architecture list is not allowed to be changed while in the `Managed` state. +When the Cluster Samples Operator starts supporting multiple architectures, you cannot change the architecture list while the Operator is in the `Managed` state. To change the architectures values, a cluster administrator must: * Mark the `Management State` as `Removed`, saving the change. * In a subsequent change, edit the architecture and change the `Management State` back to `Managed`. -The Cluster Samples Operator still processes secrets while in `Removed` state. You can create the secret before switching to `Removed`, while in `Removed` before switching to `Managed`, or after switching to `Managed` state. There are delays in creating the samples until the secret event is processed if you create the secret after switching to `Managed`. This helps facilitate the changing of the registry, where you choose to remove all the samples before switching to insure a clean slate. Removing all samples before switching is not required. +The Cluster Samples Operator still processes secrets while in `Removed` state. You can create the secret before switching to `Removed`, while in `Removed` before switching to `Managed`, or after switching to `Managed` state. There are delays in creating the samples until the secret event is processed if you create the secret after switching to `Managed`. This helps facilitate the changing of the registry, where you choose to remove all the samples before switching to ensure a clean slate. Removing all samples before switching is not required. -== Conditions +[id="samples-operator-conditions_{context}"] +== Samples resource conditions The samples resource maintains the following conditions in its status: @@ -81,6 +84,6 @@ The samples resource maintains the following conditions in its status: `True` when an error has occurred. The list of image streams with an error is in the reason field. The details of each error reported are in the message field. |`MigrationInProgress` -|`True` when the Cluster Samples Operator detects that the version is different than the Cluster Samples Operator version with which the current samples set are installed. +|`True` when the Cluster Samples Operator detects that the version is different from the Cluster Samples Operator version with which the current samples set are installed. |=== diff --git a/modules/samples-operator-crd.adoc b/modules/samples-operator-crd.adoc index 6f9c73f02b90..942dc78b4bac 100644 --- a/modules/samples-operator-crd.adoc +++ b/modules/samples-operator-crd.adoc @@ -7,15 +7,16 @@ [id="samples-operator-crd_{context}"] = Accessing the Cluster Samples Operator configuration +[role="_abstract"] You can configure the Cluster Samples Operator by editing the file with the provided parameters. .Prerequisites -* Install the OpenShift CLI (`oc`). +* You installed the {oc-first}. .Procedure -* Access the Cluster Samples Operator configuration: +* Access the Cluster Samples Operator configuration by running the following command: + [source,terminal] ---- diff --git a/modules/samples-operator-overview.adoc b/modules/samples-operator-overview.adoc index 371d2e436c54..62c07bb012b4 100644 --- a/modules/samples-operator-overview.adoc +++ b/modules/samples-operator-overview.adoc @@ -1,113 +1,41 @@ // Module included in the following assemblies: // // * openshift_images/configuring_samples_operator.adoc -// * openshift_images/configuring-samples-operator.adoc - :_mod-docs-content-type: CONCEPT [id="samples-operator-overview_{context}"] = Understanding the Cluster Samples Operator -During installation, the Operator creates the default configuration object for -itself and then creates the sample image streams and templates, including quick start templates. +[role="_abstract"] +During installation, the Operator creates the default configuration object for itself and then creates the sample image streams and templates, including quick start templates. [NOTE] ==== To facilitate image stream imports from other registries that require credentials, a cluster administrator can create any additional secrets that contain the content of a Docker `config.json` file in the `openshift` namespace needed for image import. ==== -The Cluster Samples Operator configuration is a cluster-wide resource, and the deployment is contained within the `openshift-cluster-samples-operator` namespace. +The Cluster Samples Operator configuration is a cluster-wide resource. The deployment of the Operator is within the `openshift-cluster-samples-operator` namespace. -The image for the Cluster Samples Operator contains image stream and template definitions -for the associated {product-title} release. When each sample is created or updated, -the Cluster Samples Operator includes an annotation that denotes the version of -{product-title}. The Operator uses this annotation to ensure that each sample -matches the release version. Samples outside of its inventory are ignored, as -are skipped samples. Modifications to any samples that are managed by the -Operator, where that version annotation is modified or deleted, are reverted -automatically. +The image for the Cluster Samples Operator has image stream and template definitions for the associated {product-title} release. When each sample is created or updated, the Cluster Samples Operator includes an annotation that denotes the version of {product-title}. The Operator uses this annotation to ensure that each sample matches the release version. Samples outside of its inventory are ignored, as are skipped samples. Modifications to any samples that are managed by the Operator, where that version annotation is modified or deleted, are reverted automatically. [NOTE] ==== -The Jenkins images are part of the image payload from -installation and are tagged into the image streams directly. +The Jenkins images are part of the image payload from installation and are tagged into the image streams directly. ==== -The Cluster Samples Operator configuration resource includes a finalizer which cleans up -the following upon deletion: +The Cluster Samples Operator configuration resource includes a finalizer which cleans up the following upon deletion: * Operator managed image streams. * Operator managed templates. * Operator generated configuration resources. * Cluster status resources. -Upon deletion of the samples resource, the Cluster Samples Operator recreates the -resource using the default configuration. - -[id="samples-operator-bootstrapped"] -== Cluster Samples Operator's use of management state - -The Cluster Samples Operator is bootstrapped as `Managed` by default or if global proxy is configured. In the `Managed` state, the Cluster Samples Operator is actively managing its resources and keeping the component active in order to pull sample image streams and images from the registry and ensure that the requisite sample templates are installed. - -Certain circumstances result in the Cluster Samples Operator bootstrapping itself as `Removed` including: - -* If the Cluster Samples Operator cannot reach link:https://registry.redhat.io[registry.redhat.io] after three minutes on initial startup after a clean installation. -* If the Cluster Samples Operator detects it is on an IPv6 network. -// cannot configure the Samples Operator -ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] -* If the xref:../openshift_images/image-configuration.adoc#images-configuration-parameters_image-configuration[image controller configuration parameters] prevent the creation of image streams by using the default image registry, or by using the image registry specified by the xref:../openshift_images/configuring-samples-operator.adoc#samples-operator-configuration_configuring-samples-operator[`samplesRegistry` setting]. -endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] - -[NOTE] -==== -For {product-title}, the default image registry is -ifdef::openshift-enterprise[] -`registry.redhat.io`. -endif::[] -ifdef::openshift-rosa,openshift-dedicated,openshift-rosa-hcp,openshift-origin[] -`registry.access.redhat.com` or `quay.io`. -endif::[] -==== - -However, if the Cluster Samples Operator detects that it is on an IPv6 network and an {product-title} global proxy is configured, then IPv6 check supersedes all the checks. As a result, the Cluster Samples Operator bootstraps itself as `Removed`. - -[IMPORTANT] -==== -IPv6 installations are not currently supported by link:https://registry.redhat.io[registry.redhat.io]. The Cluster Samples Operator pulls most of the sample image streams and images from link:https://registry.redhat.io[registry.redhat.io]. -==== - -// Restricted network not supported ROSA/OSD -ifndef::openshift-rosa,openshift-dedicated[] -[id="samples-operator-restricted-network-install"] -=== Restricted network installation - -Boostrapping as `Removed` when unable to access `registry.redhat.io` facilitates restricted network installations when the network restriction is already in place. Bootstrapping as `Removed` when network access is restricted allows the cluster administrator more time to decide if samples are desired, because the Cluster Samples Operator does not submit alerts that sample image stream imports are failing when the management state is set to `Removed`. When the Cluster Samples Operator comes up as `Managed` and attempts to install sample image streams, it starts alerting two hours after initial installation if there are failing imports. - -[id="samples-operator-restricted-network-install-with-access"] -=== Restricted network installation with initial network access - -Conversely, if a cluster that is intended to be a restricted network or disconnected cluster is first installed while network access exists, the Cluster Samples Operator installs the content from `registry.redhat.io` since it can access it. If you want the Cluster Samples Operator to still bootstrap as `Removed` in order to defer samples installation until you have decided which samples are desired, set up image mirrors, and so on, then follow the instructions for using the Samples Operator with an alternate registry and customizing nodes, both linked in the additional resources section, to override the Cluster Samples Operator default configuration and initially come up as `Removed`. - -You must put the following additional YAML file in the `openshift` directory created by `openshift-install create manifest`: +Upon deletion of the samples resource, the Cluster Samples Operator recreates the resource by using the default configuration. -.Example Cluster Samples Operator YAML file with `managementState: Removed` -[source,yaml] ----- -apiVersion: samples.operator.openshift.io/v1 -kind: Config -metadata: - name: cluster -spec: - architectures: - - x86_64 - managementState: Removed ----- -endif::openshift-rosa,openshift-dedicated[] +If the Cluster Samples Operator is removed during installation, you can use the Cluster Samples Operator with an alternate registry so that content can be imported. Then you can set the Cluster Samples Operator to `Managed` to get the samples. Use the following instructions: -[id="samples-operator-retries"] -== Cluster Samples Operator's tracking and error recovery of image stream imports +* link:https://docs.redhat.com/en/documentation/openshift_container_platform/{product-version}/html/images/samples-operator-alt-registry[Using the Cluster Samples Operator with an alternate registry] -After creation or update of a samples image stream, the Cluster Samples Operator monitors the progress of each image stream tag's image import. +For more information about configuring credentials, see the following link: -If an import fails, the Cluster Samples Operator retries the import through the image stream image import API, which is the same API used by the `oc import-image` command, approximately every 15 minutes until it sees the import succeed, or if -the Cluster Samples Operator's configuration is changed such that either the image stream is added to the `skippedImagestreams` list, or the management state is changed to `Removed`. +* link:https://docs.redhat.com/en/documentation/openshift_container_platform/{product-version}/html/images/managing-images#using-image-pull-secrets[Using image pull secrets] diff --git a/modules/samples-operator-restricted-network-install.adoc b/modules/samples-operator-restricted-network-install.adoc new file mode 100644 index 000000000000..f26fabb1e620 --- /dev/null +++ b/modules/samples-operator-restricted-network-install.adoc @@ -0,0 +1,12 @@ +// Module included in the following assemblies: +// +// * openshift_images/configuring_samples_operator.adoc + +:_mod-docs-content-type: CONCEPT +[id="samples-operator-restricted-network-install-con_{context}"] += Restricted network installation + +[role="_abstract"] +The Cluster Samples Operator boostrapping itself as `Removed` when unable to access `registry.redhat.io` facilitates restricted network installations when the network restriction is already in place. + +As a cluster administrator, you have more time to decide if samples are needed when the Operator is boostrapped `Removed`. This is because the Cluster Samples Operator does not submit alerts that sample image stream imports are failing when the management state is `Removed`. When the Cluster Samples Operator management state is `Managed`, and the Operator attempts to install sample image streams, failing-import alerts start two hours after initial installation. diff --git a/modules/samples-operator-restricted-nw-install-with-access.adoc b/modules/samples-operator-restricted-nw-install-with-access.adoc new file mode 100644 index 000000000000..97a5f6046547 --- /dev/null +++ b/modules/samples-operator-restricted-nw-install-with-access.adoc @@ -0,0 +1,35 @@ +// Module included in the following assemblies: +// +// * openshift_images/configuring_samples_operator.adoc + +:_mod-docs-content-type: REFERENCE +[id="samples-operator-restricted-nw-install-with-access_{context}"] += Restricted network installation with initial network access + +[role="_abstract"] +If a cluster that eventually runs on a restricted network is first installed while network access exists, the Cluster Samples Operator installs content from `registry.redhat.io`. + +In this case, you can defer samples installation until you have decided which samples are needed by overriding the default configuration of `Managed` for a connected installation. + +If you want the Cluster Samples Operator to bootstrap with the management state as `Removed` during an installation that has initial network access, override the Cluster Samples Operator default configuration by using the following instructions: + +* link:https://docs.redhat.com/en/documentation/openshift_container_platform/{product-version}/html/installation_configuration/installing-customizing[Customizing nodes] + +To host samples in your restricted environment, use the following instructions: + +* link:https://docs.redhat.com/en/documentation/openshift_container_platform/{product-version}/html/images/samples-operator-alt-registry[Using the Cluster Samples Operator with an alternate registry] + +You must also put the following additional YAML file in the `openshift` directory created by the `openshift-install create manifest` process: + +.Example Cluster Samples Operator YAML file with `managementState: Removed` +[source,yaml] +---- +apiVersion: samples.operator.openshift.io/v1 +kind: Config +metadata: + name: cluster +spec: + architectures: + - x86_64 + managementState: Removed +---- diff --git a/modules/samples-operator-retries.adoc b/modules/samples-operator-retries.adoc new file mode 100644 index 000000000000..0dd16f98250b --- /dev/null +++ b/modules/samples-operator-retries.adoc @@ -0,0 +1,15 @@ +// Module included in the following assemblies: +// +// * openshift_images/configuring_samples_operator.adoc + +:_mod-docs-content-type: CONCEPT +[id="samples-operator-retries_{context}"] += Cluster Samples Operator tracking and error recovery of image stream imports + +[role="_abstract"] +After creation or update of a samples image stream, the Cluster Samples Operator monitors the progress of each image stream tag's image import. + +If an import fails, the Cluster Samples Operator retries the import through the image stream image import API at a rate of about every 15 minutes until either one of the following occurs: + +* The import succeeds. +* The Cluster Samples Operator configuration is changed such that either the image stream is added to the `skippedImagestreams` list, or the management state is changed to `Removed`. diff --git a/openshift_images/cnf-building-and-deploying-a-dpdk-payload.adoc b/openshift_images/cnf-building-and-deploying-a-dpdk-payload.adoc deleted file mode 100644 index a14a916b2727..000000000000 --- a/openshift_images/cnf-building-and-deploying-a-dpdk-payload.adoc +++ /dev/null @@ -1,304 +0,0 @@ -:_mod-docs-content-type: ASSEMBLY -// Epic CNF-40 -[id="cnf-building-and-deploying-a-dpdk-application"] -= Building and deploying a DPDK application using the S2I image -include::_attributes/common-attributes.adoc[] -:context: building-deploying-DPDK-using-s2i-image - -toc::[] - -The Data Plane Development Kit (DPDK) base image is a base image for DPDK -applications. It uses the Source-to-Image (S2I) build tool to automate the -building of application images. - -Source-to-Image (S2I) is a tool for building reproducible and formatted -container images. It produces ready-to-run images by injecting application -source into a container image and assembling a new image. The new image -incorporates the base image (the builder) and built source. For more -information, see -xref:../cicd/builds/build-strategies.adoc#build-strategy-s2i_build-strategies[Source-to-Image -(S2I) build]. - -The DPDK base image comes preinstalled with DPDK, and with a build tool that can be used to -create a target image containing the DPDK libraries and the application provided by the user. - -== Prerequisites - -Before using the S2I tool, ensure that you have the following components installed and configured: - -* Image Registry Operator: -See xref:../registry/configuring-registry-operator.adoc#configuring-registry-operator[Image Registry Operator in OpenShift Container Platform]. - -* SR-IOV Operator: -See xref:../networking/hardware_networks/about-sriov.adoc#about-sriov[About SR-IOV hardware on {product-title}]. - -* Performance AddOn Operator: -See xref:../scalability_and_performance/cnf-low-latency-tuning.adoc#cnf-low-latency-tuning[About CNF Performance Addon Operator]. - -This example application is the `test-pmd` application provided by dpdk.org. -For more information, see link:https://doc.dpdk.org/guides/testpmd_app_ug/[Testpmd Application User Guide]. - -.Building procedure - -To build a target image, create a repository containing an application and the following two scripts: - -* `build.sh` - for building the application -* `run.sh` - for running the application - -This is an example of `build.sh`: - ----- -#!/usr/bin/env bash - -make -C test-pmd - -cp test-pmd/testpmd ./customtestpmd - -echo "build done" ----- - -This is an example of `run.sh`: - ----- -#!/bin/bash -eux - -export CPU=$(cat /sys/fs/cgroup/cpuset/cpuset.cpus) -echo ${CPU} -echo ${PCIDEVICE_OPENSHIFT_IO_DPDKNIC} # This is the resource name configured via -the SR-IOV operator. - -if [ "$RUN_TYPE" == "testpmd" ]; then -envsubst < test-template.sh > test.sh -chmod +x test.sh -expect -f test.sh -fi - -while true; do sleep inf; done; ----- - -The example `run.sh` will run the commands inside the `test-template.sh`. - ----- -spawn ./customtestpmd -l ${CPU} -w ${PCIDEVICE_OPENSHIFT_IO_DPDKNIC} ---iova-mode=va -- -i --portmask=0x1 --nb-cores=2 --forward-mode=mac --port-topology=loop ---no-mlockall -set timeout 10000 -expect "testpmd>" -send -- "start\r" -sleep 20 -expect "testpmd>" -send -- "stop\r" -expect "testpmd>" -send -- "quit\r" -expect eof ----- - -This file will run the `testpmd` compiled application from the build stage. -This spawns the `testpmd` interactive terminal then start a test workload and close it after 20 seconds. - -The DPDK base image and the application repository are both used to build a target application image. -S2I copies the application from the repository to the DPDK base image, which then builds a target image using -DPDK base image resources and the copied application. - -You can use the {product-title} BuildConfig to build a target image in a production environment. -The `build-config.yaml` file is the file you use to create your automated build. -It creates a new `dpdk` namespace and configures an `ImageStream` for the image -and starts a build. -The {product-registry} must be configured in the cluster. - ----- ---- -apiVersion: image.openshift.io/v1 -kind: ImageStream <1> -metadata: - name: s2i-dpdk-app - namespace: dpdk -spec: {} ---- -apiVersion: build.openshift.io/v1 -kind: BuildConfig -metadata: - labels: - app: s2i-dpdk - app.kubernetes.io/component: s2i-dpdk - app.kubernetes.io/instance: s2i-dpdk - name: s2i-dpdk - namespace: dpdk -spec: - failedBuildsHistoryLimit: 5 - nodeSelector: null - output: <2> - to: - kind: ImageStreamTag - name: s2i-dpdk-app:latest - postCommit: {} - resources: {} - runPolicy: Serial - source: <3> - contextDir: tools/s2i-dpdk/test/test-app - git: - uri: <4> - type: Git - strategy: <5> - sourceStrategy: - from: - kind: DockerImage - name: registry.access.redhat.com/openshift4/dpdk-base-rhel8:v4.4 - type: Source - successfulBuildsHistoryLimit: 5 - triggers: - - type: ConfigChange ----- - -<1> The `kind` type specifies the defined image stream. - -<2> The `output` type publishes the result of the image stream object. - -<3> The `source` type contains the git repository and a context directory within the repository. - -<4> The repository uri that contains the application and both the `build.sh` and the `run.sh` files. - -<5> The `strategy` type contains a DPDK base image. - -It is the `source` type and `strategy` type that build the image. - -A complete guide to using BuildConfigs is available in -xref:../builds/understanding-buildconfigs.adoc#understanding-buildconfigs[Understanding -build configurations]. - -After the base DPDK image build is ready, you should configure the environment to be able to run the DPDK workload on it. - -.Deployment procedure - -. Create a performance profile to allocate Hugepages and isolated CPUs. For more -information, see -xref:../scalability_and_performance/cnf-low-latency-tuning.adoc#cnf-understanding-low-latency_{context}[Tuning nodes for low latency via PerformanceProfile]. - -. Create the SR-IOV network policy and the SR-IOV network attachment based on your network card type. For more information, -see xref:../networking/hardware_networks/using-dpdk-and-rdma.adoc#using-dpdk-and-rdma[Using Virtual Functions (VFs) with DPDK and RDMA modes]. - -. Using a deployment config resource instead of a regular deployment allows automatic redeploy of the workload whenever a new image is built. -You must create a special `SecurityContextConstraints` resource that will allow the `deployer` service account to create the -dpdk workload deployment and the deployment config resource pointing to the `ImageStream`. -+ -`SecurityContextConstraints` example: -+ ----- -apiVersion: security.openshift.io/v1 -kind: SecurityContextConstraints -metadata: - name: dpdk -allowHostDirVolumePlugin: true -allowHostIPC: false -allowHostNetwork: false -allowHostPID: false -allowHostPorts: false -allowPrivilegeEscalation: false -allowPrivilegedContainer: false -allowedCapabilities: - - "*" -allowedUnsafeSysctls: - - "*" -defaultAddCapabilities: null -fsGroup: - type: RunAsAny -readOnlyRootFilesystem: false -runAsUser: - type: RunAsAny -seLinuxContext: - type: RunAsAny -seccompProfiles: - - "*" -users: <1> - - system:serviceaccount:dpdk:deployer -volumes: - - "*" ----- -+ -<1> This is a list of all the service accounts that will be part of the SCC. -You should add here all the namespaces that will deploy the dpdk workload in the following format `system:serviceaccount::deployer`. - -. Apply the deployment config resource. -+ -`DeploymentConfig` resource example: -+ ----- -apiVersion: apps.openshift.io/v1 -kind: DeploymentConfig -metadata: - labels: - app: s2i-dpdk-app - app.kubernetes.io/component: s2i-dpdk-app - app.kubernetes.io/instance: s2i-dpdk-app - name: s2i-dpdk-app - namespace: dpdk -spec: - replicas: 1 - revisionHistoryLimit: 10 - selector: - deploymentconfig: s2i-dpdk-app - strategy: - rollingParams: - intervalSeconds: 1 - maxSurge: 25% - maxUnavailable: 25% - timeoutSeconds: 600 - updatePeriodSeconds: 1 - type: Rolling - template: - metadata: - labels: - deploymentconfig: s2i-dpdk-app - annotations: - k8s.v1.cni.cncf.io/networks: dpdk/dpdk-network <1> - spec: - serviceAccount: deployer - serviceAccountName: deployer - securityContext: - runAsUser: 0 - containers: - - image: “//:” <2> - securityContext: - runAsUser: 0 - capabilities: - add: ["IPC_LOCK","SYS_RESOURCE"] - imagePullPolicy: Always - name: s2i-dpdk-app - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - resources: <3> - limits: - cpu: "4" - hugepages-1Gi: 4Gi - memory: 1000Mi - requests: - cpu: "4" - hugepages-1Gi: 4Gi - memory: 1000Mi - volumeMounts: - - mountPath: /mnt/huge - name: hugepage - dnsPolicy: ClusterFirst - volumes: - - name: hugepage - emptyDir: - medium: HugePages - restartPolicy: Always - test: false - triggers: - - type: ConfigChange - - imageChangeParams: - automatic: true - containerNames: - - s2i-dpdk-app - from: <4> - kind: ImageStreamTag - name: : - namespace: - type: ImageChange ----- -+ -<1> The network attachment definition name. -<2> The image stream URL. -<3> The requested resource. The limit and request should be the same so the quality of service (QOS) will be guaranteed and the CPUs will be pinned. -<4> The image stream created to start a redeployment when a newly built image is pushed to the registry. diff --git a/openshift_images/configuring-samples-operator.adoc b/openshift_images/configuring-samples-operator.adoc index 7f06738ef61a..3ead945640ce 100644 --- a/openshift_images/configuring-samples-operator.adoc +++ b/openshift_images/configuring-samples-operator.adoc @@ -2,64 +2,52 @@ ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] :_mod-docs-content-type: ASSEMBLY [id="configuring-samples-operator"] = Configuring the Cluster Samples Operator + include::_attributes/common-attributes.adoc[] :context: configuring-samples-operator + endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] ifdef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] :_mod-docs-content-type: ASSEMBLY [id="configuring-samples-operator"] = Overview of the Cluster Samples Operator + include::_attributes/common-attributes.adoc[] + :context: configuring-samples-operator endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] toc::[] ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] +[role="_abstract"] The Cluster Samples Operator, which operates in the `openshift` namespace, installs and updates the {op-system-base-full}-based {product-title} image streams and {product-title} templates. endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] ifdef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] +[role="_abstract"] The Cluster Samples Operator, which operates in the `openshift` namespace, installs and updates the {product-title} image streams and {product-title} templates. endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] -[IMPORTANT] -.The Cluster Samples Operator is being deprecated -==== -* Starting from {product-title} 4.16, the Cluster Samples Operator is deprecated. No new templates, samples, or non-Source-to-Image (Non-S2I) image streams will be added to the Cluster Samples Operator. However, the existing S2I builder image streams and templates will continue to receive updates until the Cluster Samples Operator is removed in a future release. S2I image streams and templates include: -- Ruby -- Python -- Node.js -- Perl -- PHP -- HTTPD -- Nginx -- EAP -- Java -- Webserver -- .NET -- Go - -* The Cluster Samples Operator will stop managing and providing support to the non-S2I samples (image streams and templates). You can contact the image stream or template owner for any requirements and future plans. In addition, refer to the link:https://github.com/openshift/library/blob/master/official.yaml[list of the repositories hosting the image stream or templates]. -==== +include::snippets/cluster-sampler-operator-deprecation.adoc[leveloffset=+1] include::modules/samples-operator-overview.adoc[leveloffset=+1] +include::modules/samples-operator-bootstrapped.adoc[leveloffset=+1] -[role="_additional-resources"] -== Additional resources - -* If the Cluster Samples Operator is removed during installation, you can xref:../openshift_images/samples-operator-alt-registry.adoc#samples-operator-alt-registry[use the Cluster Samples Operator with an alternate registry] so content can be imported, and then set the Cluster Samples Operator to `Managed` to get the samples. // Restricted network not supported ROSA/OSD -ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] -* To ensure the Cluster Samples Operator bootstraps as `Removed` in a restricted network installation with initial network access to defer samples installation until you have decided which samples are desired, follow the instructions for xref:../installing/install_config/installing-customizing.adoc#installing-customizing[customizing nodes] to override the Cluster Samples Operator default configuration and initially come up as `Removed`. -** To host samples in your disconnected environment, follow the instructions for xref:../openshift_images/samples-operator-alt-registry.adoc#samples-operator-alt-registry[using the Cluster Samples Operator with an alternate registry]. -endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] +ifndef::openshift-rosa,openshift-dedicated[] +include::modules/samples-operator-restricted-network-install.adoc[leveloffset=+2] + +include::modules/samples-operator-restricted-nw-install-with-access.adoc[leveloffset=+2] + +endif::openshift-rosa,openshift-dedicated[] + +include::modules/samples-operator-retries.adoc[leveloffset=+1] // Restricted network not supported ROSA/OSD ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] include::modules/installation-images-samples-disconnected-mirroring-assist.adoc[leveloffset=+2] -See xref:../openshift_images/samples-operator-alt-registry.adoc#installation-restricted-network-samples_samples-operator-alt-registry[Using Cluster Samples Operator image streams with alternate or mirrored registries] for a detailed procedure. endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] // cannot patch resource "configs" in API group "samples.operator.openshift.io" @@ -67,10 +55,7 @@ ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] include::modules/samples-operator-configuration.adoc[leveloffset=+1] include::modules/samples-operator-crd.adoc[leveloffset=+1] + endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] include::modules/images-samples-operator-deprecated-image-stream.adoc[leveloffset=+1] - -[role="_additional-resources"] -== Additional resources -* For more information about configuring credentials, see xref:../openshift_images/managing_images/using-image-pull-secrets.adoc#using-image-pull-secrets[Using image pull secrets]. diff --git a/snippets/cluster-sampler-operator-deprecation.adoc b/snippets/cluster-sampler-operator-deprecation.adoc new file mode 100644 index 000000000000..8931451b2986 --- /dev/null +++ b/snippets/cluster-sampler-operator-deprecation.adoc @@ -0,0 +1,27 @@ + +// Text snippet included in the following assemblies: +// +// * openshift_images/configuring-samples-operator.adoc + +:_mod-docs-content-type: SNIPPET + +[IMPORTANT] +==== +* The Cluster Samples Operator is deprecated. No new templates, samples, or non-Source-to-Image (Non-S2I) image streams are added to the Cluster Samples Operator. However, the existing S2I builder image streams and templates will continue to receive updates until the Cluster Samples Operator is removed in a future release. S2I image streams and templates include: +- Ruby +- Python +- Node.js +- Perl +- PHP +- HTTPD +- Nginx +- EAP +- Java +- Webserver +- .NET +- Go + +* The Cluster Samples Operator will stop managing and providing support to the non-S2I samples (image streams and templates). You can contact the image stream or template owner for any requirements and future plans. In addition, refer to the following link: + +** link:https://github.com/openshift/library/blob/master/official.yaml[List of the repositories hosting the image stream or templates] +====