Skip to content

Commit

Permalink
fixes bug 821352 - finish getting vagrant working with Precise
Browse files Browse the repository at this point in the history
  • Loading branch information
rhelmer committed Dec 19, 2012
1 parent 341687a commit 476af26
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 30 deletions.
3 changes: 2 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ CONF = _config


Vagrant::Config.run do |config|
config.vm.box = "socorro-all"
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :hostonly, "33.33.33.10"
config.vm.customize ["modifyvm", :id, "--memory", CONF['memory']]

Expand Down
9 changes: 2 additions & 7 deletions docs/vagrant.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,11 @@ http://www.virtualbox.org/
3. Install Vagrant from:
http://vagrantup.com/

4. Download base box
::
# NOTE: if you have a 32-bit host, change "lucid64" to "lucid32"
vagrant box add socorro-all http://files.vagrantup.com/precise64.box

5. Copy base box, boot VM and provision it with puppet:
4. Download and copy base box, boot VM and provision it with puppet:
::
vagrant up

6. Add to /etc/hosts (on the HOST machine!):
5. Add to /etc/hosts (on the HOST machine!):
::
33.33.33.10 crash-stats crash-reports socorro-api

Expand Down
5 changes: 3 additions & 2 deletions puppet/files/etc_apt_sources.list.d/cloudera.list
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
deb http://archive.cloudera.com/debian lucid-cdh3 contrib
deb-src http://archive.cloudera.com/debian lucid-cdh3 contrib
deb [arch=amd64] http://archive.cloudera.com/cdh4/ubuntu/precise/amd64/cdh precise-cdh4 contrib
deb-src http://archive.cloudera.com/cdh4/ubuntu/precise/amd64/cdh precise-cdh4 contrib

38 changes: 21 additions & 17 deletions puppet/manifests/classes/socorro-base.pp
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,23 @@
exec {
'/usr/bin/apt-get update && touch /tmp/apt-get-update':
alias => 'apt-get-update',
require => Exec['add-deadsnakes-ppa'],
creates => '/tmp/apt-get-update';

'add-deadsnakes-ppa':
command => '/usr/bin/sudo /usr/bin/add-apt-repository ppa:fkrull/deadsnakes && touch /tmp/add-deadsnakes-ppa',
require => Package['python-software-properties'],
creates => '/tmp/add-deadsnakes-ppa';

'apt-get-update-deadsnakes':
command => '/usr/bin/apt-get update && touch /tmp/apt-get-update-deadsnakes',
require => Exec['add-deadsnakes-ppa'],
creates => '/tmp/apt-get-update-deadsnakes';
}

package {
['rsyslog', 'libcurl4-openssl-dev', 'libxslt1-dev', 'build-essential',
'supervisor', 'ant', 'python-software-properties', 'curl', 'git-core',
'openjdk-6-jdk', 'maven2']:
'openjdk-6-jdk', 'maven2', 'memcached']:
ensure => latest,
require => Exec['apt-get-update'];
}
Expand All @@ -122,8 +127,14 @@
enable => true,
require => Package['rsyslog'],
ensure => running;

memcached:
enable => true,
require => Package['memcached'],
ensure => running;
}


group { 'puppet':
ensure => 'present',
}
Expand Down Expand Up @@ -167,9 +178,11 @@
# default => "puppet://$server/modules/socorro/prod/etc-logrotated/socorro",
# };
package {
['subversion', 'libpq-dev', 'python-virtualenv', 'python-dev']:
['subversion', 'libpq-dev', 'python-virtualenv', 'python2.6-dev',
'python-pip']:
ensure => latest,
require => Exec['apt-get-update'];
require => [Exec['apt-get-update'],
Exec['apt-get-update-deadsnakes']];
}

exec {
Expand Down Expand Up @@ -200,7 +213,9 @@
alias => 'socorro-reinstall',
cwd => '/home/socorro/dev/socorro',
timeout => '3600',
require => Exec['socorro-install'],
require => [Exec['socorro-install'],
Package['apache2'],
Package['memcached']],
logoutput => on_failure,
notify => [Service['apache2'], Service['memcached']],
user => 'socorro';
Expand Down Expand Up @@ -231,10 +246,6 @@
Package[libapache2-mod-php5], Exec[enable-mod-proxy]];
}

}

class socorro-php inherits socorro-web {

file {
'/etc/apache2/sites-available/crash-stats':
require => Package[apache2],
Expand Down Expand Up @@ -318,15 +329,8 @@
creates => '/etc/apache2/mods-enabled/headers.load';
}

service {
memcached:
enable => true,
require => Package['memcached'],
ensure => running;
}

package {
['memcached', 'libcrypt-ssleay-perl', 'php5-pgsql', 'php5-curl',
['libcrypt-ssleay-perl', 'php5-pgsql', 'php5-curl',
'php5-dev', 'php5-tidy', 'php-pear', 'php5-common', 'php5-cli',
'php5-memcache', 'php5', 'php5-gd', 'php5-mysql', 'php5-ldap',
'phpunit']:
Expand Down
1 change: 0 additions & 1 deletion puppet/manifests/nodes/nodes.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
node default {
include socorro-db
include socorro-monitor
include socorro-php
include socorro-processor
include socorro-collector
include socorro-api
Expand Down
4 changes: 2 additions & 2 deletions puppet/ubuntu-bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
#
# Quick bootstrap script for an Ubuntu Lucid host
# Quick bootstrap script for an Ubuntu Precise host
#
# This allows you to bootstrap any Lucid box (VM, physical hardware, etc)
# This allows you to bootstrap any Precise box (VM, physical hardware, etc)
# using Puppet and automatically install a full Socorro environment on it.
#
# NOTE - if you want HBase installed (which you need for processing incoming
Expand Down

0 comments on commit 476af26

Please sign in to comment.