Skip to content

Commit 62259fc

Browse files
Merge pull request #34533 from StephenJamesSmith/telcodocs-82-custom-resources
TELCODOCS-82: custom-resources
2 parents 729b2b1 + 77827f5 commit 62259fc

10 files changed

+796
-0
lines changed

modules/ztp-acm-installing-disconnected-rhacm.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ You use {rh-rhacm-first} on a hub cluster in the disconnected environment to man
1212
* Install the {product-title} CLI (`oc`).
1313
* Log in as a user with `cluster-admin` privileges.
1414
* Configure a disconnected mirror registry for use in the cluster.
15+
+
16+
[NOTE]
17+
====
18+
If you want to deploy Operators to the spoke clusters, you must also add them to this registry.
19+
====
20+
1521
* Enable the disconnected Operator Lifecycle Manager (OLM). {rh-rhacm} is included in the OLM Red Hat Operator catalog. Follow the steps in xref:../operators/admin/olm-restricted-networks.adoc[Using Operator Lifecycle Manager on restricted networks].
1622

1723
.Procedure
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Module included in the following assemblies:
2+
//
3+
// *scalability_and_performance/ztp-zero-touch-provisioning.adoc
4+
5+
[id="ztp-checking-the-managed-cluster-status_{context}"]
6+
= Checking the managed cluster status
7+
8+
Ensure that cluster provisioning was successful by checking the cluster status.
9+
10+
.Prerequisites
11+
12+
* All of the custom resources have been configured and provisioned, and the `Agent`
13+
custom resource is created on the hub for the managed cluster.
14+
15+
.Procedure
16+
17+
. Check the status of the managed cluster:
18+
+
19+
[source,terminal]
20+
----
21+
$ oc get managedcluster
22+
----
23+
+
24+
`True` indicates the managed cluster is ready.
25+
26+
. Check the agent status:
27+
+
28+
[source,terminal]
29+
----
30+
$ oc get agent -n <cluster-name>
31+
----
32+
33+
. Use the `describe` command to provide an in-depth description of the agent’s condition. Statuses to be aware of include `BackendError`, `InputError`, `ValidationsFailing`, `InstallationFailed`, and `AgentIsConnected`. These statuses are relevant to the `Agent` and `AgentClusterInstall` custom resources.
34+
+
35+
[source,terminal]
36+
----
37+
$ oc describe agent -n <cluster-name>
38+
----
39+
40+
. Check the cluster provisioning status:
41+
+
42+
[source,terminal]
43+
----
44+
$ oc get agentclusterinstall -n <cluster-name>
45+
----
46+
47+
. Use the `describe` command to provide an in-depth description of the cluster provisioning status:
48+
+
49+
[source,terminal]
50+
----
51+
$ oc describe agentclusterinstall -n <cluster-name>
52+
----
53+
54+
. Check the status of the managed cluster’s add-on services:
55+
+
56+
[source,terminal]
57+
----
58+
$ oc get managedclusteraddon -n <cluster-name>
59+
----
60+
61+
. Retrieve the authentication information of the `kubeconfig` file for the managed cluster:
62+
+
63+
[source,terminal]
64+
----
65+
$ oc get secret -n <cluster-name> <cluster-name>-admin-kubeconfig -o jsonpath={.data.kubeconfig} | base64 -d > <directory>/<cluster-name>-kubeconfig
66+
----
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
// Module included in the following assemblies:
2+
//
3+
// *scalability_and_performance/ztp-zero-touch-provisioning.adoc
4+
5+
[id="ztp-configuring-a-static-ip_{context}"]
6+
= Configuring static IP addresses for managed clusters
7+
8+
Optionally, after creating the `AgentClusterInstall` custom resource, you can configure static IP addresses for the managed clusters.
9+
10+
[NOTE]
11+
====
12+
You must create this custom resource before creating the `ClusterDeployment` custom resource.
13+
====
14+
15+
.Prerequisites
16+
17+
* Deploy and configure the `AgentClusterInstall` custom resource.
18+
19+
.Procedure
20+
21+
. Create a `NMStateConfig` custom resource:
22+
+
23+
[source,yaml]
24+
----
25+
apiVersion: agent-install.openshift.io/v1beta1
26+
kind: NMStateConfig
27+
metadata:
28+
name: <cluster-name>
29+
namespace: <cluster-name>
30+
labels:
31+
sno-cluster-<cluster-name>: <cluster-name>
32+
spec:
33+
config:
34+
interfaces:
35+
- name: eth0
36+
type: ethernet
37+
state: up
38+
mac-address: <mac-address> <1>
39+
ipv4:
40+
enabled: true
41+
address:
42+
- ip: <ip-address> <2>
43+
prefix-length: <public-network-prefix> <3>
44+
dhcp: false
45+
dns-resolver:
46+
config:
47+
server:
48+
- <dns-resolver> <4>
49+
routes:
50+
config:
51+
- destination: 0.0.0.0/0
52+
next-hop-address: <gateway> <5>
53+
next-hop-interface: eth0
54+
table-id: 254
55+
interfaces:
56+
- name: "eth0" <6>
57+
macAddress: <mac-address> <7>
58+
----
59+
<1> `mac-address` is the MAC address of the target bare metal machine, that is, the same MAC address used in the `BareMetalHost` resource.
60+
<2> `ip-address` is the static IP address of the target bare metal machine.
61+
<3> `public-network-prefix` is the static IP address’s subnet for the target bare metal machine.
62+
<4> `dns-resolver` is the DNS server for the target bare metal machine.
63+
<5> `gateway` is the gateway for the target bare metal machine.
64+
<6> `name` must match the name specified in the `interfaces` section.
65+
<7> `mac-address` must match the MAC address specified in the `interfaces` section.
66+
67+
. When creating the `InfraEnv` custom resource, reference the label from the `NMStateConfig` custom resource in the `InfraEnv` custom resource:
68+
+
69+
[source,yaml]
70+
----
71+
apiVersion: agent-install.openshift.io/v1beta1
72+
kind: InfraEnv
73+
metadata:
74+
name: <cluster-name>
75+
namespace: <cluster-name>
76+
spec:
77+
clusterRef:
78+
name: <cluster-name>
79+
namespace: <cluster-name>
80+
sshAuthorizedKey: <public-key>
81+
agentLabelSelector:
82+
matchLabels:
83+
cluster-name: <cluster-name>
84+
pullSecretRef:
85+
name: assisted-deployment-pull-secret
86+
nmStateConfigLabelSelector:
87+
matchLabels:
88+
sno-cluster-<cluster-name>: <cluster-name> # Match this label
89+
----

modules/ztp-configuring-ipv6.adoc

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Module included in the following assemblies:
2+
//
3+
// *scalability_and_performance/ztp-zero-touch-provisioning.adoc
4+
5+
[id="ztp-configuring-ipv6_{context}"]
6+
= Configuring IPv6 addresses for a disconnected environment
7+
8+
Optionally, when you are creating the `AgentClusterInstall` custom resource, you can configure IPV6 addresses for the managed clusters.
9+
10+
.Procedure
11+
12+
. In the `AgentClusterInstall` custom resource, modify the IP addresses in `clusterNetwork` and `serviceNetwork` for IPv6 addresses:
13+
+
14+
[source,yaml]
15+
----
16+
apiVersion: extensions.hive.openshift.io/v1beta1
17+
kind: AgentClusterInstall
18+
metadata:
19+
# Only include the annotation if using OVN, otherwise omit the annotation
20+
annotations:
21+
agent-install.openshift.io/install-config-overrides: '{"networking":{"networkType":"OVNKubernetes"}}'
22+
name: <cluster-name>
23+
namespace: <cluster-name>
24+
spec:
25+
clusterDeploymentRef:
26+
name: <cluster-name>
27+
imageSetRef:
28+
name: <cluster-image-set>
29+
networking:
30+
clusterNetwork:
31+
- cidr: "fd01::/48"
32+
hostPrefix: 64
33+
machineNetwork:
34+
- cidr: <machine-network-cidr>
35+
serviceNetwork:
36+
- "fd02::/112"
37+
provisionRequirements:
38+
controlPlaneAgents: 1
39+
workerAgents: 0
40+
sshPublicKey: <public-key>
41+
----
42+
43+
. Update the `NMStateConfig` custom resource with the IPv6 addresses you defined.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
// Module included in the following assemblies:
2+
//
3+
// *scalability_and_performance/ztp-zero-touch-provisioning.adoc
4+
5+
[id="ztp-configuring-the-cluster-for-a-disconnected-environment_{context}"]
6+
= Configuring a managed cluster for a disconnected environment
7+
8+
After you have completed the preceding procedure, follow these steps to configure the managed cluster for a disconnected environment.
9+
10+
.Prerequisites
11+
12+
* A disconnected installation of {rh-rhacm-first} 2.3.
13+
14+
* Host the `rootfs` and `iso` images on an HTTPD server.
15+
16+
.Procedure
17+
18+
. Create a `ConfigMap` containing the mirror registry config:
19+
+
20+
[source,yaml]
21+
----
22+
apiVersion: v1
23+
kind: ConfigMap
24+
metadata:
25+
name: assisted-installer-mirror-config
26+
namespace: assisted-installer
27+
labels:
28+
app: assisted-service
29+
data:
30+
ca-bundle.crt: <certificate> <1>
31+
registries.conf: | <2>
32+
unqualified-search-registries = ["registry.access.redhat.com", "docker.io"]
33+
34+
[[registry]]
35+
location = <mirror-registry-url> <3>
36+
insecure = false
37+
mirror-by-digest-only = true
38+
----
39+
<1> `certificate` is the mirror registry’s certificate used when creating the mirror registry.
40+
<2> `registry-config` is the configuration for the mirror registry.
41+
<3> `mirror-registry-url` is the URL of the mirror registry.
42+
+
43+
This updates `mirrorRegistryRef` in the `AgentServiceConfig` custom resource, as shown below:
44+
+
45+
.Example output
46+
+
47+
[source,yaml]
48+
----
49+
apiVersion: agent-install.openshift.io/v1beta1
50+
kind: AgentServiceConfig
51+
metadata:
52+
name: agent
53+
namespace: assisted-installer
54+
spec:
55+
databaseStorage:
56+
volumeName: <db-pv-name>
57+
accessModes:
58+
- ReadWriteOnce
59+
resources:
60+
requests:
61+
storage: <db-storage-size>
62+
filesystemStorage:
63+
volumeName: <fs-pv-name>
64+
accessModes:
65+
- ReadWriteOnce
66+
resources:
67+
requests:
68+
storage: <fs-storage-size>
69+
mirrorRegistryRef:
70+
name: 'assisted-installer-mirror-config'
71+
osImages:
72+
- openshiftVersion: <ocp-version>
73+
rootfs: <rootfs-url> <1>
74+
url: <iso-url> <1>
75+
EOF
76+
----
77+
<1> `rootfs-url` and the `iso-url` must match the URLs of the HTTPD server.
78+
79+
. For disconnected installations, you must deploy an NTP clock that is reachable through the disconnected network.
80+
You can do this by configuring chrony to act as server, editing the `/etc/chrony.conf` file, and adding the following allowed IPv6 range:
81+
+
82+
[source,yaml]
83+
----
84+
# Allow NTP client access from local network.
85+
#allow 192.168.0.0/16
86+
local stratum 10
87+
bindcmdaddress ::
88+
allow 2620:52:0:1310::/64
89+
----

0 commit comments

Comments
 (0)