Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions docs/devenv_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,22 +119,11 @@ When working with MicroShift based on a pre-release _minor_ version `Y` of OpenS

```bash
OSVERSION=$(awk -F: '{print $5}' /etc/system-release-cpe)
OCP_REPO_NAME=rhocp-4.13-for-rhel-${OSVERSION}-mirrorbeta-$(uname -m)-rpms

sudo tee /etc/yum.repos.d/${OCP_REPO_NAME}.repo >/dev/null <<EOF
[${OCP_REPO_NAME}]
name=Beta rhocp-4.13 RPMs for RHEL ${OSVERSION}
baseurl=https://mirror.openshift.com/pub/openshift-v4/\$basearch/dependencies/rpms/4.13-el${OSVERSION}-beta/
enabled=1
gpgcheck=0
skip_if_unavailable=0
EOF

sudo subscription-manager config --rhsm.manage_repos=1
# Uncomment this when OCP 4.13 is released
# sudo subscription-manager repos \
# --enable rhocp-4.13-for-rhel-${OSVERSION}-$(uname -m)-rpms \
# --enable fast-datapath-for-rhel-${OSVERSION}-$(uname -m)-rpms
# TODO: Start using 'rhocp-4.13' repository when OCP 4.13 is released
sudo subscription-manager repos \
--enable "rhocp-4.12-for-rhel-${OSVERSION}-$(uname -m)-rpms" \
--enable "fast-datapath-for-rhel-${OSVERSION}-$(uname -m)-rpms"
```
</details>
<details><summary>CentOS</summary>
Expand Down
30 changes: 3 additions & 27 deletions docs/rhel4edge_iso.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,6 @@ auth_file_path = "/etc/osbuild-worker/pull-secret.json"
EOF
```

> **NOTE** <br>
> Embedding container images in the generated ISO requires the functionality from the latest version of the `osbuild` and `osbuild-composer` packages.
> This functionality will be available in the future releases of the RHEL 9 operating system.

To install the necessary functionality, run the following command to upgrade your system with the up-to-date software from the `copr` repository.
```bash
~/microshift/hack/osbuild2copr.sh copr
```

> If necessary, rerun the `hack/osbuild2copr.sh` script with the `appstream` argument to revert to the standard `osbuild` and `osbuild-composer` packages.

Proceed by running the build script with the `-embed_containers` argument to include the dependent container images into the generated ISO.
```bash
~/microshift/scripts/image-builder/build.sh -pull_secret_file ~/.pull-secret.json -embed_containers
Expand Down Expand Up @@ -362,23 +351,10 @@ curl: (6) Could not resolve host: redhat.com
> * Run the `sudo systemctl enable --now serial-getty@ttyS0.service` command on the virtual machine to enable the serial console service.
> * Run the `sudo virsh console microshift-edge` command on the hypervisor to connect to the serial console.

Make sure that `CRI-O` has access to all the container images required by MicroShift.
Make sure that `CRI-O` has access to the container images required by MicroShift.
```bash
$ sudo crictl images
IMAGE TAG IMAGE ID SIZE
quay.io/openshift-release-dev/ocp-v4.0-art-dev <none> abfe4b141323c 400MB
quay.io/openshift-release-dev/ocp-v4.0-art-dev latest e838beef2dc33 352MB
quay.io/openshift-release-dev/ocp-v4.0-art-dev <none> 46485ef27b75a 354MB
quay.io/openshift-release-dev/ocp-v4.0-art-dev <none> c9ab25a51ced3 331MB
quay.io/openshift-release-dev/ocp-v4.0-art-dev <none> 075ed082f7130 343MB
quay.io/openshift-release-dev/ocp-v4.0-art-dev <none> d9ab25a51c123 415MB
quay.io/openshift-release-dev/ocp-v4.0-art-dev <none> 075eabc2f7a0a 466MB
registry.access.redhat.com/ubi8/openssl latest 6f0b85db494c0 40.7MB
registry.redhat.io/odf4/odf-topolvm-rhel8 latest 7772af7c5ac84 222MB
registry.redhat.io/openshift4/ose-csi-external-provisioner latest f4f57fec63a30 389MB
registry.redhat.io/openshift4/ose-csi-external-resizer latest ffee6b6e833e3 387MB
registry.redhat.io/openshift4/ose-csi-livenessprobe latest f67b4438d40d3 349MB
registry.redhat.io/openshift4/ose-csi-node-driver-registrar latest 161662e2189a0 350MB
$ sudo crictl images | egrep -c 'openshift|redhat'
13
```

Finally, wait until all the MicroShift pods are up and running.
Expand Down
43 changes: 0 additions & 43 deletions hack/osbuild2copr.sh

This file was deleted.

19 changes: 4 additions & 15 deletions scripts/devenv-builder/configure-vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,11 @@ fi
# https://github.com/openshift/microshift/blob/main/docs/devenv_setup.md#runtime-prerequisites
if ${RHEL_SUBSCRIPTION}; then
OSVERSION=$(awk -F: '{print $5}' /etc/system-release-cpe)
OCP_REPO_NAME=rhocp-4.13-for-rhel-${OSVERSION}-mirrorbeta-$(uname -m)-rpms

sudo tee "/etc/yum.repos.d/${OCP_REPO_NAME}.repo" >/dev/null <<EOF
[${OCP_REPO_NAME}]
name=Beta rhocp-4.13 RPMs for RHEL ${OSVERSION}
baseurl=https://mirror.openshift.com/pub/openshift-v4/\$basearch/dependencies/rpms/4.13-el${OSVERSION}-beta/
enabled=1
gpgcheck=0
skip_if_unavailable=0
EOF

sudo subscription-manager config --rhsm.manage_repos=1
# Uncomment this when OCP 4.13 is released
# sudo subscription-manager repos \
# --enable rhocp-4.13-for-rhel-${OSVERSION}-$(uname -m)-rpms \
# --enable fast-datapath-for-rhel-${OSVERSION}-$(uname -m)-rpms
# TODO: Start using 'rhocp-4.13' repository when OCP 4.13 is released
sudo subscription-manager repos \
--enable "rhocp-4.12-for-rhel-${OSVERSION}-$(uname -m)-rpms" \
--enable "fast-datapath-for-rhel-${OSVERSION}-$(uname -m)-rpms"
else
sudo dnf install -y centos-release-nfv-common
sudo dnf copr enable -y @OKD/okd "centos-stream-9-$(uname -m)"
Expand Down
8 changes: 5 additions & 3 deletions scripts/image-builder/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,12 @@ createrepo microshift-local >/dev/null

# Download openshift local RPM packages (noarch for python and selinux packages)
rm -rf openshift-local 2>/dev/null || true
OCP_REPO_NAME="rhocp-4.13-for-rhel-${OSVERSION}-mirrorbeta-${BUILD_ARCH}-rpms"

# TODO: Start using 'rhocp-4.13' repository when OCP 4.13 is released
OCP_REPO_NAME="rhocp-4.12-for-rhel-${OSVERSION}-$(uname -m)-rpms"
reposync -n -a "${BUILD_ARCH}" -a noarch --download-path openshift-local \
--repo="${OCP_REPO_NAME}" >/dev/null
# --repo=fast-datapath-for-rhel-${OSVERSION}-${BUILD_ARCH}-rpms
--repo="${OCP_REPO_NAME}" \
--repo="fast-datapath-for-rhel-${OSVERSION}-${BUILD_ARCH}-rpms" >/dev/null

# Remove 'microshift' packages to avoid overrides from the remote repository
find openshift-local -name \*microshift\* -exec rm -f {} \;
Expand Down
48 changes: 0 additions & 48 deletions scripts/image-builder/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,11 @@ set -exo pipefail

OSVERSION=$(awk -F: '{print $5}' /etc/system-release-cpe)

function osbuild_rhel9_beta() {
local json_file=$1
sudo mkdir -p "$(dirname "${json_file}")"
sudo tee "${json_file}" >/dev/null <<EOF
{
"x86_64": [
{
"name": "baseos",
"baseurl": "https://cdn.redhat.com/content/beta/rhel9/9/x86_64/baseos/os",
"rhsm": true,
"check_gpg": false
},
{
"name": "appstream",
"baseurl": "https://cdn.redhat.com/content/beta/rhel9/9/x86_64/appstream/os",
"rhsm": true,
"check_gpg": false
}
],
"aarch64": [
{
"name": "baseos",
"baseurl": "https://cdn.redhat.com/content/beta/rhel9/9/aarch64/baseos/os",
"rhsm": true,
"check_gpg": false
},
{
"name": "appstream",
"baseurl": "https://cdn.redhat.com/content/beta/rhel9/9/aarch64/appstream/os",
"rhsm": true,
"check_gpg": false
}
]
}
EOF

sudo systemctl stop --now osbuild-composer.socket osbuild-composer.service osbuild-worker@1.service
sleep 5
sudo rm -rf /var/cache/osbuild-worker/* /var/lib/osbuild-composer/*
}

sudo dnf install -y git osbuild-composer composer-cli ostree rpm-ostree \
cockpit-composer cockpit-machines bash-completion podman runc genisoimage \
createrepo yum-utils selinux-policy-devel jq wget lorax rpm-build \
containernetworking-plugins

# Configure osbuild-composer to use RHEL 9.2 beta repositories
# This is a workaround until RHEL 9.2 becomes GA
if grep -q 'Red Hat Enterprise Linux release 9.2 Beta' /etc/redhat-release ; then
JSON_FILE=/etc/osbuild-composer/repositories/rhel-92.json
[ ! -e ${JSON_FILE} ] && osbuild_rhel9_beta ${JSON_FILE}
fi

sudo systemctl enable osbuild-composer.socket --now
sudo systemctl enable cockpit.socket --now
sudo firewall-cmd --add-service=cockpit --permanent
Expand Down