Skip to content

Commit

Permalink
adding puppet modules
Browse files Browse the repository at this point in the history
  • Loading branch information
oppianmatt committed Apr 2, 2012
1 parent 8969a36 commit 5ea82b8
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/django
Submodule django deleted from 8a60ad
1 change: 0 additions & 1 deletion lib/django-basic-apps
Submodule django-basic-apps deleted from 35f372
1 change: 0 additions & 1 deletion lib/url-shortener
Submodule url-shortener deleted from 8447a4
31 changes: 31 additions & 0 deletions puppet/modules/oppian/manifests/init.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
class oppian {

package { "mysql": }
package { "mysql-devel":
require => Package["mysql"],
}

class { "webapp::python": owner => "root",
group => "wheel",
src_root => "/deploy",
nginx_workers => 2,
monit_admin => "matt@oppian.com",
monit_interval => 30,
require => Package["mysql-devel"],
}

webapp::python::instance { "oppianproj":
domain => "oppian.com",
django => true,
requirements => true,
pythonpath => ["lib/django", "apps", "apps/oppianapp/utils", "lib/django-storages"],
}

$debug_django = "False"

file { "/deploy/oppianproj/settings_local.py":
ensure => file,
content => template('oppian/settings.py.erb'),
}

}
23 changes: 23 additions & 0 deletions puppet/modules/oppian/templates/settings.py.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

DEBUG = <%= debug_django %>
TEMPLATE_DEBUG = DEBUG

DATABASE_ENGINE = 'mysql'
DATABASE_NAME = '<%= cfn_database %>'
DATABASE_USER = '<%= cfn_user %>'
DATABASE_PASSWORD = '<%= cfn_password %>'
DATABASE_HOST = '<%= cfn_host %>'
DATABASE_PORT = ''

SITE_DOMAIN = "oppian.com"

# the twitter email account of the site
TWITTER_EMAIL = "twitter@oppian.com"
TWITTER_USER = "oppian"
# the password for the account referenced by the twitter email address above
TWITTER_PASSWORD = "deteenee52" # oppian
# the name of the agent making the requests
TWITTER_AGENT_STR = "oppian.com"

# s3 storage
AWS_STORAGE_BUCKET_NAME = 'oppian-prod-files'

0 comments on commit 5ea82b8

Please sign in to comment.