Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GraceDB Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Coughlin
GraceDB Server
Commits
937034fc
Commit
937034fc
authored
10 years ago
by
Branson Craig Stephens
Browse files
Options
Downloads
Patches
Plain Diff
Initial config changes for glitchdb
parent
53a9ac7a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
settings/__init__.py
+3
-0
3 additions, 0 deletions
settings/__init__.py
settings/glitchdb.py
+208
-0
208 additions, 0 deletions
settings/glitchdb.py
wsgi/glitchdb.wsgi
+25
-0
25 additions, 0 deletions
wsgi/glitchdb.wsgi
with
236 additions
and
0 deletions
settings/__init__.py
+
3
−
0
View file @
937034fc
...
...
@@ -35,6 +35,9 @@ configs = {
'
/home/roywilliams/gracedbdev
'
:
'
roy
'
,
'
/home/roywilliams/gracedbdev/gracedb
'
:
'
roy
'
,
'
/home/glitchdb/glitchdb-dev
'
:
'
glitchdb
'
,
'
/home/glitchdb/glitchdb-dev/gracedb
'
:
'
glitchdb
'
,
"
/home/gracedb/gracestage
"
:
"
stage
"
,
}
...
...
This diff is collapsed.
Click to expand it.
settings/glitchdb.py
0 → 100644
+
208
−
0
View file @
937034fc
CONFIG_NAME
=
"
GlitchDB
"
DEBUG
=
True
TEMPLATE_DEBUG
=
DEBUG
DATABASES
=
{
'
default
'
:
{
'
NAME
'
:
'
glitchdb
'
,
'
ENGINE
'
:
'
django.db.backends.mysql
'
,
'
USER
'
:
'
glitchdb
'
,
'
PASSWORD
'
:
'
glitchdb
'
,
'
OPTIONS
'
:
{
'
init_command
'
:
'
SET storage_engine=MYISAM
'
,
},
}
}
STATIC_URL
=
"
/glitchdb-static/
"
STATIC_ROOT
=
"
/home/glitchdb/glitchdb-dev/static/
"
BOWER_URL
=
"
/bower-static/
"
BOWER_ROOT
=
"
/home/glitchdb/bower_components/
"
GRACEDB_DATA_DIR
=
"
/home/glitchdb/data
"
ALERT_EMAIL_FROM
=
"
Dev Alert <root@glitchdb.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@glitchdb.cgca.uwm.edu>
"
ALERT_TEST_EMAIL_TO
=
[
"
Branson Stephens <branson@gravity.phys.uwm.edu>
"
,
]
ALERT_XMPP_SERVER
=
"
jabber.phys.uwm.edu
"
EMBB_MAIL_ADDRESS
=
'
branson@moe.phys.uwm.edu
'
EMBB_SMTP_SERVER
=
'
localhost
'
EMBB_MAIL_ADMINS
=
[
'
branson@gravity.phys.uwm.edu
'
,]
EMBB_IGNORE_ADDRESSES
=
[
'
Mailer-Daemon@glitchdb.cgca.uwm.edu
'
,]
# Latency histograms. Where they go and max latency to bin.
LATENCY_REPORT_DEST_DIR
=
"
/home/glitchdb/data/latency
"
LATENCY_REPORT_WEB_PAGE_FILE_PATH
=
LATENCY_REPORT_DEST_DIR
+
"
/latency.inc
"
# Uptime reporting
UPTIME_REPORT_DIR
=
"
/home/glitchdb/data/uptime
"
# Rate file location
RATE_INFO_FILE
=
"
/home/glitchdb/data/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/glitchdb/glitchdb-dev/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
'
,
]
# Settings for Logging.
import
logging
LOG_ROOT
=
'
/home/glitchdb/logs
'
LOG_FILE_SIZE
=
1024
*
1024
# 1 MB
LOG_FILE_BAK_CT
=
3
LOG_FORMAT
=
'
verbose
'
LOG_LEVEL
=
'
DEBUG
'
# Filter objects to separate out each level of alert.
# Otherwise the log files for each level would contain the
# output for each higher level.
class
debugOnlyFilter
(
logging
.
Filter
):
def
filter
(
self
,
record
):
if
record
.
levelname
==
'
DEBUG
'
:
return
1
return
0
class
infoOnlyFilter
(
logging
.
Filter
):
def
filter
(
self
,
record
):
if
record
.
levelname
==
'
INFO
'
:
return
1
return
0
class
debugPlusInfo
(
logging
.
Filter
):
def
filter
(
self
,
record
):
if
record
.
levelname
==
'
INFO
'
or
record
.
levelname
==
'
DEBUG
'
:
return
1
return
0
class
warningOnlyFilter
(
logging
.
Filter
):
def
filter
(
self
,
record
):
if
record
.
levelname
==
'
WARNING
'
:
return
1
return
0
class
errorOnlyFilter
(
logging
.
Filter
):
def
filter
(
self
,
record
):
if
record
.
levelname
==
'
ERROR
'
:
return
1
return
0
# 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
'
,
},
},
# 'filters': {
# 'debugOnly': {
# '()': 'settings.logSettings.debugOnlyFilter',
# },
# 'infoOnly': {
# '()': 'settings.logSettings.infoOnlyFilter',
# },
# 'debugPlusInfo': {
# '()': 'settings.logSettings.debugPlusInfo',
# },
# 'warningOnly': {
# '()': 'settings.logSettings.warningOnlyFilter',
# },
# 'errorOnly': {
# '()': 'settings.logSettings.errorOnlyFilter',
# },
# },
'
handlers
'
:
{
'
null
'
:
{
'
level
'
:
'
DEBUG
'
,
'
class
'
:
'
django.utils.log.NullHandler
'
,
},
'
debug_file
'
:
{
'
class
'
:
'
logging.handlers.RotatingFileHandler
'
,
'
formatter
'
:
LOG_FORMAT
,
# Commented out so that the debug file will have *everything*
# That should make it somewhat easier to read through.
# 'filters': ['debugPlusInfo'],
'
filename
'
:
'
%s/gracedb_debug.log
'
%
LOG_ROOT
,
'
maxBytes
'
:
LOG_FILE_SIZE
,
'
backupCount
'
:
LOG_FILE_BAK_CT
,
},
# 'info_file': {
# 'class': 'logging.handlers.RotatingFileHandler',
# 'formatter': LOG_FORMAT,
# 'filters': ['infoOnly'],
# 'filename': '%s/gracedb_info.log' % LOG_ROOT,
# 'maxBytes': LOG_FILE_SIZE,
# 'backupCount': LOG_FILE_BAK_CT,
# },
# 'warning_file': {
# 'class': 'logging.handlers.RotatingFileHandler',
# 'formatter': LOG_FORMAT,
# 'filters': ['warningOnly'],
# 'filename': '%s/gracedb_warning.log' % LOG_ROOT,
# 'maxBytes': LOG_FILE_SIZE,
# 'backupCount': LOG_FILE_BAK_CT,
# },
# 'error_file': {
# 'class': 'logging.handlers.RotatingFileHandler',
# 'formatter': LOG_FORMAT,
# 'filters': ['errorOnly'],
# 'filename': '%s/gracedb_error.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
,
},
},
'
loggers
'
:
{
'
django
'
:
{
'
handlers
'
:
[
'
null
'
],
'
propagate
'
:
True
,
'
level
'
:
'
INFO
'
,
},
'
gracedb
'
:
{
# 'handlers': ['debug_file', 'info_file', 'warning_file', 'error_file'],
'
handlers
'
:
[
'
debug_file
'
],
'
propagate
'
:
True
,
'
level
'
:
LOG_LEVEL
,
},
'
middleware
'
:
{
'
handlers
'
:
[
'
performance_file
'
],
'
propagate
'
:
True
,
'
level
'
:
'
INFO
'
,
},
'
userprofile
'
:
{
#'handlers': ['debug_file', 'info_file', 'warning_file', 'error_file'],
'
handlers
'
:
[
'
debug_file
'
],
'
propagate
'
:
True
,
'
level
'
:
LOG_LEVEL
,
},
},
}
This diff is collapsed.
Click to expand it.
wsgi/glitchdb.wsgi
0 → 100644
+
25
−
0
View file @
937034fc
import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
# Sandbox libs here, if required.
#
sys.path.insert(1,'/home/glitchdb/glitchdb-dev')
sys.path.insert(1,'/home/glitchdb/djangoenv/lib/python2.7/site-packages')
# Scott's Shib app uses loggers.
import logging
logging.basicConfig()
os.environ['MPLCONFIGDIR']='/home/glitchdb/logs/'
#logging.basicConfig(level=logging.DEBUG,
# format='%(asctime)s %(levelname)s %(message)s',
# filename='/tmp/myapp.log',
# filemode='w')
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment