AMSA

Week 0: Introduction + Exercises workflow

Ferran Aran Domingo
Oriol Agost Batalla
Pablo Fraile Alonso

Before getting started 🫷

  • Visit the subject lab’s website, there you’ll find a link to download a Virtual Machine under the Resources section. It will download a .ova file.
  • We’ll get into what that is and its purpose on this course, but since its quite a large file (~5GB), go on and start the download so we can get hands-on later on today’s session.

Goals for today 🎯

  • Introduce ourselves and the subject lab’s
  • An overview of contents and timeline
  • Setup the environment for the assignments

Introduction πŸš€

Hey! We’re Ferran, Pablo & Oriol πŸ‘‹

  • PhD candidates at UdL
  • Degree + Master in Computer Science
  • We studied here, we teach here… we basically live here
  • You can find us at EPS 3.07

Methodology

We are going to be your teachers during the lab sessions every Wednesday morning.

This sessions are structured in two parts:

Part 1 β€” Introduction & guidance

  • Explanation of the lab exercise
  • Theory if needed

Part 2 β€” Hands-on work

  • Time to work directly on the lab
  • Ask us questions whenever you need

Delivery and follow-up of activities

  • There will be a total of 4 activities
  • Each activity is divided into sub-deliveries
  • Evaluation:
    • Done only at the final deadline of the full activity
    • The actual content is graded at that point

Sub-deliveries

  • It is a recommended pace
  • Each sub-delivery is submitted through the Virtual Campus (just provide a link to your GitHub repo)
  • Extra points for those who keep up with the pace

Warning

Not following the sub-deadlines never penalizes you. They are only meant to help you stay on track.

Timeline

We will follow 4 main practices (PRAC-1 … PRAC-4) divided into sub-deliveries.

Only the final delivery of each practice is graded.

Doubt sessions

We may give you an extra week for final deliveries so we can have doubt sessions. And we may also use sessions before exams for doubts.

Timeline (Weeks 0 β†’ 8)

Week Contents
0 πŸ“– Subject Intro
1 πŸ“– Explain PRAC-1
2 πŸ“– Explain PRAC-2.1 ➝ πŸ“€ Deliver PRAC-1 (Final PRAC-1)πŸ†
3 πŸ“– Explain PRAC-2.2 ➝ πŸ“€ Deliver PRAC-2.1
4 πŸ“– Explain PRAC-2.3 ➝ πŸ“€ Deliver PRAC-2.2
5 πŸ“– Explain PRAC-3.1 ➝ πŸ“€ Deliver PRAC-2.3 (Final PRAC-2)πŸ†
6 πŸ“– Explain PRAC-3.2 ➝ πŸ“€ Deliver PRAC-3.1
7 πŸ“– Explain PRAC-3.3 ➝ πŸ“€ Deliver PRAC-3.2
8 πŸ“ Exams ➝ πŸ“€ Deliver PRAC-3.3 (Final PRAC-3)πŸ†

Timeline (Weeks 9 β†’ 17)

Week Contents
9 πŸ“– Virtualization & Containers intro
10 πŸ“– Explain PRAC-4.1
11 πŸ“– Explain PRAC-4.2 ➝ πŸ“€ Deliver PRAC-4.1
12 πŸ“– AWS Intro ➝ πŸ“€ Deliver PRAC-4.2
13 πŸ“– Explain PRAC-4.3
14 πŸ“– Explain PRAC-4.4 ➝ πŸ“€ Deliver PRAC-4.3
15 πŸ“€ Deliver PRAC-4.4 (Final PRAC-4)πŸ†
16–17 πŸ“ Final Exams

Final score breakdown

Activities β†’ 10%

  • PRAC-1 β†’ 1%
  • PRAC-2 + PRAC-3 + PRAC-4 β†’ 3% each

Exams β†’ 90%

  • Theory questions β†’ 75%
  • Lab-related questions β†’ 25%

Important

Activites can be done in groups of two and cannot be retaken.

If you do work in groups, we will require both members of the group to have commited in the repo of the assignment.

We strongly recommend doing them individually.

Warning

While we acknowledge that ChatGPT can be a useful tool, relying on AI to generate the code for the assignments without understanding the underlying concepts will lead to failing the subject, and you will not be able to answer the exam questions.

Extra points ⚑️

There are an additional 0.5 points in this subject (up to 10.5 points) To get these points you can:

  • Attend classs
  • Contribute to class being active
  • Do extra activities
  • Find flaws in our notes and contribute via PR to fix them

We will assign those points in function of these things.

Content overview πŸŽ“

Main themes

We will explore system administration and application maintenance through hands-on labs, which will cover two main areas:

Systems

  • Boot process & systemd
  • Process management
  • Scheduling & priorities
  • Signals & sessions
  • Memory (SWAP, tmpfs, quotas)

Virtualization & Cloud

  • Virtual machines vs containers
  • Docker & OCI images
  • Compose + Postgres
  • AWS basics
  • Serverless: Lambdas & Gateway
  • Databases in the cloud

Weekly flow (0 β†’ 7)


Week Focus Tasks
0 Start & setup VM + GitHub access
1 Booting & systemd journalctl print, service, script
2 Process types /proc exploration
3 Scheduling & priorities filtering /proc with awk
4 Signals mini-htop
5 SWAP swap manager script + C program
6 TMPFS & benchmarking tmpfs vs ext4 benchmark
7 Quotas user quotas on tmpfs + benchmarks

Weekly flow (9 β†’ 15)


Week Focus Tasks
9 Virtualization vs containers Install Docker/Podman
10 OCI Images Dockerfile + push image
11 Compose + Postgres docker-compose + intro K8s
12 AWS intro services overview
13 Lambdas + Gateway serverless setup
14 PostgreSQL configure DB + tables
15 Wrap-up & evaluation final submissions

Working on the activities πŸ€“

Github classroom

We will be using GitHub Classroom to deliver and evaluate all activities.

  • Each student will receive a private GitHub repository for every activity
    • Only you and the instructors will have access to it
    • The repo will include an initial template where you will work
  • As you make progress, push your changes regularly
    • This allows us to follow your pace
    • For you, it will feel just like working on a normal GitHub repository
  • At the deadline, the final content of your repository will be evaluated
    • We check the repo on the official delivery date
    • We encourage you to upload your progress continuously

Virtual Machine for the Labs

We will provide you with a Virtual Machine (VM) in the form of a .ova file. This file can be imported into VirtualBox.

  • The VM runs Ubuntu 24.04.3 LTS
  • It already includes the required software and configurations prepared by us
  • All activities must be tested on this system, since this is the environment where we will evaluate your work
  • You are free to work on your own Linux system of choice. However, you must perform the final tests on the provided VM to ensure reproducibility

What is a .ova file?

  • .ova stands for Open Virtual Appliance
  • It is a single packaged file that contains everything needed for a VM.
  • By importing it into VirtualBox, you quickly get a ready-to-use VM without needing to install or configure Ubuntu manually

Lab time! πŸ§ͺ

Downaload VirtualBox

Visit the VirtualBox download website, download the right variant depending on your OS and start the installation.

Enable .ova defaults

We recommend keeping this option enabled since it will be easier to import the virtual machine later.

Import the .ova

Download the Virtual Machine from the subject’s website if you haven’t already done so. Once the download is finished, double click on the file and a window will appear to import it on VirtualBox. Just click on Finish and wait for the VM to be imported.

Tip

If double clicking on the file did not pop up a window, import it manually from VirtualBox by clicking Import > Choose the file > Next

Launching the machine

Now you should see a new machine on VirtualBox, double-click on it and after it boots up you’ll have an Ubuntu machine up and running where you’ll be able to work on the subject’s activities.

Credentials for the machine

The credentials to login are username: amsa & password: amsa

Connecting to the machine through ssh

Although the machine comes with a graphical desktop, some of you may prefer to connect to it through SSH and work from your host machine. SSH comes already configured on the machine so it will be as easy as running the command below (remember password is amsa):

ssh amsa@localhost -p 2222

Tip

You may get prompted regarding the authenticity of the host, just type yes and hit enter as shown below.

Regarding Github Classroom

Try accessing a β€œtest” assignment to check the flow:

  • NOT AVAILABLE ANYMORE

If for some reason you don’t have an SSH already configured to work with Github, good news, it’s time to grow up.

Github already provides great documentation on how to do this, here is the link.