Mikke Schirén
Developer at Wunderkraut Sweden
(former actor, journalist, whatever)
Worked with Drupal since 4.7
d.o: MiSc , Twitter: mikkdroid
(I'm guessing here...)
(That we know for a fact)
One Virtual machine that should fit
all projects and developers,
the Virtualnode.
Developers fixing their VMs so it fitted them
(updated php version, mysql, special vhost entries etc.),
OR
Easy to set-up local environment
Vagrant is free and open-source software for creating and configuring virtual development environments. (Wikipedia)
Supports Virtualbox, VMWare, Amazon EC2 etc.
Written in Ruby.
Vagrant.configure("2") do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise64"
config.vm.synced_folder '.', '/vagrant', :id => 'vagrant-root', :disabled => true
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
# Assign this VM to a host only network IP, allowing you to access it
# via the IP.
config.vm.network :private_network, ip: "192.168.50.91"
config.vm.hostname = "marvin.dev.com"
config.vm.provider "virtualbox" do |v|
v.name = config.vm.hostname
v.customize ["modifyvm", :id, "--memory", "2048"]
v.customize ["modifyvm", :id, "--cpus", "1"]
end
# Provisioning settings.
config.vm.provision :puppet do |puppet|
puppet.facter = {
'drupal_root' => '/srv/www/marvin/web'
}
puppet.manifests_path = "./"
puppet.manifest_file = "manifests/manifest.pp"
puppet.module_path = "./manifests/modules"
end
# The path to the platform
config.vm.synced_folder "./", "/srv/www/marvin", :nfs => true
end
Some extra provision could be done with shell scriptingconfig.vm.provision :shell do |shell|
shell.inline = "drush dl drush-7.x-5.9 -y"
end
config.vm.provision :shell do |shell|
shell.path = "script.sh"
end
#!/bin/bash
if [ ! -d foo ]; then
mkdir foo
fi
And whatever you could do with a script, like:
Create database
Add ssh-keys
Download databasedumps
But better to use...
class { 'systools': }
class { 'apache':
port => 8081
}
class { 'php':
development => true
}
class { 'drush': }
class { 'varnish': }
class { 'phpmyadmin': }
class { 'postfix': }
class { 'memcached':
max_memory => '30%',
}
class { 'mysql':
local_only => true,
hostname => $fqdn
}
apache::vhost { "drupal":
document_root => $drupal_root
}
Like
apache drush jetty memcached mysql php phpmyadmin postfix solr systools varnish
And whatever you need to have.
class php (
$packages = [
'php5',
'php5-cli',
'php5-common',
'php5-mysql',
'php5-gd',
'php5-curl',
'php5-dev',
'php5-mcrypt',
'php-pear',
'php5-sqlite',
'build-essential',
'php5-ldap',
'libapache2-mod-php5',
'php5-memcache',
],
; Development flags.
error_reporting = E_ALL | E_STRICT
display_errors = On
display_startup_errors = On
html_errors = 1
memory_limit = 256M
max_execution_time = 0
zend_extension=/usr/lib/php5/20090626/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=192.168.50.91
xdebug.remote_port=9000
xdebug.profiler_enable_trigger=1
"It worked in my environment!"
Geppetto to edit Puppetfiles