Skip to content

Commit

Permalink
Improve auto sat wkshp 1.1-1.4 subsections
Browse files Browse the repository at this point in the history
- deduplicate EC2 instance startup step
- fix links to titles
- fix typos
  • Loading branch information
bocekm committed Feb 7, 2025
1 parent 247f59a commit 5ceee45
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- [Step 2 - Access the Visual Studio Code Web UI](#step-2---access-the-visual-studio-code-web-ui)
- [Step 3 - Open a Terminal Session](#step-3---open-a-terminal-session)
- [Step 4 - Access the Satellite Web UI](#step-4---access-the-satellite-web-ui)
- [Step 5 - Access the RHEL Web Console](#step-5---access-the-centos-web-console)
- [Step 5 - Access the Web Console](#step-5---access-the-web-console)
- [Step 6 - Challenge Labs](#step-6---challenge-labs)
- [Conclusion](#conclusion)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- [Step 1 - Set Instance Tags](#step-1---set-instance-tags)
- [Step 2 - Update Ansible Inventory](#step-2---update-ansible-inventory)
- [Step 3 - Install Three Tier Application](#step-3---install-three-tier-application)
- [Step 4 - Smoke Test Three Tier Application](#step-4---open-a-terminal-session)
- [Step 4 - Smoke Test Three Tier Application](#step-4---smoke-test-three-tier-application)
- [Conclusion](#conclusion)

## Objectives
Expand All @@ -21,7 +21,7 @@

### Three Tier App

This use-case will focus on conversion from CentOS (though this could be another RHEL derivitive) to RHEL while maintaining a 3 tier application stack (do no harm). We will utilize an additional project in Ansible Automation Platform, "Three Tier App / Prod", which will allow us to install a three tier application stack, consisting of HAProxy, Tomcat, and PostgreSQL, across the three CentOS nodes. Additionally, the project also provides a means to test/verify functionality of the application components, which we will perform before and after CentOS to RHEL conversions.
This use-case will focus on conversion from CentOS (though this could be another RHEL derivative) to RHEL while maintaining a 3 tier application stack (do no harm). We will utilize an additional project in Ansible Automation Platform, "Three Tier App / Prod", which will allow us to install a three tier application stack, consisting of HAProxy, Tomcat, and PostgreSQL, across the three CentOS nodes. Additionally, the project also provides a means to test/verify functionality of the application components, which we will perform before and after CentOS to RHEL conversions.

| Role | Inventory name |
| ------------------------------------------| ---------------|
Expand Down Expand Up @@ -149,33 +149,6 @@ This use-case will focus on conversion from CentOS (though this could be another

### Step 3 - Install Three Tier Application

- In the AAP Web UI, navigate to Resources > Templates by clicking on "Templates" under the "Resources" group in the navigation menu. This will bring up a list of job templates that can be used to run playbook jobs on target hosts.

![Job templates on AAP Web UI with EC2 filter](images/aap_templates_ec2_filter.png)

- In the filter box, enter `EC2` and then click the magnifying glass. This will bring up a list of job templates specific to AWS/EC2 automation:

![EC2 Job templates Instance Action](images/aap_templates_ec2_instance_action.png)

- Click ![launch](images/convert2rhel-aap2-launch.png) to the right of **EC2 / Instance action**:

![EC2 Instance Action Other](images/ec2_instance_action_other.png)

- For the `Launch | EC2 / Instance action - Other prompts` dialog, click **Next**.

![EC2 Instance Action Survey](images/ec2_instance_action_survey.png)

- On the `Launch | EC2 / Instance action - Survey` dialog:
- For `Select EC2 instance action` select "start".
- For `Select OS target` select "CentOS7".
- For `Select Environment stage` select "Dev".

Then, click **Next**.

![EC2 Instance Action Launch](images/ec2_instance_action_launch.png)

- On the `Launch | EC2 / Instance action - Preview` dialog, review and then click **Launch**. Once the `EC2 / Instance action` job has completed, our CentOS7 instances will be started (or confirmed as started if they are already up and running) and available for installing the three tier application stack.

- In the AAP Web UI, navigate to Resources > Templates by clicking on "Templates" under the "Resources" group in the navigation menu. This will bring up a list of job templates.

![Job templates on AAP Web UI with EC2 filter](images/aap_templates.png)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
24 changes: 12 additions & 12 deletions exercises/rhdp_auto_satellite/3-convert2rhel/1.3-analysis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

## Table of Contents

- [Workshop Exercise - Run Pre-conversion Analysis Jobs](#workshop-exercise---run-pre-conversion-jobs)
- [Workshop Exercise - Run Pre-conversion Analysis Jobs](#workshop-exercise---run-pre-conversion-analysis-jobs)
- [Table of Contents](#table-of-contents)
- [Objectives](#objectives)
- [Guide](#guide)
- [Step 1 - CentOS Conversion Automation Workflow](#step-1---centos-conversion-automation-workflow)
- [Analysis](#analysis)
- [Analyze](#analyze)
- [Convert](#convert)
- [Commit](#commit)
- [Let's Get Started](#lets-get-started)
- [Step 2 - Patch OS to latest package versions](#step-2---patch-os-to-latest-package-versions)
- [Step 3 - Change Content Source for Content Host](#step-3---change-content-source-for-content-host)
- [Step 4 - Use AAP to Launch an Analysis Playbook Job](#step-4---use-aap-to-launch-an-analysis-playbook-job)
- [Step 5 - Review the Playbook Job Output](#step-5---review-the-playbook-job-output)
- [Step 5 - Review the Workflow Job Output](#step-5---review-the-workflow-job-output)
- [Step 6 - Challenge Lab: Analysis Playbook](#step-6---challenge-lab-analysis-playbook)
- [Conclusion](#conclusion)

Expand All @@ -28,7 +28,7 @@

### Step 1 - CentOS Conversion Automation Workflow

Red Hat provides the Convert2RHEL utility, a tool to convert RHEL-like systems to their RHEL counterparts. The [Convert2RHEL documentation](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/converting_from_an_rpm-based_linux_distribution_to_rhel/index) guides users on how to utilize the Convert2RHEL utility to manually convert a RHEL host. This is fine if there only a few CentOS hosts to convert, but what if you are a large enterprise with tens, hundreds, or even thousands of CentOS hosts? The manual process does not scale. Using automation, the end-to-end process for converting a RHEL host is reduced to a matter of days and the total downtime required for the actual conversion is measured in hours or less.
Red Hat provides the Convert2RHEL utility, a tool to convert RHEL-like systems to their RHEL counterparts. The [Convert2RHEL documentation](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/8/html-single/converting_from_a_linux_distribution_to_rhel_using_the_convert2rhel_utility/index) guides users on how to utilize the Convert2RHEL utility to manually convert a RHEL host. This is fine if there are only a few CentOS hosts to convert, but what if you are a large enterprise with tens, hundreds, or even thousands of CentOS hosts? The manual process does not scale. Using automation, the end-to-end process for converting a RHEL host is reduced to a matter of days and the total downtime required for the actual conversion is measured in hours or less.

Our CentOS conversion automation approach follows a workflow with three phases:

Expand All @@ -38,7 +38,7 @@ Our CentOS conversion automation approach follows a workflow with three phases:
>
> The <sub>![arrow pointing down at server](images/playbook_icon.svg)</sub> icon indicates workflow steps that are automated by Ansible playbooks.
#### Analysis
#### Analyze

During the analysis phase, theoretically, no changes should be made to the system, other than the installation of the `Convert2RHEL` utility. However, to err on the side of caution, a first playbook is executed to create a snapshot that can be used for rolling back if any unforeseen issues corrupt the system. After the snapshot is created, the analysis playbook is executed, where the `Convert2RHEL` utility scans the host for issues or blockers that may prevent a successful conversion and then generates a report listing any potential risks found. The report also includes recommended actions that should be followed to reduce the likelihood of the reported issues impacting the conversion. If any recommended remediation actions are performed, the analysis workflow should be run again (snapshot/analyze) to verify the risks are resolved. This iteration continues until everyone reviewing the report is comfortable that any remaining findings are acceptable.

Expand All @@ -53,7 +53,7 @@ After the analysis phase is complete and the report indicates acceptable risk, a

#### Commit

If there are any application impacts discovered that can't be easily corrected within the scheduled maintenance window, the decision can be made to undo the conversion by rolling back the snapshot. This will revert all changes and return the host back to the previous CentOS version. However, if there are no issues found, the commit phase begins. During the commit phase, the host can be returned to normal operation while keeping the snapshot just in case any issues are uncovered later.
If there are any application impacts discovered that can't be easily corrected within the scheduled maintenance window, the decision can be made to undo the conversion by rolling back the snapshot. This will revert all changes and return the host back to the previous CentOS state. However, if there are no issues found, the commit phase begins. During the commit phase, the host can be returned to normal operation while keeping the snapshot just in case any issues are uncovered later.
> **&#9432;** This is LVM specific: However, while the snapshots are kept, regular disk writes to volume groups will continue to consume the free space allocated to the snapshots. The amount of time this takes will depend on the amount of free space initially available and the volume of write i/o activity to the volume groups. Before the snapshot space is exhausted, the snapshots must be deleted and then there is no turning back.
Once comfortable with the converted host, the commit playbook should be executed to delete the snapshot. The CentOS conversion to RHEL is complete.
Expand Down Expand Up @@ -104,7 +104,7 @@ One of the prerequisites for successful Convert2RHEL OS conversions is that the

### Step 3 - Change Content Source for Content Host

Before we start the pre-conversion OS analysis, we need to change the Satellite content source for our CentOS content hosts. With the release of Convert2RHEL 2.x, providing content registration details as part of the variables supplied are no longer utilized. Instead, the system to be converted should be registered to a content view that provides access to package repositories for both the current version of installed operating system, as well as access to package repositories for the target version of RHEL that is being converted to. In addition, access to the Convert2RHEL related package repositories should be included.
Before we start the pre-conversion OS analysis, we need to change the Satellite content source for our CentOS content hosts. The system to be converted should be registered to a content view that provides access to package repositories for both the current version of installed operating system, as well as access to package repositories for the target version of RHEL that is being converted to. In addition, access to the Convert2RHEL related package repositories should be included.

If you would like to review the content view configuration that we will be utilizing as part of the conversion process, switch to the browser tab where you are logged in to Satellite.

Expand All @@ -114,7 +114,7 @@ If you would like to review the content view configuration that we will be utili

> **Note**
>
> A composite content view in Satellite is a content view that is composed of other composite views, typically multiples of content views.
> A composite content view in Satellite is a content view that is composed of other content views, typically multiples of content views.
- Click on the `CentOS7_to_RHEL7` composite content view.

Expand Down Expand Up @@ -188,7 +188,7 @@ The first step in converting our three tier app hosts will be executing the anal

> **Note**
>
> While we did change the `CentOS7_to_RHEL7_Dev` lifecycle environment that the CentOS nodes are assigned to in Satellite, this was only for selecting the requisite software packge repositories for the conversion process. We are still utilizing the `CentOS_Dev` inventory group in the Ansible Automation Platform inventory for specifying the proper instances to launch conversion automation against.
> While we did change the `CentOS7_to_RHEL7_Dev` lifecycle environment that the CentOS nodes are assigned to in Satellite, this was only for selecting the requisite software package repositories for the conversion process. We are still utilizing the `CentOS_Dev` inventory group in the Ansible Automation Platform inventory for specifying the proper instances to launch conversion automation against.
![Analysis job preview on AAP Web UI](images/analysis_preview.png)

Expand All @@ -202,7 +202,7 @@ After launching the analysis workflow job, the AAP Web UI will navigate automati

- While the workflow job is running, you can monitor progress by clicking on an individual workflow job node and then click on the "Output" tab within the individual job run. The job output will scroll automatically as task results are streamed to the bottom of job output shown in the AAP Web UI.

- The analysis workflow will run the Convert2RHEL pre-conversion system analysis. Click on the `OS / Pre-conversion Analysis` job node and then click on the "Output" tab to follow the job outout log. This will take about nine to ten minutes to complete. When it is done, you can find a "PLAY RECAP" at the end of the job output showing the success or failure status for the playbook runs executed on each host. A status of "failed=0" indicates a successful playbook run. Scroll to the bottom of the job output and you should see that your job summary looks like this example:
- The analysis workflow will run the Convert2RHEL pre-conversion system analysis. Click on the `OS / Pre-conversion Analysis` job node and then click on the "Output" tab to follow the job output log. This will take about nine to ten minutes to complete. When it is done, you can find a "PLAY RECAP" at the end of the job output showing the success or failure status for the playbook runs executed on each host. A status of "failed=0" indicates a successful playbook run. Scroll to the bottom of the job output and you should see that your job summary looks like this example:

![Analysis job "PLAY RECAP" as seen at the end of the job output](images/analysis_job_recap.png)

Expand Down Expand Up @@ -232,7 +232,7 @@ Can you find the upstream source repo and playbook code?

- With the new tab opened and the `redhat-partner-tech/automated-satellite` repo displayed, on the left side of the browser, click the drop down for the branch selection where `main` is displayed. Click the `aap2-rhdp-prod` branch to select this branch for viewing.

- Go back to the AAP Web UI and now navigate to Resources > Templates > CONVERT2RHEL / 01 Analysis. Under the Details tab, you will see that this is a workflow template. In order to view the individual jobs within the workflow, click on the tab named "Visualizer". Once, the workflow visualization is displayed, hover the mouse pointer over the node named "OS / Pre-conversion Analysis". We can see that the node name in this workflow is the same as the resource used, in this case, the name of the job template "OS / Pre-conversion Analysis".
- Go back to the AAP Web UI and now navigate to Resources > Templates > CONVERT2RHEL / 01 Analysis. Under the Details tab, you will see that this is a workflow template. In order to view the individual jobs within the workflow, click on the tab named "Visualizer". Once the workflow visualization is displayed, hover the mouse pointer over the node named "OS / Pre-conversion Analysis". We can see that the node name in this workflow is the same as the resource used, in this case, the name of the job template "OS / Pre-conversion Analysis".

![CONVERT2RHEL / 01 Analysis workflow visualizer](images/analysis_workflow_visualizer.png)

Expand All @@ -257,7 +257,7 @@ Can you find the upstream source repo and playbook code?
```
By checking the `collections/requirements.yml` file in the `redhat-partner-tech/automated-satellite` git repo, we can discover that this role comes from another git repo at [https://github.com/heatmiser/infra.convert2rhel](https://github.com/heatmiser/infra.convert2rhel). It is the `analysis` role under this second git repo that provides all the automation tasks that ultimately runs the Convert2RHEL analysis scan and generates the report.

> **NOTE:** We are utilizing a fork of the upstream infra.convert2rhel Ansible collection [https://github.com/redhat-cop/infra.convert2rhel](https://github.com/redhat-cop/infra.convert2rhel). Because the upstream collections is a fast moving project, we utilize a fork where we can closely manage the state of the code base to ensure optimal stability for the lab/workshop/demo environment.
> **NOTE:** We are utilizing a fork of the upstream infra.convert2rhel Ansible collection [https://github.com/redhat-cop/infra.convert2rhel](https://github.com/redhat-cop/infra.convert2rhel). Because the upstream collection is a fast moving project, we utilize a fork where we can closely manage the state of the code base to ensure optimal stability for the lab/workshop/demo environment.
- In a new browser tab/instance, open the [https://github.com/heatmiser/infra.convert2rhel](https://github.com/heatmiser/infra.convert2rhel) URL. Drill down to the `roles/analysis` directory in this git repo to review the README and yaml source files.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
- [Objectives](#objectives)
- [Guide](#guide)
- [Step 1 - Managing Convert2RHEL Pre-conversion Results](#step-1---managing-convert2rhel-pre-conversion-results)
- [Step 2 - Navigating the CentOS Web Console](#step-2---navigating-the-rhel-web-console)
- [Step 2 - Navigating the CentOS Web Console](#step-2---navigating-the-centos-web-console)
- [Step 3 - Review Convert2RHEL Pre-conversion Report of CentOS 7 Host](#step-3---review-convert2rhel-pre-conversion-report-of-centos-7-host)
- [Challenge Lab: What About Ignoring So Many High Findings?](#challenge-lab-what-about-ignoring-so-many-high-findings)
- [Challenge Lab: What About Ignoring So Many High Findings?](#challenge-lab-what-if-we-were-to-experience-warnings-we-are-unsure-of)
- [Conclusion](#conclusion)

## Objectives
Expand Down Expand Up @@ -86,9 +86,9 @@ less /var/log/convert2rhel/convert2rhel-pre-conversion.txt

> **Note**
>
> The contents of your report may differ from the example above because of updates made to the Convert2RHEL framework and other RHEL packages released over time since this workshop was written. If you discover any differences that materially break the flow of the exercises in the workshop, kindly let us know by raising an issue [here](https://github.com/redhat-partner-tech/automated-satellite/issues/new).
> The contents of your report may differ from the example above because of updates made to the Convert2RHEL utility and other RHEL packages released over time since this workshop was written. If you discover any differences that materially break the flow of the exercises in the workshop, kindly let us know by raising an issue [here](https://github.com/redhat-partner-tech/automated-satellite/issues/new).
- When the pre-conversion report is generated, the Convert2RHEL framework collects system data and assesses convertability based on a large collection of checks. When any of these checks uncovers a potential risk, it is recorded as a finding in the report.
- When the pre-conversion report is generated, the Convert2RHEL utility collects system data and assesses convertability based on a large collection of checks. When any of these checks uncovers a potential risk, it is recorded as a finding in the report.

- The good news is that the warning regarding the "third party" package `katello-ca-consumer-satellite`:
`(WARNING) LIST_THIRD_PARTY_PACKAGES::THIRD_PARTY_PACKAGE_DETECTED - Third party packages detected`
Expand Down
Loading

0 comments on commit 5ceee45

Please sign in to comment.