Skip to content

Commit 2ab05df

Browse files
committed
OSDOCS-7291: Agent installer disk partitioning
1 parent f7c0bdc commit 2ab05df

File tree

4 files changed

+212
-155
lines changed

4 files changed

+212
-155
lines changed

installing/installing_with_agent_based_installer/installing-with-agent-based-installer.adoc

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:_content-type: ASSEMBLY
22
[id="installing-with-agent-based-installer"]
3-
= Installing a {product-title} cluster with the Agent-based Installer
3+
= Installing an {product-title} cluster with the Agent-based Installer
44
include::_attributes/common-attributes.adoc[]
55
:context: installing-with-agent-based-installer
66

@@ -20,12 +20,29 @@ Use the following procedures to install an {product-title} cluster using the Age
2020

2121
The following procedures deploy a single-node {product-title} in a disconnected environment. You can use these procedures as a basis and modify according to your requirements.
2222

23+
// Downloading the Agent-based Installer
2324
include::modules/installing-ocp-agent-download.adoc[leveloffset=+2]
2425

26+
// Creating the preferred configuration inputs
27+
include::modules/installing-ocp-agent-inputs.adoc[leveloffset=+2]
28+
29+
[id="installing-ocp-agent-opt-manifests_{context}"]
30+
=== Optional: Creating additional manifest files
31+
32+
You can create additional manifests to further configure your cluster beyond the configurations available in the `install-config.yaml` and `agent-config.yaml` files.
33+
34+
If you do not want to make additional configurations, proceed to xref:../../installing/installing_with_agent_based_installer/installing-with-agent-based-installer.adoc#installing-ocp-agent-boot_installing-with-agent-based-installer[Creating and booting the agent image].
35+
36+
// Partitioning the disk
37+
include::modules/installation-user-infra-machines-advanced.adoc[leveloffset=+3]
38+
39+
// Creating and booting the agent image
2540
include::modules/installing-ocp-agent-boot.adoc[leveloffset=+2]
2641

42+
// Verifying that the current installation host can pull release images
2743
include::modules/installing-ocp-agent-tui.adoc[leveloffset=+2]
2844

45+
// Tracking and verifying installation progress
2946
include::modules/installing-ocp-agent-verify.adoc[leveloffset=+2]
3047

3148
[role="_additional-resources"]

modules/installation-user-infra-machines-advanced.adoc

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
//
33
// * installing/installing_bare_metal/installing-bare-metal.adoc
44
// * installing/installing_bare_metal/installing-restricted-networks-bare-metal.adoc
5-
// * installing_bare_metal/installing-bare-metal-network-customizations.adoc
5+
// * installing/installing_bare_metal/installing-bare-metal-network-customizations.adoc
6+
// * installing/installing_with_agent_based_installer/installing-with-agent-based-installer.adoc
7+
8+
ifeval::["{context}" == "installing-with-agent-based-installer"]
9+
:agent:
10+
endif::[]
611

712
:_content-type: PROCEDURE
13+
ifndef::agent[]
814
[id="installation-user-infra-machines-advanced_{context}"]
915
= Advanced {op-system} installation configuration
1016

@@ -96,6 +102,13 @@ The use of custom partitions could result in those partitions not being monitore
96102

97103
[id="installation-user-infra-machines-advanced_vardisk_{context}"]
98104
=== Creating a separate `/var` partition
105+
endif::agent[]
106+
107+
ifdef::agent[]
108+
[id="installing-ocp-agent-disk-partition_{context}"]
109+
= Disk partitioning
110+
endif::agent[]
111+
99112
In general, you should use the default disk partitioning that is created during the {op-system} installation. However, there are cases where you might want to create a separate partition for a directory that you expect to grow.
100113

101114
{product-title} supports the addition of a single partition to attach
@@ -120,12 +133,23 @@ The following procedure sets up a separate `/var` partition by adding a machine
120133

121134
.Procedure
122135

136+
ifndef::agent[]
123137
. On your installation host, change to the directory that contains the {product-title} installation program and generate the Kubernetes manifests for the cluster:
124138
+
125139
[source,terminal]
126140
----
127141
$ openshift-install create manifests --dir <installation_directory>
128142
----
143+
endif::agent[]
144+
145+
ifdef::agent[]
146+
. On your installation host, create the `openshift` subdirectory within the installation directory:
147+
+
148+
[source,terminal]
149+
----
150+
$ mkdir <installation_directory>/openshift
151+
----
152+
endif::agent[]
129153

130154
. Create a Butane config that configures the additional partition. For example, name the file `$HOME/clusterconfig/98-var-partition.bu`, change the disk device name to the name of the storage device on the `worker` systems, and set the storage size as appropriate. This example places the `/var` directory on a separate partition:
131155
+
@@ -169,6 +193,7 @@ When creating a separate `/var` partition, you cannot use different instance typ
169193
$ butane $HOME/clusterconfig/98-var-partition.bu -o $HOME/clusterconfig/openshift/98-var-partition.yaml
170194
----
171195

196+
ifndef::agent[]
172197
. Create the Ignition config files:
173198
+
174199
[source,terminal]
@@ -289,3 +314,8 @@ For PXE or ISO boots, you can create the Ignition config
289314
and `APPEND` the `ignition.config.url=` option to identify the location of
290315
the Ignition config. You also need to append `ignition.firstboot ignition.platform.id=metal`
291316
or the `ignition.config.url` option will be ignored.
317+
endif::agent[]
318+
319+
ifeval::["{context}" == "installing-with-agent-based-installer"]
320+
:!agent:
321+
endif::[]

modules/installing-ocp-agent-boot.adoc

Lines changed: 1 addition & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Module included in the following assemblies:
22
//
3-
// * installing-with-agent/installing-with-agent.adoc
3+
// * installing-with-agent/installing-with-agent-based-installer.adoc
44

55
:_content-type: PROCEDURE
66
[id="installing-ocp-agent-boot_{context}"]
@@ -10,158 +10,6 @@ Use this procedure to boot the agent image on your machines.
1010

1111
.Procedure
1212

13-
. Install `nmstate` dependency by running the following command:
14-
+
15-
[source,terminal]
16-
----
17-
$ sudo dnf install /usr/bin/nmstatectl -y
18-
----
19-
20-
. Place the `openshift-install` binary in a directory that is on your PATH.
21-
22-
. Create a directory to store the install configuration by running the following command:
23-
+
24-
[source,terminal]
25-
----
26-
$ mkdir ~/<directory_name>
27-
----
28-
29-
+
30-
[NOTE]
31-
====
32-
This is the preferred method for the Agent-based installation. Using {ztp} manifests is optional.
33-
====
34-
35-
. Create the `install-config.yaml` file:
36-
+
37-
[source,yaml]
38-
----
39-
cat << EOF > ./my-cluster/install-config.yaml
40-
apiVersion: v1
41-
baseDomain: test.example.com
42-
compute:
43-
architecture: amd64 <1>
44-
hyperthreading: Enabled
45-
name: worker
46-
replicas: 0
47-
controlPlane:
48-
architecture: amd64
49-
hyperthreading: Enabled
50-
name: master
51-
replicas: 1
52-
metadata:
53-
name: sno-cluster <2>
54-
networking:
55-
clusterNetwork:
56-
- cidr: 10.128.0.0/14
57-
hostPrefix: 23
58-
machineNetwork:
59-
- cidr: 192.168.111.0/16
60-
networkType: OVNKubernetes <3>
61-
serviceNetwork:
62-
- 172.30.0.0/16
63-
platform:
64-
none: {}
65-
pullSecret: '<pull_secret>' <4>
66-
sshKey: |
67-
'<ssh_pub_key>' <5>
68-
EOF
69-
----
70-
+
71-
<1> Specify the system architecture, valid values are `amd64` and `arm64`.
72-
<2> Required. Specify your cluster name.
73-
<3> State the cluster network plugin to install. The supported values are `OVNKubernetes` and `OpenShiftSDN`. The default value is `OVNKubernetes`.
74-
<4> Specify your pull secret.
75-
<5> Specify your ssh public key.
76-
77-
+
78-
[NOTE]
79-
====
80-
If you set the platform to `vSphere` or `baremetal`, you can configure IP address endpoints for cluster nodes in three ways:
81-
82-
* IPv4
83-
* IPv6
84-
* IPv4 and IPv6 in parallel (dual-stack)
85-
86-
IPv6 is supported only on bare metal platforms.
87-
====
88-
+
89-
.Example of dual-stack networking
90-
[source,yaml]
91-
----
92-
networking:
93-
clusterNetwork:
94-
- cidr: 172.21.0.0/16
95-
hostPrefix: 23
96-
- cidr: fd02::/48
97-
hostPrefix: 64
98-
machineNetwork:
99-
- cidr: 192.168.11.0/16
100-
- cidr: 2001:DB8::/32
101-
serviceNetwork:
102-
- 172.22.0.0/16
103-
- fd03::/112
104-
networkType: OVNKubernetes
105-
platform:
106-
baremetal:
107-
apiVIPs:
108-
- 192.168.11.3
109-
- 2001:DB8::4
110-
ingressVIPs:
111-
- 192.168.11.4
112-
- 2001:DB8::5
113-
----
114-
115-
. Create the `agent-config.yaml` file:
116-
+
117-
[source,yaml]
118-
----
119-
cat > agent-config.yaml << EOF
120-
apiVersion: v1alpha1
121-
kind: AgentConfig
122-
metadata:
123-
name: sno-cluster
124-
rendezvousIP: 192.168.111.80 <1>
125-
hosts: <2>
126-
- hostname: master-0 <3>
127-
interfaces:
128-
- name: eno1
129-
macAddress: 00:ef:44:21:e6:a5
130-
rootDeviceHints: <4>
131-
deviceName: /dev/sdb
132-
networkConfig: <5>
133-
interfaces:
134-
- name: eno1
135-
type: ethernet
136-
state: up
137-
mac-address: 00:ef:44:21:e6:a5
138-
ipv4:
139-
enabled: true
140-
address:
141-
- ip: 192.168.111.80
142-
prefix-length: 23
143-
dhcp: false
144-
dns-resolver:
145-
config:
146-
server:
147-
- 192.168.111.1
148-
routes:
149-
config:
150-
- destination: 0.0.0.0/0
151-
next-hop-address: 192.168.111.2
152-
next-hop-interface: eno1
153-
table-id: 254
154-
EOF
155-
----
156-
+
157-
<1> This IP address is used to determine which node performs the bootstrapping process as well as running the `assisted-service` component.
158-
You must provide the rendezvous IP address when you do not specify at least one host's IP address in the `networkConfig` parameter. If this address is not provided, one IP address is selected from the provided hosts' `networkConfig`.
159-
<2> Host configuration is optional. The number of hosts defined must not exceed the total number of hosts defined in the `install-config.yaml` file, which is the sum of the values of the `compute.replicas` and `controlPlane.replicas` parameters.
160-
<3> The optional `hostname` parameter overrides the hostname obtained from either the Dynamic Host Configuration Protocol (DHCP) or a reverse DNS lookup. Each host must have a unique hostname supplied by one of these methods.
161-
<4> The `rootDeviceHints` parameter enables provisioning of the Red Hat Enterprise Linux CoreOS (RHCOS) image to a particular device. It examines the devices in the order it discovers them, and compares the discovered values with the hint values. It uses the first discovered device that matches the hint value.
162-
<5> Set this optional parameter to configure the network interface of a host in NMState format.
163-
164-
+
16513
. Create the agent image by running the following command:
16614

16715
+

0 commit comments

Comments
 (0)