1.8 KiB
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
- Create virtual machine in Proxmox hypervisor
- Install Debian
- Log into system, install Docker
- Clone repository
- Build container
- Run container with shell to explore filesystem
- Create Ansible role and playbook to deploy the container
- Add web entry to Nginx Ansible group variables
- Run ansible playbooks
- Visit website
Step 2 - Complete Additional Exercises
As I am most familiar with Linux and Python, I elected to do the following exercises.