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
class apache {
package { "httpd-devel":
ensure => present,
before => File['/etc/httpd/conf.d/playdoh-site.conf'];
}
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,
require => [ Package['httpd-devel'] ];
}
service { "httpd":
ensure => running,
enable => true,
require => [
Package['httpd-devel'],
File['/etc/httpd/conf.d/playdoh-site.conf']
]
#subscribe => File['/etc/httpd/conf.d/playdoh-site.conf']
case $operatingsystem {
centos: {
package { "httpd-devel":
ensure => present,
before => File['/etc/httpd/conf.d/playdoh-site.conf'];
}
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,
require => [ Package['httpd-devel'] ];
}
service { "httpd":
ensure => running,
enable => true,
require => [
Package['httpd-devel'],
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.
class dev_tools {
package {
[ "git", "vim-enhanced" ]:
ensure => installed;
case $operatingsystem {
centos: {
package {
[ "git", "vim-enhanced" ]:
ensure => installed;
}
}
ubuntu: {
package {
[ "git-core", "vim", "emacs" ]:
ensure => installed;
}
}
}
}

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

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

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

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

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

@ -1,16 +1,32 @@
# Install python and compiled modules for project
class python {
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']
case $operatingsystem {
centos: {
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']
}
}
}
}

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

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