Vagrant as the foundation of your web development environment.

36
PROFESSIONAL TRAINING STUDYX STUDYX The foundation of your web development environment PROFESSIONAL TRAINING STUDYX STUDYX 1 Vagrant 1

description

LAMP, the basic concept of our work environment. But how do we set up this environment? During this talk I want you to think about the disadvantages of development on your own laptop and the benefits of automation through Vagrant, Virtualbox ... Take control of your own and colleagues working environment ... even within X years.

Transcript of Vagrant as the foundation of your web development environment.

Page 1: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

The foundation of your web development environment

PROFESSIONAL TRAININGSTUDYXSTUDYX

1

Vagrant

1

Page 2: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Hello I’m Xavier

•Web entrepreneur

•Tweet: @ksafke

•http://www.linkedin.com/in/xavierd

•http://www.dx-solutions.be

•http://www.studyx.be

2

PROFESSIONAL TRAININGSTUDYXSTUDYX

2

Page 3: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Poll

•Have you ever tried to install MySQL on your laptop?

3

3

Page 4: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Poll

•Have you ever tried to install MySQL on your laptop?

•Have you ever broken your development environment and spend hours to fix it?

4

4

Page 5: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Text

Mixed dev environments

5

PROFESSIONAL TRAININGSTUDYXSTUDYX

5

Page 6: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Text

6

PROFESSIONAL TRAININGSTUDYXSTUDYX

New college

6

Page 7: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

New employee

7

#FRUSTRATION

New MAMP means:

Newer PHP versionNewer MySQL versionVarnish, Memcached ???

PROFESSIONAL TRAININGSTUDYXSTUDYX

7

Page 8: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Text

8

PROFESSIONAL TRAININGSTUDYXSTUDYX

#Fuuuuuuuuuuuuu

8

Page 9: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

New laptopText

9

PROFESSIONAL TRAININGSTUDYXSTUDYX

9

Page 10: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

New laptop

10

PROFESSIONAL TRAININGSTUDYXSTUDYX

#FRUSTRATION

New MAMP means:

Newer PHP versionNewer MySQL versionVarnish, Memcached ???

10

Page 11: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Text

11

PROFESSIONAL TRAININGSTUDYXSTUDYX

#Fuuuuuuuuuuuuu

11

Page 12: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Text

12

PROFESSIONAL TRAININGSTUDYXSTUDYX

12

Page 13: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Text

13

Vagrant to the rescue

PROFESSIONAL TRAININGSTUDYXSTUDYX

13

Page 14: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

http://www.vagrantup.com

Credit goes toMitchell Hashimoto@mitchellh

Vagrant“Create and configure lightweight reproducible, and

portable development environments.”

14

Creator of Vagrant

14

Page 15: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Requirements

•VirtualBox http://www.virtualbox.com

•Vagrant http://www.vagrantup.com

•Git http://git-scm.com/

15

15

Page 16: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

16

PROFESSIONAL TRAININGSTUDYXSTUDYX

credit www.digitalforreallife.com

16

Page 17: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Vagrant subcommands

17

17

Page 18: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

#1 VagrantFile

18

VagrantFile

18

Page 19: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

#2/3 Virtualbox

19

Virtualbox creates a virtual machine

19

Page 20: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

#4/5 Provisioning

20

20

Page 21: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

#6 SSH

21

21

Page 22: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Back to the Vagrantfile

22

Start configuration block2 =

vagrant 1.1

22

Page 23: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Vagrantfile

23

Installing the required box

23

Page 24: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Vagrantfile

24

Installing the required box

http://www.vagrantbox.es/All boxes listed

24

Page 25: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Vagrantfile

25

Installing the required box

http://www.vagrantbox.es/

~/.vagrant.d/boxes

All boxes listed

Boxes locally stored @

25

Page 26: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

VagrantFile

26

Customize the VM

26

Page 27: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Vagrantfile

27

Network

27

Page 28: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Port forwarding

Vagrantfile

28

28

Page 29: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Shared folder

Vagrantfile

29

29

Page 30: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

DEMO

30

[email protected]:Ksafke/phpbeneluxdemo1.git

30

Page 31: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Chef

•http://www.opscode.com/chef/

31

Provisioning with Chef

31

Page 32: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Cookbooks

•http://community.opscode.com/cookbooks

32

32

Page 33: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Cookbooks•http://community.opscode.com/cookbooks

33

33

Page 34: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

DEMO

34

[email protected]:Ksafke/phpbeneluxdemo2.git

34

Page 35: Vagrant as the foundation of your web development environment.

PROFESSIONAL TRAININGSTUDYXSTUDYX

Questions?

35

35

Page 36: Vagrant as the foundation of your web development environment.

•Xavier Dekeyster

•Tweet: @ksafke

•http://www.linkedin.com/in/xavierd

•http://www.dx-solutions.be

•http://www.studyx.bePROFESSIONAL TRAININGSTUDYXSTUDYX

Thank You!

36

36