Permalink
Browse files

Merge pull request #3 from iandees/master

Upgrade to precise64 and make the whole shebang work
  • Loading branch information...
2 parents abe922b + b1770bd commit 7f05dedd7ede6b66b7cc4a130d54e17fa7e7a5c2 @tlpinney committed May 9, 2013
Showing with 16 additions and 137 deletions.
  1. +2 −2 Vagrantfile
  2. +11 −131 manifests/base.pp
  3. +1 −1 manifests/osm_database.sh
  4. +2 −3 seed.sh
View
@@ -3,8 +3,8 @@
Vagrant::Config.run do |config|
- config.vm.box = "maverick64"
- config.vm.box_url = "https://s3.amazonaws.com/osmdevbox/maverick64.box"
+ config.vm.box = "precise64"
+ config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.customize [
View
@@ -13,9 +13,6 @@
managehome => true,
}
-Exec["/usr/bin/apt-get update -y"] -> Package <| |>
-Exec["/usr/bin/apt-get upgrade -y"] -> Package <| |>
-
exec { "/usr/bin/apt-get update -y":
user => "root",
timeout => 3600,
@@ -24,95 +21,17 @@
exec { "/usr/bin/apt-get upgrade -y":
user => "root",
timeout => 3600,
+ require => [ Exec["/usr/bin/apt-get update -y"] ]
}
-package { "git-core":
- ensure => installed,
-}
-
-package { "vim":
- ensure => installed,
-}
-
-package { "postgresql-contrib":
- ensure => installed,
-}
-
-
-package { "ruby":
- ensure => installed,
-}
-
-package { "rdoc":
- ensure => installed,
-}
-
-package { "ri":
- ensure => installed,
-}
-
-package { "libpq-dev":
- ensure => installed,
-}
-
-package { "libxml2-dev":
- ensure => installed,
-}
-
-package { "libxslt1-dev":
- ensure => installed,
-}
-
-package { "ruby-dev":
- ensure => installed,
-}
-
-package { "apache2-dev":
- ensure => installed,
-}
-
-package { "libmagick9-dev":
- ensure => installed,
-}
-
-package { "build-essential":
- ensure => installed,
-}
-
-package { "libopenssl-ruby":
- ensure => installed,
-}
-
-package { "subversion":
- ensure => installed,
-}
-
-package { "apache2":
- ensure => installed,
-}
-
-package { "postgresql":
- ensure => installed,
-}
-
-package { "libcurl4-openssl-dev":
- ensure => installed,
-}
-
-package { "expect":
- ensure => installed,
-}
-
-package { "expect-dev":
- ensure => installed,
-}
-
-package { "libsasl2-dev":
- ensure => installed,
-}
-
-package { "wget" :
+package { ["git-core", "vim", "postgresql-contrib", "ruby", "rdoc", "ri",
+ "libpq-dev", "libxml2-dev", "libxslt1-dev", "ruby-dev", "apache2-dev",
+ "graphicsmagick-libmagick-dev-compat", "build-essential", "libopenssl-ruby",
+ "subversion", "apache2", "postgresql-9.1", "libcurl4-openssl-dev",
+ "expect", "expect-dev", "libsasl2-dev", "wget", "libapache2-mod-passenger",
+ "ruby-bundler", "rake" ]:
ensure => installed,
+ require => [ Exec["/usr/bin/apt-get update -y"] ]
}
service { "apache2":
@@ -129,14 +48,6 @@
require => [Package["git-core"]],
}
-file { "/etc/apache2/conf.d/passenger" :
- owner => root,
- group => root,
- source => "/vagrant/configs/passenger",
- mode => 644,
- require => [Package["apache2"]],
-}
-
file { "/etc/apache2/sites-available/default" :
owner => root,
group => root,
@@ -177,45 +88,14 @@
require => [ Package["postgresql-contrib"] ]
}
-exec { "passenger":
- cwd => "/home/vagrant",
- user => "vagrant",
- command => "sudo gem install passenger --no-ri --no-rdoc && touch /home/vagrant/passenger.log",
- creates => "/home/vagrant/passenger.log",
- logoutput => "true",
- path => ["/usr/bin", "/bin", "/usr/sbin", "/sbin"],
- require => [File["/home/vagrant/openstreetmap-website/config/application.yml"]]
-}
-
-exec { "pfusion":
- cwd => "/home/vagrant",
- user => "vagrant",
- command => "expect /vagrant/manifests/pfusion.exp && touch /home/vagrant/pfusion.log",
- creates => "/home/vagrant/pfusion.log",
- logoutput => "true",
- path => ["/usr/bin", "/bin", "/usr/sbin", "/sbin"],
- timeout => 3600,
- require => [Exec["passenger"]]
-}
-
-exec { "bundle_gem":
- cwd => "/home/vagrant",
- user => "vagrant",
- command => "sudo gem install bundle --no-ri --no-rdoc; touch /home/vagrant/bundle_gem.log",
- creates => "/home/vagrant/bundle_gem.log",
- logoutput => "true",
- path => ["/usr/bin", "/bin", "/usr/sbin", "/sbin"],
- require => [Exec["pfusion"]]
-}
-
exec { "bundle":
cwd => "/home/vagrant/openstreetmap-website",
user => "vagrant",
command => "sudo bundle install && touch /home/vagrant/bundle.log",
creates => "/home/vagrant/bundle.log",
logoutput => "true",
path => ["/usr/bin", "/bin", "/usr/sbin", "/sbin"],
- require => [Exec["bundle_gem"]]
+ require => [Exec["osm_git"]]
}
exec { "rake_migrate":
@@ -225,7 +105,7 @@
creates => "/home/vagrant/rake_migrate.log",
logoutput => "true",
path => ["/usr/bin", "/bin", "/usr/sbin", "/sbin"],
- require => [Exec["bundle"]]
+ require => [Exec["bundle"], File["/home/vagrant/openstreetmap-website/config/application.yml"], Exec["Set up database"]]
}
exec { "set_up_osm_website_directories":
@@ -235,4 +115,4 @@
creates => "/home/vagrant/osm_directories_setup.log",
logoutput => "true",
require => [ Exec["rake_migrate"] ]
-}
+}
@@ -5,7 +5,7 @@ createuser openstreetmap -s
createdb -E UTF8 -O openstreetmap openstreetmap -T template0
createdb -E UTF8 -O openstreetmap osm_test -T template0
createdb -E UTF8 -O openstreetmap osm -T template0
-psql -d openstreetmap < /usr/share/postgresql/8.4/contrib/btree_gist.sql
+echo "create extension btree_gist;" | psql -d openstreetmap
echo "alter role openstreetmap password 'openstreetmap'" | psql
View
@@ -1,8 +1,7 @@
#!/bin/sh
# bootstrap
-sudo apt-get install git-core ruby -y
-git clone https://github.com/tlpinney/osmdevbox.git
+sudo apt-get update && sudo apt-get -y install git-core ruby
git clone https://github.com/puppetlabs/puppet.git
wget http://files.rubyforge.vm.bytemark.co.uk/rubygems/rubygems-1.3.7.tgz
tar -xzvf rubygems-1.3.7.tgz
@@ -14,5 +13,5 @@ sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
# sudo apt-get install puppet -y
# run puppet scripts
-sudo uppet apply -v osmdevbox/manifests/base.pp
+sudo puppet apply -v /vagrant/manifests/base.pp

0 comments on commit 7f05ded

Please sign in to comment.