Skip to content

Commit

Permalink
Merge pull request #465 from rhelmer/make-vagrant-faster
Browse files Browse the repository at this point in the history
Make vagrant faster
  • Loading branch information
rhelmer committed Apr 3, 2012
2 parents 4b1ef27 + 953ba4a commit 37050ec
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
8 changes: 5 additions & 3 deletions puppet/manifests/classes/socorro-base.pp
Expand Up @@ -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 {
Expand Down Expand Up @@ -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';
}
}
Expand Down
5 changes: 3 additions & 2 deletions puppet/manifests/classes/socorro-db.pp
Expand Up @@ -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 {
Expand Down
9 changes: 6 additions & 3 deletions puppet/manifests/classes/socorro-hbase.pp
Expand Up @@ -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 {
Expand All @@ -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'];
}
Expand Down

0 comments on commit 37050ec

Please sign in to comment.