Skip to content

Commit 0f1378a

Browse files
authored
Merge pull request #48673 from Amrita42/agent-install-new
Created a sub-dir for Agent-based Installer with a proposed TOC
2 parents d8e18b4 + 798a88e commit 0f1378a

13 files changed

+577
-4
lines changed

_topic_maps/_topic_map.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,14 @@ Topics:
292292
Topics:
293293
- Name: Installing an on-premise cluster using the Assisted Installer
294294
File: installing-on-prem-assisted
295-
- Name: Preparing to install
296-
File: assisted-installer-preparing-to-install
297-
- Name: Installing with the Assisted Installer
298-
File: assisted-installer-installing
295+
- Name: Installing an on-premise cluster with the Agent-based Installer
296+
Dir: installing_with_agent_based_installer
297+
Distros: openshift-enterprise
298+
Topics:
299+
- Name: Preparing to install with Agent-based installer
300+
File: preparing-to-install-with-agent-based-installer
301+
- Name: Installing a cluster with Agent-based installer
302+
File: installing-with-agent-based-installer
299303
- Name: Installing on a single node
300304
Dir: installing_sno
301305
Distros: openshift-enterprise
165 KB
Loading
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../_attributes/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../images/
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
:_content-type: ASSEMBLY
2+
[id="installing-with-agent-based-installer"]
3+
= Installing a {product-title} cluster with the Agent-based Installer
4+
include::_attributes/common-attributes.adoc[]
5+
:context: installing-with-agent-based-installer
6+
7+
toc::[]
8+
9+
[id="prerequisites_installing-with-agent-based-installer"]
10+
== Prerequisites
11+
12+
* You reviewed details about the xref:../../architecture/architecture-installation.adoc#architecture-installation[{product-title} installation and update] processes.
13+
* You read the documentation on xref:../../installing/installing-preparing.adoc#installing-preparing[selecting a cluster installation method and preparing it for users].
14+
15+
include::modules/installing-ocp-agent.adoc[leveloffset=+1]
16+
17+
[role="_additional-resources"]
18+
.Additional resources
19+
20+
* See xref:../../installing/installing_bare_metal/installing-restricted-networks-bare-metal.adoc#installation-three-node-cluster_installing-restricted-networks-bare-metal[Configuring a three-node cluster] to deploy three-node clusters in bare metal environments.
21+
22+
include::modules/sample-ztp-custom-resources.adoc[leveloffset=+1]
23+
24+
[role="_additional-resources"]
25+
.Additional resources
26+
27+
* See xref:../../scalability_and_performance/ztp-deploying-disconnected.adoc#ztp-deploying-disconnected[ZTP custom resources] to learn more about ZTP.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../modules/
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
:_content-type: ASSEMBLY
2+
[id="preparing-to-install-with-agent-based-installer"]
3+
= Preparing to install with the Agent-based installer
4+
include::_attributes/common-attributes.adoc[]
5+
:context: preparing-to-install-with-agent-based-installer
6+
7+
toc::[]
8+
9+
== About the Agent-based Installer
10+
The Agent-based Installer is a combination of the Assisted Installer (AI) technology and the installer-provisioned infrastructure (IPI). It is a subcommand that resides in the {product-title} installer and also utilizes the {product-title} installer for the input asset management.
11+
It generates a bootable image containing all of the information required to deploy an {product-title} cluster.
12+
13+
The Agent-based Installer is a sub-command that generates a live {op-system-first} ISO. The live ISO runs all of the required components that are running in containers pulled from the {product-title} release payload.
14+
15+
The Agent-based Installer also utilizes Zero Touch Provisioning (ZTP) custom resources. ZTP allows you to provision new edge sites with declarative configurations of bare-metal equipment.
16+
17+
include::modules/understanding-agent-install.adoc[leveloffset=+1]
18+
19+
include::modules/installation-bare-metal-agent-installer-config-yaml.adoc[leveloffset=+1]
20+
21+
include::modules/validations-before-agent-iso-creation.adoc[leveloffset=+1]
22+
23+
[id="agent-based-installation-next-steps"]
24+
== Next steps
25+
26+
* xref:../../installing/installing_with_agent_based_installer/installing-with-agent-based-installer.adoc#installing-with-agent-based-installer[Installing a cluster with the Agent-based Installer]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../snippets/
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
// Module included in the following assemblies:
2+
3+
//* installing-with-agent/installing-with-agent.adoc
4+
// Re-used content from Sample install-config.yaml file for bare metal without conditionals
5+
6+
:_content-type: CONCEPT
7+
[id="installation-bare-metal-agent-installer-config-yaml_{context}"]
8+
= Sample install-config.yaml file for bare metal
9+
10+
You can customize the `install-config.yaml` file to specify more details about your {product-title} cluster's platform or modify the values of the required parameters.
11+
12+
[source,yaml]
13+
----
14+
apiVersion: v1
15+
baseDomain: example.com <1>
16+
compute: <2>
17+
- hyperthreading: Enabled <3>
18+
name: worker
19+
replicas: 0 <4>
20+
controlPlane: <2>
21+
hyperthreading: Enabled <3>
22+
name: master
23+
replicas: 3 <5>
24+
metadata:
25+
name: sno-cluster <6>
26+
networking:
27+
clusterNetwork:
28+
- cidr: 10.128.0.0/14 <7>
29+
hostPrefix: 23 <8>
30+
networkType: OpenShiftSDN <9>
31+
serviceNetwork: <10>
32+
- 172.30.0.0/16
33+
platform:
34+
none: {} <11>
35+
fips: false <12>
36+
pullSecret: '{"auths": ...}' <13>
37+
sshKey: 'ssh-ed25519 AAAA...' <14>
38+
capabilities:
39+
baselineCapabilitySet: None
40+
additionalEnabledCapabilities:
41+
- openshift-samples
42+
----
43+
<1> The base domain of the cluster. All DNS records must be sub-domains of this base and include the cluster name.
44+
<2> The `controlPlane` section is a single mapping, but the `compute` section is a sequence of mappings. To meet the requirements of the different data structures, the first line of the `compute` section must begin with a hyphen, `-`, and the first line of the `controlPlane` section must not. Only one control plane pool is used.
45+
<3> Specifies whether to enable or disable simultaneous multithreading (SMT), or hyperthreading. By default, SMT is enabled to increase the performance of the cores in your machines. You can disable it by setting the parameter value to `Disabled`. If you disable SMT, you must disable it in all cluster machines; this includes both control plane and compute machines.
46+
47+
+
48+
[NOTE]
49+
====
50+
Simultaneous multithreading (SMT) is enabled by default. If SMT is not enabled in your BIOS settings, the `hyperthreading` parameter has no effect.
51+
====
52+
+
53+
[IMPORTANT]
54+
====
55+
If you disable `hyperthreading`, whether in the BIOS or in the `install-config.yaml` file, ensure that your capacity planning accounts for the dramatically decreased machine performance.
56+
====
57+
58+
<4> This parameter controls the number of compute machines that the Agent-based installation waits to discover before triggering the installation process. It is the number of compute machines that must be booted with the generated ISO.
59+
60+
+
61+
[NOTE]
62+
====
63+
If you are installing a three-node cluster, do not deploy any compute machines when you install the {op-system-first} machines.
64+
====
65+
+
66+
<5> The number of control plane machines that you add to the cluster. Because the cluster uses these values as the number of etcd endpoints in the cluster, the value must match the number of control plane machines that you deploy.
67+
<6> The cluster name that you specified in your DNS records.
68+
<7> A block of IP addresses from which pod IP addresses are allocated. This block must not overlap with existing physical networks. These IP addresses are used for the pod network. If you need to access the pods from an external network, you must configure load balancers and routers to manage the traffic.
69+
+
70+
[NOTE]
71+
====
72+
Class E CIDR range is reserved for a future use. To use the Class E CIDR range, you must ensure your networking environment accepts the IP addresses within the Class E CIDR range.
73+
====
74+
+
75+
<8> The subnet prefix length to assign to each individual node. For example, if `hostPrefix` is set to `23`, then each node is assigned a `/23` subnet out of the given `cidr`, which allows for 510 (2^(32 - 23) - 2) pod IP addresses. If you are required to provide access to nodes from an external network, configure load balancers and routers to manage the traffic.
76+
<9> The cluster network provider Container Network Interface (CNI) plug-in to install. The supported values are `OVNKubernetes` (default value) and `OpenShiftSDN` .
77+
<10> The IP address pool to use for service IP addresses. You can enter only one IP address pool. This block must not overlap with existing physical networks. If you need to access the services from an external network, configure load balancers and routers to manage the traffic.
78+
<11> You must set the platform to `none` for a single-node cluster. You can also set the platform to `vSphere` and `baremetal`.
79+
<12> Whether to enable or disable FIPS mode. By default, FIPS mode is not enabled. If FIPS mode is enabled, the {op-system-first} machines that {product-title} runs on bypass the default Kubernetes cryptography suite and use the cryptography modules that are provided with {op-system} instead.
80+
+
81+
[IMPORTANT]
82+
====
83+
The use of FIPS Validated / Modules in Process cryptographic libraries is only supported on {product-title} deployments on the `x86_64` architecture.
84+
====
85+
86+
<13> This pull secret allows you to authenticate with the services that are provided by the included authorities, including Quay.io, which serves the container images for {product-title} components.
87+
<14> The SSH public key for the `core` user in {op-system-first}.
88+
+
89+
[NOTE]
90+
====
91+
For production {product-title} clusters on which you want to perform installation debugging or disaster recovery, specify an SSH key that your `ssh-agent` process uses.
92+
====

modules/installing-ocp-agent.adoc

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * installing-with-agent/installing-with-agent.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="installing-ocp-agent_{context}"]
7+
= Installing {product-title} with the Agent-based Installer
8+
9+
The following procedure deploys a single-node {product-title}. You can use this procedure as a basis and modify according to your requirements.
10+
11+
.Procedure
12+
13+
. Navigate to the link:https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest [OpenShift mirror site] and download the latest version of the tarball that matches your operating system.
14+
15+
. Extract the binary by running the following command:
16+
+
17+
[source,terminal]
18+
----
19+
$ tar xvf <file> -C ~/.local/bin
20+
----
21+
+
22+
The file contains the Agent-based Installer.
23+
24+
. Install `nmstate` dependency by running the following command:
25+
+
26+
[source,terminal]
27+
----
28+
$ sudo dnf install /usr/bin/nmstatectl -y
29+
----
30+
31+
. Place the `openshift-install` binary in a directory that is on your PATH.
32+
33+
. Create a directory to store the cluster manifests by running the following command:
34+
+
35+
[source,terminal]
36+
----
37+
$ mkdir ~/<directory_name>
38+
----
39+
40+
+
41+
[NOTE]
42+
====
43+
This is the preferred method for the Agent-based installation. Using ZTP manifests is optional.
44+
====
45+
46+
. Create the `install-config.yaml` file:
47+
+
48+
[source,yaml]
49+
----
50+
cat << EOF > ./cluster-manifests/install-config.yaml
51+
apiVersion: v1
52+
baseDomain: test.example.com
53+
compute:
54+
- architecture: amd64
55+
hyperthreading: Enabled
56+
name: worker
57+
replicas: 0
58+
controlPlane:
59+
architecture: amd64
60+
hyperthreading: Enabled
61+
name: master
62+
replicas: 1
63+
metadata:
64+
name: sno-cluster <1>
65+
networking:
66+
clusterNetwork:
67+
- cidr: 10.128.0.0/14
68+
hostPrefix: 23
69+
machineNetwork:
70+
- cidr: 192.168.111.0/16
71+
networkType: OpenShiftSDN
72+
serviceNetwork:
73+
- 172.30.0.0/16
74+
platform:
75+
none: {}
76+
pullSecret: '<pull_secret>' <2>
77+
sshKey: |
78+
'<ssh_pub_key>' <3>
79+
EOF
80+
----
81+
+
82+
<1> Required.
83+
<2> Enter your pull secret.
84+
<3> Enter your ssh public key.
85+
86+
. Create the `agent-config.yaml` file:
87+
+
88+
[source,yaml]
89+
----
90+
cat > agent-config.yaml << EOF
91+
kind: AgentConfig
92+
metadata:
93+
name: sno-cluster
94+
rendezvousIP: 192.168.111.80 <1>
95+
hosts: <2>
96+
- hostname: master-0
97+
interfaces:
98+
- name: eno1
99+
macAddress: 00:ef:44:21:e6:a5
100+
networkConfig:
101+
interfaces:
102+
- name: eno1
103+
type: ethernet
104+
state: up
105+
mac-address: 00:ef:44:21:e6:a5
106+
ipv4:
107+
enabled: true
108+
address:
109+
- ip: 192.168.111.80
110+
prefix-length: 23
111+
dhcp: false
112+
dns-resolver:
113+
config:
114+
server:
115+
- 192.168.111.1
116+
routes:
117+
config:
118+
- destination: 0.0.0.0/0
119+
next-hop-address: 192.168.111.2
120+
next-hop-interface: eno1
121+
table-id: 254
122+
EOF
123+
----
124+
+
125+
<1> This IP address is used to determine which node performs the bootstrapping process as well as running the `assisted-service` component.
126+
You must provide the IP address when you do not specify the node's IP addresses in the `networkConfig` parameter. If this address is not provided, one IP address is selected from the provided nodes's `networkConfig`.
127+
You must provide the IP address when you do not specify the node's IP addresses in the `networkConfig` parameter. If this address is not provided, one IP address is selected from the provided nodes's `networkConfig`.
128+
<2> The number of hosts defined must match 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. When 3 master nodes and 0 worker nodes are defined in the `install-config.yaml` file,
129+
the number of hosts defined is 3. When 3 master nodes and 2 worker nodes are defined in the `install-config.yaml` file, the number of hosts defined is 5.
130+
131+
+
132+
. Create the Agent image by running the following command:
133+
+
134+
[NOTE]
135+
====
136+
Ensure that the image is created in the same path as the **auth** folder. You can verify this with the following command:
137+
138+
[source,terminal]
139+
----
140+
$ ls
141+
agent.iso auth
142+
----
143+
====
144+
+
145+
[source,terminal]
146+
----
147+
$ openshift-install agent create image
148+
----
149+
150+
. Boot the `agent.iso` image on the bare metal machines. You can run the image on any Linux distribution.
151+
152+
. To track the progress and verify sucessful installation, run the following command:
153+
+
154+
[source,terminal]
155+
----
156+
$ openshift-install agent wait-for install-complete
157+
----
158+
+
159+
.Example output
160+
[source,terminal]
161+
----
162+
...................................................................
163+
...................................................................
164+
INFO Cluster is installed
165+
INFO Install complete!
166+
INFO To access the cluster as the system:admin user when using 'oc', run
167+
INFO export KUBECONFIG=/home/core/installer/auth/kubeconfig
168+
INFO Access the OpenShift web-console here: https://console-openshift-console.apps.sno-cluster.test.example.com
169+
----

0 commit comments

Comments
 (0)