Virtualization and Containerization What is Virtualization? What - - PowerPoint PPT Presentation

virtualization and containerization what is
SMART_READER_LITE
LIVE PREVIEW

Virtualization and Containerization What is Virtualization? What - - PowerPoint PPT Presentation

Virtualization and Containerization What is Virtualization? What is Containerization? What does this do for us? Virtual Machines: Terminology Types of Hypervisors VirtualBox and VMWare


slide-1
SLIDE 1

Virtualization and Containerization

slide-2
SLIDE 2

What is Virtualization?

slide-3
SLIDE 3

What is Containerization?

slide-4
SLIDE 4

What does this do for us?

slide-5
SLIDE 5

Virtual Machines: Terminology

○ ○ ○ ○ ○ ○

slide-6
SLIDE 6

○ ○ ○ ○ ○

Types of Hypervisors

slide-7
SLIDE 7

VirtualBox and VMWare

slide-8
SLIDE 8

Creating a VirtualBox VM

○ I make virtual machines for you!

slide-9
SLIDE 9

In a little more detail maybe...

slide-10
SLIDE 10

Looking at Docker

slide-11
SLIDE 11

Installing Docker

slide-12
SLIDE 12

Docker Prerequisites

$ uname -r 3.11.0-15-generic

slide-13
SLIDE 13

Docker APT Sources

$ apt-get update && apt-get install apt-transport-https ca-certificates $ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 -- recv-keys 58118E89F3A912897C070ADBF76221572C52609D

slide-14
SLIDE 14

Docker APT Sources

slide-15
SLIDE 15

Install and Run the Docker Service

slide-16
SLIDE 16

Other Install Notes

slide-17
SLIDE 17

Installing Containers in Docker

slide-18
SLIDE 18

What to do next?

slide-19
SLIDE 19

systemd-nspawn

○ ○

slide-20
SLIDE 20

Requirements

slide-21
SLIDE 21

Getting Started

○ mkdir ~/MyContainer ○ # Arch: pacstrap -i -c -d ~/MyContainer base ○ # Debian: debootstrap -arch=amd64 jessie ~/MyContainer

slide-22
SLIDE 22

The Quick Way

systemd-nspawn -b -D ~/MyContainer -n machinectl login MyContainer

slide-23
SLIDE 23

But...

○ ○

slide-24
SLIDE 24

Starting at host boot

○ systemctl enable machines.target ○ systemctl enable systemd-nspawn@MyContainer.service ○ cp /usr/lib/systemd/system/systemd-nspawn@.service /usr/lib/systemd/system/MyContainer.service ○ Edit to your heart’s content (we’ll get there in a sec) ○ systemctl enable machines.target ○ systemctl enable MyContainer.service

slide-25
SLIDE 25

Customizing your container

slide-26
SLIDE 26

Real life example

ExecStart=/usr/bin/systemd-nspawn

  • -quiet --keep-unit
  • -boot
  • -link-journal=try-guest
  • -directory=/var/lib/container/git
  • -bind=/tank/git-gogs:/srv/gogs
  • -bind=/home/nate
  • -network-bridge=br0
slide-27
SLIDE 27

You don’t want to hear it...

slide-28
SLIDE 28

File Permissions

○ ○ ○ ○

slide-29
SLIDE 29

Collisions

○ ○ ○ ○ ○

slide-30
SLIDE 30

machinectl

○ machinectl poweroff MyContainer # power down a container ○ machinectl start MyContainer # power on a container ○ machinectl list # list running containers ○ machinectl show MyContainer # show details about MyContainer ○