Skip to content

Commit ba24937

Browse files
authored
Update and slim down vm/container slides for ws2526 (#233)
1 parent 2023693 commit ba24937

File tree

8 files changed

+80
-275
lines changed

8 files changed

+80
-275
lines changed

02_virtualization_and_containers/containers_slides.md

Lines changed: 0 additions & 100 deletions
This file was deleted.

02_virtualization_and_containers/docker_slides.md

Lines changed: 25 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -23,46 +23,50 @@ slideOptions:
2323
}
2424
</style>
2525

26-
# Docker
26+
# Containers with Docker
2727

28-
<img src="https://upload.wikimedia.org/wikipedia/en/thumb/f/f4/Docker_logo.svg/2560px-Docker_logo.svg.png" width=40%; style="margin-left:auto; margin-right:auto; padding-top: 25px; padding-bottom: 25px">
28+
<img src="https://upload.wikimedia.org/wikipedia/commons/7/79/Docker_%28container_engine%29_logo.png" width=40%; style="margin-left:auto; margin-right:auto; padding-top: 25px; padding-bottom: 25px">
2929

3030
<small>Image by https://www.docker.com/, Fair use, https://en.wikipedia.org/w/index.php?curid=70663056</small>
3131

3232
---
3333

34-
## What is Docker? 1/3
34+
## What is a Container?
3535

36-
- Docker Inc.
37-
- Docker Desktop
36+
<img src="https://raw.githubusercontent.com/Simulation-Software-Engineering/Lecture-Material/main/02_virtualization_and_containers/figs/container-sketch.png" width=30%; style="margin-left:auto; margin-right:auto; padding-top: 25px; padding-bottom: 25px">
3837

39-
> Developer productivity tools and a local Kubernetes environment.
40-
41-
- Docker Engine
42-
43-
> an open source containerization technology for building and containerizing your applications.
38+
- Container operates in "fenced off" part of the operating system (`namespaces`)
39+
- Lower overhead than a virtual machine
40+
- Runs on kernel (and libraries) of the host OS
41+
- Cheap to start and stop a container
42+
- Available features depend on Host (Linux, Windows)
43+
- Container can be isolated.
4444

4545
---
4646

47-
## What is Docker? 2/3
48-
49-
- Docker Hub
50-
51-
> Cloud-based application registry and development team collaboration services.
47+
## Common Use-Cases
5248

53-
- Docker Compose
54-
55-
> a tool for defining and running multi-container Docker applications.
49+
- Microservices
50+
- Reproducible environments for developing and testing (DevOps)
51+
- More and more in science
52+
- High-performance computing, "Bring Your Own Environment"
53+
- Reproducible research
5654

5755
---
5856

59-
## What is Docker? 3/3
57+
## Container Solutions
6058

61-
> Docker is an open platform for developing, shipping, and running applications.
59+
- Plenty of different container formats
60+
- [lxc/lxd](https://linuxcontainers.org/), [Docker](https://www.docker.com/), [podman](https://podman.io/), [Apptainer](https://apptainer.org/), [Sarus](https://user.cscs.ch/tools/containers/sarus/)...
61+
- Different solutions with different strengths due to different use cases
62+
- Working on the (Super-)Userspace
63+
- Direct access to hardware vs. encapsulation
64+
- Generic or with integration in software ecosystem (e.g. job schedulers)
65+
- Common standard: [Open Container Initiative (OCI)](https://opencontainers.org/)
6266

6367
---
6468

65-
## Introduction
69+
## Docker
6670

6771
- 2010: Docker Inc. founded
6872
- 2013: First Docker release
@@ -73,16 +77,6 @@ slideOptions:
7377

7478
---
7579

76-
## Typical Docker Applications
77-
78-
- Applications as Microservices
79-
- Containers for consistent development environment
80-
- Containers for consistent testing environment
81-
- Portable format for sharing applications
82-
- Avoid tedious installation procedures by providing Docker container ([FEniCS](https://fenicsproject.org/download/), [OpenFOAM](https://www.openfoam.com/download/openfoam-installation-on-windows-docker), [GitLab](https://docs.gitlab.com/ee/install/docker.html), etc.)
83-
84-
---
85-
8680
## Building Blocks 1/2
8781

8882
- Docker objects
@@ -244,12 +238,6 @@ Details available in [`docker_demo.md`](https://github.com/Simulation-Software-E
244238

245239
---
246240

247-
## Demo: Run FEniCS Container
248-
249-
Details available in [`docker_demo.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/02_virtualization_and_containers/docker_demo.md)
250-
251-
---
252-
253241
## Advanced Topics
254242

255243
- User ID mapping

02_virtualization_and_containers/singularity_demo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
```Singularity
2121
BootStrap: docker
22-
From: ubuntu:22.04
22+
From: precice/precice
2323
2424
%post
2525
apt-get -y update
@@ -30,7 +30,7 @@
3030
export PATH=/usr/games:$PATH
3131
3232
%runscript
33-
date | cowsay | lolcat
33+
precice-tools --version | cowsay | lolcat
3434
```
3535
3636
- Show file `lolcow.def` content

02_virtualization_and_containers/singularity_slides.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Details available in [`singularity_demo.md`](https://github.com/Simulation-Softw
167167
- Special container format for scientific computing
168168
- Immutable containers in a single file
169169
- Prefers integration over isolation
170-
- Other solutions: [Sarus](https://user.cscs.ch/tools/containers/sarus/), [Charliecloud](https://hpc.github.io/charliecloud/)
170+
- Other solutions: [Sarus](https://user.cscs.ch/tools/containers/sarus/), [Charliecloud](https://charliecloud.io/latest/index.html)
171171

172172
---
173173

02_virtualization_and_containers/vagrant_slides.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,8 @@ slideOptions:
5555
## What for?
5656

5757
- Developing software
58-
- Set up consistent development environment
59-
- Share environment with others
58+
- Set up / share consistent development environment
6059
- Testing software, workflows...
61-
- Disposable environments
62-
- Consistent workflows
63-
- More general
64-
- Simple way to setup virtual machine
6560
- Reproducible environment
6661

6762
---
@@ -70,12 +65,11 @@ slideOptions:
7065

7166
- Strong focus on workflow consistency
7267
- (Re)use existing images
73-
- Automatize VM creation and configuration
68+
- Automate VM creation and configuration
7469
- Easier than with VirtualBox CLI and shell scripts
7570
- Store in Git-friendly format
76-
- For us:
77-
- Management of VirtualBox VMs (testing, developing...)
78-
- Sharing of VMs (debugging, workshops...)
71+
72+
> "If you can't git diff a file format, it's broken."
7973
8074
---
8175

@@ -133,7 +127,7 @@ Details available in [`vagrant_demo.md`](https://github.com/Simulation-Software-
133127
```ruby
134128
Vagrant.configure("2") do |config|
135129
config.vm.box = "bento/ubuntu-24.04"
136-
config.vm.box_version = "202407.23.0"
130+
config.vm.box_version = "202510.26.0"
137131
end
138132
```
139133

02_virtualization_and_containers/virtualbox_slides.md

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,49 @@ slideOptions:
2424
}
2525
</style>
2626

27-
# VirtualBox
27+
# Virtual machines with VirtualBox
2828

2929
<img src="https://upload.wikimedia.org/wikipedia/commons/f/ff/VirtualBox_2024_Logo.svg" width=20%; style="margin-left:auto; margin-right:auto; padding-top: 25px; padding-bottom: 25px">
3030

3131
---
3232

33-
## Introduction
33+
## What is a Virtual Machine?
34+
35+
<img src="https://raw.githubusercontent.com/Simulation-Software-Engineering/Lecture-Material/main/02_virtualization_and_containers/figs/virtualmachine-sketch.png" width=40%; style="margin-left:auto; margin-right:auto; padding-top: 25px; padding-bottom: 25px">
36+
37+
- A computer inside your computer, with its own OS and resources
38+
- Virtual Machines are portable and flexible
39+
40+
---
41+
42+
## (Some) Features of Virtual Machines
43+
44+
- Exclusive access to some of your resources
45+
- Behaves like a native installation
46+
- Isolation from host operating system
47+
- Popular for
48+
- Safety critical tasks
49+
- Development and testing
50+
- Wherever one wants a portable solution
51+
52+
---
53+
54+
## Types of Hypervisors
55+
56+
- **Type 1**
57+
- Runs directly on bare-metal hardware, like the host OS
58+
- Examples: [Microsoft Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/about/), [VMware ESXi](https://www.vmware.com/products/esxi-and-esx.html), [Xen](https://xenproject.org/), [KVM](https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine), ...
59+
- **Type 2**
60+
- Negotiates resources shared with a host OS
61+
- Examples: [VirtualBox](https://www.virtualbox.org/), [VMWare Workstation Player](https://www.vmware.com/products/workstation-player.html), [Parallels](https://www.parallels.com/eu/products/desktop/)...
62+
63+
---
64+
65+
## VirtualBox
3466

3567
- Hosted hypervisor created by Innotek GmbH (Weinstadt, Germany)
3668
- Obtained by Sun Microsystems in 2008. Since 2010, owned by Oracle
37-
- Open source (GPLv3)
69+
- Free software (GPLv3)
3870

3971
---
4072

@@ -50,14 +82,12 @@ slideOptions:
5082

5183
---
5284

53-
## Virtual Hard Drive Formats
85+
## Note on CPU architectures
5486

55-
- Virtual hard drive as a file
56-
- Multiple formats, for example:
57-
- **VDI**: "Virtual Disk Image", VirtualBox' native format
58-
- **VHD**: Format used by Microsoft
59-
- **VMDK**: VMWare's virtual disk format
60-
- Support for dynamic allocation
87+
- VirtualBox runs both on x86 and ARM
88+
- ARM hosts need ARM VMs (no emulation)
89+
- Linux support limited/recent (e.g., Ubuntu 25.10)
90+
- Emulation alternative (very slow): [UTM](https://mac.getutm.app/)
6191

6292
---
6393

@@ -89,21 +119,10 @@ Details available in [`virtualbox_demo.md`](https://github.com/Simulation-Softwa
89119

90120
---
91121

92-
## Summary and Outlook
93-
94-
- VirtualBox is an open-source system for virtual machines
95-
- Simple to set up and run
96-
- Manual setup, but command-line interface exists
97-
- Next step: Infrastructure as code
98-
- Consistency of the environment?
99-
- How to share a VM image with others?
100-
101-
> "If you can't git diff a file format, it's broken."
102-
103-
---
104-
105122
## Further Reading
106123

107124
- [VirtualBox Manual](https://www.virtualbox.org/manual/UserManual.html)
125+
- [VirtualBox Manual: 1. First Steps](https://www.virtualbox.org/manual/ch01.html)
108126
- [VirtualBox Manual: 4. Guest Additions](https://www.virtualbox.org/manual/ch04.html)
127+
- [VirtualBox Manual: 13. Security Guide](https://www.virtualbox.org/manual/ch13.html)
109128
- [Overview of different disk formats](https://www.parallels.com/blogs/ras/vdi-vs-vhd-vs-vmdk/)

0 commit comments

Comments
 (0)