mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
125 lines
4.9 KiB
Plaintext
125 lines
4.9 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * hosted_control_planes/hcp-disconnected/hcp-deploy-dc-bm.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="hcp-agentserviceconfig_{context}"]
|
|
= Deploying AgentServiceConfig resources
|
|
|
|
The `AgentServiceConfig` custom resource is an essential component of the Assisted Service add-on that is part of {mce-short}. It is responsible for bare metal cluster deployment. When the add-on is enabled, you deploy the `AgentServiceConfig` resource to configure the add-on.
|
|
|
|
In addition to configuring the `AgentServiceConfig` resource, you need to include additional config maps to ensure that {mce-short} functions properly in a disconnected environment.
|
|
|
|
.Procedure
|
|
|
|
. Configure the custom registries by adding the following config map, which contains the disconnected details to customize the deployment:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: custom-registries
|
|
namespace: multicluster-engine
|
|
labels:
|
|
app: assisted-service
|
|
data:
|
|
ca-bundle.crt: |
|
|
-----BEGIN CERTIFICATE-----
|
|
-----END CERTIFICATE-----
|
|
registries.conf: |
|
|
unqualified-search-registries = ["registry.access.redhat.com", "docker.io"]
|
|
|
|
[[registry]]
|
|
prefix = ""
|
|
location = "registry.redhat.io/openshift4"
|
|
mirror-by-digest-only = true
|
|
|
|
[[registry.mirror]]
|
|
location = "registry.dns.base.domain.name:5000/openshift4" <1>
|
|
|
|
[[registry]]
|
|
prefix = ""
|
|
location = "registry.redhat.io/rhacm2"
|
|
mirror-by-digest-only = true
|
|
# ...
|
|
# ...
|
|
----
|
|
+
|
|
<1> Replace `dns.base.domain.name` with the DNS base domain name.
|
|
+
|
|
The object contains two fields:
|
|
|
|
* Custom CAs: This field contains the Certificate Authorities (CAs) that are loaded into the various processes of the deployment.
|
|
* Registries: The `Registries.conf` field contains information about images and namespaces that need to be consumed from a mirror registry rather than the original source registry.
|
|
|
|
. Configure the Assisted Service by adding the `AssistedServiceConfig` object, as shown in the following example:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: agent-install.openshift.io/v1beta1
|
|
kind: AgentServiceConfig
|
|
metadata:
|
|
annotations:
|
|
unsupported.agent-install.openshift.io/assisted-service-configmap: assisted-service-config <1>
|
|
name: agent
|
|
namespace: multicluster-engine
|
|
spec:
|
|
mirrorRegistryRef:
|
|
name: custom-registries <2>
|
|
databaseStorage:
|
|
storageClassName: lvms-vg1
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 10Gi
|
|
filesystemStorage:
|
|
storageClassName: lvms-vg1
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 20Gi
|
|
osImages: <3>
|
|
- cpuArchitecture: x86_64 <4>
|
|
openshiftVersion: "4.14"
|
|
rootFSUrl: http://registry.dns.base.domain.name:8080/images/rhcos-414.92.202308281054-0-live-rootfs.x86_64.img <5>
|
|
url: http://registry.dns.base.domain.name:8080/images/rhcos-414.92.202308281054-0-live.x86_64.iso
|
|
version: 414.92.202308281054-0
|
|
- cpuArchitecture: x86_64
|
|
openshiftVersion: "4.15"
|
|
rootFSUrl: http://registry.dns.base.domain.name:8080/images/rhcos-415.92.202403270524-0-live-rootfs.x86_64.img
|
|
url: http://registry.dns.base.domain.name:8080/images/rhcos-415.92.202403270524-0-live.x86_64.iso
|
|
version: 415.92.202403270524-0
|
|
----
|
|
+
|
|
<1> The `metadata.annotations["unsupported.agent-install.openshift.io/assisted-service-configmap"]` annotation references the config map name that the Operator consumes to customize behavior.
|
|
<2> The `spec.mirrorRegistryRef.name` annotation points to the config map that contains disconnected registry information that the Assisted Service Operator consumes. This config map adds those resources during the deployment process.
|
|
<3> The `spec.osImages` field contains different versions available for deployment by this Operator. This field is mandatory. This example assumes that you already downloaded the `RootFS` and `LiveISO` files.
|
|
<4> Add a `cpuArchitecture` subsection for every {product-title} release that you want to deploy. In this example, `cpuArchitecture` subsections are included for 4.14 and 4.15.
|
|
<5> In the `rootFSUrl` and `url` fields, replace `dns.base.domain.name` with the DNS base domain name.
|
|
|
|
. Deploy all of the objects by concatenating them into a single file and applying them to the management cluster. To do so, enter the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc apply -f agentServiceConfig.yaml
|
|
----
|
|
+
|
|
The command triggers two pods.
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
assisted-image-service-0 1/1 Running 2 11d <1>
|
|
assisted-service-668b49548-9m7xw 2/2 Running 5 11d <2>
|
|
----
|
|
+
|
|
<1> The `assisted-image-service` pod is responsible for creating the Red Hat Enterprise Linux CoreOS (RHCOS) boot image template, which is customized for each cluster that you deploy.
|
|
<2> The `assisted-service` refers to the Operator.
|
|
|
|
.Next steps
|
|
|
|
Configure TLS certificates.
|