Skip to content

Commit

Permalink
Merge pull request #53 from clwdev/ubuntu-xenial
Browse files Browse the repository at this point in the history
Upgrade to Ubuntu 16.04.2
  • Loading branch information
Jeff George authored Aug 1, 2017
2 parents 93a2d57 + 1c96430 commit 9112dee
Show file tree
Hide file tree
Showing 27 changed files with 599 additions and 342 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ sites/*
bin/*
ssl/*
puppet/modules/*
puppet/.librarian
puppet/.tmp
*.aliases.drushrc.php
precip.box
*.vdi
.idea
.DS_Store
.DS_Store
shell/custom.sh
8 changes: 4 additions & 4 deletions .vagrantplugins
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# via https://github.com/mitchellh/vagrant/issues/4347

required_plugins = {
'vagrant-vbguest' => '~>0.13',
'vagrant-hostsupdater' => '~>1.0',
'vagrant-vbguest' => '0.14.2',
'vagrant-hostsupdater' => '1.0.2',
'vagrant-useradd' => '0.0.1',
'vagrant-bindfs' => '1.0.1',
'vagrant-persistent-storage' => '0.0.21',
'vagrant-bindfs' => '1.0.8',
'vagrant-persistent-storage' => '0.0.33',
}

needs_restart = false
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2015-2016 Clearwater Development
Copyright (c) 2015-2017 Clearwater Development

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

## What's Included?
A full LAMP stack, and a few nice extras.
- Ubuntu Server 14.04 LTS
- Ubuntu Server 16.04.2 LTS
- Apache Server 2.4
- MariaDB 10.1
- PHP 5.6
- PHP 5.6 *or* 7.0
- With Memcache, OPCache, and Xdebug all pre-configured
- MailHog, the _absolute_ simplest way to locally test mail delivery

Expand All @@ -24,7 +24,7 @@ A full LAMP stack, and a few nice extras.
## Pre-flight Checklist
- Get [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
- Also [Vagrant](http://www.vagrantup.com/downloads.html)
- Then go download these super helpful Vagrant Plugins (If you forget to, Vagrant will install them for you. It'll error on your first `vagrant up`, but will work fine if you re-run `vagrant up`.)
- Then go download these super helpful Vagrant Plugins (If you forget to, Vagrant will install them for you. It *might* error on your first `vagrant up`, but should still install things fine.)
- `$ vagrant plugin install vagrant-vbguest`
- `$ vagrant plugin install vagrant-hostsupdater`
- `$ vagrant plugin install vagrant-useradd`
Expand All @@ -48,13 +48,12 @@ A full LAMP stack, and a few nice extras.
- As a general rule, getting latest Vagrant, Virtualbox and plugins is advised
- BUT if you have issues, as sometimes bleeding edge releases can have unreported / unresolved bugs, roll back to prior versions by uninstalling and re-installing that earlier version (and search issue queues). The Macosx package includes an uninstaller script.
- Current known stable releases as of March 7, 2017:
- vagrant 1.9.2
- vagrant-bindfs (1.0.1)
- vagrant 1.9.7
- vagrant-bindfs (1.0.8)
- vagrant-hostsupdater (1.0.2)
- vagrant-persistent-storage (0.0.21)
- vagrant-share (1.1.6, system)
- vagrant-persistent-storage (0.0.33)
- vagrant-useradd (0.0.1)
- vagrant-vbguest (0.13.0)
- vagrant-vbguest (0.14.2)

## Updating Vagrant
- If you do a `$ git pull` and see that the `Vagrantfile` has been updated, you may want to make sure things are up to date by running `$ vagrant reload --provision`.
Expand Down Expand Up @@ -95,8 +94,6 @@ Each VirtualHost you define in `config.rb` automatically logs Apache errors to t
## Debugging Integration
[Xdebug](http://xdebug.org/) is built in and preconfigured. Use something like [Xdebug Helper](https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?hl=en) to trigger a session, and your IDE should automagically pick it up.

The [XHProf PHP Extension](http://php.net/manual/en/book.xhprof.php) is also built in. There's a [pretty nice Drupal Module](https://www.drupal.org/project/xhprof) that can hook into it.

## MailHog
[MailHog](https://github.com/mailhog/MailHog) is an alternative mailhandler written in Go. Similar to MailCatcher it collects mail sent by PHP (or, anything actually) and puts it in a friendly local web UI. Said web UI lives on port 8025: [precip.vm:8025](http://precip.vm:8025). The major benefit MailHog has over MailCatcher is that it's written in Go and is distributed as a statically-compiled binary, so we don't have a mile-long list of Ruby dependencies to reconcile before installing.

Expand Down
41 changes: 29 additions & 12 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ drupal_basepath = "sites"
internal_hosts = []
external_hosts = {}
packaging_mode = false
forward_ssh_agent = false
vm_name = "precip"
use_packaged_precip = false

# Determine if this is our first boot or not.
# If there's a better way to figure this out we now have a single place to change.
Expand Down Expand Up @@ -38,14 +41,21 @@ drupal_sites.each do |name, site|
internal_hosts.push(site['aliases'])
end
end
internal_hosts.push("70.precip.vm")
internal_hosts = internal_hosts.flatten

# The actual Vagrant Configuration
Vagrant.configure(2) do |config|
# Vagrant Box Address
# This is a happy base box from PuppetLabs
config.vm.box = "puppetlabs/ubuntu-14.04-64-puppet"
config.vm.box_version = "1.0.3"
if use_packaged_precip == true
# The pre-packaged and shrink-wrapped version of Precip
config.vm.box = "clwdev/precip"
config.vm.box_version = "2.0.0"
else
# The super-generic simple Ubuntu 16.04 base box (with Puppet)
config.vm.box = "clwdev/precip-16.04-base"
config.vm.box_version = "1.0.0"
end

# Basic network config.
config.vm.network :private_network, ip: "10.0.0.11"
Expand All @@ -62,6 +72,10 @@ Vagrant.configure(2) do |config|
# Disabling vbguest is helpful in development
# config.vbguest.auto_update = false

# Forward your host's SSH Agent to the VM
# Allows for key-based git repo authentication inside the box without copying keys
config.ssh.forward_agent = forward_ssh_agent

# Synced Folders
if Vagrant::Util::Platform.windows?
# Windows gets vboxsf, because it can't do nfs + bindfs
Expand Down Expand Up @@ -94,8 +108,8 @@ Vagrant.configure(2) do |config|
# Configure the VM. Tweak as needed
configured = -1
config.vm.provider :virtualbox do |vb|
# Name this virtual machine "precip"
vb.customize ["modifyvm", :id, "--name", "precip"]
# Provide a unique name for this virtual machine
vb.customize ["modifyvm", :id, "--name", vm_name]
# IOAPIC is needed for a 64bit host for multiple cures
vb.customize ["modifyvm", :id, "--ioapic", "on"]
# Use ICH9 for performance
Expand Down Expand Up @@ -135,20 +149,18 @@ Vagrant.configure(2) do |config|
# puts "CPUs set to: #{cpus}"
# end
end
# Allow Windows Hosts to create symlinks inside shared folders
if Vagrant::Util::Platform.windows?
vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
end
configured = 1
end

# Fix the harmless "stdin: is not a tty" issue once and for all
config.vm.provision "fix-no-tty", type: "shell" do |s|
s.privileged = false
s.inline = "sudo sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile"
end

# Set up and use puppet-librarian inside the box to get all our Puppet Modules
config.vm.provision "shell", path: "shell/librarian.sh"

# Hand off to puppet
config.vm.provision :puppet, :options => [""] do |puppet|
config.vm.provision :puppet, :options => ["--disable_warnings deprecations"] do |puppet|
puppet.environment_path = "puppet/environments"
puppet.environment = "vm"
puppet.hiera_config_path = "puppet/hiera.yaml"
Expand All @@ -163,4 +175,9 @@ Vagrant.configure(2) do |config|
"packaging_mode" => packaging_mode,
}
end

if File.file?('shell/custom.sh')
# Run any Extra stuff you may need
config.vm.provision "shell", path: "shell/custom.sh", privileged: false
end
end
28 changes: 28 additions & 0 deletions config.rb-dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# drupal: Drupal Version of the site, 6 or 7. Not Drupal? Pass in
# "false".
#
# php_version: "5.6" or "7.0", defaults to "5.6". Defines which php-fpm
# pool to talk to, on a host-by-host basis.
#
# aliases: A list of alias domains to set up. Useful for testing
# domain-based internationalization.
#
Expand Down Expand Up @@ -80,6 +83,31 @@
# }
#

# Packaging Mode skips some of the build steps and preps a box for publishing.
# Uncomment the following line to run the site in "packaging mode".
#
# Warning: Only do this if you _really_ know what you're doing
#
# packaging_mode = true

# Forward SSH Agent forwards your host's ssh_agent (so, all authorized keys and such)
# into the box, which means you'll be able to do key-based git authentication without
# having to copy/paste keys into the box.
#
# forward_ssh_agent = true

# Sometimes you may need to run two instances of precip, but Virtualbox and Vagrant
# get angry if two boxes have the same name. Need to override that? Set it here.
#
# vm_name = "not-precip"

# We offer a partially pre-built version of the Precip Base Box, which ships with
# all keys and base packages pre-installed, so all that's left is installing PHP,
# Apache, MySQL, and Configuring everything. This can help on restrictive networks
# where you might not be able to add keys properly.
#
# use_packaged_precip = true

drupal_sites = {
# "example" => {
# "host" => "example.vm",
Expand Down
16 changes: 6 additions & 10 deletions puppet/Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,13 @@
forge "https://forgeapi.puppetlabs.com"

mod 'puppetlabs-apache'
mod 'puppetlabs-apt'
mod 'puppetlabs-mysql', "3.2.0"
mod 'puppetlabs-apt', "4.1.0"
mod 'puppetlabs-mysql'
mod 'puppetlabs-vcsrepo'
mod 'puppetlabs-stdlib', "4.12.0"
mod 'ftaeger-mailhog', "1.1.0"

#mod 'thias-php', "1.2.0"
#mod 'willdurand-composer'
mod 'mayflower-php'

mod 'jlondon-wkhtmltox'
mod 'puppetlabs-stdlib'
mod 'ftaeger-mailhog',
:git => "https://github.com/jeffgeorge/ftaeger-mailhog.git",
:ref => "remove_wget_cache_dir"

mod 'saz-memcached'

Expand Down
55 changes: 22 additions & 33 deletions puppet/Puppetfile.lock
Original file line number Diff line number Diff line change
@@ -1,55 +1,44 @@
FORGE
remote: https://forgeapi.puppetlabs.com
specs:
darin-zypprepo (1.0.2)
example42-puppi (2.2.1)
example42-yum (2.1.27)
example42-puppi (>= 2.0.0)
ftaeger-mailhog (1.1.0)
puppetlabs-stdlib (< 5.0.0, >= 4.10.0)
jlondon-wkhtmltox (1.1.0)
maestrodev-wget (>= 1.5.0)
puppetlabs-stdlib (>= 0)
maestrodev-wget (1.7.3)
mayflower-php (4.0.0-beta1)
darin-zypprepo (~> 1.0)
example42-yum (~> 2.0)
puppetlabs-apt (< 3.0.0, >= 1.8.0)
puppetlabs-inifile (~> 1.0)
puppetlabs-stdlib (< 5.0.0, >= 4.2.0)
nanliu-staging (1.0.3)
puppetlabs-apache (1.10.0)
puppet-staging (2.2.0)
puppetlabs-apache (1.11.0)
puppetlabs-concat (< 3.0.0, >= 1.1.1)
puppetlabs-stdlib (< 5.0.0, >= 2.4.0)
puppetlabs-apt (2.2.2)
puppetlabs-stdlib (< 5.0.0, >= 4.5.0)
puppetlabs-concat (2.1.0)
puppetlabs-stdlib (< 5.0.0, >= 3.2.0)
puppetlabs-stdlib (< 5.0.0, >= 4.2.0)
puppetlabs-apt (4.1.0)
puppetlabs-stdlib (< 5.0.0, >= 4.16.0)
puppetlabs-concat (2.2.1)
puppetlabs-stdlib (< 5.0.0, >= 4.2.0)
puppetlabs-firewall (1.8.1)
puppetlabs-inifile (1.6.0)
puppetlabs-mysql (3.2.0)
nanliu-staging (~> 1.0)
puppetlabs-mysql (3.11.0)
puppet-staging (< 3.0.0, >= 1.0.1)
puppetlabs-stdlib (< 5.0.0, >= 3.2.0)
puppetlabs-stdlib (4.12.0)
puppetlabs-stdlib (4.16.0)
puppetlabs-vcsrepo (1.4.0)
saz-memcached (2.8.1)
puppetlabs-firewall (>= 0.1.0)
puppetlabs-stdlib (>= 3.2.0)

GIT
remote: https://github.com/jeffgeorge/ftaeger-mailhog.git
ref: remove_wget_cache_dir
sha: 19ae4d8ef23606b497eba004bfbb37a928dd0bd7
specs:
ftaeger-mailhog (1.1.0)
puppetlabs-stdlib (< 5.0.0, >= 4.10.0)

PATH
remote: /vagrant/puppet/precip
specs:
clwdev-precip (0.0.1)

DEPENDENCIES
clwdev-precip (>= 0)
ftaeger-mailhog (= 1.1.0)
jlondon-wkhtmltox (>= 0)
mayflower-php (>= 0)
ftaeger-mailhog (>= 0)
puppetlabs-apache (>= 0)
puppetlabs-apt (>= 0)
puppetlabs-mysql (= 3.2.0)
puppetlabs-stdlib (= 4.12.0)
puppetlabs-apt (= 4.1.0)
puppetlabs-mysql (>= 0)
puppetlabs-stdlib (>= 0)
puppetlabs-vcsrepo (>= 0)
saz-memcached (>= 0)

1 change: 1 addition & 0 deletions puppet/hiera.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
version: 5
# Blank yaml to prevent Hiera from throwing a warning during provisioning :(
2 changes: 1 addition & 1 deletion puppet/precip/Modulefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name 'clwdev-precip'
version '0.0.1'
version '0.0.2'
source 'https://github.com/clwdev/precip'
author 'clwdev'
license 'MIT'
Expand Down
Loading

0 comments on commit 9112dee

Please sign in to comment.