Vagrant and docker
-
Upload
duckduckgo -
Category
Technology
-
view
50 -
download
0
Transcript of Vagrant and docker
![Page 1: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/1.jpg)
Advanced Virtualization- Vagrant- Docker
Mr. Mohan PawarMr. Richard Joseph
![Page 2: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/2.jpg)
What is Vagrant ?
A CLI-based tool for streamlining the use of VM environments
(creation, provisioning, usage, & decommissioning)
![Page 3: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/3.jpg)
A "VM environment"?
Think of this as one or more VMs (based on a user-specified template) along with networking and possible in-guest software customization.
Examples.
The classic "3 tier" web/app/DB topology.
Trying out new technologies (CoreOS and etcd cluster, Open vSwitch).
![Page 4: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/4.jpg)
Use cases for Vagrant
Sharing VM environments with other Users.
Accelerating the creation of VM environments.
Automating software provisioning inside VM environments.
Providing a CLI for creating/destroying/accessing VM environments.
![Page 5: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/5.jpg)
What are the components ofVagrant?
![Page 6: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/6.jpg)
1. Vagrant
☞ Written in Ruby
☞ Multi-platform (Windows, Linux, OS X)
☞ CLI (no GUI)
![Page 7: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/7.jpg)
2. Vagrant provider
Interfaces with back-end virtualization solution.
Vagrant comes with a provider for VirtualBox.
Provider for VMware desktop products (Fusion & Workstation) available for a free.
Other providers available as open source projects.
![Page 8: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/8.jpg)
3. Vagrant box
Template used when creating VM environments in Vagrant.
Boxes are provider-specific.
Packer is a related product that can be used to help build Vagrant boxes.
![Page 9: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/9.jpg)
4. Vagrantfile
A text file (written with Ruby syntax) that describes the VM environment.
![Page 10: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/10.jpg)
Vagrant Demo Time !
![Page 11: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/11.jpg)
What is Docker?
A CLI tool for simplifying the use of Linux containers.
Docker is an open source engine that automates the deployment of any application as a lightweight, portable and self-sufficient that will run virtually anywhere.
Package your application into a standardized unit of software development.
![Page 12: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/12.jpg)
Docker : Name
Provide a uniformed wrapper around a software package:
«Build, Ship and Run Any App, Anywhere»
Similar to shipping containers: The container is always the same, regardless of the contents and thus fits on all trucks, cranes, ships, ...
![Page 13: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/13.jpg)
Virtual Machine vs Docker
![Page 14: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/14.jpg)
Docker technology
libvirt: Platform Virtualization
LXC (LinuX Containers): Multiple isolated Linux systems (containers) on a single host which is replace by LibContainers
Layered File System
![Page 15: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/15.jpg)
Run Platforms
Various Linux distributions (Ubuntu, Fedora, RHEL, Centos, openSUSE, ...)
Cloud (Amazon EC2, Google Compute Engine, Rackspacem, Azure) 2016-12:
Microsoft announces plans to integrate Docker with next release of Windows Server
![Page 16: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/16.jpg)
Docker is the world’s leading software containerization platform.
![Page 17: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/17.jpg)
Docker Terminology
Persisted snapshot that can be run
images: List all local images
run: Create a container from an image and execute a command in it
tag: Tag an image
pull: Download image from repository ◦
rmi: Delete a local image This will also remove intermediate images if no longer used
![Page 18: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/18.jpg)
Images vs Container as Class vs Object
![Page 19: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/19.jpg)
Dockerfile
Create images automatically using a build script: «Dockerfile»
Can be versioned in a version control system like Git or SVN, along with all dependencies
Docker Hub can automatically build images based on dockerfiles on Github
![Page 20: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/20.jpg)
Hands - On Lab Time...!
![Page 21: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/21.jpg)
Docker Use cases
Development Environment
Environments for Integration Tests
Quick evaluation of software
Microservices
Multi-Tenancy
Unified execution environment (dev test prod (local, VM, cloud, ...) e.g. BookMyShow migrated their 3 servers to docker.
![Page 22: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/22.jpg)
Future Scope
All IT companies are migrating their servers with docker.
Micro-service architecture
Serverless computing.
![Page 23: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/23.jpg)
Docker Vs Vagrant
![Page 24: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/24.jpg)
Conclusion
Containerization is the fastest, most resource effective, and most secure setup we know to date and docker is drifting the IT world in more agile way to achieved easy to create architecture.
![Page 25: Vagrant and docker](https://reader031.fdocuments.net/reader031/viewer/2022021813/587bded01a28ab834d8b7131/html5/thumbnails/25.jpg)
Thank You.