This commit is contained in:
Austin King 2011-07-01 13:51:51 -07:00
Родитель b56c505add
Коммит e008b0b3f4
6 изменённых файлов: 99 добавлений и 39 удалений

Просмотреть файл

@ -1,22 +1,47 @@
# Get apache up and running # Get apache up and running
class apache { class apache {
package { "httpd-devel": case $operatingsystem {
ensure => present, centos: {
before => File['/etc/httpd/conf.d/playdoh-site.conf']; package { "httpd-devel":
} ensure => present,
file { "/etc/httpd/conf.d/playdoh-site.conf": before => File['/etc/httpd/conf.d/playdoh-site.conf'];
source => "$PROJ_DIR/puppet/files/etc/httpd/conf.d/playdoh-site.conf", }
owner => "root", group => "root", mode => 0644, file { "/etc/httpd/conf.d/playdoh-site.conf":
require => [ Package['httpd-devel'] ]; source => "$PROJ_DIR/puppet/files/etc/httpd/conf.d/playdoh-site.conf",
} owner => "root", group => "root", mode => 0644,
service { "httpd": require => [ Package['httpd-devel'] ];
ensure => running, }
enable => true, service { "httpd":
require => [ ensure => running,
Package['httpd-devel'], enable => true,
File['/etc/httpd/conf.d/playdoh-site.conf'] require => [
] Package['httpd-devel'],
#subscribe => File['/etc/httpd/conf.d/playdoh-site.conf'] File['/etc/httpd/conf.d/playdoh-site.conf']
]
#subscribe => File['/etc/httpd/conf.d/playdoh-site.conf']
}
}
ubuntu: {
package { "apache2-dev":
ensure => present,
before => File['/etc/apache2/sites-enabled/playdoh-site.conf'];
}
file { "/etc/apache2/sites-enabled/playdoh-site.conf":
source => "$PROJ_DIR/puppet/files/etc/httpd/conf.d/playdoh-site.conf",
owner => "root", group => "root", mode => 0644,
require => [ Package['apache2-dev'] ];
}
service { "apache2":
ensure => running,
enable => true,
require => [
Package['apache2-dev'],
File['/etc/apache2/sites-enabled/playdoh-site.conf']
]
#subscribe => File['/etc/apache2/sites-enabled/playdoh-site.conf']
}
}
} }
} }

Просмотреть файл

@ -1,7 +1,21 @@
# Ensure some handy dev tools are available. # Ensure some handy dev tools are available.
class dev_tools { class dev_tools {
package { case $operatingsystem {
[ "git", "vim-enhanced" ]: centos: {
ensure => installed; package {
[ "git", "vim-enhanced" ]:
ensure => installed;
}
}
ubuntu: {
package {
[ "git-core", "vim", "emacs" ]:
ensure => installed;
}
}
} }
} }

Просмотреть файл

@ -1,8 +1,11 @@
# Get mysql up and running # Get mysql up and running
class mysql { class mysql {
package { "mysql-server": ensure => installed; } package { "mysql-server": ensure => installed; }
package { "mysql-devel": ensure => installed; } case $operatingsystem {
service { "mysqld": centos: { package { "mysql-devel": ensure => installed; }}
ubuntu: { package { "libmysqld-dev": ensure => installed; }}
}
service { "mysql":
ensure => running, ensure => running,
enable => true, enable => true,
require => Package['mysql-server'] require => Package['mysql-server']

Просмотреть файл

@ -15,12 +15,16 @@ class playdoh_site {
require => Exec["create_mysql_database"] require => Exec["create_mysql_database"]
} }
# TODO: make this support centos or ubuntu (#centos)
exec { "sql_migrate": exec { "sql_migrate":
cwd => "$PROJ_DIR", cwd => "$PROJ_DIR",
command => "/usr/bin/python2.6 ./vendor/src/schematic/schematic migrations/", command => "/usr/bin/python2.6 ./vendor/src/schematic/schematic migrations/",
require => [ require => [
Service["mysqld"], Service["mysql"],
Package["python26-devel", "python26-mod_wsgi" ], Package["python2.6-dev", "libapache2-mod-wsgi", "python-wsgi-intercept" ],
#centos Service["mysqld"],
#centos Package["python26-devel", "python26-mod_wsgi" ],
Exec["grant_mysql_database"] Exec["grant_mysql_database"]
]; ];
} }

Просмотреть файл

@ -1,16 +1,32 @@
# Install python and compiled modules for project # Install python and compiled modules for project
class python { class python {
package { case $operatingsystem {
[ "python26-devel", "python26-libs", "python26-distribute", "python26-mod_wsgi" ]: centos: {
ensure => installed; package {
[ "python26-devel", "python26-libs", "python26-distribute", "python26-mod_wsgi" ]:
ensure => installed;
}
exec { "pip-install":
command => "/usr/bin/easy_install-2.6 -U pip",
creates => "/usr/bin/pip",
require => Package["python26-devel","python26-distribute"]
}
exec { "pip-install-compiled":
command => "/usr/bin/pip install -r $PROJ_DIR/requirements/compiled.txt",
require => Exec['pip-install']
}
}
ubuntu: {
package {
[ "python2.6-dev", "python2.6", "libapache2-mod-wsgi", "python-wsgi-intercept", "python-pip" ]:
ensure => installed;
}
exec { "pip-install-compiled":
command => "/usr/bin/pip install -r $PROJ_DIR/requirements/compiled.txt",
require => Package['python-pip']
}
}
} }
exec { "pip-install": }
command => "/usr/bin/easy_install-2.6 -U pip",
creates => "/usr/bin/pip",
require => Package["python26-devel","python26-distribute"]
}
exec { "pip-install-compiled":
command => "/usr/bin/pip install -r $PROJ_DIR/requirements/compiled.txt",
require => Exec['pip-install']
}
}

Просмотреть файл

@ -17,8 +17,6 @@ class dev {
dev_hacks: before => Class[repos]; dev_hacks: before => Class[repos];
repos: before => Class[dev_tools]; repos: before => Class[dev_tools];
dev_tools: before => Class[slapd]; dev_tools: before => Class[slapd];
#compilers: before => Class[bdb];
#bdb: before => Class[slapd];
slapd: before => Class[mysql]; slapd: before => Class[mysql];
mysql: before => Class[python]; mysql: before => Class[python];
python: before => Class[apache]; python: before => Class[apache];