Skip to content

Commit

Permalink
completing the Vagrant config
Browse files Browse the repository at this point in the history
now using Puppet for simplicity
should support VB as well as LXC oob
  • Loading branch information
02strich committed Dec 4, 2013
1 parent cb08ab9 commit 6a43533
Show file tree
Hide file tree
Showing 501 changed files with 24,934 additions and 75 deletions.
88 changes: 13 additions & 75 deletions Vagrantfile
Expand Up @@ -3,87 +3,25 @@

Vagrant.configure("2") do |config|
# Base box to build off, and download URL for when it doesn't exist on the user's system already
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
config.vm.box = "precise64"

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine.
config.vm.network :forwarded_port, guest: 8000, host: 8000
config.vm.network :forwarded_port, guest: 80, host: 8000

# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network :private_network, ip: "192.168.33.10"

# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network :public_network
config.vm.provider :virtualbox do |vb, override|
vb.customize ["modifyvm", :id, "--memory", "1024"]

# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
#config.vm.synced_folder ".", "~/evap", {
override.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210.box"
end

# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider :virtualbox do |vb|
# # Don't boot with headless mode
# vb.gui = true
#
# Use VBoxManage to customize the VM. For example to change memory:
vb.customize ["modifyvm", :id, "--memory", "1024"]
config.vm.provider :lxc do |v, override|
override.vm.box_url = "http://bit.ly/vagrant-lxc-precise64-2013-10-23"
end
#
# View the documentation for the provider you're using for more
# information on available options.

# Enable provisioning with Puppet stand alone. Puppet manifests
# are contained in a directory path relative to this Vagrantfile.
# You will need to create the manifests directory and a manifest in
# the file base.pp in the manifests_path directory.
#
# An example Puppet manifest to provision the message of the day:
#
# # group { "puppet":
# # ensure => "present",
# # }
# #
# # File { owner => 0, group => 0, mode => 0644 }
# #
# # file { '/etc/motd':
# # content => "Welcome to your Vagrant-built virtual machine!
# # Managed by Puppet.\n"
# # }
#
# config.vm.provision :puppet do |puppet|
# puppet.manifests_path = "manifests"
# puppet.manifest_file = "init.pp"
# end

config.vm.provision :shell, :inline => "gem install chef --version 11.4.2 --no-rdoc --no-ri --conservative"

# Enable provisioning with chef solo, specifying a cookbooks path, roles
# path, and data_bags path (all relative to this Vagrantfile), and adding
# some recipes and/or roles.
#
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe "apt"
chef.add_recipe "apache2::mod_wsgi"
chef.add_recipe "build-essential"
#chef.add_recipe "git" # doesn't work so far, maybe here's the solution: https://github.com/opscode-cookbooks/git/pull/16
chef.add_recipe "python"
chef.add_recipe "vim"
#
# # You may also specify custom JSON attributes:
# chef.json = { :mysql_password => "foo" }

config.vm.provision :puppet do |puppet|
puppet.module_path = "deployment/modules"
puppet.manifests_path = "deployment"
puppet.manifest_file = "site.pp"
end


config.vm.provision :shell, :inline => "apt-get install -y libxml2-dev libxslt-dev"
config.vm.provision :shell, :inline => "pip install -r /vagrant/requirements.txt"
#config.vm.provision :shell, :inline => "ls"
end
133 changes: 133 additions & 0 deletions deployment/modules/apache/CHANGELOG.md
@@ -0,0 +1,133 @@
## 2013-09-06 Release 0.9.0
### Summary:
This release adds more parameters to the base apache class and apache defined
resource to make the module more flexible. It also adds or enhances SuPHP,
WSGI, and Passenger mod support, and support for the ITK mpm module.

### Backwards-incompatible Changes:
- Remove many default mods that are not normally needed.
- Remove `rewrite_base` `apache::vhost` parameter; did not work anyway.
- Specify dependencies on stdlib >=2.4.0 (this was already the case, but
making explicit)
- Deprecate `a2mod` in favor of the `apache::mod::*` classes and `apache::mod`
defined resource.

### Features:
- `apache` class
- Add `httpd_dir` parameter to change the location of the configuration
files.
- Add `logroot` parameter to change the logroot
- Add `ports_file` parameter to changes the `ports.conf` file location
- Add `keepalive` parameter to enable persistent connections
- Add `keepalive_timeout` parameter to change the timeout
- Update `default_mods` to be able to take an array of mods to enable.
- `apache::vhost`
- Add `wsgi_daemon_process`, `wsgi_daemon_process_options`,
`wsgi_process_group`, and `wsgi_script_aliases` parameters for per-vhost
WSGI configuration.
- Add `access_log_syslog` parameter to enable syslogging.
- Add `error_log_syslog` parameter to enable syslogging of errors.
- Add `directories` hash parameter. Please see README for documentation.
- Add `sslproxyengine` parameter to enable SSLProxyEngine
- Add `suphp_addhandler`, `suphp_engine`, and `suphp_configpath` for
configuring SuPHP.
- Add `custom_fragment` parameter to allow for arbitrary apache
configuration injection. (Feature pull requests are prefered over using
this, but it is available in a pinch.)
- Add `apache::mod::suphp` class for configuring SuPHP.
- Add `apache::mod::itk` class for configuring ITK mpm module.
- Update `apache::mod::wsgi` class for global WSGI configuration with
`wsgi_socket_prefix` and `wsgi_python_home` parameters.
- Add README.passenger.md to document the `apache::mod::passenger` usage.
Added `passenger_high_performance`, `passenger_pool_idle_time`,
`passenger_max_requests`, `passenger_stat_throttle_rate`, `rack_autodetect`,
and `rails_autodetect` parameters.
- Separate the httpd service resource into a new `apache::service` class for
dependency chaining of `Class['apache'] -> <resource> ~>
Class['apache::service']`
- Added `apache::mod::proxy_balancer` class for `apache::balancer`

### Bugfixes:
- Change dependency to puppetlabs-concat
- Fix ruby 1.9 bug for `a2mod`
- Change servername to be `$::hostname` if there is no `$::fqdn`
- Make `/etc/ssl/certs` the default ssl certs directory for RedHat non-5.
- Make `php` the default php package for RedHat non-5.
- Made `aliases` able to take a single alias hash instead of requiring an
array.

## 2013-07-26 Release 0.8.1
### Bugfixes:
- Update `apache::mpm_module` detection for worker/prefork
- Update `apache::mod::cgi` and `apache::mod::cgid` detection for
worker/prefork

## 2013-07-16 Release 0.8.0
### Features:
- Add `servername` parameter to `apache` class
- Add `proxy_set` parameter to `apache::balancer` define

### Bugfixes:
- Fix ordering for multiple `apache::balancer` clusters
- Fix symlinking for sites-available on Debian-based OSs
- Fix dependency ordering for recursive confdir management
- Fix `apache::mod::*` to notify the service on config change
- Documentation updates

## 2013-07-09 Release 0.7.0
### Changes:
- Essentially rewrite the module -- too many to list
- `apache::vhost` has many abilities -- see README.md for details
- `apache::mod::*` classes provide httpd mod-loading capabilities
- `apache` base class is much more configurable

### Bugfixes:
- Many. And many more to come

## 2013-03-2 Release 0.6.0
- update travis tests (add more supported versions)
- add access log_parameter
- make purging of vhost dir configurable

## 2012-08-24 Release 0.4.0
### Changes:
- `include apache` is now required when using `apache::mod::*`

### Bugfixes:
- Fix syntax for validate_re
- Fix formatting in vhost template
- Fix spec tests such that they pass

2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4
e62e362 Fix broken tests for ssl, vhost, vhost::*
42c6363 Changes to match style guide and pass puppet-lint without error
42bc8ba changed name => path for file resources in order to name namevar by it's name
72e13de One end too much
0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.
273f94d fix tests
a35ede5 (#13860) Make a2enmod/a2dismo commands optional
98d774e (#13860) Autorequire Package['httpd']
05fcec5 (#13073) Add missing puppet spec tests
541afda (#6899) Remove virtual a2mod definition
976cb69 (#13072) Move mod python and wsgi package names to params
323915a (#13060) Add .gitignore to repo
fdf40af (#13060) Remove pkg directory from source tree
fd90015 Add LICENSE file and update the ModuleFile
d3d0d23 Re-enable local php class
d7516c7 Make management of firewalls configurable for vhosts
60f83ba Explicitly lookup scope of apache_name in templates.
f4d287f (#12581) Add explicit ordering for vdir directory
88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall
a776a8b (#11071) Fix to work with latest firewall module
2b79e8b (#11070) Add support for Scientific Linux
405b3e9 Fix for a2mod
57b9048 Commit apache::vhost::redirect Manifest
8862d01 Commit apache::vhost::proxy Manifest
d5c1fd0 Commit apache::mod::wsgi Manifest
a825ac7 Commit apache::mod::python Manifest
b77062f Commit Templates
9a51b4a Vhost File Declarations
6cf7312 Defaults for Parameters
6a5b11a Ensure installed
f672e46 a2mod fix
8a56ee9 add pthon support to apache
26 changes: 26 additions & 0 deletions deployment/modules/apache/Gemfile
@@ -0,0 +1,26 @@
source 'https://rubygems.org'

group :development, :test do
gem 'rake', :require => false
gem 'rspec-puppet', :require => false
gem 'puppetlabs_spec_helper', :require => false
gem 'serverspec', :require => false
gem 'rspec-system', :require => false
gem 'rspec-system-puppet', :require => false
gem 'rspec-system-serverspec', :require => false
gem 'puppet-lint', :require => false
end

if facterversion = ENV['FACTER_GEM_VERSION']
gem 'facter', facterversion, :require => false
else
gem 'facter', :require => false
end

if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false
else
gem 'puppet', :require => false
end

# vim:ft=ruby
78 changes: 78 additions & 0 deletions deployment/modules/apache/Gemfile.lock
@@ -0,0 +1,78 @@
GEM
remote: https://rubygems.org/
specs:
builder (3.2.2)
diff-lcs (1.2.4)
facter (1.7.2)
hiera (1.2.1)
json_pure
highline (1.6.19)
json_pure (1.8.0)
kwalify (0.7.2)
metaclass (0.0.1)
mocha (0.14.0)
metaclass (~> 0.0.1)
net-scp (1.1.2)
net-ssh (>= 2.6.5)
net-ssh (2.6.8)
nokogiri (1.5.10)
puppet (3.2.4)
facter (~> 1.6)
hiera (~> 1.0)
rgen (~> 0.6.5)
puppet-lint (0.3.2)
puppetlabs_spec_helper (0.4.1)
mocha (>= 0.10.5)
rake
rspec (>= 2.9.0)
rspec-puppet (>= 0.1.1)
rake (10.1.0)
rbvmomi (1.6.0)
builder
nokogiri (>= 1.4.1)
trollop
rgen (0.6.6)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.5)
rspec-expectations (2.14.2)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.3)
rspec-puppet (0.1.6)
rspec
rspec-system (2.2.0)
kwalify (~> 0.7.2)
net-scp (~> 1.1)
net-ssh (~> 2.6)
nokogiri (~> 1.5.9)
rbvmomi (~> 1.6)
rspec (~> 2.13)
systemu (~> 2.5)
rspec-system-puppet (2.2.0)
rspec-system (~> 2.0)
rspec-system-serverspec (1.0.0)
rspec-system (~> 2.0)
serverspec (~> 0.6.0)
serverspec (0.6.3)
highline
net-ssh
rspec (~> 2.0)
systemu (2.5.2)
trollop (2.0)

PLATFORMS
ruby

DEPENDENCIES
facter
puppet (~> 3.0)
puppet-lint
puppetlabs_spec_helper
rake
rspec-puppet
rspec-system
rspec-system-puppet
rspec-system-serverspec
serverspec
15 changes: 15 additions & 0 deletions deployment/modules/apache/LICENSE
@@ -0,0 +1,15 @@
Copyright (C) 2012 Puppet Labs Inc

Puppet Labs can be contacted at: info@puppetlabs.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
12 changes: 12 additions & 0 deletions deployment/modules/apache/Modulefile
@@ -0,0 +1,12 @@
name 'puppetlabs-apache'
version '0.9.0'
source 'git://github.com/puppetlabs/puppetlabs-apache.git'
author 'puppetlabs'
license 'Apache 2.0'
summary 'Puppet module for Apache'
description 'Module for Apache configuration'
project_page 'https://github.com/puppetlabs/puppetlabs-apache'

## Add dependencies, if any:
dependency 'puppetlabs/stdlib', '>= 2.4.0'
dependency 'puppetlabs/concat', '>= 1.0.0'

0 comments on commit 6a43533

Please sign in to comment.