Skip to content

Commit

Permalink
Puppet tweaks to account for new migration changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lmorchard committed May 31, 2011
1 parent 32ad559 commit 5234313
Showing 1 changed file with 16 additions and 26 deletions.
42 changes: 16 additions & 26 deletions puppet/manifests/mozilla_kuma.pp
Original file line number Diff line number Diff line change
Expand Up @@ -125,26 +125,13 @@

file {

# Let symlinks into home directory be served through apache
"/home/vagrant":
[ "/home/vagrant",
"/home/vagrant/logs",
"/home/vagrant/uploads",
"/home/vagrant/product_details_json",
"/home/vagrant/mdc_pages"]:
ensure => directory,
owner => "vagrant", group => "vagrant", mode => 0755;

"/home/vagrant/logs":
ensure => directory,
owner => "vagrant", group => "vagrant", mode => 0777;

"/home/vagrant/uploads":
ensure => directory,
owner => "vagrant", group => "vagrant", mode => 0777;

"/home/vagrant/product_details_json":
ensure => directory,
owner => "vagrant", group => "vagrant", mode => 0777;

"/home/vagrant/mdc_pages":
ensure => directory,
owner => "vagrant", group => "vagrant", mode => 0777;

"/vagrant/settings_local.py":
ensure => file,
Expand Down Expand Up @@ -204,7 +191,7 @@

"/var/www/dekiwiki/.htaccess":
ensure => link,
target => "/vagrant/webroot/.htaccess",
target => "/vagrant/configs/htaccess",
require => Package["mindtouch"],
owner => "apache", group => "apache", mode => 0644;
"/var/www/dekiwiki/favicon.ico":
Expand Down Expand Up @@ -279,8 +266,7 @@
"vendor_lib_git_submodule_update":
command => "/usr/bin/git submodule update --init --recursive",
cwd => "/vagrant",
creates => "/vagrant/vendor/src/django/README",
require => [ Exec["vendor_lib_git_clone"] ];
creates => "/vagrant/vendor/src/django/README";
"svn_co_deki_mozilla":
command => "/usr/bin/svn co http://svn.mozilla.org/projects/deki/trunk/mozilla/",
cwd => "/home/vagrant",
Expand Down Expand Up @@ -318,9 +304,8 @@
File["/etc/dekiwiki/mindtouch.deki.startup.xml"],
Exec["setup_mysql_wikidb"]
];
"kuma_syncdb":
cwd => "/vagrant", command => "/usr/bin/python2.6 ./manage.py syncdb --noinput",
unless => "/usr/bin/mysql -uroot kuma -B -e 'show tables' 2>&1 | grep -q 'django_content_type'",
"kuma_sql_migrate":
cwd => "/vagrant", command => "/usr/bin/python2.6 ./vendor/src/schematic/schematic migrations/",
require => [
Service["mysqld"],
Package["python26-devel", "python26-mod_wsgi", "python26-jinja2",
Expand All @@ -329,6 +314,11 @@
"setup_mysql_databases_and_users",
"vendor_lib_git_submodule_update"]
];
"kuma_south_migrate":
cwd => "/vagrant", command => "/usr/bin/python2.6 manage.py migrate",
require => [
Exec["kuma_sql_migrate"]
];

#
# These commands work, but I haven't figured out conditions to check to
Expand All @@ -337,13 +327,13 @@
"kuma_update_product_details":
cwd => "/vagrant", command => "/usr/bin/python2.6 ./manage.py update_product_details",
require => [
Exec["kuma_syncdb"],
Exec["kuma_south_migrate"],
File["/home/vagrant/product_details_json"]
];
"kuma_update_feeds":
cwd => "/vagrant", command => "/usr/bin/python2.6 ./manage.py update_feeds",
require => [
Exec["kuma_syncdb"]
Exec["kuma_south_migrate"]
];

# HACK: Disable SELinux... causing problems, and I don't understand it.
Expand Down

0 comments on commit 5234313

Please sign in to comment.