welcome everyone! docker and devops

24
Docker and DevOps Welcome everyone!

Upload: others

Post on 12-May-2022

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Welcome everyone! Docker and DevOps

Docker and DevOpsWelcome everyone!

Page 2: Welcome everyone! Docker and DevOps

Agenda

1. About Us2. Motivation3. Docker4. DevOps5. Demo6. Questions

Page 3: Welcome everyone! Docker and DevOps

About Us

Chad Duffin Jeff Guzman Justin Bankes Shane MacBride

Page 4: Welcome everyone! Docker and DevOps

Cutting edge technology● Docker and DevOps are used heavily in the tech industry● Knowing these tools can help land you a career

Liatrio wants to give back to the community● Liatrio has a symbiotic relationship with CSU Chico● We want to become more involved with Butte

These tools and practices are nifty● We actively use these tools in class and at work● Want to share the knowledge to help prepare others for the industry

Motivation

Page 5: Welcome everyone! Docker and DevOps

Docker is...

...the leading software container platform.

Run software in a highly repeatable and predictable environment● Eliminates the notorious worked on my machine problem

Run software more efficiently● Run apps side by side with higher compute density● One machine instead of many

Develop, test and deploy software faster● Used in software delivery pipelines● Allows for much more rapid software development and delivery

Page 6: Welcome everyone! Docker and DevOps
Page 7: Welcome everyone! Docker and DevOps

Containers

Docker is software that you install on a computer, which can run containers.

A container is a logically isolated environment on your computer.● Dedicated to running a piece of software

○ Includes all of the dependencies for the software● Runs on top of the host kernel● Lightweight, fast

What is a container not?● A virtual machine

○ Fundamentally different architecture● A complete operating system

Page 8: Welcome everyone! Docker and DevOps
Page 9: Welcome everyone! Docker and DevOps

Docker containers and virtual machines are not mutually exclusive.

Page 10: Welcome everyone! Docker and DevOps

Images

Docker containers are created from Docker images.

What is an image?● A set of layers that defines everything necessary to run a desired piece of software● Immutable, can be thought of as a template for containers

The relationship between an image and a container is the same as the relationship between a class and an instance of that class.

● i.e. a container is the runtime equivalent of an image

Why layers?● An image needs a starting point; this is the base layer● A base layer can be any image● Reuse of layers can:

○ Save a significant amount of memory○ Allow for rapid building and rebuilding of images

Page 11: Welcome everyone! Docker and DevOps

Volumes

Docker volumes facilitate persistent storage for containers.

Wait. Containers don’t have persistent storage by default?● Nope● When a container is created from an image, it adds a write layer● This write layer is where all changes to files or directories go at runtime● When the container ends, the write layer is destroyed

Volumes allow us to kill two birds with one stone.● The changes that we make in a container can be saved

○ Very granular, can be a single file or entire directory● We can include files or entire directories that already exist on the host machine

Docker volumes can be mounted to multiple containers at the same time

Page 12: Welcome everyone! Docker and DevOps

Volumes cont.

There are four types of Docker volumes:● Bind mounted● Anonymous● Named● tmpfs

Bind Mounted● Allow you to mount files or directories on the host machine

Anonymous● When you want Docker to manage how and where the files are stored● Can be difficult to refer to and mount again as the names are hashes

Named● Very similar to an anonymous volume, but it can be given a name

tmpfs● Similar to anonymous / named volumes, but allows the data written to it to never

be written to permanent memory.

Page 13: Welcome everyone! Docker and DevOps

Dockerfiles

Dockerfiles are files that specify the steps required to build an image● Each step in the Dockerfile adds a layer to the image● A text file called Dockerfile with directives that resemble shell commands

Dockerfiles inherently provide some benefits:● The process of building an image is transparent, every step can be seen● The Dockerfile can be stored in source control

○ Keeps a history of changes that the resulting image underwent

It is important to optimize your Dockerfile● Minimize the number of layers● Do not install unnecessary dependencies● Many other ways to optimize

Optimizing Dockerfiles will:● Result in smaller images● Fewer security risks

Page 14: Welcome everyone! Docker and DevOps
Page 15: Welcome everyone! Docker and DevOps

DevOps is...

...a cultural and professional movement, focused on how we build and operate high velocity organizations, born from the experiences of its practitioners.

Culture● Inclusion● Collaboration● Fail fast, fail often

Process● How we reach our goals● Coupled tightly with our culture and tools● Improve the process iteratively

Tools● Enable work to be performed in a structured, repeatable and consistent manner● Enforces delivery pipelines through which work can be automated and measured

Page 16: Welcome everyone! Docker and DevOps

Why is DevOps necessary?

Traditional software development was done using the waterfall method● Not flexible to change● Incremental and sequential● Entire product and all dependencies mapped out before development begins

Why is this bad?● Cannot react to changes in market or customer needs● No value being gained until product completion● Deadlines are very difficult to meet, and are typically missed● Fosters animosity between teams● Slow feedback during development can result in obsolete features

Page 17: Welcome everyone! Docker and DevOps

Why is DevOps necessary? cont.

Page 18: Welcome everyone! Docker and DevOps

The Three Ways are principles that describe fundamental practices and beliefs of DevOps.

● Developed by seasoned professionals in the field● Frequently referenced and used

Systems Thinking● Learning how everything is interconnected, from concept to customer

Amplify Feedback Loops● Cutting the time between action and reaction, failure and success

Culture Of Continual Experimentation And Learning● Continual experimentation, taking risks and learning from failure● Repetition and practice is the prerequisite to mastery

The Three Ways

Page 19: Welcome everyone! Docker and DevOps

Software Delivery

A typical enterprise team’s software delivery is a nightmare.

● Giant, complex teams and applications

● Many dependencies across the board○ App A version 2.0.0 depends on App B version 1.5.0

● Lack of automation○ Deployments of artifacts, server configurations, etc. are manual

● Progress moves slowly○ Inadequate communication, lack of resources

● Time is more costly

Page 20: Welcome everyone! Docker and DevOps

Enter DevOps

DevOps practices and principles can be used to greatly improve the software delivery process.

To name a few…

● Immediate feedback on code changes, chat notifications

● Ability to generate environments at the push of a button

● Everything lives in source control

● Automated tests performed on code changes

● Dashboards for visibility

Page 21: Welcome everyone! Docker and DevOps

Docker and DevOps

Docker has multiple applications in the realm of DevOps● Consistent, predictable environments

○ Custom images that can replicate the desired production environment and even be deployed in production

● Build images○ Containers with all of the dependencies needed to build a project can

be spun up and torn down at will○ Allows the host machine to never install build dependencies for

the projects● Ease of deployment

○ An enterprise can develop an application and toss it into a Docker image

○ Docker containers can then be created from this image and run on a huge number of platforms

● Security○ Applications running in containers are entirely isolated from each

other

Page 22: Welcome everyone! Docker and DevOps

Docker Demo

Page 23: Welcome everyone! Docker and DevOps

Questions?