Browse files

Updated based on feedback, added links.

  • Loading branch information...
1 parent 18604d1 commit c8ba0f236b4fe6061bf03b57d1785153de024f32 Jakub Holy committed Aug 11, 2012
@@ -1,12 +1,17 @@
Commit On Day One Thanks to Vagrant & Puppet!
+Instructions for a quick, demo-based introduction into Vagrant. Get the [accompanying presentation at SlideShare](
+Time needed: 10 - 14 min.
What to prepare to follow the demo
1. Install Vagrant:
2. Install `$ vagrant gem install vagrant-vbguest`
3. Download a base box: `vagrant box add base`
4. Install VirtualBox, e,g, 4.1.16:
+ (For the presenter: Make sure the VB version is the same as VB Guest Additions installed on the base box.)
The demo
@@ -15,50 +20,71 @@ Note: Net connection required (Puppet accesses Apt repositories when installing
* browser for showing the web site
-* two terminal tabs (alt+cmd+arrow) in a fullscreen window
-* presentation in fullscreen
-* base box url
+* two terminal tabs in a fullscreen window (with suitable font size and color scheme)
+** Terminal 1: empty
+** Terminal 2: run 'cat copy' (diff, copy config) and type 'vim manifest/base.pp' w/o executing it yet
+* the presentation in fullscreen
* While running vagrant up: talk about puppet, show its config
* While running provision: Slide benefits
* While running destroy: Slide pitfalls
-### A simple VM
+### 1. A simple VM
+$ mkdir vm; cd vm
$ vagrant # displays help
$ vagrant init
-$ vim Vagrantfile
+$ diff Vagrantfile ../vm-finished/Vagrantfile # our 4 changes to the default config
+$ cp ../vm-finished/Vagrantfile .
+$ vim Vagrantfile # to show it (well documented; options to know)
-About Vagrantfile & modifications:
+Our modifications to the default Vagrantfile:
* Set the base box URL
-* Shared directories - add (by default: . as /vagrant)
-* Mapped ports - add Apache's 80
+** So that it will be automatically downloaded if not present on the machine
+* Shared directories - add www (by default: the dir with Vagrantfile is shared as /vagrant)
+* Mapped ports - make Apache's 80 available as localhost:8080 on the host
* Provisioner - enable puppet (altern.: shell, chef)
-* GUI mode for troubleshooting
+$ mkdir manifests; touch manifests/base.pp # empty puppet config
$ vagrant up
+ # Show our puppet manifest briefly (package installation, dir copy, service startup)
+ # Afterwards: Highlight parts of the output: VM creation, dir sharing, port mapping, puppet execution
-### Installing & configuring SW with Puppet
+### 2. Installing & configuring SW with Puppet
Reusable configuration - Puppet can install SW, create files, users etc., execute commands, start services - used to set up the system in a repeatable manner.
-=> cp -r vm-finished/manifests vm; cp -r vm-finished/files vm
-=> show the prepared manifest (to mention: Ruby-like syntax, classes, usage of 'types' (package, file, service, exec), dependencies)
+To learn more about Puppet read the [Minimalistic Practical Introduction to Puppet For Vagrant Users](
+ # Copy the previously shown manifest and the apache config files:
+$ cp ../vm-finished/manifests/base.pp manifests/base.pp
+$ cp -r ../vm-finished/files/ files
-Re-run provisioner: `vagrant provision` (run also at `up`)
+Re-run the puppet provisioner:
+vagrant provision
+(While running, show the slide Benefits. Afterwards show the input, highlight package installation, file copying, service starting.)
### Daily use
-$ vagrant ssh # ssh into as the user vagrant; use 'sudo' to get root access
-# Ex.: tail apache log & browse to the port on the host machine
-vagrant> TBD
+$ vagrant ssh # password-less ssh into the VM as the user vagrant
+vagrant$ sudo ls / # the user has password-less access to sudo
+ # Ex.: tail apache log & browse to the port on the host machine
$ vagrant halt # use 'vagrant suspend' to just sleep
$ vagrant destroy # remove the VM
+(While halting, show the slide Pitfalls.)
@@ -1,3 +1,4 @@
+diff Vagrantfile ../vm-finished/Vagrantfile
cp ../vm-finished/Vagrantfile .
cp ../vm-finished/manifests/base.pp manifests/base.pp
cp -r ../vm-finished/files/ files
@@ -1 +0,0 @@

0 comments on commit c8ba0f2

Please sign in to comment.