diff --git a/README.md b/README.md index a6145562..dc61538b 100644 --- a/README.md +++ b/README.md @@ -13,24 +13,10 @@ Learn about how you can obtain a free Red Hat Enterprise Linux subscription here Documentation for this repository is stored in the wiki section here: [https://github.com/rhel-labs/instruqt/wiki](https://github.com/rhel-labs/instruqt/wiki) -## Helper Script - -This script is used for making bulk changes to the labs like modifying all the VM images. - - - -## Red Hat Internal Documentation - -[Google Doc](https://docs.google.com/document/d/1WozkbDSJD7L850HAfIrQw7ifXuJlm-hDzU7-CCe6S7Q/edit#heading=h.pi65ypczlg9y) - ## Requests for new labs, bugs To request new features, labs, or to report bugs, please create a new issue. ## Current VM images -RHEL 9.2 -image: `projects/tmm-instruqt-11-26-2021/global/images/rhel-9-2-6-20-23` - -RHEL 9.2 with virt -image: `projects/tmm-instruqt-11-26-2021/global/images/virt-rhel-9-2-08-01-23` +[List of images here](https://github.com/rhel-labs/instruqt/wiki/images). diff --git a/centos-conversion-insights/01-pre-conversion-analysis-for-converting-to-rhel/assignment.md b/centos-conversion-insights/01-pre-conversion-analysis-for-converting-to-rhel/assignment.md index 7422985c..bf1ddb5d 100755 --- a/centos-conversion-insights/01-pre-conversion-analysis-for-converting-to-rhel/assignment.md +++ b/centos-conversion-insights/01-pre-conversion-analysis-for-converting-to-rhel/assignment.md @@ -124,7 +124,7 @@ In the search bar, enter the following. rhel tasks ``` -2) Click on `RHEL Tasks` +2) Click on `Tasks | RHEL` ![](../assets/tasksnew.png) @@ -174,6 +174,13 @@ tail -f /var/log/convert2rhel/convert2rhel.log ``` ![tail logs](../assets/viewlogs.png) +> [!WARNING] +> The `tail -f /var/log/convert2rhel/convert2rhel.log` may result in the following error below because there may be a delay between the previous operation to run the pre-conversion analysis and your centos host running the task. +> ``` +> tail: cannot open ‘/var/log/convert2rhel/convert2rhel.log’ for reading: No such file or directory +> tail: no files remaining +> ``` + To view the status of the task in Insights, click on the `Activity` tab. ![activity tab](../assets/activitytab.png) diff --git a/centos-conversion-insights/config.yml b/centos-conversion-insights/config.yml index d505adeb..1f619574 100644 --- a/centos-conversion-insights/config.yml +++ b/centos-conversion-insights/config.yml @@ -4,7 +4,7 @@ virtualbrowsers: url: https://console.redhat.com virtualmachines: - name: host - image: projects/tmm-instruqt-11-26-2021/global/images/virt-rhel-9-5-11-26-24 + image: projects/tmm-instruqt-11-26-2021/global/images/virt-rhel-9-5-11-29-24 shell: /bin/bash environment: TERM: xterm diff --git a/centos-conversion-insights/track.yml b/centos-conversion-insights/track.yml index 856bcdf9..537a2634 100755 --- a/centos-conversion-insights/track.yml +++ b/centos-conversion-insights/track.yml @@ -31,8 +31,9 @@ lab_config: feedback_recap_enabled: true feedback_tab_enabled: false loadingMessages: true + override_challenge_layout: false hideStopButton: false default_layout: AssignmentRight default_layout_sidebar_size: 33 -checksum: "3400256481407639150" +checksum: "12471132800590439347" enhanced_loading: false diff --git a/centos-conversion-insights/track_scripts/setup-host b/centos-conversion-insights/track_scripts/setup-host index f11cfae2..f300fd9a 100755 --- a/centos-conversion-insights/track_scripts/setup-host +++ b/centos-conversion-insights/track_scripts/setup-host @@ -1,40 +1,23 @@ -#!/bin/bash while [ ! -f /opt/instruqt/bootstrap/host-bootstrap-completed ] do echo "Waiting for Instruqt to finish booting the VM" sleep 1 done -virsh start centos - -subscription-manager config --rhsm.manage_repos=1 -subscription-manager register --activationkey=${ACTIVATION_KEY} --org=12451665 --force +agent variable set sandboxid $_SANDBOX_ID -usermod -aG wheel rhel -echo redhat | passwd --stdin rhel +virsh start centos echo "${SSHKEY}" > /root/.ssh/id_rsa chmod 600 /root/.ssh/id_rsa ssh-keygen -f /root/.ssh/id_rsa -y > /root/.ssh/id_rsa.pub -# MAC Addresses -# vm1: 52:54:00:d6:0c:72 -# centos: 52:54:00:68:79:84 -# converted: 52:54:00:87:d3:fc -# rhel07: 52:54:00:02:ce:bb -# rhel08: 52:54:00:43:26:d3 -# rhel09: 52:54:00:7f:e1:4e -# upgraded08: 52:54:00:22:37:93 -# upgraded09: 52:54:00:e6:14:ee - -# Get the IP of the VM belonging to cento based on arp. -while ! [ $( arp -an | grep 52:54:00:68:79:84 | awk '{print $2}' | tr -d '()' ) ]; do echo "Waiting for arp to return centos MAC address."; sleep 10; done; -echo "$( arp -an | grep 52:54:00:68:79:84 | awk '{print $2}' | tr -d '()' ) centos" >> /etc/hosts +# This sleep call is to give libvirt-nss time to find the ip address of the vm. +sleep 30 -agent variable set sandboxid $_SANDBOX_ID +# Attempt to register the vm 3 times, waiting 30 seconds for each attempt. +#(r=3;while ! ssh -i /root/.ssh/id_rsa -o "StrictHostKeyChecking no" centos "subscription-manager register --activationkey=${ACTIVATION_KEY} --org=12451665 --force" ; do ((--r))||exit;sleep 30;done) -# Set centos hostname and pass it as a runtime variable. -while ! ping -c 1 -W 1 centos; do echo "Waiting for centos - network interface might be down."; sleep 10; done; centosid="centos-conversion-$(uuidgen | cut -c 32-)" agent variable set vmid "$centosid" ssh -o "StrictHostKeyChecking no" root@centos hostnamectl set-hostname "$centosid" diff --git a/convert2rhel/config.yml b/convert2rhel/config.yml index 714474dd..47b1235d 100644 --- a/convert2rhel/config.yml +++ b/convert2rhel/config.yml @@ -1,7 +1,7 @@ version: "3" virtualmachines: - name: host - image: projects/tmm-instruqt-11-26-2021/global/images/virt-rhel-9-5-11-26-24 + image: projects/tmm-instruqt-11-26-2021/global/images/virt-rhel-9-5-11-29-24 shell: /bin/bash environment: TERM: xterm diff --git a/convert2rhel/track.yml b/convert2rhel/track.yml index af8804ce..b91ad472 100644 --- a/convert2rhel/track.yml +++ b/convert2rhel/track.yml @@ -26,9 +26,8 @@ tags: - conversions owner: rhel developers: -- myee@redhat.com - ehendric@redhat.com -maintenance: true +- myee@redhat.com show_timer: true timelimit: 3600 lab_config: @@ -40,5 +39,5 @@ lab_config: hideStopButton: false default_layout: AssignmentRight default_layout_sidebar_size: 33 -checksum: "3667878121716427374" +checksum: "10662381237094973691" enhanced_loading: false diff --git a/convert2rhel/track_scripts/setup-host b/convert2rhel/track_scripts/setup-host index 51594c22..a5aae9de 100755 --- a/convert2rhel/track_scripts/setup-host +++ b/convert2rhel/track_scripts/setup-host @@ -5,27 +5,16 @@ do sleep 1 done +agent variable set sandboxid $_SANDBOX_ID + virsh start centos echo "${SSHKEY}" > /root/.ssh/id_rsa chmod 600 /root/.ssh/id_rsa ssh-keygen -f /root/.ssh/id_rsa -y > /root/.ssh/id_rsa.pub -usermod -aG wheel rhel - -# MAC Addresses -# vm1: 52:54:00:d6:0c:72 -# centos: 52:54:00:68:79:84 -# rhel07: 52:54:00:02:ce:bb -# rhel08: 52:54:00:43:26:d3 -# rhel09: 52:54:00:7f:e1:4e - - -# Get the IP of the VM belonging to vm1 based on arp. -while ! [ $( arp -an | grep 52:54:00:68:79:84 | awk '{print $2}' | tr -d '()' ) ]; do echo "Waiting for arp to return centos MAC address."; sleep 10; done; -echo "$( arp -an | grep 52:54:00:68:79:84 | awk '{print $2}' | tr -d '()' ) centos" >> /etc/hosts - -usermod -aG wheel rhel -echo redhat | passwd --stdin rhel +# This sleep call is to give libvirt-nss time to find the ip address of the vm. +sleep 30 -while ! ping -c 1 -W 1 centos; do echo "Waiting for centos - network interface might be down."; sleep 10; done; +# Attempt to register the vm 3 times, waiting 30 seconds for each attempt. +#(r=3;while ! ssh -i /root/.ssh/id_rsa -o "StrictHostKeyChecking no" centos "subscription-manager register --activationkey=${ACTIVATION_KEY} --org=12451665 --force" ; do ((--r))||exit;sleep 30;done) \ No newline at end of file diff --git a/firewall-system-role/01-introduction/assignment.md b/firewall-system-role/01-introduction/assignment.md index ec5266eb..570a229a 100755 --- a/firewall-system-role/01-introduction/assignment.md +++ b/firewall-system-role/01-introduction/assignment.md @@ -27,18 +27,20 @@ tabs: title: controlnode type: terminal hostname: controlnode - cmd: tmux attach-session -t "firewall-testing" - id: yapmn6f1xgcj - title: rhelvm + title: vm1 type: terminal hostname: controlnode - cmd: tmux attach-session -t "firewall-testing-rhelvm" + cmd: ssh -i /root/.ssh/id_rsa -o "StrictHostKeyChecking no" root@vm1 - id: 3nmln4oousqe title: controlnode Web Console type: external url: https://controlnode.${_SANDBOX_ID}.instruqt.io:9090 difficulty: basic timelimit: 3000 +lab_config: + custom_layout: '{"root":{"children":[{"branch":{"size":66,"children":[{"leaf":{"tabs":["d2teuijqhcov","3nmln4oousqe"],"activeTabId":"d2teuijqhcov","size":49}},{"leaf":{"tabs":["yapmn6f1xgcj"],"activeTabId":"yapmn6f1xgcj","size":49}}]}},{"leaf":{"tabs":["assignment"],"activeTabId":"assignment","size":33}}],"orientation":"Horizontal"}}' +enhanced_loading: null --- > _NOTE:_ To make the inline images larger, expand this window. ![Menu Slider](../assets/slider.png) @@ -46,17 +48,17 @@ timelimit: 3000 This lab is composed of two hosts. 1. controlnode -2. rhelvm +2. vm1 -In this lab, we will use the host `controlnode` as the "control node" or the node where we will install and run the firewall system role. Firewall changes will be applied to `rhelvm`. +In this lab, we will use the host `controlnode` as the "control node" or the node where we will install and run the firewall system role. Firewall changes will be applied to `vm1`. We'll perform the following 3 tasks. -1. We will use the firewall system role to open the appropriate port to access web servers on `rhelvm`. This exercise is to show how to open firewall ports by service. +1. We will use the firewall system role to open the appropriate port to access web servers on `vm1`. This exercise is to show how to open firewall ports by service. -2. As well, we will also use the firewall system role to open port 9999 on `rhelvm` to enable inbound tcp connections. This exercise is to show how to open an arbitrary firewall port. +2. As well, we will also use the firewall system role to open port 9999 on `vm1` to enable inbound tcp connections. This exercise is to show how to open an arbitrary firewall port. -3. Finally, we'll configure port forwarding from 9999 to port 12345 on `rhelvm`. +3. Finally, we'll configure port forwarding from 9999 to port 12345 on `vm1`. ![afterapplying](../assets/firewallsystemrolesoverview.png) diff --git a/firewall-system-role/02-installsystemroles/assignment.md b/firewall-system-role/02-installsystemroles/assignment.md index 607db50c..af340680 100755 --- a/firewall-system-role/02-installsystemroles/assignment.md +++ b/firewall-system-role/02-installsystemroles/assignment.md @@ -12,18 +12,20 @@ tabs: title: controlnode type: terminal hostname: controlnode - cmd: tmux attach-session -t "firewall-testing" - id: xjo3jxzqs5od - title: rhelvm + title: vm1 type: terminal hostname: controlnode - cmd: tmux attach-session -t "firewall-testing-rhelvm" + cmd: ssh -i /root/.ssh/id_rsa -o "StrictHostKeyChecking no" root@vm1 - id: dl1pzm38ev9g title: controlnode Web Console type: external url: https://controlnode.${_SANDBOX_ID}.instruqt.io:9090 difficulty: basic timelimit: 1 +lab_config: + custom_layout: '{"root":{"children":[{"branch":{"size":66,"children":[{"leaf":{"tabs":["fawzh4mfupxy","dl1pzm38ev9g"],"activeTabId":"fawzh4mfupxy","size":49}},{"leaf":{"tabs":["xjo3jxzqs5od"],"activeTabId":"xjo3jxzqs5od","size":49}}]}},{"leaf":{"tabs":["assignment"],"activeTabId":"assignment","size":33}}],"orientation":"Horizontal"}}' +enhanced_loading: null --- Now we'll install system roles. @@ -37,6 +39,9 @@ Enter the following command. ```bash,run dnf install rhel-system-roles -y ``` +> [!NOTE] +> You can click on the `run` button and select the terminal where you wish to run the command. +> ![](../assets/runbutton.png) The resulting output will look similar to the output below. diff --git a/firewall-system-role/03-openhttpservice/assignment.md b/firewall-system-role/03-openhttpservice/assignment.md index cab4f4ce..2e6d8f96 100755 --- a/firewall-system-role/03-openhttpservice/assignment.md +++ b/firewall-system-role/03-openhttpservice/assignment.md @@ -13,27 +13,29 @@ tabs: title: controlnode type: terminal hostname: controlnode - cmd: tmux attach-session -t "firewall-testing" - id: jjy6ddnfvsfb - title: rhelvm + title: vm1 type: terminal hostname: controlnode - cmd: tmux attach-session -t "firewall-testing-rhelvm" + cmd: ssh -i /root/.ssh/id_rsa -o "StrictHostKeyChecking no" root@vm1 - id: 5tlhuxjaynsa title: controlnode Web Console type: external url: https://controlnode.${_SANDBOX_ID}.instruqt.io:9090 difficulty: basic timelimit: 1 +lab_config: + custom_layout: '{"root":{"children":[{"branch":{"size":66,"children":[{"leaf":{"tabs":["aja3vlwfhadg","5tlhuxjaynsa"],"activeTabId":"aja3vlwfhadg","size":49}},{"leaf":{"tabs":["jjy6ddnfvsfb"],"activeTabId":"jjy6ddnfvsfb","size":49}}]}},{"leaf":{"tabs":["assignment"],"activeTabId":"assignment","size":33}}],"orientation":"Horizontal"}}' +enhanced_loading: null --- -In this challenge, we will enable access to the http port 80 on `rhelvm`. +In this challenge, we will enable access to the http port 80 on `vm1`. -First, we'll prove to ourselves that port 80 is blocked by the firewall running on `rhelvm`. +First, we'll prove to ourselves that port 80 is blocked by the firewall running on `vm1`. -Switch to the [button label="rhelvm"](tab-1) terminal by clicking on this button: [button label="rhelvm"](tab-1). +Switch to the [button label="vm1"](tab-1) terminal by clicking on this button: [button label="vm1"](tab-1). -Run the following in [button label="rhelvm"](tab-1). +Run the following in [button label="vm1"](tab-1). ```bash,run firewall-cmd --list-all @@ -43,7 +45,7 @@ firewall-cmd --list-all The output above shows that port 80 is not open. -In the `rhelvm` terminal, run `nc -l 80`. This command runs the utility `netcat` and tells it to listen for incoming traffic on port 80. +In the `vm1` terminal, run `nc -l 80`. This command runs the utility `netcat` and tells it to listen for incoming traffic on port 80. ```bash,run nc -l 80 @@ -51,31 +53,31 @@ nc -l 80 ![nclistening](../assets/nclistening.png) -`netcat` is now listening on port 80 on `rhelvm`. +`netcat` is now listening on port 80 on `vm1`. > [!WARNING] > Do not exit out of `nc` in this terminal! Switch back to the [button label="controlnode"](tab-0) terminal. -Enter the command `nc rhelvm 80`. This tells `netcat` to connect to port 80 on `rhelvm`. +Enter the command `nc vm1 80`. This tells `netcat` to connect to port 80 on `vm1`. ```bash,run -nc rhelvm 80 +nc vm1 80 ``` ![noroute](../assets/no-route.png) -`netcat` cannot connect to `rhelvm` on port 80. +`netcat` cannot connect to `vm1` on port 80. -Let's use RHEL systems roles to open up port 80 on `rhelvm`. +Let's use RHEL systems roles to open up port 80 on `vm1`. -First, Ansible requires a host file pointing at the `rhelvm` host. The host file looks like this. +First, Ansible requires a host file pointing at the `vm1` host. The host file looks like this.
 all:
   hosts:
-    rhelvm:
+    vm1:
   vars:
     firewall:
       - service: http
@@ -88,7 +90,7 @@ Copy and paste the following into the [button label="controlnode"](tab-0) termin
 tee -a /root/hosts << EOF
 all:
   hosts:
-    rhelvm:
+    vm1:
   vars:
     firewall:
       - service: http
@@ -116,7 +118,7 @@ tee -a /root/firewall.yml <
 all:
   hosts:
-    rhelvm:
+    vm1:
   vars:
     firewall:
       - service: http
@@ -59,7 +61,7 @@ ansible-playbook -i hosts -b firewall.yml
 
 ![applyportopen](../assets/applyportopen.png)
 
-In the [button label="rhelvm"](tab-1) terminal, run `nc`, listening on port 9999.
+In the [button label="vm1"](tab-1) terminal, run `nc`, listening on port 9999.
 
 ```bash,run
 nc -l 9999
@@ -68,7 +70,7 @@ nc -l 9999
 In the [button label="controlnode"](tab-0) terminal, run `nc` and then type some stuff.
 
 ```bash,run
-nc rhelvm 9999
+nc vm1 9999
 ```
 
 ![ncport9999](../assets/ncport9999.png)
diff --git a/firewall-system-role/05-portforward/assignment.md b/firewall-system-role/05-portforward/assignment.md
index efead2d6..f2d53282 100755
--- a/firewall-system-role/05-portforward/assignment.md
+++ b/firewall-system-role/05-portforward/assignment.md
@@ -12,21 +12,23 @@ tabs:
   title: controlnode
   type: terminal
   hostname: controlnode
-  cmd: tmux attach-session -t "firewall-testing"
 - id: nnyy6ah7iqm2
-  title: rhelvm
+  title: vm1
   type: terminal
   hostname: controlnode
-  cmd: tmux attach-session -t "firewall-testing-rhelvm"
+  cmd: ssh -i /root/.ssh/id_rsa -o "StrictHostKeyChecking no" root@vm1
 - id: 3kbmycpyr2no
   title: controlnode Web Console
   type: external
   url: https://controlnode.${_SANDBOX_ID}.instruqt.io:9090
 difficulty: basic
 timelimit: 1
+lab_config:
+  custom_layout: '{"root":{"children":[{"branch":{"size":66,"children":[{"leaf":{"tabs":["2dhre6usylvv","3kbmycpyr2no"],"activeTabId":"2dhre6usylvv","size":49}},{"leaf":{"tabs":["nnyy6ah7iqm2"],"activeTabId":"nnyy6ah7iqm2","size":49}}]}},{"leaf":{"tabs":["assignment"],"activeTabId":"assignment","size":33}}],"orientation":"Horizontal"}}'
+enhanced_loading: null
 ---
 
-In this challenge we'll forward incoming tcp requests to rhelvm on port 9999 to 12345.
+In this challenge we'll forward incoming tcp requests to vm1 on port 9999 to 12345.
 
 In the [button label="controlnode"](tab-0) terminal, add the lines `- forward_port: '9999/tcp;12345;'` and
 `state: enabled`.
@@ -34,7 +36,7 @@ In the [button label="controlnode"](tab-0) terminal, add the lines `- forward_po
 
 all:
   hosts:
-    rhelvm:
+    vm1:
   vars:
     firewall:
       - service: http
@@ -60,7 +62,7 @@ Now run the playbook in the [button label="controlnode"](tab-0) terminal.
 ansible-playbook -i hosts -b firewall.yml
 ```
 
-In the [button label="rhelvm"](tab-1) terminal, run `nc`, listening on port 12345.
+In the [button label="vm1"](tab-1) terminal, run `nc`, listening on port 12345.
 
 ```bash,run
 nc -l 12345
@@ -69,7 +71,7 @@ nc -l 12345
 In the [button label="controlnode"](tab-0) terminal, run `nc` and then type some stuff.
 
 ```bash,run
-nc rhelvm 9999
+nc vm1 9999
 ```
 
 ![ncport9999](../assets/portforward.png)
diff --git a/firewall-system-role/06-reset/assignment.md b/firewall-system-role/06-reset/assignment.md
index 5d11400e..f0334c1b 100755
--- a/firewall-system-role/06-reset/assignment.md
+++ b/firewall-system-role/06-reset/assignment.md
@@ -12,32 +12,34 @@ tabs:
   title: controlnode
   type: terminal
   hostname: controlnode
-  cmd: tmux attach-session -t "firewall-testing"
 - id: bxbcchheqmw7
-  title: rhelvm
+  title: vm1
   type: terminal
   hostname: controlnode
-  cmd: tmux attach-session -t "firewall-testing-rhelvm"
+  cmd: ssh -i /root/.ssh/id_rsa -o "StrictHostKeyChecking no" root@vm1
 - id: aujpxtpak9ps
   title: controlnode Web Console
   type: external
   url: https://controlnode.${_SANDBOX_ID}.instruqt.io:9090
 difficulty: basic
 timelimit: 1
+lab_config:
+  custom_layout: '{"root":{"children":[{"branch":{"size":66,"children":[{"leaf":{"tabs":["f3yybsmkw61s","aujpxtpak9ps"],"activeTabId":"f3yybsmkw61s","size":49}},{"leaf":{"tabs":["bxbcchheqmw7"],"activeTabId":"bxbcchheqmw7","size":49}}]}},{"leaf":{"tabs":["assignment"],"activeTabId":"assignment","size":33}}],"orientation":"Horizontal"}}'
+enhanced_loading: null
 ---
 
 The firewall system role can reset all settings to the default configuration found immediately after Red Hat Enterprise Linux is installed.
 
-We'll reset the firewall configuration in the `rhelvm` host.
+We'll reset the firewall configuration in the `vm1` host.
 
-First, in the [button label="rhelvm"](tab-1) terminal, list the current rules.
+First, in the [button label="vm1"](tab-1) terminal, list the current rules.
 
 ```bash,run
 firewall-cmd --list-all
 ```
 
 
-[root@rhelvm ~]# firewall-cmd --list-all
+[root@vm1 ~]# firewall-cmd --list-all
 public (active)
   target: default
   icmp-block-inversion: no
@@ -61,14 +63,14 @@ In the [button label="controlnode"](tab-0) terminal, we'll create a new host fil
 tee -a /root/reset << EOF
 all:
   hosts:
-    rhelvm:
+    vm1:
   vars:
     firewall:
       - previous: replaced
 EOF
 ```
 
-From the [button label="controlnode"](tab-0) terminal, run the playbook to reset the firewall rules on the `rhelvm` host.
+From the [button label="controlnode"](tab-0) terminal, run the playbook to reset the firewall rules on the `vm1` host.
 
 ```bash,run
 ansible-playbook -i reset -b firewall.yml
@@ -76,14 +78,14 @@ ansible-playbook -i reset -b firewall.yml
 
 ![reset output](../assets/resetplaybook.png)
 
-When the playbook as stopped running, switch to the [button label="rhelvm"](tab-1) terminal and check that the firewall rules have been reset.
+When the playbook as stopped running, switch to the [button label="vm1"](tab-1) terminal and check that the firewall rules have been reset.
 
 ```bash,run
 firewall-cmd --list-all
 ```
 
 
-[root@rhelvm ~]# firewall-cmd --list-all
+[root@vm1 ~]# firewall-cmd --list-all
 public (active)
   target: default
   icmp-block-inversion: no
diff --git a/firewall-system-role/06-reset/solve-rhel b/firewall-system-role/06-reset/solve-rhel
index 69bd17ea..929fe1f0 100644
--- a/firewall-system-role/06-reset/solve-rhel
+++ b/firewall-system-role/06-reset/solve-rhel
@@ -3,13 +3,13 @@
 # This script runs when the platform solve the challenge.
 #
 # The platform determines if the script was successful using the exit code of this
-# script. If the exit code is not 0, the script fails. 
+# script. If the exit code is not 0, the script fails.
 #
 
 tee -a /root/reset << EOF
 all:
   hosts:
-    rhelvm:
+    vm1:
   vars:
     firewall:
       - previous: replaced
diff --git a/firewall-system-role/07-conclusion/assignment.md b/firewall-system-role/07-conclusion/assignment.md
index d8da5b89..81c23a70 100755
--- a/firewall-system-role/07-conclusion/assignment.md
+++ b/firewall-system-role/07-conclusion/assignment.md
@@ -8,18 +8,20 @@ tabs:
   title: controlnode
   type: terminal
   hostname: controlnode
-  cmd: tmux attach-session -t "firewall-testing"
 - id: kncf6nzun9hn
-  title: rhelvm
+  title: vm1
   type: terminal
   hostname: controlnode
-  cmd: tmux attach-session -t "firewall-testing-rhelvm"
+  cmd: ssh -i /root/.ssh/id_rsa -o "StrictHostKeyChecking no" root@vm1
 - id: zvivdjkmn4p3
   title: controlnode Web Console
   type: external
   url: https://controlnode.${_SANDBOX_ID}.instruqt.io:9090
 difficulty: basic
 timelimit: 1
+lab_config:
+  custom_layout: '{"root":{"children":[{"branch":{"size":66,"children":[{"leaf":{"tabs":["lhvd4dcz5tlj","zvivdjkmn4p3"],"activeTabId":"lhvd4dcz5tlj","size":49}},{"leaf":{"tabs":["kncf6nzun9hn"],"activeTabId":"kncf6nzun9hn","size":49}}]}},{"leaf":{"tabs":["assignment"],"activeTabId":"assignment","size":33}}],"orientation":"Horizontal"}}'
+enhanced_loading: null
 ---
 
 For more details on using the firewall system role, please read this blog post: 
diff --git a/firewall-system-role/assets/instruqt-tab.png b/firewall-system-role/assets/instruqt-tab.png
index a8b5296d..7d16b772 100644
Binary files a/firewall-system-role/assets/instruqt-tab.png and b/firewall-system-role/assets/instruqt-tab.png differ
diff --git a/firewall-system-role/assets/runbutton.png b/firewall-system-role/assets/runbutton.png
new file mode 100644
index 00000000..cbacd5e8
Binary files /dev/null and b/firewall-system-role/assets/runbutton.png differ
diff --git a/firewall-system-role/config.yml b/firewall-system-role/config.yml
index 77b65a09..7c44ab61 100644
--- a/firewall-system-role/config.yml
+++ b/firewall-system-role/config.yml
@@ -1,11 +1,11 @@
 version: "3"
 virtualmachines:
 - name: controlnode
-  image: projects/tmm-instruqt-11-26-2021/global/images/virt-rhel-9-4-06-04-24
+  image: projects/tmm-instruqt-11-26-2021/global/images/virt-rhel-9-5-11-29-24
   shell: /bin/bash
   environment:
     TERM: xterm
-  machine_type: n1-standard-2
+  machine_type: n1-standard-4
   allow_external_ingress:
   - http
   - https
diff --git a/firewall-system-role/track.yml b/firewall-system-role/track.yml
index 4dfbd1eb..e77bad50 100755
--- a/firewall-system-role/track.yml
+++ b/firewall-system-role/track.yml
@@ -25,13 +25,12 @@ developers:
 show_timer: true
 skipping_enabled: true
 lab_config:
-  overlay: false
-  width: 33
-  position: right
   feedback_recap_enabled: true
+  feedback_tab_enabled: false
   loadingMessages: true
-  lab_v2: true
+  override_challenge_layout: false
   hideStopButton: false
   default_layout: AssignmentRight
   default_layout_sidebar_size: 33
-checksum: "14698947820330912901"
+checksum: "11275616806288151633"
+enhanced_loading: false
diff --git a/firewall-system-role/track_scripts/cleanup-controlnode b/firewall-system-role/track_scripts/cleanup-controlnode
index 951ee37d..8124f16d 100755
--- a/firewall-system-role/track_scripts/cleanup-controlnode
+++ b/firewall-system-role/track_scripts/cleanup-controlnode
@@ -7,7 +7,7 @@ until [ -f /opt/instruqt/bootstrap/host-bootstrap-completed ]; do
 done
 
 # Ungregister the VM.
-ssh -o "StrictHostKeyChecking no" root@rhelvm subscription-manager unregister
+ssh -o "StrictHostKeyChecking no" root@vm1 subscription-manager unregister
 
 # Unregister the host.
 subscription-manager unregister
\ No newline at end of file
diff --git a/firewall-system-role/track_scripts/setup-controlnode b/firewall-system-role/track_scripts/setup-controlnode
index 13a6455f..44b58450 100755
--- a/firewall-system-role/track_scripts/setup-controlnode
+++ b/firewall-system-role/track_scripts/setup-controlnode
@@ -7,29 +7,12 @@ done
 
 virsh start vm1
 
-subscription-manager config --rhsm.manage_repos=1
 subscription-manager register --activationkey=${ACTIVATION_KEY} --org=12451665 --force
 
-usermod -aG wheel rhel
-echo redhat | passwd --stdin rhel
+dnf install -y nc tmux
 
 echo "${SSHKEY}" > /root/.ssh/id_rsa
 chmod 600 /root/.ssh/id_rsa
 ssh-keygen -f /root/.ssh/id_rsa -y > /root/.ssh/id_rsa.pub
 
-# MAC Addresses
-# vm1:      52:54:00:d6:0c:72
-# centos:   52:54:00:68:79:84
-
-# Get the IP of the VM belonging to vm1 based on arp.
-while ! [ $( arp -an | grep 52:54:00:d6:0c:72 | awk '{print $2}' | tr -d '()')  ]; do echo "Waiting for arp to return rhelvm MAC address."; sleep 1; done;
-echo "$( arp -an | grep 52:54:00:d6:0c:72 | awk '{print $2}' | tr -d '()' ) rhelvm" >> /etc/hosts
-
-TMUX='' tmux new-session -d -s 'firewall-testing'
-tmux set -g pane-border-status top
-tmux setw -g pane-border-format ' #{pane_index} #{pane_current_command}'
-
-while ! ping -c 1 -W 1 rhelvm; do echo "\nWaiting for rhelvm - network interface might be down."; sleep 1; done
-ssh -o "StrictHostKeyChecking no" root@rhelvm subscription-manager register --activationkey=${ACTIVATION_KEY} --org=12451665 --force
-ssh -o "StrictHostKeyChecking no" root@rhelvm "nmcli dev con enp1s0"
-TMUX='' tmux new-session -d -s 'firewall-testing-rhelvm' 'ssh -o "StrictHostKeyChecking no" root@rhelvm; clear'
\ No newline at end of file
+(r=3;while ! ssh -i /root/.ssh/id_rsa -o "StrictHostKeyChecking no" root@vm1 "subscription-manager register --activationkey=${ACTIVATION_KEY} --org=12451665 --force" ; do ((--r))||exit;sleep 30;done)
diff --git a/imagebuilder-service/05-virt-customize/assignment.md b/imagebuilder-service/05-virt-customize/assignment.md
index 2273b1ee..aa9bdc63 100755
--- a/imagebuilder-service/05-virt-customize/assignment.md
+++ b/imagebuilder-service/05-virt-customize/assignment.md
@@ -43,7 +43,7 @@ virt-customize -a ./composer-api-ee3492f7-5d95-4c1b-a223-bbf04b9adef4-disk.qcow2
 [  13.3] Finishing off
 
-`virt-customize` will also let us copy files in place. and set permissions. Let's say we've got a sudoers drop-in we'd like in place on all of our systems. In your home directory is a drop-in to allow users in the `superusers` group to control the `sshd` service. +`virt-customize` will also let us copy files in place and set permissions. Let's say we've got a sudoers drop-in we'd like in place on all of our systems. In your home directory is a drop-in to allow users in the `superusers` group to control the `sshd` service. ```bash,run virt-customize -a ./composer-api-ee3492f7-5d95-4c1b-a223-bbf04b9adef4-disk.qcow2 --copy-in superusers:/etc/sudoers.d/ diff --git a/imagebuilder-service/config.yml b/imagebuilder-service/config.yml index f91dad62..41aa18b7 100644 --- a/imagebuilder-service/config.yml +++ b/imagebuilder-service/config.yml @@ -4,7 +4,7 @@ virtualbrowsers: url: https://console.redhat.com virtualmachines: - name: rhel - image: projects/tmm-instruqt-11-26-2021/global/images/virt-rhel-9-5-11-26-24 + image: projects/tmm-instruqt-11-26-2021/global/images/virt-rhel-9-5-11-29-24 shell: /bin/bash environment: TERM: xterm diff --git a/imagebuilder-service/track.yml b/imagebuilder-service/track.yml index 0ba56f28..6c9d70df 100644 --- a/imagebuilder-service/track.yml +++ b/imagebuilder-service/track.yml @@ -31,5 +31,5 @@ lab_config: hideStopButton: false default_layout: AssignmentRight default_layout_sidebar_size: 25 -checksum: "15666382733919002836" +checksum: "6930911366921063741" enhanced_loading: false diff --git a/in-place-upgrades/01-install-leapp/assignment.md b/in-place-upgrades/01-install-leapp/assignment.md index f78663c8..604a0d77 100755 --- a/in-place-upgrades/01-install-leapp/assignment.md +++ b/in-place-upgrades/01-install-leapp/assignment.md @@ -30,6 +30,7 @@ tabs: hostname: host cmd: ssh -o "StrictHostKeyChecking no" root@rhel07 difficulty: basic +enhanced_loading: null --- What is Leapp? === diff --git a/in-place-upgrades/02-preupgrade-assistant/assignment.md b/in-place-upgrades/02-preupgrade-assistant/assignment.md index 39d903e8..629ad109 100755 --- a/in-place-upgrades/02-preupgrade-assistant/assignment.md +++ b/in-place-upgrades/02-preupgrade-assistant/assignment.md @@ -10,6 +10,7 @@ tabs: hostname: host cmd: ssh -o "StrictHostKeyChecking no" root@rhel07 difficulty: basic +enhanced_loading: null --- Running the pre-upgrade assistant and resolving issues === diff --git a/in-place-upgrades/03-fixing-inhibitor/assignment.md b/in-place-upgrades/03-fixing-inhibitor/assignment.md index 6a093758..a9ba1bb0 100755 --- a/in-place-upgrades/03-fixing-inhibitor/assignment.md +++ b/in-place-upgrades/03-fixing-inhibitor/assignment.md @@ -10,6 +10,7 @@ tabs: hostname: host cmd: ssh -o "StrictHostKeyChecking no" root@rhel07 difficulty: basic +enhanced_loading: null --- You saw in the last step how Leapp produced an error. In this scenario, PAM modules are not in use. It is therefore safe to skip this check. To do so, replace the commented line `# confirm =` with a true statement. diff --git a/in-place-upgrades/04-upgrading/assignment.md b/in-place-upgrades/04-upgrading/assignment.md index 5f211480..18f17bc9 100755 --- a/in-place-upgrades/04-upgrading/assignment.md +++ b/in-place-upgrades/04-upgrading/assignment.md @@ -4,24 +4,47 @@ id: poqkilv0g3m5 type: challenge title: Running the Upgrade tabs: -- id: dwbffvdxzmee - title: RHEL +- id: iykrogagoxod + title: Serial Port type: terminal hostname: host - cmd: ssh -o "StrictHostKeyChecking no" root@rhel07 -- id: 3ugfxcwzdzpv - title: RHEL Web Console - type: browser - hostname: webconsole + cmd: virsh console rhel07 difficulty: basic +enhanced_loading: null --- -# Running the upgrade +Log into the serial port console +=== + +This challenge will be run from the `Serial Port` tab which is a serial port console. + +Hit enter on your keyboard to bring up the login prompt. + +Login as the user `rhel`. + +```bash,run +rhel +``` + +Enter the password `redhat`. + +```bash,run +redhat +``` + +Change to the super user account. + +```bash,run +sudo -i +``` + +Run the upgrade +=== Now that you have verified the RHEL system meets all the expected conditions, it is time to kick off the upgrade process: Note: This process will take awhile.) ```bash,run -leapp upgrade --target 8.10 +leapp upgrade --target 8.10 --reboot ```
@@ -54,76 +77,28 @@ A report has been generated at /var/log/leapp/leapp-report.txt
 Answerfile has been generated at /var/log/leapp/answerfile
 
->**Disclaimer:** -The Leapp process can take upwards of 15 minutes to run. - - - -If you would like to proceed with the lab without waiting for the upgrade to complete, click on the `Upgraded RHEL` tab and continue in that terminal. You can skip the reboot step below. Proceed to the step `Verifying the upgrade` below. +Verify the upgrade +=== +Once the new initramfs image is in place, package updates run, and SELinux relabel completion, the system will perform one final reboot. -Rebooting the upgaded host. -=========================== -A reboot is required for the RHEL 8-based initial RAM disk image (initramfs), upgrades all packages and automatically reboots to the RHEL 8 system. +Once that is done, you must log into the system's terminal. ->**Pro Tip:** You can combine these two steps with the --reboot option -`leapp upgrade --target 8.9 --reboot` +Log in with this username. ```bash,run -reboot -``` - -Now, leapp is performing several actions inside a temporary environment. This includes creating a new initramfs image, relabeling SELinux contexts, and well as cleaning up any remaining RHEL 7 packages. The reboot process can take up to 15 minutes. The `Optional step` below shows how you can view the reboot/upgrade process. - -Verifying Reboot (Optional) -============= -This step is optional but it may provide insight into the upgrade process. This lab provides a web console UI to the virtual machine host. You can log into the web UI to view the upgrade process after `reboot` has been executed. - -Click on [button label="RHEL Web Console"](tab-1) to log into the web UI. - -![web console tab](../assets/rhelwebconsoletab.png) - -Use the following credentials to log into the web console. - -Username -``` rhel ``` -Password -``` +Enter this password. +```bash,run redhat ``` -![web ui login](../assets/webuilogin.png) - -Next, give yourself administrative access by clicking on the button `Turn on administrative access` and entering the password `redhat` again. - -![admin](../assets/adminaccess.png) - -Navigate to `Virtual machines` - -![vms](../assets/virtualmachines.png) - -Click on `rhel07` -![rhel07](../assets/rhel07.png) - -You can now view the upgrade process in the console window. - -![console](../assets/console.png) - -Please continue to `Verifying the upgrade` below. - -Verifying the upgrade -===================== -Once the new initramfs image is in place, package updates run, and SELinux relabel completion, the system will perform one final reboot. - -Refresh the Instruqt console to log back into your host, by clicking the button shown below. - -![console](../assets/refreshtheconsole.png) +Finally, we will verify the update was successful by looking at the release file we referenced earlier in the lab: -Once that is done, you will be logged into the system's terminal once more. Finally, we will verify the update was successful by looking at the release file we referenced earlier in the lab: +Run the following command in the `RHEL` terminal. ```bash,run cat /etc/redhat-release diff --git a/in-place-upgrades/config.yml b/in-place-upgrades/config.yml index 620807ed..04626c7f 100644 --- a/in-place-upgrades/config.yml +++ b/in-place-upgrades/config.yml @@ -4,11 +4,11 @@ virtualbrowsers: url: https://host.${_SANDBOX_ID}.instruqt.io:9090 virtualmachines: - name: host - image: projects/tmm-instruqt-11-26-2021/global/images/virt-rhel-9-4-06-04-24 + image: projects/tmm-instruqt-11-26-2021/global/images/virt-rhel-9-5-11-29-24 shell: /bin/bash environment: TERM: xterm - machine_type: n2-standard-2 + machine_type: n1-standard-4 allow_external_ingress: - http - https diff --git a/in-place-upgrades/track.yml b/in-place-upgrades/track.yml index 8ff17bfd..98996042 100644 --- a/in-place-upgrades/track.yml +++ b/in-place-upgrades/track.yml @@ -31,10 +31,14 @@ developers: show_timer: true timelimit: 3060 lab_config: - overlay: false - width: 33 - position: right feedback_recap_enabled: true + feedback_tab_enabled: false + feedback_tab_enabled: false loadingMessages: true + override_challenge_layout: false + override_challenge_layout: false hideStopButton: false -checksum: "1466124477719047027" + default_layout: AssignmentRight + default_layout_sidebar_size: 33 +checksum: "13672482477776544322" +enhanced_loading: false diff --git a/in-place-upgrades/track_scripts/setup-host b/in-place-upgrades/track_scripts/setup-host index 02e71968..a579b339 100644 --- a/in-place-upgrades/track_scripts/setup-host +++ b/in-place-upgrades/track_scripts/setup-host @@ -11,58 +11,7 @@ echo "${SSHKEY}" > /root/.ssh/id_rsa chmod 600 /root/.ssh/id_rsa ssh-keygen -f /root/.ssh/id_rsa -y > /root/.ssh/id_rsa.pub -usermod -aG wheel rhel +# Attempt to register the vm 3 times, waiting 30 seconds for each attempt. +(r=3;while ! ssh -i /root/.ssh/id_rsa -o "StrictHostKeyChecking no" root@rhel07 "subscription-manager register --activationkey=${ACTIVATION_KEY} --org=12451665 --force" ; do ((--r))||exit;sleep 30;done) -# MAC Addresses -# vm1: 52:54:00:d6:0c:72 -# centos: 52:54:00:68:79:84 -# rhel07: 52:54:00:02:ce:bb -# rhel08: 52:54:00:43:26:d3 -# rhel09: 52:54:00:7f:e1:4e - - -# Get the IP of the VM belonging to vm1 based on arp. -while ! [ $( arp -an | grep 52:54:00:02:ce:bb | awk '{print $2}' | tr -d '()' ) ]; do echo "Waiting for arp to return rhel07 MAC address."; sleep 10; done; -echo "$( arp -an | grep 52:54:00:02:ce:bb | awk '{print $2}' | tr -d '()' ) rhel07" >> /etc/hosts - -usermod -aG wheel rhel -echo redhat | passwd --stdin rhel - -while ! ping -c 1 -W 1 rhel07; do echo "Waiting for rhel07 - network interface might be down."; sleep 10; done; - -ssh -i /root/.ssh/id_rsa -o "StrictHostKeyChecking no" root@rhel07 "subscription-manager register --activationkey=${ACTIVATION_KEY} --org=12451665 --force" - -# set up SSL for certificate signing -subscription-manager register --activationkey=${ACTIVATION_KEY} --org=12451665 --force - -#check web console url for certificate -echo https://${HOSTNAME}.${_SANDBOX_ID}.instruqt.io:9090 - -#also go ahead and echo it to a text file as well just for good measure -echo https://${HOSTNAME}.${_SANDBOX_ID}.instruqt.io:9090 >> ~/webconsoleurl.txt - -# Enable EPEL for RHEL 9 -subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms -dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm - -#install necessary components -dnf install -y certbot python3-certbot-nginx - -#ensure certbot is successfully installed -certbot --version - -#stop the process that is using TCP port 80; we need that port open for certbot -fuser -k 80/tcp - -#request our certificate -certbot certonly --standalone --preferred-challenges http -d ${HOSTNAME}.${INSTRUQT_PARTICIPANT_ID}.instruqt.io --non-interactive --agree-tos -m trackbot@instruqt.com -v - -#configure our certificate for the web console (copy it into the cockpit certificate folder) -cat /etc/letsencrypt/live/${HOSTNAME}.${INSTRUQT_PARTICIPANT_ID}.instruqt.io/cert.pem >> /etc/cockpit/ws-certs.d/certificate.cert -cat /etc/letsencrypt/live/${HOSTNAME}.${INSTRUQT_PARTICIPANT_ID}.instruqt.io/privkey.pem >> /etc/cockpit/ws-certs.d/certificate.cert - -#remove the old self-signed certificates -rm /etc/cockpit/ws-certs.d/0* - -#restart cockpit to apply the changs -systemctl restart cockpit +ssh -i /root/.ssh/id_rsa -o "StrictHostKeyChecking no" root@rhel07 "sed -i 's/^# %wheel.*/%wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers" \ No newline at end of file diff --git a/networking-basics/01-introduction/assignment.md b/networking-basics/01-introduction/assignment.md index ae14bcd1..b9395fd0 100755 --- a/networking-basics/01-introduction/assignment.md +++ b/networking-basics/01-introduction/assignment.md @@ -32,6 +32,7 @@ tabs: type: external url: https://host1.${_SANDBOX_ID}.instruqt.io:9090 difficulty: basic +enhanced_loading: null --- What is NetworkManager? === diff --git a/networking-basics/02-installnmstate/assignment.md b/networking-basics/02-installnmstate/assignment.md index 025328bb..29b63bd2 100755 --- a/networking-basics/02-installnmstate/assignment.md +++ b/networking-basics/02-installnmstate/assignment.md @@ -13,6 +13,7 @@ tabs: type: terminal hostname: host1 difficulty: basic +enhanced_loading: null --- What is nmstate? === diff --git a/networking-basics/03-dhcpconfig/assignment.md b/networking-basics/03-dhcpconfig/assignment.md index 2fd4ed07..60d59d37 100755 --- a/networking-basics/03-dhcpconfig/assignment.md +++ b/networking-basics/03-dhcpconfig/assignment.md @@ -13,6 +13,7 @@ tabs: type: terminal hostname: host1 difficulty: basic +enhanced_loading: null --- Dynamic IP configuration with DHCP === diff --git a/networking-basics/04-staticconfig/assignment.md b/networking-basics/04-staticconfig/assignment.md index f269b545..370e96e3 100755 --- a/networking-basics/04-staticconfig/assignment.md +++ b/networking-basics/04-staticconfig/assignment.md @@ -13,6 +13,7 @@ tabs: type: terminal hostname: host1 difficulty: basic +enhanced_loading: null --- Static IP configuration === diff --git a/networking-basics/05-activateconnection/assignment.md b/networking-basics/05-activateconnection/assignment.md index 83cd19bf..3b79915c 100755 --- a/networking-basics/05-activateconnection/assignment.md +++ b/networking-basics/05-activateconnection/assignment.md @@ -13,6 +13,7 @@ tabs: type: terminal hostname: host1 difficulty: basic +enhanced_loading: null --- Activating the connection === diff --git a/networking-basics/06-configdns/assignment.md b/networking-basics/06-configdns/assignment.md index 3d2fdeb4..8b79af38 100755 --- a/networking-basics/06-configdns/assignment.md +++ b/networking-basics/06-configdns/assignment.md @@ -9,6 +9,7 @@ tabs: type: terminal hostname: host1 difficulty: basic +enhanced_loading: null --- Configuring DNS === diff --git a/networking-basics/config.yml b/networking-basics/config.yml index 1349b72c..09f14759 100644 --- a/networking-basics/config.yml +++ b/networking-basics/config.yml @@ -1,11 +1,11 @@ version: "3" virtualmachines: - name: host1 - image: projects/tmm-instruqt-11-26-2021/global/images/virt-rhel-9-4-06-04-24 + image: projects/tmm-instruqt-11-26-2021/global/images/virt-rhel-9-5-11-29-24 shell: /bin/bash environment: TERM: xterm - machine_type: n1-standard-2 + machine_type: n1-standard-4 allow_external_ingress: - http - https diff --git a/networking-basics/track.yml b/networking-basics/track.yml index 282c9a8c..317f4b73 100755 --- a/networking-basics/track.yml +++ b/networking-basics/track.yml @@ -29,10 +29,11 @@ developers: show_timer: true timelimit: 3000 lab_config: - overlay: false - width: 25 - position: right feedback_recap_enabled: true + feedback_tab_enabled: false loadingMessages: true hideStopButton: false -checksum: "10870154030118367799" + default_layout: AssignmentRight + default_layout_sidebar_size: 25 +checksum: "405929616339159266" +enhanced_loading: false diff --git a/networking-basics/track_scripts/setup-host1 b/networking-basics/track_scripts/setup-host1 index 96e5d393..7aaddadd 100755 --- a/networking-basics/track_scripts/setup-host1 +++ b/networking-basics/track_scripts/setup-host1 @@ -5,54 +5,24 @@ do sleep 1 done -# systemctl enable --now cockpit.socket - virsh start vm1 -subscription-manager config --rhsm.manage_repos=1 subscription-manager register --activationkey=${ACTIVATION_KEY} --org=12451665 --force -echo "Adding wheel" > /root/post-run.log -usermod -aG wheel rhel - -echo "setting password" >> /root/post-run.log -echo redhat | passwd --stdin rhel - -dnf install -y nc - -systemctl enable --now libvirtd - +dnf install -y nc tmux -echo "${SSHKEY}" > r4ekey -chmod 600 r4ekey +echo "${SSHKEY}" > /root/.ssh/id_rsa +chmod 600 /root/.ssh/id_rsa +ssh-keygen -f /root/.ssh/id_rsa -y > /root/.ssh/id_rsa.pub -# MAC Addresses -# vm1: 52:54:00:d6:0c:72 -# centos: 52:54:00:68:79:84 -# converted: 52:54:00:87:d3:fc -# rhel07: 52:54:00:02:ce:bb -# rhel08: 52:54:00:43:26:d3 -# rhel09: 52:54:00:7f:e1:4e -# upgraded08: 52:54:00:22:37:93 -# upgraded09: 52:54:00:e6:14:ee - -# Get the IP of the VM belonging to cento based on arp. -while ! [ $( arp -an | grep 52:54:00:d6:0c:72| awk '{print $2}' | tr -d '()' ) ]; do echo "Waiting for arp to return vm1 MAC address."; sleep 10; done; -echo "$( arp -an | grep 52:54:00:d6:0c:72| awk '{print $2}' | tr -d '()' ) vm1" >> /etc/hosts - -#while ! ping -c 1 -W 1 vm1; do echo "Waiting for vm1 - network interface might be down."; sleep 10; done; +(r=3;while ! ssh -i /root/.ssh/id_rsa -o "StrictHostKeyChecking no" root@vm1 "subscription-manager register --activationkey=${ACTIVATION_KEY} --org=12451665 --force" ; do ((--r))||exit;sleep 30;done) virsh attach-interface --domain vm1 --type network --source default --model virtio -while ! ping -c 1 -W 1 vm1; do echo "Waiting for vm1 - network interface might be down..."; sleep 1; done - -ssh -o "StrictHostKeyChecking no" -i r4ekey root@vm1 subscription-manager register --activationkey=${ACTIVATION_KEY} --org=12451665 --force - -TMUX='' tmux new-session -d -s 'networking-setup' ssh -i r4ekey root@vm1; clear > /dev/null 2>&1 +TMUX='' tmux new-session -d -s 'networking-setup' ssh -i /root/.ssh/id_rsa -o "StrictHostKeyChecking no" root@vm1; clear > /dev/null 2>&1 tmux set -g pane-border-status top tmux setw -g pane-border-format ' #{pane_index} #{pane_current_command}' -ssh -i r4ekey root@vm1 'nmcli connection delete Wired\ connection\ 1' -ssh -i r4ekey root@vm1 'subscription-manager register --activationkey=${ACTIVATION_KEY} --org=12451665 --force' +ssh -i /root/.ssh/id_rsa -o "StrictHostKeyChecking no" root@vm1 'nmcli connection delete Wired\ connection\ 1' cat >> ~/.bashrc <<-EOF session_name="networking-setup" @@ -62,4 +32,4 @@ if [[ -z "$TMUX" ]]; then else tmux switch-client -t "$session_name" > /dev/null 2>&1 fi -EOF \ No newline at end of file +EOF diff --git a/stratis/01-install-stratis/assignment.md b/stratis/01-install-stratis/assignment.md index 99f7b870..c2d20bf9 100644 --- a/stratis/01-install-stratis/assignment.md +++ b/stratis/01-install-stratis/assignment.md @@ -18,6 +18,7 @@ tabs: type: external url: https://rhel.${_SANDBOX_ID}.instruqt.io:9090 difficulty: basic +enhanced_loading: null --- In this challenge, we'll install Stratis. diff --git a/stratis/02-manage-storage/assignment.md b/stratis/02-manage-storage/assignment.md index e630205c..8c67405f 100644 --- a/stratis/02-manage-storage/assignment.md +++ b/stratis/02-manage-storage/assignment.md @@ -18,6 +18,7 @@ tabs: type: external url: https://rhel.${_SANDBOX_ID}.instruqt.io:9090 difficulty: basic +enhanced_loading: null --- List the pseudo block devices ============================= diff --git a/stratis/03-manage-filesystem/assignment.md b/stratis/03-manage-filesystem/assignment.md index 493a4a23..c591c33c 100644 --- a/stratis/03-manage-filesystem/assignment.md +++ b/stratis/03-manage-filesystem/assignment.md @@ -18,6 +18,7 @@ tabs: type: external url: https://rhel.${_SANDBOX_ID}.instruqt.io:9090 difficulty: basic +enhanced_loading: null --- Create a filesystem =================== diff --git a/stratis/04-manage-snapshots/assignment.md b/stratis/04-manage-snapshots/assignment.md index d040b72e..568b0bc7 100644 --- a/stratis/04-manage-snapshots/assignment.md +++ b/stratis/04-manage-snapshots/assignment.md @@ -18,6 +18,7 @@ tabs: type: external url: https://rhel.${_SANDBOX_ID}.instruqt.io:9090 difficulty: basic +enhanced_loading: null --- Create a snapshot ================= diff --git a/stratis/config.yml b/stratis/config.yml index ee162da6..3b5c2298 100644 --- a/stratis/config.yml +++ b/stratis/config.yml @@ -1,7 +1,7 @@ version: "3" virtualmachines: - name: rhel - image: projects/tmm-instruqt-11-26-2021/global/images/virt-rhel-9-4-06-04-24 + image: projects/tmm-instruqt-11-26-2021/global/images/rhel-9-5-11-27-24 shell: /bin/bash environment: TERM: xterm diff --git a/stratis/track.yml b/stratis/track.yml index 6f4d0ca3..4aaee062 100755 --- a/stratis/track.yml +++ b/stratis/track.yml @@ -1,6 +1,6 @@ slug: stratis id: sxgqw12euntx -title: Configure Stratis with the cli +title: Configure Stratis with the command line interface description: |- This lab is intended to provide an introduction to using Stratis, @@ -30,10 +30,11 @@ show_timer: true skipping_enabled: true timelimit: 3060 lab_config: - overlay: false - width: 33 - position: right feedback_recap_enabled: true + feedback_tab_enabled: false loadingMessages: true hideStopButton: false -checksum: "18049535970445622798" + default_layout: AssignmentRight + default_layout_sidebar_size: 33 +checksum: "6161574547896302378" +enhanced_loading: false