-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates local lab environment to RHEL9 (#77)
Signed-off-by: Alberto Losada <[email protected]>
- Loading branch information
1 parent
0d87d70
commit f5433bd
Showing
1 changed file
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,25 +9,27 @@ CAUTION: If you are a Red Hatter, you can order a lab environment on the https:/ | |
[#lab-requirements] | ||
== Lab Requirements | ||
|
||
RHEL 8.X box with access to the Internet. This lab relies on KVM, so you need to have the proper virtualization packages already installed. It is highly recommended to use a bare-metal host. Our lab environment has the following specs: | ||
RHEL 9.X box with access to the Internet. This lab relies on KVM, so you need to have the proper virtualization packages already installed. It is highly recommended to use a bare-metal host. Our lab environment has the following specs: | ||
|
||
* 64 cores in total, with or without hyperthreading enabled. | ||
* 200GiB Memory. | ||
* 1 TiB storage. | ||
IMPORTANT: These instructions have been tested in a RHEL 8.9, we cannot guarantee that other operating systems (even RHEL-based) will work. We won't be providing support out of RHEL 8. | ||
IMPORTANT: These instructions have been tested in a RHEL 9.3, we cannot guarantee that other operating systems (even RHEL-based) will work. We won't be providing support out of RHEL 9. | ||
|
||
These are the steps to install the required packages on a RHEL 8.9 server: | ||
These are the steps to install the required packages on a RHEL 9.3 server: | ||
|
||
[.console-input] | ||
[source,bash,subs="attributes+,+macros"] | ||
----- | ||
dnf -y install libvirt libvirt-daemon-driver-qemu qemu-kvm | ||
usermod -aG qemu,libvirt $(id -un) | ||
newgrp libvirt | ||
systemctl enable --now libvirtd | ||
systemctl enable libvirtd --now | ||
----- | ||
|
||
NOTE: Verfiy tha the libvirtd systemd service is running successfully by executing `systemctl status libvirtd`. | ||
|
||
[#lab-deployment] | ||
== Lab Deployment | ||
|
||
|
@@ -44,9 +46,11 @@ IMPORTANT: Below commands must be executed from the hypervisor host as root if n | |
[source,bash,subs="attributes+,+macros"] | ||
----- | ||
dnf -y copr enable karmab/kcli | ||
dnf -y install kcli bash-completion vim jq tar git ipcalc python3-pyOpenSSL | ||
dnf -y install kcli bash-completion vim jq tar git ipcalc pip | ||
pip install pyopenssl | ||
----- | ||
|
||
|
||
[#install-oc-kubectl] | ||
=== Install oc/kubectl CLIs | ||
|
||
|
@@ -89,10 +93,33 @@ semanage fcontext -a -t dnsmasq_lease_t /opt/dnsmasq/hosts.leases | |
restorecon /opt/dnsmasq/hosts.leases | ||
sed -i "s/UPSTREAM_DNS/1.1.1.1/" /opt/dnsmasq/upstream-resolv.conf | ||
systemctl daemon-reload | ||
systemctl enable --now dnsmasq-virt | ||
systemctl enable dnsmasq-virt | ||
systemctl mask dnsmasq | ||
----- | ||
|
||
Before starting dnsmasq-virt service we must set the proper SELinux attributes to the files that have been downloaded. | ||
|
||
[.console-input] | ||
[source,bash,subs="attributes+,+macros"] | ||
----- | ||
semanage fcontext -a -t dnsmasq_etc_t "/opt/dnsmasq/include.d(/.*)?" | ||
semanage fcontext -a -t dnsmasq_lease_t "/opt/dnsmasq/(.*)?\.leases" | ||
semanage fcontext -a -t dnsmasq_etc_t "/opt/dnsmasq/(.*)?\.conf" | ||
semanage fcontext -a -t dnsmasq_etc_t "/opt/dnsmasq" | ||
restorecon -rv /opt/dnsmasq/ | ||
----- | ||
Now, you can start the dnsmasq-virt systemd service. | ||
[.console-input] | ||
[source,bash,subs="attributes+,+macros"] | ||
----- | ||
systemctl restart dnsmasq-virt.service | ||
----- | ||
Verify that the dnsmasq-virt service has started successfully this time. | ||
[#configure-local-dns-as-primary-server] | ||
=== Configure Local DNS as Primary Server | ||
|
@@ -121,6 +148,8 @@ iptables -F | |
systemctl restart libvirtd | ||
----- | ||
WARNING: The iptables.service probably does not exist in your server, so it fails to be disabled. In that case, just continue with the rest of the commands. | ||
[#configure-webcache] | ||
=== Configure Webcache | ||
|
@@ -185,6 +214,7 @@ chown -R 1000:1000 /opt/gitea/ | |
curl -sL https://raw.githubusercontent.com/RHsyseng/5g-ran-deployments-on-ocp-lab/{branch}/lab-materials/lab-env-data/gitea/podman-gitea.service -o /etc/systemd/system/podman-gitea.service | ||
systemctl daemon-reload | ||
systemctl enable podman-gitea --now | ||
sleep 10 | ||
podman exec --user 1000 gitea /bin/sh -c 'gitea admin user create --username student --password student --email [email protected] --must-change-password=false --admin' | ||
curl -u 'student:student' -H 'Content-Type: application/json' -X POST --data '{"service":"2","clone_addr":"https://github.com/RHsyseng/5g-ran-deployments-on-ocp-lab.git","uid":1,"repo_name":"5g-ran-deployments-on-ocp-lab"}' http://infra.5g-deployment.lab:3000/api/v1/repos/migrate | ||
curl -u 'student:student' -H 'Content-Type: application/json' -X POST --data '{"service":"2","clone_addr":"https://github.com/RHsyseng/5g-ran-lab-aap-integration-tools.git","uid":1,"repo_name":"aap-integration-tools"}' http://infra.5g-deployment.lab:3000/api/v1/repos/migrate | ||
|