PDF Version Available
This document is also available in PDF format: virtualization.pdf
The PDF version includes bookmarks for easy navigation and is optimized for printing.
Accessibility Notice
This document is also available in HTML format at:
Link: https://aholdengouveia.name/LinuxAdmin/labexcercises/virtualization.html
The HTML version provides enhanced accessibility features including keyboard navigation, screen reader support, responsive design, dark mode support, and high contrast options.
Ticket
Ticket: ACME-5276
Requested by: IT Manager
Systems: Both report servers
Background
Acme Corp wants faster recovery and fewer hand-built servers. Your manager has asked for two things: proof that snapshots can save you, and a first try at configuring a server with code. You will be working on the two servers you set up in the Server Setup lab: your Red Hat based server and your second server.
Learning Outcomes
By the end of this lab, you will be able to:
- Use snapshots to recover a server, and compare snapshots with backups
- Write an Ansible playbook that configures a server automatically
- Explain idempotence using the results of your playbook runs
- Recommend whether a business should adopt Infrastructure as Code
Requirements
- Take a snapshot of one server, make a breaking change on purpose, then roll back to the snapshot. Document what you broke, how you broke it, and what stopped working. Time the rollback, and compare it to your restore drill from the Backup, Restore, and Post Mortem lab.
- Using Ansible, run from one server against the other, write a playbook that installs the tools from the Installs, Updates, and Documentation lab, creates a user and group from the User Management lab, and deploys a config or text file. Use the sample playbook and inventory (linked under Resources) as a guide for the format. Every task in the samples is an example only, so your playbook needs its own tasks.
- Run your playbook twice, and explain why the second run doesn't change anything. This is called idempotence.
- Write an executive summary for Acme Corp comparing snapshots and backups, and recommending whether to adopt Infrastructure as Code.
Acceptance Criteria
- Everything must be cited. Every command, statement, and line of code in your scripts and documents must be cited, either with a link to a reference or with a note naming the previous class where you learned it, for example: # Learned in CIS 117 Intro to Linux. In scripts, put the citation in a comment next to the code. Anything without a citation will not count.
- Screenshots show the server broken before the rollback, and working again after it.
- Screenshots show both playbook runs: changes on the first run, and none on the second.
- Your playbook is well commented and uploaded to GitHub.
- The executive summary is less than 1 page.
- Every terminal screenshot shows your prompt with your username and hostname, and either the output of date or a note beside the terminal with your name and the term. Hostnames must match your server inventory from the Server Setup lab.
- Your GitHub repository shows your work over time: several commits across more than one day, each with a message describing the change, not a single upload of finished code.
- Your Troubleshooting FAQ covers at least 2 problems you ran into, each with a screenshot of the error and an explanation of how you fixed it.
Deliverables
Audience: your manager at Acme Corp, who will decide whether the team adopts these practices. Assume technical knowledge but not expertise. Screenshots are helpful to go with your descriptions.
- Your snapshot procedure, including what you broke, how you broke it, your before and after screenshots, your rollback time, and how it compared to your restore drill.
- Your playbook, with a link to your GitHub where you've uploaded it.
- Your screenshots of both playbook runs, with your explanation of idempotence.
- Your executive summary.
- A Troubleshooting FAQ for the next person who does this: at least 2 problems you ran into, written as questions and answers, each with a screenshot of the error and how you fixed it.
Resources
References, a video, a PowerPoint and some notes are available at my website Link: https://www.aholdengouveia.name/LinuxAdmin/virtualization.html
Sample playbook, showing the format to follow Link: https://www.aholdengouveia.name/LinuxAdmin/labexcercises/SamplePlaybook.yml
Sample inventory file Link: https://www.aholdengouveia.name/LinuxAdmin/labexcercises/SampleInventory.ini
Getting started with Ansible Link: https://docs.ansible.com/ansible/latest/getting_started/index.html
An introduction to Ansible playbooks Link: https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_intro.html