mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-07 00:48:01 +01:00
102 lines
4.2 KiB
Plaintext
102 lines
4.2 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// microshift/microshift-embed-into-rpm-ostree.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="provisioning-a-machine_{context}"]
|
|
= Provisioning a machine for {microshift-short}
|
|
|
|
Provision a machine with your {op-system-ostree} image by using the procedures from the {op-system-ostree} documentation.
|
|
|
|
To use {microshift-short}, you must provision the system so that it meets the following requirements:
|
|
|
|
* The machine you are provisioning must meet the system requirements for installing {microshift-short}.
|
|
* The file system must have a logical volume manager (LVM) volume group (VG) with sufficient capacity for the persistent volumes (PVs) of your workload.
|
|
* A pull secret from the https://console.redhat.com/openshift/install/pull-secret[Red Hat Hybrid Cloud Console] must be present as `/etc/crio/openshift-pull-secret` and have root user-only read/write permissions.
|
|
* The firewall must be configured with the required settings.
|
|
|
|
[NOTE]
|
|
====
|
|
If you are using a Kickstart such as the {op-system-ostree} Installer (ISO) image, you can update your Kickstart file to meet the provisioning requirements.
|
|
====
|
|
|
|
.Prerequisites
|
|
|
|
. You have created a {op-system-ostree} Installer (ISO) image containing your {op-system-ostree} commit with {product-title}.
|
|
.. This requirement includes the steps of composing an RFE Container image, creating the RFE Installer blueprint, starting the RFE container, and composing the RFE Installer image.
|
|
. Create a Kickstart file or use an existing one. In the Kickstart file, you must include:
|
|
.. Detailed instructions about how to create a user.
|
|
.. How to fetch and deploy the {op-system-ostree} image.
|
|
|
|
For more information, read "Additional resources."
|
|
|
|
.Procedure
|
|
|
|
. In the main section of the Kickstart file, update the setup of the filesystem such that it contains an LVM volume group called `rhel` with at least 10GB system root. Leave free space for the LVMS CSI driver to use for storing the data for your workloads.
|
|
+
|
|
.Example kickstart snippet for configuring the filesystem
|
|
[source,text]
|
|
----
|
|
# Partition disk such that it contains an LVM volume group called `rhel` with a
|
|
# 10GB+ system root but leaving free space for the LVMS CSI driver for storing data.
|
|
#
|
|
# For example, a 20GB disk would be partitioned in the following way:
|
|
#
|
|
# NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
|
|
# sda 8:0 0 20G 0 disk
|
|
# ├─sda1 8:1 0 200M 0 part /boot/efi
|
|
# ├─sda1 8:1 0 800M 0 part /boot
|
|
# └─sda2 8:2 0 19G 0 part
|
|
# └─rhel-root 253:0 0 10G 0 lvm /sysroot
|
|
#
|
|
ostreesetup --nogpg --osname=rhel --remote=edge \
|
|
--url=file:///run/install/repo/ostree/repo --ref=rhel/<RHEL VERSION NUMBER>/x86_64/edge
|
|
zerombr
|
|
clearpart --all --initlabel
|
|
part /boot/efi --fstype=efi --size=200
|
|
part /boot --fstype=xfs --asprimary --size=800
|
|
# Uncomment this line to add a SWAP partition of the recommended size
|
|
#part swap --fstype=swap --recommended
|
|
part pv.01 --grow
|
|
volgroup rhel pv.01
|
|
logvol / --vgname=rhel --fstype=xfs --size=10000 --name=root
|
|
# To add users, use a line such as the following
|
|
user --name=<YOUR_USER_NAME> \
|
|
--password=<YOUR_HASHED_PASSWORD> \
|
|
--iscrypted --groups=<YOUR_USER_GROUPS>
|
|
----
|
|
|
|
. In the `%post` section of the Kickstart file, add your pull secret and the mandatory firewall rules.
|
|
+
|
|
.Example Kickstart snippet for adding the pull secret and firewall rules
|
|
[source,terminal]
|
|
----
|
|
%post --log=/var/log/anaconda/post-install.log --erroronfail
|
|
|
|
# Add the pull secret to CRI-O and set root user-only read/write permissions
|
|
cat > /etc/crio/openshift-pull-secret << EOF
|
|
YOUR_OPENSHIFT_PULL_SECRET_HERE
|
|
EOF
|
|
chmod 600 /etc/crio/openshift-pull-secret
|
|
|
|
# Configure the firewall with the mandatory rules for MicroShift
|
|
firewall-offline-cmd --zone=trusted --add-source=10.42.0.0/16
|
|
firewall-offline-cmd --zone=trusted --add-source=169.254.169.1
|
|
|
|
%end
|
|
----
|
|
|
|
. Install the `mkksiso` tool by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ sudo yum install -y lorax
|
|
----
|
|
|
|
. Update the Kickstart file in the ISO with your new Kickstart file by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ sudo mkksiso <your_kickstart>.ks <your_installer>.iso <updated_installer>.iso
|
|
----
|