Slide 1

Slide 1 text

DevOps ToolChain Fwz DevOps Workshop Day I

Slide 2

Slide 2 text

What’s included?

Slide 3

Slide 3 text

Vagrant

Slide 4

Slide 4 text

What’s Vagrant? Create and configure lightweight, reproducible, and portable development environments.

Slide 5

Slide 5 text

Vagrantfile Example

Slide 6

Slide 6 text

Why Vagrant? Infrastructure as code. Identical environments across machines. Reproduce production environment on local machines.

Slide 7

Slide 7 text

Install Vagrant - Download from https://www.vagrantup.com/ - Execute the installation by following the steps.

Slide 8

Slide 8 text

Boot Vagrant Box vagrant init ubuntu/trusty64 vagrant up vagrant ssh

Slide 9

Slide 9 text

Vagrant Boxes More boxes can be found by the URL below. https://atlas.hashicorp.com/boxes/search

Slide 10

Slide 10 text

Ansible

Slide 11

Slide 11 text

What’s Ansible? Ansible is the simplest way to automate apps and IT infrastructure.

Slide 12

Slide 12 text

Similar Tools - Mina, Capistrano. - Chef, Puppet. - AWS Code Deploy. - … and more

Slide 13

Slide 13 text

Why Ansible? ANSIBLE - Written in Python (supporting Python 3 soon). - Lightweight. - Open source. - Playbook written in YAML. - Various modules are available. CHEF, PUPPET - Written in Ruby. - Heavyweight. - Open source. - Ruby language is required. - Widely support. - Various recipes are available.

Slide 14

Slide 14 text

Ansible Playbook Structure - Inventory - Vars, Group Vars, Host Vars - Roles - Tasks

Slide 15

Slide 15 text

Install Ansible sudo pip install ansible ansible-playbook --version

Slide 16

Slide 16 text

Write your own Ansible Playbook - Set up an Ubuntu server. - Install common modules (build-essentials) - Install nginx. - Start nginx. - Check if it works.

Slide 17

Slide 17 text

Docker

Slide 18

Slide 18 text

What’s Docker? Docker allows you to package an application with all of its dependencies into a standardized unit for software development.

Slide 19

Slide 19 text

Docker vs Virtual Machines

Slide 20

Slide 20 text

Why Docker - Package, containerize, and standardize applications. - Eliminate Environment Inconsistencies. - Facilitate Microservices Architecture. - Accelerate Developer Onboarding

Slide 21

Slide 21 text

Install Docker Install Docker Toolbox by following the guide in this URL: https://docs.docker.com/engine/installation/mac/

Slide 22

Slide 22 text

Docker Toolbox - Docker Engine - Docker Machine - Docker Compose - Kitematic - And more...

Slide 23

Slide 23 text

Start Docker Machine docker-machine create dev docker-machine env dev docker-machine start dev

Slide 24

Slide 24 text

Run a Docker container docker run redis docker run -d --name redis redis

Slide 25

Slide 25 text

Docker Port Binding

Slide 26

Slide 26 text

docker run -d --name nginx -p 6969:80 nginx Docker Port Binding