You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ra...@apache.org on 2017/12/19 21:44:59 UTC

[incubator-openwhisk-deploy-kube] branch master updated: Remove obsolete nginx and kafka docker images (#130)

This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-deploy-kube.git


The following commit(s) were added to refs/heads/master by this push:
     new 2407791  Remove obsolete nginx and kafka docker images (#130)
2407791 is described below

commit 240779182d9abcc4310f0a5caf4e08a11d4b7795
Author: David Grove <dg...@users.noreply.github.com>
AuthorDate: Tue Dec 19 16:44:57 2017 -0500

    Remove obsolete nginx and kafka docker images (#130)
    
    Remove support for building these custom docker images;
    we are now able to deploy using unmodified upstream images.
---
 docker/README.md           |  7 +------
 docker/kafka/Dockerfile    |  5 -----
 docker/kafka/init.sh       | 39 ---------------------------------------
 docker/nginx/Dockerfile    | 27 ---------------------------
 docker/nginx/README.md     | 24 ------------------------
 docker/nginx/build.sh      | 45 ---------------------------------------------
 kubernetes/nginx/nginx.yml |  4 ++--
 7 files changed, 3 insertions(+), 148 deletions(-)

diff --git a/docker/README.md b/docker/README.md
index ebcab79..2356a94 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -1,7 +1,7 @@
 This directory contains the Dockerfiles and other artifacts to
 build specialized docker images for deploying OpenWhisk to Kubernetes.
 
-Some of the images are built automatically and published
+These images are built automatically and published
 to DockerHub under the openwhisk userid.  Docker images are
 published on all successful Travis CI builds of the master branch.
 The built images are:
@@ -13,8 +13,3 @@ The built images are:
   * openwhisk-catalog - installs the catalog from the project
     incubator-openwhisk-calalog to the system namespace of the
     OpenWhisk deployment.
-
-The nginx and kafka images are not officially built and published
-because they are considered to be temporary.  We are working on
-eliminating the need for these images by changing the upstream
-core OpenWhisk project.
diff --git a/docker/kafka/Dockerfile b/docker/kafka/Dockerfile
deleted file mode 100644
index 99c6aa7..0000000
--- a/docker/kafka/Dockerfile
+++ /dev/null
@@ -1,5 +0,0 @@
-FROM ches/kafka:0.10.2.1
-
-COPY init.sh /init.sh
-
-CMD ["/init.sh"]
diff --git a/docker/kafka/init.sh b/docker/kafka/init.sh
deleted file mode 100755
index 1ab2750..0000000
--- a/docker/kafka/init.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-
-set -m
-/start.sh &
-
-TIMEOUT=0
-PASSED=false
-echo "wait for Kafka to be up and running"
-until [ $TIMEOUT -eq 25 ]; do
-  echo "waiting for kafka to be available"
-
-  nc -z 127.0.0.1 $KAFKA_PORT
-  if [ $? -eq 0 ]; then
-    echo "kafka is up and running"
-    PASSED=true
-    break
-  fi
-
-  sleep 0.2
-  let TIMEOUT=TIMEOUT+1
-done
-
-if [ $PASSED = false ]; then
-  echo "failed to setup and reach kafka"
-  exit 1
-fi
-
-unset JMX_PORT
-
-set -x
-
-echo "Create health topic"
-OUTPUT=$(kafka-topics.sh --create --topic health --replication-factor $REPLICATION_FACTOR --partitions $PARTITIONS --zookeeper ${ZOOKEEPER_HOST}:${ZOOKEEPER_PORT} --config retention.bytes=$KAFKA_TOPICS_HEALTH_RETENTIONBYTES --config retention.ms=$KAFKA_TOPICS_HEALTH_RETENTIONMS --config segment.bytes=$KAFKA_TOPICS_HEALTH_SEGMENTBYTES)
-if ! ([[ "$OUTPUT" == *"already exists"* ]] || [[ "$OUTPUT" == *"Created topic"* ]]); then
-  echo "Failed to create heath topic"
-  exit 1
-fi
-
-fg
diff --git a/docker/nginx/Dockerfile b/docker/nginx/Dockerfile
deleted file mode 100644
index 278167e..0000000
--- a/docker/nginx/Dockerfile
+++ /dev/null
@@ -1,27 +0,0 @@
-FROM nginx:1.11
-
-Run apt-get -y update && \
-  apt-get -y install zip
-
-# Download all of the OpenWhisk CLIs
-ADD https://github.com/apache/incubator-openwhisk-cli/releases/download/latest/OpenWhisk_CLI-latest-linux-386.zip /etc/nginx/cli/go/download/linux/386/wsk.zip
-ADD https://github.com/apache/incubator-openwhisk-cli/releases/download/latest/OpenWhisk_CLI-latest-linux-amd64.zip /etc/nginx/cli/go/download/linux/amd64/wsk.zip
-ADD https://github.com/apache/incubator-openwhisk-cli/releases/download/latest/OpenWhisk_CLI-latest-mac-386.zip /etc/nginx/cli/go/download/mac/386/wsk.zip
-ADD https://github.com/apache/incubator-openwhisk-cli/releases/download/latest/OpenWhisk_CLI-latest-mac-amd64.zip /etc/nginx/cli/go/download/mac/amd64/wsk.zip
-ADD https://github.com/apache/incubator-openwhisk-cli/releases/download/latest/OpenWhisk_CLI-latest-windows-386.zip /etc/nginx/cli/go/download/windows/386/wsk.zip
-
-# Untar all of the files
-RUN unzip /etc/nginx/cli/go/download/linux/386/wsk.zip -d /etc/nginx/cli/go/download/linux/386
-RUN unzip /etc/nginx/cli/go/download/linux/amd64/wsk.zip -d /etc/nginx/cli/go/download/linux/amd64
-RUN unzip /etc/nginx/cli/go/download/mac/386/wsk.zip -d /etc/nginx/cli/go/download/mac/386
-RUN unzip /etc/nginx/cli/go/download/mac/amd64/wsk.zip -d /etc/nginx/cli/go/download/mac/amd64
-RUN unzip /etc/nginx/cli/go/download/windows/386/wsk.zip -d /etc/nginx/cli/go/download/windows/386
-
-# Remove extra zip file
-RUN rm /etc/nginx/cli/go/download/linux/386/wsk.zip
-RUN rm /etc/nginx/cli/go/download/linux/amd64/wsk.zip
-RUN rm /etc/nginx/cli/go/download/mac/386/wsk.zip
-RUN rm /etc/nginx/cli/go/download/mac/amd64/wsk.zip
-RUN rm /etc/nginx/cli/go/download/windows/386/wsk.zip
-
-COPY blackbox-0.1.0.tar.gz /etc/nginx/blackbox-0.1.0.tar.gz
diff --git a/docker/nginx/README.md b/docker/nginx/README.md
deleted file mode 100644
index cecce14..0000000
--- a/docker/nginx/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# Create Nginx Docker Image
-
-We currently deploy a custom Nginx docker image that includes the
-OpenWhisk CLI and other downloadable artifacts. Once there are proper
-releases of these artifacts, we can switch to using a standard Nginx
-image and redirect to the official release archives for the artifacts
-we are currently storing in the custom docker image.  See the GitHub
-[issue](https://github.com/openwhisk/openwhisk/issues/2152).
-
-To build the Nginx docker image for Kubernetes on OpenWhisk,
-you will need to run the build script [build.sh](docker/build.sh).
-This script requires one parameter, which is the repo to bush
-the Docker image to.
-
-E.G
-```
-docker/builds.sh <danlavine>
-```
-
-This script goes through and donwload the OpenWhisk repo under the
-tmp directory, builds the Blackbox image and copies it into the
-Docker image.  Then, each of the published WSK CLIs are download into
-the Docker image so that users are able to download them as usual.
-
diff --git a/docker/nginx/build.sh b/docker/nginx/build.sh
deleted file mode 100755
index 8e3f07d..0000000
--- a/docker/nginx/build.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env bash
-
-# This script can be used to build Nginx
-# used by OpenWhisk on Kubernetes.
-
-set -ex
-
-if [ -z "$1" ]; then
-cat <<- EndOfMessage
-  First argument should be location of which docker repo to push all
-  of the built OpenWhisk docker images. This way, Kubernetes can pull
-  any images it needs to.
-EndOfMessage
-
-exit 1
-fi
-
-git clone https://github.com/apache/incubator-openwhisk /tmp/openwhisk
-
-# build nginx
-mkdir -p blackbox
-pushd blackbox
-  # copy docker sdk to dockerSkeleton in scratch space
-  cp /tmp/openwhisk/sdk/docker/buildAndPush.sh .
-  cp /tmp/openwhisk/sdk/docker/Dockerfile .
-  cp /tmp/openwhisk/sdk/docker/example.c .
-  cp /tmp/openwhisk/sdk/docker/README.md .
-
-  # rename base image in Dockerfile
-  sed -i "s|FROM dockerskeleton|FROM openwhisk/dockerskeleton|g" Dockerfile
-
-  # fix file permissions
-  chmod 0755 buildAndPush.sh
-
-  # build blackbox container artifact
-  tar -czf ../blackbox-0.1.0.tar.gz .
-popd
-
-NGINX_IMAGE=$(docker build . --no-cache | grep "Successfully built" | awk '{print $3}')
-docker tag $NGINX_IMAGE "$1"/whisk_nginx
-docker push "$1"/whisk_nginx
-
-# cleanup
-rm blackbox-0.1.0.tar.gz
-rm -rf blackbox
diff --git a/kubernetes/nginx/nginx.yml b/kubernetes/nginx/nginx.yml
index b7fc954..f9659a4 100644
--- a/kubernetes/nginx/nginx.yml
+++ b/kubernetes/nginx/nginx.yml
@@ -48,8 +48,8 @@ spec:
         emptyDir: {}
       containers:
       - name: nginx
-        imagePullPolicy: Always
-        image: danlavine/whisk_nginx
+        imagePullPolicy: IfNotPresent
+        image: nginx:1.11
         ports:
         - name: http
           containerPort: 80

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].