hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.27k stars 4.43k forks source link

Getting Started Documentation: Puppet parity #384

Closed pete0emerson closed 13 years ago

pete0emerson commented 13 years ago

Your puppet example at http://vagrantup.com/docs/getting-started/provisioning.html gets Apache running, but leaves it at the default site instead of connecting to your dummy index.html like the chef recipe does.

Here's my proposed change to the recipe, and a support file to go with it:

Basic Puppet Apache manifest

class lucid32 { package { "apache2": ensure => present, } file { "/etc/apache2/sites-available/project.conf": require => Package["apache2"], ensure => file, owner => root, group => root, mode => 0644, source => "/vagrant/project.conf", notify => Service["apache2"] } file { "/etc/apache2/sites-enabled/project.conf": ensure => "/etc/apache2/sites-available/project.conf", require => File["/etc/apache2/sites-available/project.conf"], notify => Service["apache2"] } file { "/etc/apache2/sites-enabled/000-default": ensure => absent, require => File["/etc/apache2/sites-enabled/project.conf"], notify => Service["apache2"] } service { "apache2": require => File["/etc/apache2/sites-enabled/project.conf"], ensure => running } }

include lucid32

In my vagrant root dir is project.conf. Note that unlike chef it's not as dynamic, but it does the job.

<VirtualHost *:80> DocumentRoot /vagrant

Pete

mitchellh commented 13 years ago

This is indeed a bug. Hm. I don't want to overwhelm the reader with a larger Puppet manifest. But I can't think of an immediately better way...

pete0emerson commented 13 years ago

I agree with the desire to not overwhelm the reader. If you documented every possible way vagrant can be touched and tested and used, you'd never get anything else done! How about leaving the documentation as is, putting fuller code in a repo, and then make a note in the documentation that the current puppet example is not identical to the Chef example, but for a full example go ? That way more novice Puppet users can still get going, but you don't overwhelm your documentation with extra stuff?

Thanks again for vagrant. It's really slick.

Pete

mitchellh commented 13 years ago

Thanks for your response. I've done just as you said :)

The website will be updated when Vagrant 0.8.0 is pushed (a week or so).