読者です 読者をやめる 読者になる 読者になる

by shigemk2

当面は技術的なことしか書かない

DevOps with Vagrant and KVM/qemu #linuxcon

勉強会

KVMは、ハードウェアのエミュレーションやゲストOSの管理用のフロントエンドとして「QEMU」を使い、Linuxの上でゲストOSを動かすので、一見前者のホストOS型に見えます。しかしLinux自体をハイパーバイザにしてしまうことを考慮すると、後者のハイパーバイザ型といえるでしょう。

1. what is devops

If you're going to do operations reliably, you need to make it reproducible and programmatic.

The nature of "operations"

cloud changes

Growing distributed systems Software development practice "cooperation and collaboration" between dev and oos

Gap between Development and Operations

  • Goals
  • Process and approach
  • Tools

Infrastructure engineering becomes like a development

  • Infrastructure as a code
  • Adption of Vagrant

2. introduction to vagrant

development environment on VM, container or cloud(just one command) same

  • among team members.
  • among production and development. VirtualBox, AWS EC2

"Mature, stable, proven" by author, Mr.Mitchell Hashimoto

1st target is web engineers.(Web application developers) Programmers, PHPers, Rubyist...like that.

  • Infrastructure engineer programmer
  • Deploy on VMwarevCenter,Openstack
  • Test Puppet, Chef or Ansible
  • provision script

Vagrant work flow

Just run

$ vagrant up

It download "vagrant box" and start provision script

What is Vagrant Box

  • Preconfigured VM images
  • Base for environment
  • Community shared
  • VagrantCloud.com: shares boxes

Launched at 2010 2013, March, Version 1.1+ Plugins: 3rd party projects Vagrant-KVM plugin start

Vagrant provisioner

Shell, Puppet, Ansible, Docker and Chef

Vagrant Plugins

Supported plugins from 1.1+(2013.2-)

Provider: Driver for VM monitor

Many provider plugins(LXC, AWS, Docker, IIJ and so on......)

知って見るみるKVM(1):Linux標準の仮想化技術「KVM」の仕組み (1/2) - @IT

3. vagrant-kvm

Current Status of Vagrant-KVM

V0.1.8 March, 2014

  • Basic Vagrant features(private nw, NFS, provisioning, GUI, customize)
  • Plan9 host file share
  • QEMU 1.1 - 1.7

V0.2.0 will come May, 2014

  • Multiple guests and networks
  • Bridged network
  • Address conflict resolver

V0.2.0 will come May, 2014

Vagrant-KVM vs libvirt

  • kvm plugin: simple, single host
  • libvirt plugin: multi-host, multi-vmm

Quality and Test

  • Rspec to test the plugins
  • Test vagrant-kvm in guest OS on KVM prepared by vagrant-kvm

  • CI: Github/Travis-CI combination

  • Github.com: development platform
  • Travis-CI: test automation platform
  • RVM: Ruby Virtual Machines p

OSS and CI

Every commit/patch and PRs are tested with TravisCI and Rspec

Issues Fixed

There are many issues to be fixed in related projects.

4. Vagrant-kvm Furure plan

  • Support full features of Vagrant
  • Multiple architecture (ARM)
  • Linux kernel debug support

Change the way:Infrastructure

5. New trend on DevOps

Packaging for deploy

Application container help agile deployment

Packer

  • Create virtual machine image for several kind of cloud virtulization infrastructures
  • Use JSON as profile desciption language.

Packer

Docker

  • Portable container for Application

Containers vs. VMs

Vagrant and Docker

  • Prepare Docker envirnment on Vagrant
  • Auto detect guest OS and install proper packages
  • Start Docker environment only one line command

Stack of DevOps infrastructure

  • Vagrant enables control over infrastructure tool sets

Work flow example

Creation of Guest Images

Future of Varant/vagrant-kvm

  • Enbedded development with ARM support
  • Various cloud and private platform support