Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 27 additions & 5 deletions .evergreen/Dockerfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ RUN echo 2

RUN apt-get install -y curl

<% if preload? && distro =~ /ubuntu1204/ %>

# ubuntu1204 comes with python 2.7.3.
# Install a more recent one from deadsnakes ppa so that pip works.
RUN apt-get install -y python-software-properties
# https://github.com/deadsnakes/issues/issues/53
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5BB92C09DB82666C
RUN add-apt-repository ppa:fkrull/deadsnakes-python2.7
RUN apt-get update
RUN apt-get install -y python2.7-dev

<% end %>

<% end %>

<% if ruby_head? %>
Expand Down Expand Up @@ -107,6 +120,17 @@ RUN echo 2
ENV USE_OPT_TOOLCHAIN=1

<% end %>

<% if distro =~ /ubuntu1204/ %>

# Ubuntu 12.04 ships pip 1.0 which is ancient and does not work.
# https://pip.pypa.io/en/stable/installing/
RUN curl --retry 3 -fLo get-pip.py https://bootstrap.pypa.io/get-pip.py
RUN python get-pip.py

<% end %>

RUN pip --version

<% end %>

Expand All @@ -124,9 +148,7 @@ WORKDIR /app

COPY . .

ENV MONGO_ORCHESTRATION_HOME=/tmpfs
ENV PROJECT_DIRECTORY=/app
ENV MONGO_ORCHESTRATION_HOME=/tmpfs \
PROJECT_DIRECTORY=/app

<% @env.each do |k, v| %>
ENV <%= k %>="<%= v %>"
<% end %>
ENV <%= @env.map { |k, v| %Q`#{k}="#{v}"` }.join(" \\\n ") %>
4 changes: 0 additions & 4 deletions .evergreen/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,6 @@ install_mlaunch_pip() {
python -V || true
python3 -V || true
pythonpath="$MONGO_ORCHESTRATION_HOME"/python
# The scripts in a python installation have shebangs pointing to the
# prefix, which doesn't work for us because we unpack toolchain to a
# different directory than prefix used for building. Work around this by
# explicitly running pip3 with python.
pip install -t "$pythonpath" 'mtools-legacy[mlaunch]'
export PATH="$pythonpath/bin":$PATH
export PYTHONPATH="$pythonpath"
Expand Down
22 changes: 3 additions & 19 deletions .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ setup_ruby

prepare_server $arch

install_mlaunch_git https://github.com/p-mongo/mtools wait-for-rs
install_mlaunch_pip

# Launching mongod under $MONGO_ORCHESTRATION_HOME
# makes its log available through log collecting machinery
Expand Down Expand Up @@ -78,23 +78,7 @@ if test "$SSL" = ssl; then
"tlsCertificateKeyFile=spec/support/certificates/$client_pem"
fi

# mlaunch frequently fails to provision sharded clusters with authentication -
# see https://github.com/rueckstiess/mtools/issues/691.
# Give it 5 attempts.
ok=false
for i in `seq 5`; do
if mlaunch --dir "$dbdir" --binarypath "$BINDIR" $args; then
ok=true
break
fi
mlaunch stop --dir "$dbdir" || true
rm -rf "$dbdir"
done

if ! $ok; then
echo mlaunch failed to provision the desired deployment 1>&2
exit 5
fi
python -m mtools.mlaunch.mlaunch --dir "$dbdir" --binarypath "$BINDIR" $args

install_deps

Expand Down Expand Up @@ -180,6 +164,6 @@ echo ${test_status}

kill_jruby

mlaunch stop --dir "$dbdir"
python -m mtools.mlaunch.mlaunch stop --dir "$dbdir"

exit ${test_status}