forked from mozilla-releng/balrog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to very simple wsgi file for Docker; kill configs and associat…
…ed code + all vagrant stuff.
- Loading branch information
Showing
20 changed files
with
31 additions
and
577 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,6 @@ | |
test.done | ||
*.db | ||
.vagrant | ||
admin.ini | ||
balrog.ini | ||
.coverage | ||
htmlcov | ||
cef.log | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -15,3 +17,5 @@ RUN python setup.py install | |
|
||
WORKDIR /app/ui | ||
RUN npm install | ||
|
||
WORKDIR /app |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.