Skip to content

Commit

Permalink
markdownlint: Revert indentation changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MakisH committed Oct 29, 2024
1 parent daec2e4 commit c7d45cf
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 102 deletions.
28 changes: 14 additions & 14 deletions 02_virtualization_and_containers/containers_slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ slideOptions:

- Container operates in "fenced off" part of the operating system (`namespaces`)
- Lower overhead than virtual machines
- Runs on kernel (and libraries) of the host OS
- Cheap to start and stop a container
- Runs on kernel (and libraries) of the host OS
- Cheap to start and stop a container
- Available features depend on Host (Linux, Windows)
- Container can be isolated.

Expand All @@ -46,23 +46,23 @@ slideOptions:
- Reproducible environments for developing and testing (DevOps)
- Container hype strongly driven by [Docker](https://www.docker.com/).
- More and more in science
- High-performance computing, "Bring Your Own Environment"
- Reproducible research
- High-performance computing, "Bring Your Own Environment"
- Reproducible research

---

## Container Solutions

- Plenty of different container formats

- [lxc/lxd](https://linuxcontainers.org/), [Docker](https://www.docker.com/), [Apptainer](https://apptainer.org/) (Singularity), [podman](https://podman.io/), [Sarus](https://user.cscs.ch/tools/containers/sarus/)...
* [lxc/lxd](https://linuxcontainers.org/), [Docker](https://www.docker.com/), [Apptainer](https://apptainer.org/), [podman](https://podman.io/), [Sarus](https://user.cscs.ch/tools/containers/sarus/)...

- Different solutions with different strengths due to different use cases
- Working on the (Super-)Userspace
- Direct access to hardware vs. encapsulation
- Generic or with integration in software ecosystem (e.g. job schedulers)
- Working on the (Super-)Userspace
- Direct access to hardware vs. encapsulation
- Generic or with integration in software ecosystem (e.g. job schedulers)
- Effort to establish certain standards
- [Open Container Initiative (OCI)](https://opencontainers.org/)
- [Open Container Initiative (OCI)](https://opencontainers.org/)

---

Expand All @@ -80,12 +80,12 @@ slideOptions:
## Summary

- Shares many similarities with VMs, but
- Lightweight alternative to VMs
- Stricter limitations than VMs
- Often different use cases and working together
- Lightweight alternative to VMs
- Stricter limitations than VMs
- Often different use cases and working together
- Many different containers solutions
- Standardization effort
- Choose right solution for your use case
- Standardization effort
- Choose right solution for your use case

---

Expand Down
59 changes: 30 additions & 29 deletions 02_virtualization_and_containers/singularity_slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,43 +31,43 @@ slideOptions:

- Initiated in 2015 at Lawrence Berkeley National Laboratory
- Two open source projects, fork in 2021:
- [Apptainer](https://apptainer.org/) (The Linux Foundation)
- SingularityCE (Sylabs)
- [Apptainer](https://apptainer.org/) (The Linux Foundation)
- SingularityCE (Sylabs)
- More [related enterprise products by Sylabs](https://sylabs.io/products/)

---

## Image registries

- [Sylabs Cloud](https://cloud.sylabs.io/library)
- Image registry and remote builder
- Image registry and remote builder
- [Singularity Hub](https://singularityhub.github.io)
- Older open source registry
- Older open source registry

---

## Goals

- Verifiable reproducibility and security
- Immutable images with encryption and verification support
- Immutable images with encryption and verification support
- Integration over isolation by default
- Access hardware (GPU, network...) and filesystems
- Access hardware (GPU, network...) and filesystems
- Simple and effective security model
- Same user inside and outside container
- Same user inside and outside container
- "Mobility of Compute"
- Single file container for easy transport and sharing
- Single file container for easy transport and sharing

---

## Differences to Docker

- User rights enough for running container
- Automatically mounts [common directories](https://apptainer.org/docs/user/latest/bind_paths_and_mounts.html#system-defined-bind-paths)
- `${HOME}`, `${PWD}`, network etc.
- `${HOME}`, `${PWD}`, network etc.
- Allows "untrusted user to run untrusted containers"
- Important for shared facilities (computing centers etc.)
- Important for shared facilities (computing centers etc.)
- (Normally) Immutable containers
- Set up environment and immutable data in container
- Set up environment and immutable data in container
- Support for typical HPC environments (schedulers, MPI, GPU...)

---
Expand All @@ -77,7 +77,7 @@ slideOptions:
- Bring Your Own Environment
- Reproducible research
- Software needs specific environment
- Legacy code, commercial software, unmaintained research software
- Legacy code, commercial software, unmaintained research software
- "Hiding" complicated software stack
- Conservation of (complicated) workflows

Expand All @@ -86,16 +86,16 @@ slideOptions:
## Useful Commands

- `singularity exec`
- Execute a command within container
- Execute a command within container
- `singularity run`
- Launch a runscript within container
- Launch a runscript within container
- `singularity shell`
- Run a Bourne shell within container
- Run a Bourne shell within container
- `singularity build`
- Build a new Singularity container
- Use `--sandbox` for mutable container
- Build a new Singularity container
- Use `--sandbox` for mutable container
- `singularity pull`
- Pull a Singularity image (`.sif` file)
- Pull a Singularity image (`.sif` file)

---

Expand All @@ -108,16 +108,16 @@ Details available in [`singularity_demo.md`](https://github.com/Simulation-Softw
## Defining and Building own Images

- Build instructions in text file
- Git friendly
- Git friendly
- Start from base images
- Several bootstrap strategies (container sources)
- Images can be based on Docker images
- Several bootstrap strategies (container sources)
- Images can be based on Docker images
- Extra steps
- `%post`: Steps after OS installation
- `%environment`: Set environment variables (`PATH` etc.)
- `%runscript`: Container behavior under `singularity run`
- `%labels`: Extra information
- `%pre`, `%setup`... (see [Documentation](https://apptainer.org/docs/user/latest/definition_files.html))
- `%post`: Steps after OS installation
- `%environment`: Set environment variables (`PATH` etc.)
- `%runscript`: Container behavior under `singularity run`
- `%labels`: Extra information
- `%pre`, `%setup`... (see [Documentation](https://apptainer.org/docs/user/latest/definition_files.html))

---

Expand Down Expand Up @@ -153,12 +153,12 @@ Details available in [`singularity_demo.md`](https://github.com/Simulation-Softw

- Run container as service (called `instance`)
- Parallel computing
- Using correct MPI, network drivers
- MPI: hybrid model, bind model
- Using correct MPI, network drivers
- MPI: hybrid model, bind model
- Mounting additional directories
- Signing, sharing and sandbox containers
- Performance vs. Portability
- Compile content with `arch=generic` or `arch=TARGET`?
- Compile content with `arch=generic` or `arch=TARGET`?

---

Expand All @@ -176,3 +176,4 @@ Details available in [`singularity_demo.md`](https://github.com/Simulation-Softw
- [Apptainer user guide](https://apptainer.org/docs/user/latest/index.html)
- [Singularity User Guide](https://docs.sylabs.io/guides/main/user-guide/)
- [Singularity Cloud](https://cloud.sylabs.io/library)
- [Sarus](https://user.cscs.ch/tools/containers/sarus/)
78 changes: 39 additions & 39 deletions 02_virtualization_and_containers/vagrant_slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,24 @@ slideOptions:
## Building Blocks

- Provisioners
- Tool for configuring the boxes (install software on machine)
- Examples: shell scripts, Ansible, Chef, Puppet..
- Tool for configuring the boxes (install software on machine)
- Examples: shell scripts, Ansible, Chef, Puppet..
- Providers
- "Backend" on which the box is based
- Examples: VirtualBox, Hyper-V, libvirt, AWS, Docker...
- "Backend" on which the box is based
- Examples: VirtualBox, Hyper-V, libvirt, AWS, Docker...

---

## What for?

- Developing software
- Set up consistent development environment
- Share environment with others
- Set up consistent development environment
- Share environment with others
- Testing software, workflows...
- Disposable environments
- Consistent workflows
- Disposable environments
- Consistent workflows
- More general
- Simple way to setup virtual machine
- Simple way to setup virtual machine
- Reproducible environment

---
Expand All @@ -71,41 +71,41 @@ slideOptions:
- Strong focus on workflow consistency
- (Re)use existing images
- Automatize VM creation and configuration
- Easier than with VirtualBox CLI and shell scripts
- Easier than with VirtualBox CLI and shell scripts
- Store in Git-friendly format
- For us:
- Management of VirtualBox VMs (testing, developing...)
- Sharing of VMs (debugging, workshops...)
- Management of VirtualBox VMs (testing, developing...)
- Sharing of VMs (debugging, workshops...)

---

## Some Useful Commands 1/2

- `vagrant init USERNAME/BOXNAME or URL`
- Initializes repository in current directory
- Creates `Vagrantfile` -> Text file (Git friendly)
- Initializes repository in current directory
- Creates `Vagrantfile` -> Text file (Git friendly)
- `vagrant up`
- Create VM and start it
- VM is stored in `${HOME}/.vagrant.d/boxes` (overruled by `VAGRANT_HOME`)
- Create VM and start it
- VM is stored in `${HOME}/.vagrant.d/boxes` (overruled by `VAGRANT_HOME`)
- `vagrant ssh`
- Connect to VM via ssh
- Connect to VM via ssh
- `vagrant destroy`
- Stops the virtual machine and removes its disk
- Stops the virtual machine and removes its disk

---

## Some Useful Commands 2/2

- `vagrant box list`
- Show available boxes
- Show available boxes
- `vagrant box remove NAMEOFBOX`
- Remove a box completely
- Remove a box completely
- `vagrant suspend`
- Suspends machine (sleep)
- Suspends machine (sleep)
- `vagrant halt`
- Shuts down machine keeping changes
- Shuts down machine keeping changes
- `vagrant reload --provision` or `vagrant provision`
- Rebuild (partially) built image
- Rebuild (partially) built image

---

Expand All @@ -118,9 +118,9 @@ Details available in [`vagrant_demo.md`](https://github.com/Simulation-Software-
## Structure of Vagrant Box

- File `Vagrantfile`
- Contains configuration of VM
- Contains configuration of VM
- Supplementary files, scripts etc. for configuring VM
- Example: `bootstrap.sh`
- Example: `bootstrap.sh`
- Files are usually text files (Git friendly)

---
Expand Down Expand Up @@ -150,16 +150,16 @@ Details available in [`vagrant_demo.md`](https://github.com/Simulation-Software-
## Exchanging Files

- Vagrant mounts shared folders
- Check output when VM starts
- Check output when VM starts

```bash
default: Mounting shared folders...
```
```bash
default: Mounting shared folders...
```

- Files can be exchanged between Guest and Host (bidirectional)
- Files can be exchanged between Guest and Host (bidirectional)
- Default:
- Directory containing `Vagrantfile` mounted to `/vagrant`
- Natural use case: Build your code in a VM
- Directory containing `Vagrantfile` mounted to `/vagrant`
- Natural use case: Build your code in a VM

---

Expand All @@ -172,21 +172,21 @@ Details available in [`vagrant_demo.md`](https://github.com/Simulation-Software-
vagrant package --base "NAMEOFVM" --output BOXNAME.box
```

- `NAMEOFVM` is name as shown in VirtualBox
- `BOXNAME` name to store box to
- `NAMEOFVM` is name as shown in VirtualBox
- `BOXNAME` name to store box to
- [Publish own boxes](https://developer.hashicorp.com/vagrant/docs/providers/virtualbox/boxes)

---

## Demo: Own box

- `bento/ubuntu-24.04`:
- [HashiCorp Cloud](https://portal.cloud.hashicorp.com/vagrant/discover/bento/ubuntu-24.04)
- [GitHub](https://github.com/chef/bento)
- [HashiCorp Cloud](https://portal.cloud.hashicorp.com/vagrant/discover/bento/ubuntu-24.04)
- [GitHub](https://github.com/chef/bento)
- `precice/precice-vm`:
- [HashiCorp Cloud](https://portal.cloud.hashicorp.com/vagrant/discover/precice/precice-vm)
- [GitHub](https://github.com/precice/vm)
- [User Documentation](https://precice.org/installation-vm.html)
- [HashiCorp Cloud](https://portal.cloud.hashicorp.com/vagrant/discover/precice/precice-vm)
- [GitHub](https://github.com/precice/vm)
- [User Documentation](https://precice.org/installation-vm.html)

---

Expand Down
21 changes: 10 additions & 11 deletions 02_virtualization_and_containers/virtualbox_slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ slideOptions:

- Linux, macOS, Windows
- Reasonably new hardware with virtualization support
- Check virtualization settings in your BIOS/UEFI
- Check virtualization settings in your BIOS/UEFI
- Sufficient space on hard drive
- VM uses a virtual hard drive, i.e., a file on your drive
- VM uses a virtual hard drive, i.e., a file on your drive
- Some video memory
- Exact requirements depend on VM: CPU cores, RAM, ...

Expand All @@ -54,10 +54,10 @@ slideOptions:

- Virtual hard drive as a file
- Multiple formats, for example:
- **VDI**: "Virtual Disk Image", VirtualBox' native format
- **VHD**: Format used by Microsoft
- **VMDK**: VMWare's virtual disk format
- Support for dynamic allocation
- **VDI**: "Virtual Disk Image", VirtualBox' native format
- **VHD**: Format used by Microsoft
- **VMDK**: VMWare's virtual disk format
- Support for dynamic allocation

---

Expand All @@ -74,9 +74,8 @@ slideOptions:
## Guest Additions

- Software and drivers to improves Guest's performance
- Better video support, shared clipboard, ...
- Better video support, shared clipboard, ...
- Might need additional packages. On Ubuntu 24.04 (guest):

```bash
sudo apt install virtualbox-guest-utils virtualbox-guest-x11
```
Expand All @@ -95,10 +94,10 @@ Details available in [`virtualbox_demo.md`](https://github.com/Simulation-Softwa
- Simple to set up and run
- Manual setup, but command-line interface exists
- Next step: Infrastructure as code
- Consistency of the environment?
- How to share a VM image with others?
- Consistency of the environment?
- How to share a VM image with others?

> "If you can't git diff a file format, it's broken."
> "If you can't git diff a file format, it's broken."

---

Expand Down
Loading

0 comments on commit c7d45cf

Please sign in to comment.