Skip to content

Commit 02d341c

Browse files
committed
Updated docker-related files based on 6.17.0
- Legacy-Id: 10967
1 parent 7b65e26 commit 02d341c

12 files changed

Lines changed: 338 additions & 172 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# Simulated Subversion default ignores end here
1818
/.project
1919
/.pydevproject
20+
/.Python
2021
/.settings
2122
/.coverage
2223
/unix.tag
@@ -30,6 +31,8 @@
3031
/lib
3132
/share
3233
/include
34+
/pip-selfcheck.json
35+
/settings_local.py
3336
/static
3437
/latest-coverage.json
3538
/ghostdriver.log

data/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
/ietf_utf8.bin.tar.bz2
22
/ietf_utf8.sql.gz
33
/mysql
4+
/.com.apple.backupd.*
5+
/developers
6+
/nomcom_keys

docker/Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,29 +40,36 @@ RUN apt-get update && apt-get install -qy \
4040
libsvn1/wheezy-backports \
4141
libxml2-dev \
4242
libxslt-dev \
43+
locales \
4344
mysql-server \
4445
openssh-client \
4546
procps \
4647
pv \
4748
python \
4849
python-dev \
4950
python-m2crypto \
51+
rsync \
5052
subversion/wheezy-backports \
5153
sudo \
5254
wget \
5355
&& apt-get clean \
5456
&& rm -rf /var/lib/apt/lists/*
5557

58+
# Enable some common locales
59+
RUN sed -i -e 's/^. en_US/en_US/' -e 's/^. en_GB/en_GB/' -e 's/^. en_IE/en_IE/' /etc/locale.gen
60+
RUN locale-gen
61+
5662
# Set up root password
5763
RUN echo "root:root" | chpasswd
5864

5965
# MySQL
6066
VOLUME /var/lib/mysql
6167

6268
# Pip
63-
ENV PYTHONWARNINGS="ignore:a true SSLContext object"
69+
ENV PYTHONWARNINGS="ignore:a true SSLContext object,ignore:An HTTPS request has been made"
6470
WORKDIR /usr/src
6571
RUN wget -q https://bootstrap.pypa.io/get-pip.py && python get-pip.py && rm get-pip.py
72+
RUN pip install certifi
6673
RUN pip install virtualenv
6774

6875
# idnits and dependencies
@@ -73,7 +80,7 @@ RUN mkdir -p $DDIR
7380
WORKDIR $DDIR
7481

7582
COPY requirements.txt ./
76-
RUN pip install -r requirements.txt
83+
RUN pip --no-cache-dir install -r requirements.txt
7784

7885
COPY settings_local.py ./
7986
COPY setprompt ./

docker/docker-init.sh

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,50 @@ if [ ! -f $VIRTDIR/lib/site-python/settings_local.py ]; then
9494
cp /usr/local/share/datatracker/settings_local.py $VIRTDIR/lib/site-python/
9595
fi
9696

97+
for sub in test/id/ test/staging/ test/archive/; do
98+
dir="/home/$USER/$CWD/$sub"
99+
if [ ! -d "$dir" ]; then
100+
echo "Creating dir $dir"
101+
mkdir -p "$dir";
102+
fi
103+
done
104+
105+
for sub in \
106+
nomcom_keys/public_keys \
107+
developers/ietf-ftp \
108+
developers/ietf-ftp/internet-drafts \
109+
developers/ietf-ftp/rfc \
110+
developers/ietf-ftp/charter \
111+
developers/ietf-ftp/status-changes \
112+
developers/ietf-ftp/conflict-reviews \
113+
developers/www6s \
114+
developers/www6s/staging \
115+
developers/www6s/wg-descriptions \
116+
developers/www6s/proceedings \
117+
developers/www6/ \
118+
developers/www6/iesg \
119+
developers/www6/iesg/evaluation \
120+
; do
121+
dir="/home/$USER/$CWD/data/$sub"
122+
if [ ! -d "$dir" ]; then
123+
echo "Creating dir $dir"
124+
mkdir -p "$dir";
125+
fi
126+
done
127+
128+
if [ ! -f "/home/$USER/$CWD/test/data/draft-aliases" ]; then
129+
echo "Generating draft aliases ..."
130+
ietf/bin/generate-draft-aliases }
131+
fi
132+
133+
if [ ! -f "/home/$USER/$CWD/test/data/group-aliases" ]; then
134+
echo "Generating group aliases ..."
135+
ietf/bin/generate-wg-aliases }
136+
fi
137+
97138
chown -R $USER /opt/home/$USER
98139

99-
cd /home/$USER/$CWD || cd /home/$USER/
140+
cd "/home/$USER/$CWD" || cd "/home/$USER/"
100141

101142
echo "Done!"
102143

docker/run

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,8 @@ done
122122
# The program itself
123123

124124
if [ "$(uname)" != "Linux" ]; then
125-
if [ -n "$(type -p boot2docker)" ]; then
126-
machine=$(type -p boot2docker)
127-
up=up
128-
env=shellinit
129-
elif [ -n "$(type -p docker-machine)" ]; then
125+
if [ -n "$(type -p docker-machine)" ]; then
130126
machine=$(type -p docker-machine)
131-
up=start
132-
env="env default"
133127
else
134128
die "Could not find boot2docker or docker-machine -- you need to set one of those before running this script."
135129
fi
@@ -138,13 +132,13 @@ else
138132
fi
139133

140134

141-
if [ $($machine status) != "running" ]; then
142-
echo "The docker VM doesn't seem to be running; will attempt to start it by doing '\$ $machine $up':"
143-
$machine $up || die "Failed taking up the Docker VM"
135+
if [ $($machine status default) != "Running" ]; then
136+
echo "The docker VM doesn't seem to be running; will attempt to start it by doing '\$ $machine start':"
137+
$machine start || die "Failed taking up the Docker VM"
144138
fi
145139

146140
if [ -f "$machine" ]; then
147-
if [ $($machine status | tr "A-Z" "a-z") = "running" ]; then
141+
if [ $($machine status | tr "A-Z" "a-z") = "Running" ]; then
148142
tmpfile=$(mktemp docker.run.XXXXXXXX)
149143
if $machine $env 2>/dev/null | grep DOCKER_ > $tmpfile; then
150144
mv $tmpfile ~/.docker-info

docker/settings_local.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@
1414
}
1515

1616
IDSUBMIT_IDNITS_BINARY = "/usr/local/bin/idnits"
17+
IDSUBMIT_REPOSITORY_PATH = "test/id/"
18+
IDSUBMIT_STAGING_PATH = "test/staging/"
19+
INTERNET_DRAFT_ARCHIVE_DIR = "test/archive/"

ietf/checks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def check_group_email_aliases_exists(app_configs, **kwargs):
3030
ok = check_group_email_aliases()
3131
if not ok:
3232
errors.append(checks.Error(
33-
"Found no aliases in the group email aliases file",
33+
"Found no aliases in the group email aliases file\n'%s'."%settings.GROUP_ALIASES_PATH,
3434
hint="Please run ietf/bin/generate-wg-aliases to generate them.",
3535
obj=None,
3636
id="datatracker.E0002",
@@ -53,7 +53,7 @@ def check_doc_email_aliases_exists(app_configs, **kwargs):
5353
ok = check_doc_email_aliases()
5454
if not ok:
5555
errors.append(checks.Critical(
56-
"Found no aliases in the document email aliases file.",
56+
"Found no aliases in the document email aliases file\n'%s'."%settings.DRAFT_ALIASES_PATH,
5757
hint="Please run ietf/bin/generate-draft-aliases to generate them.",
5858
obj=None,
5959
id="datatracker.E0004",

test/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
/*.pyc
2+
/archive
3+
/id
4+
/staging
25
/sql_setup.sql

0 commit comments

Comments
 (0)