From 7f2807b06be3ff9a0163c0e2c498c23fbbc826b5 Mon Sep 17 00:00:00 2001 From: Nicolas Ruflin Date: Mon, 12 Dec 2016 09:53:23 +0100 Subject: [PATCH] Improve speed and stability of CI builds (#3162) Loading and creating docker images takes quite a bit of time on the travis builds. Especially calls like apt-get update and install take lots of time and bandwidth and fail from time to time, as a host is not available. Following actions were taken: * Fake Kibana container is now based on alpine * Redis stunnel container was also switched to alpine --- libbeat/Dockerfile | 3 ++- libbeat/docker-compose.yml | 5 +---- libbeat/scripts/docker-entrypoint.sh | 2 +- metricbeat/Dockerfile | 3 ++- metricbeat/docker-compose.yml | 4 +--- testing/environments/Dockerfile | 3 --- testing/environments/docker/sredis/Dockerfile | 6 ++---- 7 files changed, 9 insertions(+), 17 deletions(-) diff --git a/libbeat/Dockerfile b/libbeat/Dockerfile index a09e69447e89..3c4b4283bcd9 100644 --- a/libbeat/Dockerfile +++ b/libbeat/Dockerfile @@ -4,7 +4,8 @@ MAINTAINER Nicolas Ruflin RUN set -x && \ apt-get update && \ - apt-get install -y netcat python-virtualenv python-pip && \ + apt-get install -y --no-install-recommends \ + netcat python-pip virtualenv && \ apt-get clean ENV PYTHON_ENV=/tmp/python-env diff --git a/libbeat/docker-compose.yml b/libbeat/docker-compose.yml index 1620948e1b8a..24b287b2105b 100644 --- a/libbeat/docker-compose.yml +++ b/libbeat/docker-compose.yml @@ -59,7 +59,4 @@ services: # Overloading kibana with a simple image as it is not needed here kibana: - build: - context: ${PWD}/../testing/environments/ - dockerfile: Dockerfile - args: [] + image: alpine:latest diff --git a/libbeat/scripts/docker-entrypoint.sh b/libbeat/scripts/docker-entrypoint.sh index 32b0c2809113..44e7c2cd8760 100755 --- a/libbeat/scripts/docker-entrypoint.sh +++ b/libbeat/scripts/docker-entrypoint.sh @@ -81,7 +81,7 @@ waitFor() { done echo - echo >&2 '${3} is not available' + echo >&2 "${3} is not available" echo >&2 "Address: ${1}:${2}" } diff --git a/metricbeat/Dockerfile b/metricbeat/Dockerfile index 123bf642e54b..31b6c548d9f1 100644 --- a/metricbeat/Dockerfile +++ b/metricbeat/Dockerfile @@ -3,7 +3,8 @@ MAINTAINER Nicolas Ruflin RUN set -x && \ apt-get update && \ - apt-get install -y netcat python-virtualenv python-pip && \ + apt-get install -y --no-install-recommends \ + netcat python-pip virtualenv && \ apt-get clean # Setup work environment diff --git a/metricbeat/docker-compose.yml b/metricbeat/docker-compose.yml index 991fe07a29eb..f05b4f9b0f5c 100644 --- a/metricbeat/docker-compose.yml +++ b/metricbeat/docker-compose.yml @@ -44,9 +44,7 @@ services: # Overloading kibana with a simple image as it is not needed here kibana: - build: - context: ${PWD}/../testing/environments/ - dockerfile: Dockerfile + image: alpine:latest # Modules apache: diff --git a/testing/environments/Dockerfile b/testing/environments/Dockerfile index 79411d5d9ab0..0543985dadd3 100644 --- a/testing/environments/Dockerfile +++ b/testing/environments/Dockerfile @@ -6,6 +6,3 @@ MAINTAINER Nicolas Ruflin RUN apt-get update && \ apt-get install -y curl nano wget zip && \ apt-get clean - - -ARG KIBANA_VERSION diff --git a/testing/environments/docker/sredis/Dockerfile b/testing/environments/docker/sredis/Dockerfile index adbc826ce4cc..3b6e95519327 100644 --- a/testing/environments/docker/sredis/Dockerfile +++ b/testing/environments/docker/sredis/Dockerfile @@ -1,8 +1,6 @@ -FROM debian:8.4 +FROM alpine:edge -RUN apt-get update \ - && apt-get upgrade -y \ - && apt-get install stunnel4 -y +RUN apk add --no-cache stunnel COPY stunnel.conf /etc/stunnel/stunnel.conf COPY pki /etc/pki