diff --git a/content/antora.yml b/content/antora.yml index e4b2845..f8824e4 100644 --- a/content/antora.yml +++ b/content/antora.yml @@ -6,7 +6,7 @@ nav: asciidoc: attributes: - lab_name: "I'm the lab_name var" + lab_name: "OpenShift Virtualization: Troubleshooting common issues" release-version: master page-pagination: true my_var: "foo" diff --git a/content/modules/ROOT/nav.adoc b/content/modules/ROOT/nav.adoc index dd66021..0780d4d 100644 --- a/content/modules/ROOT/nav.adoc +++ b/content/modules/ROOT/nav.adoc @@ -1,7 +1,17 @@ -* xref:module-01.adoc[1. RPM Native Container] -** xref:module-01.adoc#repositories[Repositories] -** xref:module-01.adoc#software[Software] +* xref:lab-environment.adoc[Lab Environment] -* xref:module-02.adoc[2. GitHub Sourced Container] -** xref:module-02.adoc#prerequisites[Install Prerequisites] -** xref:module-02.adoc#container[Enable Container] +* xref:exercise1-break.adoc[1. Virtual Machine is not starting] +** xref:exercise1-break.adoc#break[Break the exercise] +** xref:exercise1-check.adoc#check[Check your work] + +* xref:exercise2-break.adoc[2. Virtual Machine Pending] +** xref:exercise2-break.adoc#break[Break the exercise] +** xref:exercise2-check.adoc#check[Check your work] + +* xref:exercise3-break.adoc[3. Application is not being accessed externally] +** xref:exercise3-break.adoc#break[Break the exercise] +** xref:exercise3-check.adoc#check[Check your work] + +* xref:exercise4-break.adoc[4. Virtual Machine with performance degraded] +** xref:exercise4-fix.adoc#break[Break the exercise] +** xref:exercise4-check.adoc#check[Check your work] \ No newline at end of file diff --git a/content/modules/ROOT/pages/module-01.adoc b/content/modules/ROOT/pages/exercise-example.adoc similarity index 94% rename from content/modules/ROOT/pages/module-01.adoc rename to content/modules/ROOT/pages/exercise-example.adoc index 880800c..fbaf8d1 100644 --- a/content/modules/ROOT/pages/module-01.adoc +++ b/content/modules/ROOT/pages/exercise-example.adoc @@ -1,6 +1,10 @@ -= Building an Application with rpms += Check your work -== Downloading the UBI +[#scenario] +== Scenario + +The primary goal in this lab is to investigate the cause of the failure and take corrective action to bring `exercise1` virtual machine online again. +Your task is to identify the root cause and resolve the issue. In this lab, you will be installing software into the container image running as an interactive application. To do this you will diff --git a/content/modules/ROOT/pages/exercise1-break.adoc b/content/modules/ROOT/pages/exercise1-break.adoc new file mode 100644 index 0000000..6d01bbe --- /dev/null +++ b/content/modules/ROOT/pages/exercise1-break.adoc @@ -0,0 +1,21 @@ +[#scenario] += Virtual Machine is not starting + +== Scenario + +The primary goal in this scenario is to investigate the cause of the failure and take corrective action to bring `exercise1` virtual machine `Running` state again. +Your task is to identify the root cause and resolve the issue. + +== Executing the lab script + +In this exercise setup, you first need to access the bastion trough `bastion_url` to gain entry into the lab environment. From the terminal, access SSH the node `bastion_url` using `userX` (where X is the number of your user) + +``` +ssh userX@bastion_url +``` + +Once connected to the bastion host run the command lab to break the lab. + +``` +lab break exercise1 +``` \ No newline at end of file diff --git a/content/modules/ROOT/pages/exercise1-check.adoc b/content/modules/ROOT/pages/exercise1-check.adoc new file mode 100644 index 0000000..8129429 --- /dev/null +++ b/content/modules/ROOT/pages/exercise1-check.adoc @@ -0,0 +1,8 @@ +[#check] += Check your work on exercise1 + +To check you work exercute the `grade` lab. + +``` +lab grade exercise1 +``` diff --git a/content/modules/ROOT/pages/exercise1-guided.adoc b/content/modules/ROOT/pages/exercise1-guided.adoc new file mode 100644 index 0000000..70afd03 --- /dev/null +++ b/content/modules/ROOT/pages/exercise1-guided.adoc @@ -0,0 +1,21 @@ +[#fix] += Fix Virtual Machine is not starting + +== Scenario + +The primary goal in this scenario is to investigate the cause of the failure and take corrective action to bring `exercise1` virtual machine online again. +Your task is to identify the root cause and resolve the issue. + +== Executing the lab script + +In this exercise setup, you first need to access the bastion trough `bastion_url` to gain entry into the lab environment. From the terminal, access SSH the node `bastion_url` using `userX` (where X is the number of your user) + +``` +ssh userX@bastion_url +``` + +Once connected to the bastion host run the command lab to break the lab. + +``` +lab break exercise1 +``` \ No newline at end of file diff --git a/content/modules/ROOT/pages/exercise2-break.adoc b/content/modules/ROOT/pages/exercise2-break.adoc new file mode 100644 index 0000000..cba4953 --- /dev/null +++ b/content/modules/ROOT/pages/exercise2-break.adoc @@ -0,0 +1,20 @@ +[#scenario] += Virtual Machine is with status Pending + +== Scenario + +The primary goal in this scenario is to investigate the cause of the failure and take corrective action to bring `exercise2` virtual machine online again. +Your task is to identify the root cause and resolve the issue. + +== Executing the lab script + +In this exercise setup, you first need to access the bastion trough `bastion_url` to gain entry into the lab environment. From the terminal, access SSH the node `bastion_url` using `userX` (where X is the number of your user) + +``` +ssh userX@bastion_url +``` + +Once connected to the bastion host run the command lab to break the lab. + +``` +lab break exercise2 \ No newline at end of file diff --git a/content/modules/ROOT/pages/exercise2-check.adoc b/content/modules/ROOT/pages/exercise2-check.adoc new file mode 100644 index 0000000..51ddc26 --- /dev/null +++ b/content/modules/ROOT/pages/exercise2-check.adoc @@ -0,0 +1,8 @@ +[#check] += Check your work on exercise2 + +To check you work exercute the `grade` lab. + +``` +lab grade exercise2 +``` \ No newline at end of file diff --git a/content/modules/ROOT/pages/exercise2-guided.adoc b/content/modules/ROOT/pages/exercise2-guided.adoc new file mode 100644 index 0000000..eb0d378 --- /dev/null +++ b/content/modules/ROOT/pages/exercise2-guided.adoc @@ -0,0 +1,4 @@ +[#fix] += Fix Virtual Machine is not starting + +== Scenario \ No newline at end of file diff --git a/content/modules/ROOT/pages/exercise3-break.adoc b/content/modules/ROOT/pages/exercise3-break.adoc new file mode 100644 index 0000000..db50b35 --- /dev/null +++ b/content/modules/ROOT/pages/exercise3-break.adoc @@ -0,0 +1,4 @@ +[#scenario] += Application is not being accessed externally + +== Scenario \ No newline at end of file diff --git a/content/modules/ROOT/pages/exercise3-check.adoc b/content/modules/ROOT/pages/exercise3-check.adoc new file mode 100644 index 0000000..cb0459a --- /dev/null +++ b/content/modules/ROOT/pages/exercise3-check.adoc @@ -0,0 +1,8 @@ +[#check] += Check your work on exercise3 + +To check you work exercute the `grade` lab. + +``` +lab grade exercise3 +``` \ No newline at end of file diff --git a/content/modules/ROOT/pages/exercise3-guided.adoc b/content/modules/ROOT/pages/exercise3-guided.adoc new file mode 100644 index 0000000..3a3edb5 --- /dev/null +++ b/content/modules/ROOT/pages/exercise3-guided.adoc @@ -0,0 +1,4 @@ +[#fix] += Fix Application is not being accessed externally + +== Scenario \ No newline at end of file diff --git a/content/modules/ROOT/pages/exercise4-break.adoc b/content/modules/ROOT/pages/exercise4-break.adoc new file mode 100644 index 0000000..ecbf4e4 --- /dev/null +++ b/content/modules/ROOT/pages/exercise4-break.adoc @@ -0,0 +1,4 @@ +[#scenario] += Virtual Machine with performance degraded + +== Scenario \ No newline at end of file diff --git a/content/modules/ROOT/pages/exercise4-check.adoc b/content/modules/ROOT/pages/exercise4-check.adoc new file mode 100644 index 0000000..81ec0a4 --- /dev/null +++ b/content/modules/ROOT/pages/exercise4-check.adoc @@ -0,0 +1,8 @@ +[#check] += Check your work on exercise4 + +To check you work exercute the `grade` lab. + +``` +lab grade exercise4 +``` \ No newline at end of file diff --git a/content/modules/ROOT/pages/exercise4-guided.adoc b/content/modules/ROOT/pages/exercise4-guided.adoc new file mode 100644 index 0000000..28ae462 --- /dev/null +++ b/content/modules/ROOT/pages/exercise4-guided.adoc @@ -0,0 +1,4 @@ +[#fix] += Virtual Machine with performance degraded + +== Scenario \ No newline at end of file diff --git a/content/modules/ROOT/pages/lab-environment.adoc b/content/modules/ROOT/pages/lab-environment.adoc new file mode 100644 index 0000000..4d3cd5c --- /dev/null +++ b/content/modules/ROOT/pages/lab-environment.adoc @@ -0,0 +1,4 @@ += Lab Environment + +[#lab] +== Lab description diff --git a/content/modules/ROOT/pages/module-02.adoc b/content/modules/ROOT/pages/module-02.adoc deleted file mode 100644 index f92086a..0000000 --- a/content/modules/ROOT/pages/module-02.adoc +++ /dev/null @@ -1,138 +0,0 @@ -= Managing an Application from GitHub - -In the first half of this workshop, we packaged an application into this portable container format manually using rpms. -In the second half, we will consider that you may want to manage software from GitHub or some kind of software versioning application. -Rather than installing rpms, we have individual software files and pull them out of that version control into a group of systems. - -== Install RHEL 8 UBI - -In this lab, we will be using a different Red Hat Enterprise Linux version in my container. - -. Verify the host system release - -+ -[source,bash] ----- -cat /etc/redhat-release ----- -+ -NOTE: The `bastion` system is Red Hat Enterprise Linux 9, and when you built the previous container, you used the UBI9 image. This means both the image and the container were built off the same Red Hat Enterprise Linux packages. - -. As we did previously in this lab, Use `buildah from` to pull down the Red Hat Enterprise Linux 8 UBI. - -+ -[source,bash] ----- -buildah from registry.access.redhat.com/ubi8/ubi ----- - -NOTE: Because you already pulled one image named `ubi-working-container` this one is called `ubi-working-container-1`. - -[#prerequisites] -== Install Prerequisites - -Now that you have a working container, you will use the same process as before installing all the prerequisites, changing config files, and manipulating the contents of this container to be in the desired state. - -The software you will install is a JavaScript-based game that runs on a web browser. As before in the lab, use dnf to install software inside the container. - -. Use `buildah run` and install Apache (`httpd`) into the `ubi-working-container-1` container. -+ -[source,bash] ----- -buildah run ubi-working-container-1 -- dnf -y install httpd ----- - -== Enable Service - -The next thing to do is to use a systemctl to enable the service. The ubi-init provides full systemd service to the container. -This will start up any of the services that are enabled. - -. Enable the `httpd` service using `buildah run` - -+ -[source,bash] ----- -buildah run ubi-working-container-1 -- systemctl enable httpd ----- - -NOTE: The UBI standard image doesn't have systemd installed on it by default. The `ubi-init` container image does include systemd. Plan accordingly to which image you use to build applications. - -== Explore Source Materials - -A GitHub repository has already been synchronized to `/home/devops/clumsy-bird/` This repository contains the configurations for your application. - -. Verify the repository is cloned inside the `/home/devops/` directory -+ -[source,bash] ----- -cd /home/devops/ ----- - -+ -[source,bash] ----- -git clone https://github.com/ellisonleao/clumsy-bird ----- -+ -NOTE: The output states that the software has already been checked out. -+ -. Explore the JavaScript contents, index files, and everything else that we need for this web-based JavaScript software. -+ -[source,bash,role=execute] ----- -ls clumsy-bird ----- - -== Add Source Materials to Container - -. Now that you have verified the source materials exist, you will put the software inside of my container image using the `buildah copy` command. -+ -[source,bash] ----- -buildah copy ubi-working-container-1 clumsy-bird /var/www/html ----- - -[#container] -== Enable Container in Background - -In the previous section of this lab, you ran the game natively through interactive mode. Because you are now building a web application you will need to run the container in the background and access it through a web address. - -. Execute `buildah config` to specify a port and initialize the container. - -+ -[source,bash] ----- -buildah config --port 80 --cmd "/usr/sbin/init" ubi-working-container-1 ----- - -NOTE: The command makes a configuration change to this container. I'm configuring this container to accept connections to its port 80. When the container starts up, it should run the init command, which, in this case, is going to be the Apache daemon right from earlier when I enabled it. - -== Commit Container and Deploy - -. Now that we have a container in a working configured state, it is time to make that permanent by committing it to a container image called `clumsy-bird` -+ -[source,bash] ----- -buildah commit ubi-working-container-1 clumsy-bird ----- - -. Verify that the image was created with `podman` -+ -[source,bash] ----- -podman images ----- -+ -. Run the container Now it's time to run the container. -+ -[source,bash] ----- -podman run -d -p 8500:80 clumsy-bird ----- - -== Verify Application - -Verify that the application is running by navigating to - -http://bastion.{guid}.example.opentlc.com:8500 - diff --git a/default-site.yml b/default-site.yml index 00c3d02..3d2faf9 100644 --- a/default-site.yml +++ b/default-site.yml @@ -1,7 +1,7 @@ --- site: - title: Showroom Template Demo - url: https://redhat-scholars.github.io/course-template + title: Troubleshooting OpenShift Virtualization Lab + url: https://github.com/opentraining-labs-customizations/rh1-lab17-ocpvirt start_page: modules::index.adoc content: