Commit 43540edd authored by Branson Craig Stephens's avatar Branson Craig Stephens
Browse files

Changes for new test instance and cleanup fo some old settigs files.

parent 958e1291
......@@ -5,5 +5,6 @@ django-*.wsgi
static-collected
static/admin/
static/rest_framework/
static/debug_toolbar/
doc/build/*
doc/build/.buildinfo
......@@ -15,28 +15,17 @@ import os
ROOT_PATH = os.path.abspath( os.path.join( os.path.dirname(__file__), os.pardir ) )
configs = {
'/home/bmoe/ER2': 'development_er2',
'/home/bmoe/er2box/lib/python2.6/site-packages/gracedb' : 'development_er2',
'/home/bmoe/er2box/lib/python2.6/site-packages/ER2' : 'development_er2',
'/home/bmoe/gracedb': 'development',
'/home/bmoe/gracedb/gracedb': 'development',
'/home/gracedb/gracedb': 'production',
'/home/gracedb/graceproj': 'production',
'/home/branson/gracedbdev': 'branson',
'/home/branson/gracedbdev/gracedb': 'branson',
'/home/fzhang/gracedb/gracedb': 'fan',
'/home/fzhang/gracedb/gracedb/gracedb': 'fan',
'/home/branson.stephens/gracedb': 'test',
'/home/branson.stephens/gracedb/gracedb': 'test',
'/home/roywilliams/gracedbdev': 'roy',
'/home/roywilliams/gracedbdev/gracedb': 'roy',
"/home/gracedb/gracestage" : "stage",
}
......
CONFIG_NAME = "DEVELOPMENT"
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ALERT_EMAIL_FROM = "Dev Alert <root@moe.phys.uwm.edu>"
ALERT_EMAIL_TO = [
"Brian Moe <bmoe@gravity.phys.uwm.edu>",
]
ALERT_EMAIL_BCC = ["bmoe@uwm.edu"]
ALERT_TEST_EMAIL_FROM = "Dev Test Alert <root@moe.phys.uwm.edu>"
ALERT_TEST_EMAIL_TO = [
"Brian Moe <bmoe@gravity.phys.uwm.edu>",
]
# Don't sent out non-test XMPP alerts on dev box!
XMPP_ALERT_CHANNELS = [
'test_omega',
'test_mbtaonline',
'test_cwb',
'test_lowmass',
]
# SkyAlert
SKYALERT_IVORN_PATTERN = "ivo://ligo.org/gracedb#%s-dev"
# Latency histograms. Where they go and max latency to bin.
LATENCY_REPORT_DEST_DIR = "/home/bmoe/data/latency"
LATENCY_REPORT_WEB_PAGE_FILE_PATH = LATENCY_REPORT_DEST_DIR + "/latency.inc"
# Uptime reporting
UPTIME_REPORT_DIR = "/home/bmoe/data/uptime"
SITE_ID = 1
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
"/home/bmoe/gracedb/templates",
)
CONFIG_NAME = "ER2"
DEBUG = True
TEMPLATE_DEBUG = DEBUG
DATABASES = {
'default' : {
'NAME' : 'er2',
'ENGINE' : 'django.db.backends.mysql',
'USER' : 'er2',
'PASSWORD' : 'weasel',
}
}
ALERT_EMAIL_FROM = "Dev Alert <root@moe.phys.uwm.edu>"
ALERT_EMAIL_TO = [
"Brian Moe <bmoe@gravity.phys.uwm.edu>",
]
ALERT_EMAIL_BCC = ["bmoe@uwm.edu"]
ALERT_TEST_EMAIL_FROM = "Dev Test Alert <root@moe.phys.uwm.edu>"
ALERT_TEST_EMAIL_TO = [
"Brian Moe <bmoe@gravity.phys.uwm.edu>",
]
XMPP_ALERT_CHANNELS = [
]
# SkyAlert
SKYALERT_IVORN_PATTERN = "ivo://ligo.org/gracedb#%s-dev-er2"
# Latency histograms. Where they go and max latency to bin.
LATENCY_REPORT_DEST_DIR = "/home/bmoe/data/latency"
SITE_ID = 4
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
"/home/bmoe/ER2/templates",
)
DEBUG = True
TEMPLATE_DEBUG = DEBUG
CONFIG_NAME = "STAGE"
SITE_ID = 3
EMAIL_HOST = 'localhost'
MEDIA_ROOT = '/home/gracedb/gracestage/static/'
TEMPLATE_DIRS = (
"/home/gracedb/gracestage/templates",
)
CONFIG_NAME = "Test"
DEBUG = True
TEMPLATE_DEBUG = DEBUG
DEBUG_TOOLBAR_PATCH_SETTINGS = False
DATABASES = {
'default' : {
'NAME' : 'gracedb',
'ENGINE' : 'django.db.backends.mysql',
'USER' : 'gracedb',
'PASSWORD' : 'thinglet',
'OPTIONS' : {
'init_command' : 'SET storage_engine=MYISAM',
},
}
}
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
},
# this cache backend will be used by django-debug-panel
'debug-panel': {
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': '/tmp/debug-panel-cache',
'OPTIONS': {
'MAX_ENTRIES': 200
}
},
}
STATIC_URL = "/gracedb-static/"
STATIC_ROOT = "/home/branson.stephens/gracedb/static/"
BOWER_URL = "/bower-static/"
BOWER_ROOT = "/home/branson.stephens/bower_components/"
GRACEDB_DATA_DIR = "/exports/gracedb/data"
EMAIL_HOST = 'localhost'
ALERT_EMAIL_FROM = "Dev Alert <root@gracedb-test.cgca.uwm.edu>"
#ALERT_EMAIL_TO = [
# "Branson Stephens <branson@gravity.phys.uwm.edu>",
# ]
#ALERT_EMAIL_BCC = ["branson@gravity.phys.uwm.edu"]
#
#ALERT_TEST_EMAIL_FROM = "Dev Test Alert <root@gracedb-test.cgca.uwm.edu>"
#ALERT_TEST_EMAIL_TO = [
# "Branson Stephens <branson@gravity.phys.uwm.edu>",
# ]
ALERT_EMAIL_TO = []
ALERT_EMAIL_BCC = []
ALERT_TEST_EMAIL_FROM = "Dev Test Alert <root@gracedb-test.cgca.uwm.edu>"
ALERT_TEST_EMAIL_TO = []
ALERT_XMPP_SERVERS = ["lvalert-test.cgca.uwm.edu",]
LVALERT_SEND_EXECUTABLE = '/home/branson.stephens/djangoenv/bin/lvalert_send'
USE_LVALERT_OVERSEER = True
# For each lvalert server, a separate instance of the lvalert_overseer
# must be running and listening on a distinct port.
LVALERT_OVERSEER_PORTS = {
'lvalert-test.cgca.uwm.edu': 8001,
}
EMBB_MAIL_ADDRESS = 'branson.stephens@gracedb-test.cgca.uwm.edu'
EMBB_SMTP_SERVER = 'localhost'
EMBB_MAIL_ADMINS = ['branson@gravity.phys.uwm.edu',]
EMBB_IGNORE_ADDRESSES = ['Mailer-Daemon@gracedb-test.cgca.uwm.edu',]
# Don't sent out non-test XMPP alerts on dev box!
XMPP_ALERT_CHANNELS = [
'test_omega',
'test_mbtaonline',
'test_cwb',
'test_lowmass',
]
# Latency histograms. Where they go and max latency to bin.
LATENCY_REPORT_DEST_DIR = "/exports/gracedb/latency"
LATENCY_REPORT_WEB_PAGE_FILE_PATH = LATENCY_REPORT_DEST_DIR + "/latency.inc"
# Uptime reporting
UPTIME_REPORT_DIR = "/exports/gracedb/uptime"
# Rate file location
RATE_INFO_FILE = "/exports/gracedb/rate_info.json"
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
"/home/branson.stephens/gracedb/templates",
)
MIDDLEWARE_CLASSES = [
'middleware.accept.AcceptMiddleware',
'middleware.cli.CliExceptionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'ligoauth.middleware.auth.LigoAuthMiddleware',
'middleware.performance.PerformanceMiddleware',
#'debug_toolbar.middleware.DebugToolbarMiddleware',
#'debug_panel.middleware.DebugPanelMiddleware',
#'middleware.profiling.ProfileMiddleware',
]
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.admin',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.staticfiles',
'gracedb',
'userprofile',
'ligoauth',
'rest_framework',
'guardian',
#'debug_toolbar',
#'debug_panel',
)
INTERNAL_IPS = (
'129.89.57.83',
)
CONTROL_ROOM_IPS = {
'H1': '108.45.69.217',
'L1': '129.2.92.124',
# 'L1': '129.89.57.83',
}
# Settings for Logging.
import logging
LOG_ROOT = '/home/branson.stephens/logs'
LOG_FILE_SIZE = 1024*1024 # 1 MB
LOG_FILE_BAK_CT = 3
LOG_FORMAT = 'verbose'
LOG_LEVEL = 'DEBUG'
# Note that mode for log files is 'a' (append) by default
# The 'level' specifier on the handle is optional, and we
# don't need it since we're using custom filters.
LOGGING = {
'version': 1,
'disable_existing_loggers' : True,
'formatters': {
'simple': {
'format': '%(levelname)s %(message)s',
},
'verbose': {
'format': '%(asctime)s: %(name)s: %(message)s',
'datefmt': '%Y-%m-%d %H:%M:%S',
},
},
'handlers': {
'null': {
'level':'DEBUG',
'class':'django.utils.log.NullHandler',
},
'debug_file': {
'class': 'logging.handlers.RotatingFileHandler',
'formatter': LOG_FORMAT,
'filename': '%s/gracedb_debug.log' % LOG_ROOT,
'maxBytes': LOG_FILE_SIZE,
'backupCount': LOG_FILE_BAK_CT,
},
'performance_file': {
'class': 'logging.FileHandler',
'formatter': 'simple',
'filename': '%s/gracedb_performance.log' % LOG_ROOT,
},
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler'
}
},
'loggers': {
'django': {
'handlers': ['null'],
'propagate': True,
'level': 'INFO',
},
'gracedb': {
'handlers': ['debug_file'],
'propagate': True,
'level': LOG_LEVEL,
},
'ligoauth': {
'handlers': ['debug_file'],
'propagate': True,
'level': LOG_LEVEL,
},
'middleware': {
'handlers': ['performance_file'],
'propagate': True,
'level': 'INFO',
},
'userprofile': {
'handlers': ['debug_file'],
'propagate': True,
'level': LOG_LEVEL,
},
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': False,
},
},
}
import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
# Add the source code directory
sys.path.insert(1,'/home/branson.stephens/gracedb')
# Activate the virtual environment
VIRTUALENV_ACTIVATOR = "/home/branson.stephens/djangoenv/bin/activate_this.py"
execfile(VIRTUALENV_ACTIVATOR, dict(__file__=VIRTUALENV_ACTIVATOR))
os.environ['MPLCONFIGDIR']='/home/branson.stephens/logs/'
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment