Containers Today and Beyond Michal Svec Flavio Castelli Product - - PowerPoint PPT Presentation

containers today and beyond
SMART_READER_LITE
LIVE PREVIEW

Containers Today and Beyond Michal Svec Flavio Castelli Product - - PowerPoint PPT Presentation

Containers Today and Beyond Michal Svec Flavio Castelli Product Manager Engineering Manager msvec@suse.com fcastelli@suse.com Agenda How it all started Why should I care? What are containers? Gimme more! Show me! 2 How


slide-1
SLIDE 1

Containers Today and Beyond

Michal Svec Product Manager msvec@suse.com Flavio Castelli Engineering Manager fcastelli@suse.com

slide-2
SLIDE 2

2

Agenda

  • How it all started
  • Why should I care?
  • What are containers?
  • Gimme more!
  • Show me!
slide-3
SLIDE 3

3

How it all started

slide-4
SLIDE 4

4

Bimodal IT – Challenges & Opportunities

Malcom McLean

slide-5
SLIDE 5

5

slide-6
SLIDE 6

6

How does it apply to me?

  • Running applications?
  • Providing services?
  • …?
slide-7
SLIDE 7

7

slide-8
SLIDE 8

8

slide-9
SLIDE 9

9

Why should I care?

slide-10
SLIDE 10

10

Bimodal IT – Challenges & Opportunities

slide-11
SLIDE 11

11

The two brains of IT

Mode 2 Mode 1

Agile, DevOps Waterfall, ITIL New & Uncertain Projects Conventional Projects Short Cycle (days, weeks) Long-cycle Times (months) Agility Reliability

slide-12
SLIDE 12

12

45% of organizatjons claim to have some form of bimodal capability today.

Traditional IT

Mode 1

Agile IT

Mode 2

Two Worlds of IT Need a Bridge

slide-13
SLIDE 13

13

Challenges in Context of Containers

Developers

Frequent releases vs. staged production schedule. “It works on my machine.”

  • Manage growing services
  • Reliability and uptime of new

applications

  • Time to market
  • Efficiency

New features; Faster please!

Operations

slide-14
SLIDE 14

14

What are containers, really?

slide-15
SLIDE 15

15

OS-level or application virtualization with Linux Containers (LXC) and container engine. Support for Windows Subsystem for Linux (WSL).

Containers

slide-16
SLIDE 16

16

What are containers – two views

  • Operations
  • Components of Linux kernel and OS
  • Image format, specific tools
  • Isolation
  • High density
  • Smaller, lighter, faster
  • Orchestration, management
  • Applications
  • Packaging
  • Share easily
  • Easily extensible
  • Scale up/down
  • Self-contained
  • Micro-services
slide-17
SLIDE 17

17

slide-18
SLIDE 18

18

Linux Containers

  • System containers

– Full system in the container (no kernel) – libvirt-lxc

  • Application containers

– One process per container – Docker, podman, ... – Rich ecosystem

slide-19
SLIDE 19

19

Linux Containers

Server Host OS Bins/Libs App A Guest OS Bins/Libs App B Guest OS Kernel Hypervisor (Type 2) Bins/Libs App A' Guest OS Bins/Libs App B' Application container System container Guest OS Kernel

slide-20
SLIDE 20

20

Advantages of Linux Containers

Lightweight virtualization solution

– Isolated from the other processes – 1 kernel to rule them all – Normal I/O – Dynamic changes possible without reboot – Nested virtualization is not a problem – No boot time or very short one

Isolate services (e.g. web server, ftp, …) Much more (see furter) ...

slide-21
SLIDE 21

21

Linux Containers – Limitations

They cannot run a different OS/architecture

– Cannot run Windows containers on Linux

Risk of escaping from containers

– Solution: user namespaces

Shared kernel with the host

– Syscall exploits can be exploited from within the container – Solution: seccomp2

Security measures

– Patch, don’t use root, kernel capabilities, confinement – Use VMs

slide-22
SLIDE 22

23

Containers and orchestration

  • Standalone container host

– SLES, container engine, registry (Portus)

  • Orchestrated datacenter

– SUSE CaaS Platform (Micro OS, K8s) – Containerized applications, micro services

  • Bi-modal datacenter

– SUSE CaaS Platform + SUSE OpenStack Cloud – Combination of traditional IT + agile (containers)

slide-23
SLIDE 23

25

Bimodal IT – Challenges & Opportunities

slide-24
SLIDE 24

26

slide-25
SLIDE 25

27

Too much going on, dive deeper! (And show me!)

slide-26
SLIDE 26

28

Containers are standardized

  • OCI runtime specification:
  • Defines container runtime (API, data structures, …)
  • How to start/stop/... containers
  • OCI provides a reference implementation: runC
  • OCI image format specification:
  • Defines how a container image is structured
  • Result:
  • Avoid vendor lock-in
  • Avoid fragmentation
  • Containers are truly portable
  • Foster innovation
slide-27
SLIDE 27

29

Running containers

  • Stand-alone node:
  • docker
  • podman
  • Container orchestration - kubernetes:
  • docker
  • containerd
  • CRI-O
  • ...
slide-28
SLIDE 28

30

Introducing podman

  • Drop-in replacement for docker
  • Focuses on single node operations, close to docker 1.13
  • No daemon
  • Relies on runC
  • Network implemented using CNI
slide-29
SLIDE 29

31

podman extra features

  • Has the concept of "pods":
  • Works like with kubernetes
  • Allows to group several containers together
  • Remove some isolation features on purpose (namespaces, cgroups)
  • Can work in rootless mode:
  • Regular unprivileged users can create containers
  • Containers are visible only to the user who created them
  • Makes containers even more secure
slide-30
SLIDE 30

32

Building containers

  • Most of you are probably using "docker build" but...
  • Other ways to build container images exist
  • Images delivered by SUSE are not built using docker:
  • Base container images
  • Derived images, think about all the CaaS Platform ones

How could that work?

slide-31
SLIDE 31

33

Repetition: standards matter!

  • Container images follow the OCI image specification
  • This is what grants image portability across container engines
  • Different ways to build OCI images:
  • docker
  • podman build
  • buildah
  • KIWI
  • ...
slide-32
SLIDE 32

34

Building with docker

  • Start from an existing container image (the "base" image)
  • Write a Dockerfile
  • Use Dockerfile directives to:
  • Execute commands: most used one "RUN" -> install/build software, ...
  • Write image metadata
  • ...
slide-33
SLIDE 33

35

Building with podman

  • Start from an existing container image (the "base" image)
  • Write a Dockerfile
  • Use Dockerfile directives to:
  • Execute commands: most used one "RUN" -> install/build software, ...
  • Write image metadata

YES – it's like the previous slide, podman is a drop-in replacement for docker

  • pen-source engine!
slide-34
SLIDE 34

36

Building with buildah

  • Can build using a simple Dockerfile
  • Allows more flexible build mode:
  • Start from existing image, create a container
  • Mount the container rootfs on the host
  • Interact with the container rootfs from the host: cp, scripts, zypper,…
  • Can produce small images with zero external dependencies (no need to have zypper around or

in the history of the image!)

slide-35
SLIDE 35

37

Building with KIWI

  • Appliance builder used at SUSE since a long time
  • Steeper learning curve compared to the others
  • Integrates nicely with the Open Build Service:
  • Automatic rebuilds of the images on package updates
  • Automatic rebuilds of derived image after base image is updated
  • Note well: OBS supports also builds using special Dockerfile
slide-36
SLIDE 36

38

Demo

slide-37
SLIDE 37

39

Pre-built images

  • Docker HUB

Community, handle with care!

  • SUSE Registry (registry.suse.com)

Enterprise contents, secure, verified, signed

SUSE Products (CaaS Platform, Cloud Application Platform, …)

What used to be in SLES Containers module (e.g.: Portus)

slide-38
SLIDE 38

40

Interacting with SUSE registry

  • SUSE publishes all its product images to registry.suse.com
  • SUSE products will automatically download images from there
  • This can be done in two ways:

Manifest file

Helm charts

  • SUSE’s helm charts are hosted on a public helm chart repository operated

by SUSE

slide-39
SLIDE 39

41

New world, old problems

  • Pulling images from an external registry can be expensive (time, bandwidth)
  • Pulling isn’t even possible in some scenarios (air-gapped environments)
  • The same applies to helm charts
  • RPM world had the same problems: solved with tools like SMT (more

recently RMT)

slide-40
SLIDE 40

42

Registry mirroring

  • Provide our customers a way to mirror the contents of an external registry

into an on-premise one

  • Solution available since CaaS Platform v3
  • More plans to improve it over the time
slide-41
SLIDE 41

43

Air-gapped scenario

  • Most complex case
  • Container hosts don’t have access to the internet
  • Nodes must be able to pull containers from local registry
  • We don’t want to change names of the container images

registry.suse.com/caasp:1.0 should NOT change name (eg: my-registry.acme.lan/caasp:1.0)

slide-42
SLIDE 42

44

Architecture

registry.suse.com mirror.local.lan mirror.secure.lan node1 node2 air-gapped network Secured drive with registry contents

slide-43
SLIDE 43

45

Helm chart mirroring

  • Helm charts can be downloaded using “helm-mirror”
  • The charts can be copied to a local HTTP server
  • Charts are just static files
slide-44
SLIDE 44

46

Container images mirroring

  • Use “helm-mirror” to get a list of all the images referenced by the charts
  • Use “skopeo sync” to download all the images:

Save the images into a local USB drive

Connect the drive to a machine inside of the air-gapped network

Use skopeo sync to import all the images into a local registry

  • Configure the container engine to use the local registry as a mirror of

registry.suse.com → no need to re-write image names

slide-45
SLIDE 45

47

Container engine: mirroring support

  • Out of the box docker supports mirroring only for the Docker Hub
  • We have a patch extending that, still going through upstream review
  • SUSE CaaS Platform v3+ have the patch applied
  • CRI-O patch is under review from upstream
slide-46
SLIDE 46

48

Container mirroring: next steps

  • Add Portus to the picture: used to secure on-premise container registry in a

more granular way

  • Allow the same registry to be used to mirror multiple external registries
  • Other ideas… please provide feedback
slide-47
SLIDE 47

55

And, finally...

slide-48
SLIDE 48

56

Some Related Content @ SUSECON 19

 Best Practices in Deploying SUSE CaaS Platform [TUT1131]

  • Tuesday @10:15, Wednesday @2:00

 Enabling Business Continuity with SUSE CaaS Platform [BOV1078]

  • Tuesday @2:00

 Getting Started with Kubernetes [HO1113]

  • Tuesday @2:00, Wednesday @2:00

 SUSE CaaS Platform Hands-On [HO1209]

  • Tuesday @4:30, Wednesday @2:00

 OpenStack and Kubernetes Get the Heat Treatment [HO1421]

  • Tuesday @10:15, Wednesday @10:00

 SUSE CaaS Platform vs SUSE Cloud Application Platform - Technical Tutorial [TUT1338]

  • Tuesday @10:15

 Simplifying AI Applications with Containers and K8s [TUT1151]

  • Wednesday @10:00

 Bringing container security to the next level using Kata containers [TUT1201]

  • Tuesday @4:30, Wednesday @3:15
  • Visit our Kiosk in the Technology Showcase
  • Join the Kubic project in the Developer Lounge
slide-49
SLIDE 49

57

More Related Content @ SUSECON 19

  • GitLab on SUSE CaaS Platform [HO1415]
  • Tuesday @10:15, Thursday @2:00
  • SUSE CaaS Platform as a Service: Deploying on Demand CaaS Platform Clusters [TUT1308]
  • Tuesday @3:15, Wedneesday @4:45
  • SUSE Application Delivery Platform Future [FUT1429]
  • Wednesday @4:45, Thursday @3:15
  • Tymlez Blockchain on SUSE CaaS Platform [BOV1313]
  • Tuesday @10:15
  • SUSE CaaS Platform: Day 2 - Where Do We Go From Here? [TUT1076]
  • Tuesday @4:30
  • Secure Modern Application Delivery with SUSE CaaS Platform [TUT1266]
  • Tuesday @4:30, Thursday @3:15
  • Integrating Identity with LDAP for SUSE CaaS Platform [TUT1254]
  • Tuesday @10:15, Thursday @3:15
  • Deploy and Scale Orchestrated Container Infrastructures on Your Own [TUT1166]
  • Tuesday @4:30
  • Visit our Kiosk in the Technology Showcase
  • Join the Kubic project in the Developer Lounge
slide-50
SLIDE 50

58

Still More Related Content @ SUSECON 19

 DevOps Pipelines on Jenkins-X with SUSE CaaS Platform [DEV1118]

  • Wednesday @3:15, Friday @10:15

 Deploy a Modern Data Platform with SQL Server 2019 on the SUSE Platform [SPO1456]

  • Thursday @11:15

 openSUSE Kubic - exploring the containerized frontiers [DEV1111]

  • Tuesday @11:30, Thursday @3:15

 Geekos, Containers, and Clouds.. Oh my! [CAS1406]

  • Tuesday @4:30, Thursday @2:00

 Containerized OpenStack: Preview Inside [TUT1273]

  • Thursday @4:30

 Containers Today and Beyond [TUT1198]

  • Tuesday @10:15

Demo?

 Visit our Kiosk in the Technology Showcase  Join the Kubic project in the Developer Lounge

slide-51
SLIDE 51