Merge branch 'master' of www.aklabs.net:~/mercy/
This commit is contained in:
BIN
alembic/env.pyc
Normal file
BIN
alembic/env.pyc
Normal file
Binary file not shown.
31
puppet/mercy/manifests/#init.pp#
Normal file
31
puppet/mercy/manifests/#init.pp#
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
class mercy(
|
||||||
|
$environment,
|
||||||
|
$version,
|
||||||
|
$ensure,
|
||||||
|
$rabbitmq_uri,
|
||||||
|
$process_user => 'mercy',
|
||||||
|
$process_group => 'mercy',
|
||||||
|
$process_threads => 5,
|
||||||
|
$servername => $::fqdn,
|
||||||
|
$rabbitmq_user => 'mercy',
|
||||||
|
$rabbitmq_pw => 'mercy',
|
||||||
|
$rabbitmq_vhost => 'mercy',
|
||||||
|
$vhost_dir => '/etc/apache/httpd/conf.d',
|
||||||
|
$apache_service => 'httpd',
|
||||||
|
$port => 443,
|
||||||
|
$postgres_uri => 'localhost',
|
||||||
|
$postgres_user => 'mercy',
|
||||||
|
$postgres_pw => 'mercy',
|
||||||
|
$postgres_db => 'mercy')
|
||||||
|
{
|
||||||
|
if ! defined(User[$process_user]) {
|
||||||
|
user { $process_user:
|
||||||
|
ensure => 'present'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ! defined(Group[$process_group]) {
|
||||||
|
user { $process_group:
|
||||||
|
ensure => 'present'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
4
puppet/mercy/manifests/params.pp
Normal file
4
puppet/mercy/manifests/params.pp
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
class mercy::params
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
23
puppet/mercy/manifests/params.pp~
Normal file
23
puppet/mercy/manifests/params.pp~
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
class mercy::params ( $environment,
|
||||||
|
$version,
|
||||||
|
$ensure,
|
||||||
|
$rabbitmq_uri,
|
||||||
|
# ---- Everything below is optional
|
||||||
|
$process_user => 'mercy',
|
||||||
|
$process_group => 'mercy',
|
||||||
|
$process_threads => 5,
|
||||||
|
$servername => $::fqdn,
|
||||||
|
$rabbitmq_user => 'mercy',
|
||||||
|
$rabbitmq_pw => 'mercy',
|
||||||
|
$rabbitmq_vhost => 'mercy',
|
||||||
|
$vhost_dir => '/etc/apache/httpd/conf.d',
|
||||||
|
$apache_service => 'httpd',
|
||||||
|
$port => 443,
|
||||||
|
$postgres_uri => 'localhost',
|
||||||
|
$postgres_user => 'mercy',
|
||||||
|
$postgres_pw => 'mercy',
|
||||||
|
$postgres_db => 'mercy'
|
||||||
|
)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
12
puppet/mercy/templates/apache/vhost.erb~
Normal file
12
puppet/mercy/templates/apache/vhost.erb~
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<VirtualHost *:<%= scope.lookupvar('::mercy::params::port') %>>
|
||||||
|
ServerName <%= scope.lookupvar('::fqdn') %>
|
||||||
|
WSGIDaemonProcess mercy user=<%= scope.lookupvar('::mercy::params::process_user') %> group=<%= scope.lookupvar('::mercy::params::process_group') %> threads=<%= scope.lookupvar('::mercy::params::process_threads') %>
|
||||||
|
WSGIScriptAlias / /opt/mercy/scripts/mercy.wsgi
|
||||||
|
|
||||||
|
<Directory /opt/mercy>
|
||||||
|
WSGIProcessGroup mercy
|
||||||
|
WSGIApplicationGroup %{GLOBAL}
|
||||||
|
Order deny, allow
|
||||||
|
Allow from all
|
||||||
|
</Directory>
|
||||||
|
</VirtualHost>
|
||||||
49
puppet/mercy/templates/python/alembic.ini.erb~
Normal file
49
puppet/mercy/templates/python/alembic.ini.erb~
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# A generic, single database configuration.
|
||||||
|
|
||||||
|
[alembic]
|
||||||
|
# path to migration scripts
|
||||||
|
script_location = alembic
|
||||||
|
|
||||||
|
# template used to generate migration files
|
||||||
|
# file_template = %%(rev)s_%%(slug)s
|
||||||
|
|
||||||
|
# set to 'true' to run the environment during
|
||||||
|
# the 'revision' command, regardless of autogenerate
|
||||||
|
# revision_environment = false
|
||||||
|
|
||||||
|
sqlalchemy.url = driver://mercy:mercy@postgresql.aklabs.net/mercy
|
||||||
|
|
||||||
|
# Logging configuration
|
||||||
|
[loggers]
|
||||||
|
keys = root,sqlalchemy,alembic
|
||||||
|
|
||||||
|
[handlers]
|
||||||
|
keys = console
|
||||||
|
|
||||||
|
[formatters]
|
||||||
|
keys = generic
|
||||||
|
|
||||||
|
[logger_root]
|
||||||
|
level = WARN
|
||||||
|
handlers = console
|
||||||
|
qualname =
|
||||||
|
|
||||||
|
[logger_sqlalchemy]
|
||||||
|
level = WARN
|
||||||
|
handlers =
|
||||||
|
qualname = sqlalchemy.engine
|
||||||
|
|
||||||
|
[logger_alembic]
|
||||||
|
level = INFO
|
||||||
|
handlers =
|
||||||
|
qualname = alembic
|
||||||
|
|
||||||
|
[handler_console]
|
||||||
|
class = StreamHandler
|
||||||
|
args = (sys.stderr,)
|
||||||
|
level = NOTSET
|
||||||
|
formatter = generic
|
||||||
|
|
||||||
|
[formatter_generic]
|
||||||
|
format = %(levelname)-5.5s [%(name)s] %(message)s
|
||||||
|
datefmt = %H:%M:%S
|
||||||
Reference in New Issue
Block a user