Merge #135 Get docker-compose actually working!

This commit is contained in:
Matt Prahl
2016-10-28 14:12:44 +00:00
4 changed files with 67 additions and 18 deletions

View File

@@ -13,6 +13,9 @@ RUN dnf install -y \
fedmsg-relay \
python-mock \
git \
# Troubleshooting tools
telnet \
nc \
&& dnf autoremove -y \
&& dnf clean all \
&& mkdir /opt/module_build_service/ \
@@ -25,5 +28,3 @@ COPY koji.conf /etc/module_build_service/
COPY copr.conf /etc/module_build_service/
COPY . /opt/module_build_service/
RUN python2 ./manage.py upgradedb && python2 manage.py generatelocalhostcert

View File

@@ -1,33 +1,51 @@
version: "2"
services:
fedmsg-relay:
build:
context: .
build: .
command: fedmsg-relay
ports:
- "2003:2003"
- "4001:4001"
module_build_service_daemon:
build:
context: .
expose:
- 2001
- 2003
volumes:
# module_build_service sources are bind-mounted, so you don't have to rebuild
- ./:/opt/module_build_service/:z
scheduler:
build: .
command: python2 /opt/module_build_service/module_build_service_daemon.py
links:
- fedmsg-relay
volumes:
# module_build_service sources are bind-mounted, so you don't have to rebuild
- ./module_build_service/:/opt/module_build_service/module_build_service/:z
- ./:/opt/module_build_service/:z
- ~/.fedora.cert:/root/.fedora.cert:z # koji credentials are mounted inside
- ~/.fedora-server-ca.cert:/root/.fedora-server-ca.cert:z
- ~/.fedora-upload-ca.cert:/root/.fedora-upload-ca.cert:z
module_build_service:
build:
context: .
frontend:
build: .
ports:
- "5000:5000"
links:
- module_build_service_daemon
- scheduler
- fedmsg-relay
depends_on:
- upgradedb
- generatelocalhostcert
volumes:
# module_build_service sources are bind-mounted, so you don't have to rebuild
- ./module_build_service/:/opt/module_build_service/module_build_service/:z
- ./:/opt/module_build_service/:z
command: python2 manage.py runssl
upgradedb:
build: .
volumes:
- ./:/opt/module_build_service/:z
command: python2 manage.py upgradedb
generatelocalhostcert:
build: .
volumes:
- ./:/opt/module_build_service/:z
command: python2 manage.py generatelocalhostcert

16
fedmsg.d/logging.py Normal file
View File

@@ -0,0 +1,16 @@
# Setup fedmsg logging.
# See the following for constraints on this format https://bit.ly/Xn1WDn
bare_format = "[%(asctime)s][%(name)10s %(levelname)7s] %(message)s"
config = dict(
logging=dict(
loggers=dict(
# Quiet this guy down...
requests={
"level": "WARNING",
"propagate": True,
"handlers": ["console"],
},
),
),
)

View File

@@ -1,12 +1,26 @@
config = {
# Just for dev.
"validate_signatures": False,
# Talk to the relay, so things also make it to composer.stg in our dev env
"active": True,
# Since we're in active mode, we don't need to declare any of our own
# passive endpoints. This placeholder value needs to be here for the tests
# to pass in Jenkins, though. \o/
"endpoints": {},
"relay_inbound": ["tcp://127.0.0.1:2003"],
"endpoints": {
"fedora-infrastructure": [
# Just listen to staging for now, not to production (spam!)
#"tcp://hub.fedoraproject.org:9940",
"tcp://stg.fedoraproject.org:9940",
],
"relay_outbound": [
"tcp://fedmsg-relay:2001"
],
},
"relay_inbound": [
"tcp://fedmsg-relay:2003"
],
# Start of code signing configuration
# 'sign_messages': True,