Skip to content

Commit

Permalink
Switch to very simple wsgi file for Docker; kill configs and associat…
Browse files Browse the repository at this point in the history
…ed code + all vagrant stuff.
  • Loading branch information
bhearsum committed Dec 18, 2015
1 parent 0e30e47 commit 821de2d
Show file tree
Hide file tree
Showing 20 changed files with 31 additions and 577 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
test.done
*.db
.vagrant
admin.ini
balrog.ini
.coverage
htmlcov
cef.log
Expand Down
29 changes: 0 additions & 29 deletions Vagrantfile

This file was deleted.

21 changes: 0 additions & 21 deletions admin.ini-dist

This file was deleted.

52 changes: 24 additions & 28 deletions admin.wsgi
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
import logging
from os import path
import site
import sys
import os

mydir = path.dirname(path.abspath(__file__))

site.addsitedir(mydir)
from auslib.util import thirdparty
thirdparty.extendsyspath()

from auslib.config import AdminConfig
import auslib.log

cfg = AdminConfig(path.join(mydir, 'admin.ini'))
errors = cfg.validate()
if errors:
print >>sys.stderr, "Invalid configuration file:"
for err in errors:
print >>sys.stderr, err
sys.exit(1)

# Logging needs to get set-up before importing the application
# to make sure that logging done from other modules uses our Logger.
SYSTEM_ACCOUNTS = ["ffxbld", "tbirdbld", "b2gbld", "stage-ffxbld", "stage-tbirdbld", "stage-b2gbld"]
DOMAIN_WHITELIST = [
"download.mozilla.org", "stage.mozilla.org", "ftp.mozilla.org",
"ciscobinary.openh264.org", "cdmdownload.adobe.com",
"queue.taskcluster.net", "download.cdn.mozilla.net",
"mozilla-nightly-updates.s3.amazonaws.com",
"archive.mozilla.org",
"mozilla-releng-nightly-promotion-mozilla-central.b2gdroid.s3.amazonaws.com",
]

# Logging needs to be set-up before importing the application to make sure that
# logging done from other modules uses our Logger.
logging.setLoggerClass(auslib.log.BalrogLogger)
logging.basicConfig(filename=cfg.getLogfile(), level=cfg.getLogLevel(), format=auslib.log.log_format)
logging.basicConfig(level=logging.INFO, format=auslib.log.log_format)

from auslib.global_state import dbo
from auslib.admin.base import app as application
from auslib.global_state import dbo

# TODO: How to do cef logging in CloudOps? Do we need to?
auslib.log.cef_config = auslib.log.get_cef_config("cef.log")

auslib.log.cef_config = auslib.log.get_cef_config(cfg.getCefLogfile())
dbo.setDb(cfg.getDburi())
dbo.setupChangeMonitors(cfg.getSystemAccounts())
dbo.setDomainWhitelist(cfg.getDomainWhitelist())
application.config['WHITELISTED_DOMAINS'] = cfg.getDomainWhitelist()
application.config['PAGE_TITLE'] = cfg.getPageTitle()
application.config['SECRET_KEY'] = cfg.getSecretKey()
dbo.setDb(os.environ["DBURI"])
dbo.setupChangeMonitors(SYSTEM_ACCOUNTS)
dbo.setDomainWhitelist(DOMAIN_WHITELIST)
application.config["WHITELISTED_DOMAINS"] = DOMAIN_WHITELIST
application.config["PAGE_TITLE"] = "Balrog Administration"
application.config["SECRET_KEY"] = os.environ["SECRET_KEY"]
98 changes: 0 additions & 98 deletions auslib/config.py

This file was deleted.

23 changes: 0 additions & 23 deletions balrog.ini-dist

This file was deleted.

53 changes: 0 additions & 53 deletions balrog.wsgi

This file was deleted.

6 changes: 5 additions & 1 deletion images/admin/Dockerfile → docker/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ MAINTAINER [email protected]
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -q update && \
apt-get -q --yes install nodejs-legacy npm && \
apt-get -q --yes install \
nodejs-legacy \
npm && \
apt-get clean

WORKDIR /app
Expand All @@ -15,3 +17,5 @@ RUN python setup.py install

WORKDIR /app/ui
RUN npm install

WORKDIR /app
53 changes: 0 additions & 53 deletions puppet/files/etc/httpd/conf.d/balrog.conf

This file was deleted.

6 changes: 0 additions & 6 deletions puppet/files/sample-data.sql

This file was deleted.

Loading

0 comments on commit 821de2d

Please sign in to comment.