33 lines
1.8 KiB
Markdown
33 lines
1.8 KiB
Markdown
# Sysadmin Interview Exercises
|
|
|
|
## Step 1 - Deploy Webserver
|
|
|
|
I was able to relatively quickly provision a new virtual machine on my hypervisor and install the requisite software for this task. I chose to install Debian, as I have experience with it and it is well-suited for tasks such as these.
|
|
|
|
Once it was running, I quickly installed Docker, cloned the given repository, and built the Docker image. I then started it with a shell as PID 1 to explore the container.
|
|
|
|
The web app is a simple Django app with a single URL defined which simply renders the `index.html` template. It has the admin app installed, but it doesn't actually seem functional.
|
|
|
|
Once I had determined this, I wrote a simple Ansible playbook to deploy the container from scratch, including installing dependencies, pulling the latest Dockerfile, and building the container. I also added an entry to my Nginx configuration (at [https://sysadmin-exercise.internal.ezri.dev/], accessible from the ITS building or USU VPN), as I consider HTTPS access to be a part of deploying a webapp. I then simply visited the above site from my browser.
|
|
|
|
### Tasks
|
|
1. Create virtual machine in Proxmox hypervisor
|
|
2. Install Debian
|
|
3. Log into system, install Docker
|
|
4. Clone repository
|
|
5. Build container
|
|
6. Run container with shell to explore filesystem
|
|
7. Create [Ansible role and playbook](https://git.ezri.dev/ezri/homelab-ansible/src/branch/main/playbooks/roles/sysadmin_exercise) to deploy the container
|
|
8. Add web entry to Nginx Ansible group variables
|
|
9. Run ansible playbooks
|
|
10. Visit website
|
|
|
|
## Step 2 - Complete Additional Exercises
|
|
|
|
As I am most familiar with Linux and Python, I elected to do the following exercises.
|
|
|
|
- [Exercise 1: User Report](user-report)
|
|
- [Exercise 2: Watchdog Script](size-watchdog)
|
|
- [Exercise 4: Condition Testing](condition-testing)
|
|
- [Exercise 5: Log Parsing](python-logs)
|