Skip to content

Commit 6c63a5f

Browse files
committed
Make a bunch of rsync'ed assets available as part of the image.
- Legacy-Id: 19496
1 parent 9e44531 commit 6c63a5f

4 files changed

Lines changed: 51 additions & 155 deletions

File tree

docker/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,22 @@ RUN sed -i 's/\[mysqld\]/\[mysqld\]\ninnodb_buffer_pool_size = 1G\ninnodb_log_bu
128128
rm -rf /ietf_utf8.sql /mariadb-sys-master && \
129129
mv /var/lib/mysql /
130130

131+
# Make various assets available
132+
RUN mkdir -p /root/data/proceedings
133+
ENV RSYNC_OPT="-auz --info=progress2 --exclude *.p7s --exclude *.xml --exclude *.html --exclude *.pdf --exclude *.ps --exclude *.Z --exclude *.mib --exclude *.ZIP"
134+
RUN rsync $RSYNC_OPT ftp.rfc-editor.org::rfcs-text-only/ /root/data/rfc/
135+
RUN rsync $RSYNC_OPT rsync.ietf.org::charter/ /root/data/charter/
136+
RUN rsync $RSYNC_OPT rsync.ietf.org::conflict-reviews/ /root/data/conflict-reviews/
137+
RUN rsync $RSYNC_OPT rsync.ietf.org::dev.media/floor/ /root/data/floor/
138+
RUN rsync $RSYNC_OPT rsync.ietf.org::everything-ftp/yang/ /root/data/yang/
139+
RUN rsync $RSYNC_OPT rsync.ietf.org::id-archive/ /root/data/internet-drafts/
140+
RUN rsync $RSYNC_OPT rsync.ietf.org::status-changes/ /root/data/status-changes/
141+
# These are either very large or unneeded:
142+
#RUN rsync $RSYNC_OPT rsync.ietf.org::dev.media/photo/ /root/data/photo/
143+
#RUN rsync $RSYNC_OPT rsync.ietf.org::everything-ftp/review/ /root/data/review/
144+
#RUN rsync $RSYNC_OPT rsync.ietf.org::rfc/ /root/data/rfc/
145+
#RUN rsync $RSYNC_OPT rsync.ietf.org::slides/ /root/data/slides/
146+
131147
# Copy the startup file
132148
COPY docker-init.sh /docker-init.sh
133149
RUN chmod +x /docker-init.sh

docker/docker-init.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,16 @@ if ! service mariadb status; then
3030
exit 1
3131
fi
3232

33+
echo
3334
if [ ! -f /root/src/ietf/settings_local.py ]; then
34-
echo "Setting up a default settings_local.py ..."
35+
echo "Setting up a default ietf/settings_local.py file"
3536
cp /root/src/docker/settings_local.py /root/src/ietf/settings_local.py
37+
else
38+
echo "Using existing ietf/settings_local.py file"
39+
if ! cmp -s /root/src/docker/settings_local.py /root/src/ietf/settings_local.py; then
40+
echo "NOTE: Differences detected compared to docker/settings_local.py!"
41+
echo "We'll assume you made these deliberately."
42+
fi
3643
fi
3744

3845
for sub in \

docker/rsync-extras

Lines changed: 0 additions & 105 deletions
This file was deleted.

docker/settings_local.py

Lines changed: 27 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,39 @@
11
# Copyright The IETF Trust 2007-2019, All Rights Reserved
22
# -*- coding: utf-8 -*-
33

4-
import six
5-
if six.PY3:
6-
from typing import Collection, Dict, List, Tuple # pyflakes:ignore
7-
8-
SECRET_KEY = 'jzv$o93h_lzw4a0%0oz-5t5lk+ai=3f8x@uo*9ahu8w4i300o6'
9-
104
DATABASES = {
11-
'default': {
12-
'NAME': 'ietf_utf8',
13-
'ENGINE': 'django.db.backends.mysql',
14-
'USER': 'django',
15-
'PASSWORD': 'RkTkDPFnKpko',
16-
'OPTIONS': {
17-
'sql_mode': 'STRICT_TRANS_TABLES',
18-
'init_command': 'SET storage_engine=InnoDB; SET names "utf8"',
5+
"default": {
6+
"NAME": "ietf_utf8",
7+
"ENGINE": "django.db.backends.mysql",
8+
"USER": "django",
9+
"PASSWORD": "RkTkDPFnKpko",
10+
"OPTIONS": {
11+
"sql_mode": "STRICT_TRANS_TABLES",
12+
"init_command": 'SET storage_engine=InnoDB; SET names "utf8"',
1913
},
2014
},
21-
} # type: Dict[str, Dict[str, Collection[str]]]
15+
}
2216

23-
DATABASE_TEST_OPTIONS = {
24-
'init_command': 'SET storage_engine=InnoDB',
25-
}
17+
USING_DEBUG_EMAIL_SERVER = True
18+
EMAIL_HOST = "localhost"
19+
EMAIL_PORT = 2025
2620

2721
IDSUBMIT_IDNITS_BINARY = "/usr/local/bin/idnits"
22+
2823
IDSUBMIT_REPOSITORY_PATH = "test/id/"
2924
IDSUBMIT_STAGING_PATH = "test/staging/"
30-
INTERNET_DRAFT_ARCHIVE_DIR = "test/archive/"
31-
INTERNET_ALL_DRAFTS_ARCHIVE_DIR = "test/archive/"
32-
RFC_PATH = "test/rfc/"
33-
34-
AGENDA_PATH = 'data/developers/www6s/proceedings/'
35-
MEETINGHOST_LOGO_PATH = AGENDA_PATH
36-
37-
USING_DEBUG_EMAIL_SERVER=True
38-
EMAIL_HOST='localhost'
39-
EMAIL_PORT=2025
40-
41-
TRAC_WIKI_DIR_PATTERN = "test/wiki/%s"
42-
TRAC_SVN_DIR_PATTERN = "test/svn/%s"
43-
TRAC_CREATE_ADHOC_WIKIS = [
44-
] # type: List[Tuple[str, str, str]]
45-
46-
MEDIA_BASE_DIR = 'test'
47-
MEDIA_ROOT = MEDIA_BASE_DIR + '/media/'
48-
MEDIA_URL = '/media/'
49-
50-
PHOTOS_DIRNAME = 'photo'
51-
PHOTOS_DIR = MEDIA_ROOT + PHOTOS_DIRNAME
52-
53-
DOCUMENT_PATH_PATTERN = 'data/developers/ietf-ftp/{doc.type_id}/'
54-
55-
SUBMIT_YANG_CATALOG_MODEL_DIR = 'data/developers/ietf-ftp/yang/catalogmod/'
56-
SUBMIT_YANG_DRAFT_MODEL_DIR = 'data/developers/ietf-ftp/yang/draftmod/'
57-
SUBMIT_YANG_INVAL_MODEL_DIR = 'data/developers/ietf-ftp/yang/invalmod/'
58-
SUBMIT_YANG_IANA_MODEL_DIR = 'data/developers/ietf-ftp/yang/ianamod/'
59-
SUBMIT_YANG_RFC_MODEL_DIR = 'data/developers/ietf-ftp/yang/rfcmod/'
60-
6125

26+
AGENDA_PATH = "/root/data/proceedings/"
27+
BOFREQ_PATH = "/nonexistent" # not on rsync yet?
28+
CHARTER_PATH = "/root/data/charter/"
29+
CONFLICT_REVIEW_PATH = "/root/data/conflict-review/"
30+
FLOORPLAN_DIR = "/root/data/floor/"
31+
INTERNET_DRAFT_PATH = "/root/data/internet-drafts/"
32+
INTERNET_ALL_DRAFTS_ARCHIVE_DIR = INTERNET_DRAFT_PATH
33+
INTERNET_DRAFT_ARCHIVE_DIR = INTERNET_DRAFT_PATH
34+
RFC_PATH = "/root/data/rfc/"
35+
STATUS_CHANGE_PATH = "/root/data/status-change/"
36+
SUBMIT_YANG_CATALOG_MODEL_DIR = "/root/data/yang/catalogmod/"
37+
SUBMIT_YANG_DRAFT_MODEL_DIR = "/root/data/yang/draftmod/"
38+
SUBMIT_YANG_IANA_MODEL_DIR = "/root/data/yang/ianamod/"
39+
SUBMIT_YANG_RFC_MODEL_DIR = "/root/data/yang/rfcmod/"

0 commit comments

Comments
 (0)