Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Make vagrant faster #465

Merged
merged 3 commits into from

1 participant

@rhelmer
Owner

This makes vagrant consistently faster, I get 20s reload and 13s provision with these changes (avoiding hbase connection and only checking for system updates once per reboot)

The long pole in there seems to be supervisord, which is just needed for the backend services like processor, monitor, and crashmover (so it's probably really the time it takes for those to shut down).

Note that if you're just working on PHP and/or mware, the fastest build time is probably by using something like this inside the VM:

make reinstall && sudo /etc/init.d/apache2 restart & sudo /etc/init.d/memcached restart & wait

That takes ~2s in my VM. We may want to just have a "reinstall" script in the repo or something that triggers this directly, instead of going via puppet. Puppet has the nice side-effect of making sure everything is installed and running though.

@rhelmer rhelmer merged commit 37050ec into mozilla:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
8 puppet/manifests/classes/socorro-base.pp
@@ -91,8 +91,9 @@
}
exec {
- '/usr/bin/apt-get update':
- alias => 'apt-get-update';
+ '/usr/bin/apt-get update && touch /tmp/apt-get-update':
+ alias => 'apt-get-update',
+ creates => '/tmp/apt-get-update';
}
exec {
@@ -205,7 +206,8 @@
timeout => '3600',
require => Exec['socorro-install'],
logoutput => on_failure,
- notify => [Service['supervisor'], Service['apache2']],
+ notify => [Service['supervisor'], Service['apache2'],
+ Service['memcached']],
user => 'socorro';
}
}
View
5 puppet/manifests/classes/socorro-db.pp
@@ -38,8 +38,9 @@
exec {
'update-postgres-ppa':
- command => '/usr/bin/apt-get update',
- require => Exec['add-postgres-ppa'];
+ command => '/usr/bin/apt-get update && touch /tmp/update-postgres-ppa',
+ require => Exec['add-postgres-ppa'],
+ creates => '/tmp/update-postgres-ppa';
}
exec {
View
9 puppet/manifests/classes/socorro-hbase.pp
@@ -11,14 +11,17 @@
exec { '/usr/bin/apt-get install -y hadoop-hbase hadoop-hbase-master hadoop-hbase-thrift liblzo2-dev':
alias => 'install-hbase',
logoutput => on_failure,
+ refreshonly => true,
+ subscribe => Exec['apt-get-update-cloudera'],
require => [Exec['apt-get-update'],Exec['apt-get-update-cloudera']];
}
exec {
'apt-get-update-cloudera':
- command => '/usr/bin/apt-get update',
+ command => '/usr/bin/apt-get update && touch /tmp/apt-get-update-cloudera',
require => [Exec['install-oracle-jdk'],
- File['/etc/apt/sources.list.d/cloudera.list']];
+ File['/etc/apt/sources.list.d/cloudera.list']],
+ creates => '/tmp/apt-get-update-cloudera';
}
exec {
@@ -32,7 +35,7 @@
exec {
'/bin/cat /home/socorro/dev/socorro/analysis/hbase_schema | sed \'s/LZO/NONE/g\' | /usr/bin/hbase shell':
alias => 'hbase-schema',
- unless => '/bin/echo "describe \'crash_reports\'" | /usr/bin/hbase shell | grep "1 row"',
+ creates => "/var/lib/hbase/crash_reports",
logoutput => on_failure,
require => Exec['install-hbase'];
}
Something went wrong with that request. Please try again.