Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Make vagrant faster #465

Merged
merged 3 commits into from Apr 3, 2012
Jump to file or symbol
Failed to load files and symbols.
+14 −8
Split
@@ -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';
}
}
@@ -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 {
@@ -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'];
}