You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by cs...@apache.org on 2018/08/29 15:46:40 UTC

[incubator-openwhisk-deploy-kube] branch master updated: Use upstream script-runner and ansible-runner Docker images (#288)

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

csantanapr 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 7d1ef8d  Use upstream script-runner and ansible-runner Docker images (#288)
7d1ef8d is described below

commit 7d1ef8ddb9a8f841a938b6cb4b0da2291ff26b58
Author: David Grove <dg...@users.noreply.github.com>
AuthorDate: Wed Aug 29 11:46:36 2018 -0400

    Use upstream script-runner and ansible-runner Docker images (#288)
---
 docker/README.md                                   |  4 ---
 docker/whisk-ansible-runner/Dockerfile             | 38 ----------------------
 docker/whisk-script-runner/Dockerfile              | 22 -------------
 docker/whisk-script-runner/init.sh                 | 13 --------
 .../ow-alarm/templates/installPkgAlarmJob.yaml     |  2 +-
 .../templates/installPkgCloudantJob.yaml           |  2 +-
 .../ow-kafka/templates/installPkgKafkaJob.yaml     |  2 +-
 helm/openwhisk/templates/initCouchDBJob.yaml       |  2 +-
 helm/openwhisk/templates/installCatalogJob.yaml    |  2 +-
 helm/openwhisk/templates/installRouteMgmtJob.yaml  |  2 +-
 helm/openwhisk/templates/rolebindings.yaml         |  6 ++--
 helm/openwhisk/values.yaml                         |  2 +-
 tools/travis/build-helm.sh                         |  8 ++---
 tools/travis/deploy.sh                             |  6 ----
 14 files changed, 14 insertions(+), 97 deletions(-)

diff --git a/docker/README.md b/docker/README.md
index 25f3c54..919dddf 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -24,9 +24,5 @@ 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:
-  * whisk-ansible-runner - An alpine-based utility image for running
-    ansible playbooks.
-  * whisk-script-runner - An alpine-based utility image for running
-    simple bash scripts that need the `wsk` cli available to them.
   * invoker-agent - worker node invoker agent -- used to implement
     suspend/resume on action containers for a remote invoker
diff --git a/docker/whisk-ansible-runner/Dockerfile b/docker/whisk-ansible-runner/Dockerfile
deleted file mode 100644
index 7b87b74..0000000
--- a/docker/whisk-ansible-runner/Dockerfile
+++ /dev/null
@@ -1,38 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.0.
-
-from alpine
-
-ENV DOCKER_VERSION 1.12.0
-
-RUN apk --no-cache add \
-  bash \
-  curl \
-  git \
-  libc6-compat \
-  libffi \
-  openssl \
-  python \
-  py-pip \
-  wget \
-  zip
-
-RUN apk --no-cache add --virtual build-dependencies \
-  python-dev \
-  build-base \
-  libffi-dev \
-  openssl-dev
-
-# Install docker client
-RUN wget --no-verbose https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz && \
-tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker && \
-rm -f docker-${DOCKER_VERSION}.tgz && \
-chmod +x /usr/bin/docker
-
-RUN pip install --upgrade setuptools
-RUN pip install ansible==2.5.2
-RUN pip install jinja2==2.9.6
-
-RUN apk del build-dependencies
-
-CMD ["/usr/bin/ansible-playbook", "/task/playbook.yml"]
diff --git a/docker/whisk-script-runner/Dockerfile b/docker/whisk-script-runner/Dockerfile
deleted file mode 100644
index b7801d1..0000000
--- a/docker/whisk-script-runner/Dockerfile
+++ /dev/null
@@ -1,22 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.0.
-
-from alpine
-
-RUN apk --no-cache add \
-  bash \
-  git \
-  libc6-compat \
-  wget \
-  zip
-
-# Install `wsk` cli in /usr/local/bin
-ENV WHISK_CLI_VERSION latest
-RUN wget -q https://github.com/apache/incubator-openwhisk-cli/releases/download/$WHISK_CLI_VERSION/OpenWhisk_CLI-$WHISK_CLI_VERSION-linux-amd64.tgz && \
-    tar xzf OpenWhisk_CLI-$WHISK_CLI_VERSION-linux-amd64.tgz -C /usr/local/bin wsk && \
-    rm OpenWhisk_CLI-$WHISK_CLI_VERSION-linux-amd64.tgz
-
-COPY init.sh /init.sh
-RUN chmod +X /init.sh
-
-CMD ["/init.sh"]
diff --git a/docker/whisk-script-runner/init.sh b/docker/whisk-script-runner/init.sh
deleted file mode 100755
index e76c2ca..0000000
--- a/docker/whisk-script-runner/init.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.0.
-
-set -ex
-
-# Run the custom task mounted into /task by kube/docker
-if [ -f /task/myTask.sh ]; then
-    . /task/myTask.sh
-else
-    echo "I was not given a task to execute.  Exiting with error"
-    exit 1
-fi
diff --git a/helm/openwhisk-providers/charts/ow-alarm/templates/installPkgAlarmJob.yaml b/helm/openwhisk-providers/charts/ow-alarm/templates/installPkgAlarmJob.yaml
index a17b0f5..5430e83 100644
--- a/helm/openwhisk-providers/charts/ow-alarm/templates/installPkgAlarmJob.yaml
+++ b/helm/openwhisk-providers/charts/ow-alarm/templates/installPkgAlarmJob.yaml
@@ -19,7 +19,7 @@ spec:
           name: install-package-alarms
       containers:
       - name: alarmpkginstaller
-        image: openwhisk/kube-whisk-script-runner
+        image: openwhisk/script-runner
         volumeMounts:
         - name: task-dir
           mountPath: "/task/myTask.sh"
diff --git a/helm/openwhisk-providers/charts/ow-cloudant/templates/installPkgCloudantJob.yaml b/helm/openwhisk-providers/charts/ow-cloudant/templates/installPkgCloudantJob.yaml
index 2d2c729..d2d661f 100644
--- a/helm/openwhisk-providers/charts/ow-cloudant/templates/installPkgCloudantJob.yaml
+++ b/helm/openwhisk-providers/charts/ow-cloudant/templates/installPkgCloudantJob.yaml
@@ -19,7 +19,7 @@ spec:
           name: install-package-cloudant
       containers:
       - name: cloudantpkginstaller
-        image: openwhisk/kube-whisk-script-runner
+        image: openwhisk/script-runner
         volumeMounts:
         - name: task-dir
           mountPath: "/task/myTask.sh"
diff --git a/helm/openwhisk-providers/charts/ow-kafka/templates/installPkgKafkaJob.yaml b/helm/openwhisk-providers/charts/ow-kafka/templates/installPkgKafkaJob.yaml
index a30c887..3001bf6 100644
--- a/helm/openwhisk-providers/charts/ow-kafka/templates/installPkgKafkaJob.yaml
+++ b/helm/openwhisk-providers/charts/ow-kafka/templates/installPkgKafkaJob.yaml
@@ -19,7 +19,7 @@ spec:
           name: install-package-kafka
       containers:
       - name: kafkapkginstaller
-        image: openwhisk/kube-whisk-script-runner
+        image: openwhisk/script-runner
         volumeMounts:
         - name: task-dir
           mountPath: "/task/myTask.sh"
diff --git a/helm/openwhisk/templates/initCouchDBJob.yaml b/helm/openwhisk/templates/initCouchDBJob.yaml
index 0856b07..e13da6d 100644
--- a/helm/openwhisk/templates/initCouchDBJob.yaml
+++ b/helm/openwhisk/templates/initCouchDBJob.yaml
@@ -24,7 +24,7 @@ spec:
           secretName: whisk.auth
       containers:
       - name: init-couchdb
-        image: openwhisk/kube-whisk-ansible-runner
+        image: openwhisk/ansible-runner
         imagePullPolicy: "Always"
         command: ["/bin/bash", "-c", "set -e; . /task/initdb.sh"]
         volumeMounts:
diff --git a/helm/openwhisk/templates/installCatalogJob.yaml b/helm/openwhisk/templates/installCatalogJob.yaml
index 41d41ab..3857745 100644
--- a/helm/openwhisk/templates/installCatalogJob.yaml
+++ b/helm/openwhisk/templates/installCatalogJob.yaml
@@ -22,7 +22,7 @@ spec:
 {{ include "readiness.waitForController" . | indent 6 }}
       containers:
       - name: catalog
-        image: openwhisk/kube-whisk-script-runner
+        image: openwhisk/script-runner
         volumeMounts:
         - name: task-dir
           mountPath: "/task/myTask.sh"
diff --git a/helm/openwhisk/templates/installRouteMgmtJob.yaml b/helm/openwhisk/templates/installRouteMgmtJob.yaml
index 3d14ddb..3559718 100644
--- a/helm/openwhisk/templates/installRouteMgmtJob.yaml
+++ b/helm/openwhisk/templates/installRouteMgmtJob.yaml
@@ -22,7 +22,7 @@ spec:
 {{ include "readiness.waitForController" . | indent 6 }}
       containers:
       - name: routemgmt
-        image: openwhisk/kube-whisk-script-runner
+        image: openwhisk/script-runner
         volumeMounts:
         - name: task-dir
           mountPath: "/task/myTask.sh"
diff --git a/helm/openwhisk/templates/rolebindings.yaml b/helm/openwhisk/templates/rolebindings.yaml
index b8b4bca..25a4fa3 100644
--- a/helm/openwhisk/templates/rolebindings.yaml
+++ b/helm/openwhisk/templates/rolebindings.yaml
@@ -38,12 +38,12 @@ metadata:
   name: {{ .Values.invoker.name | quote }}
 ---
 kind: Role
-apiVersion: rbac.authorization.k8s.io/v1beta1
+apiVersion: rbac.authorization.k8s.io/v1
 metadata:
   namespace: {{ .Release.Namespace | quote }}
   name: {{ .Values.invoker.name | quote }}
 rules:
-- apiGroups: ["extensions"]
+- apiGroups: ["extensions", "apps"]
   resources: ["deployments"]
   verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
 - apiGroups: [""]
@@ -54,7 +54,7 @@ rules:
   verbs: ["get", "list"]
 ---
 kind: RoleBinding
-apiVersion: rbac.authorization.k8s.io/v1beta1
+apiVersion: rbac.authorization.k8s.io/v1
 metadata:
   namespace: {{ .Release.Namespace | quote }}
   name: {{ .Values.invoker.name | quote }}
diff --git a/helm/openwhisk/values.yaml b/helm/openwhisk/values.yaml
index 4daad53..5bec652 100644
--- a/helm/openwhisk/values.yaml
+++ b/helm/openwhisk/values.yaml
@@ -157,7 +157,7 @@ invoker:
   imagePullPolicy: "Always"
   restartPolicy: "Always"
   port: 8080
-  pullRuntimesImage: "openwhisk/kube-whisk-ansible-runner:latest"
+  pullRuntimesImage: "openwhisk/ansible-runner:latest"
   options: ""
   jvmHeapMB: "512"
   jvmOptions: ""
diff --git a/tools/travis/build-helm.sh b/tools/travis/build-helm.sh
index ae436c8..b5cf333 100755
--- a/tools/travis/build-helm.sh
+++ b/tools/travis/build-helm.sh
@@ -29,7 +29,7 @@ deploymentHealthCheck () {
     sleep 10
   done
 
-  if [ "$PASSED" = false ]; then
+  if [ ! $PASSED ]; then
     echo "Failed to finish deploying $1"
 
     kubectl -n openwhisk logs $(kubectl -n openwhisk get pods -l name="$1" -o wide | grep "$1" | awk '{print $1}')
@@ -62,7 +62,7 @@ statefulsetHealthCheck () {
     sleep 10
   done
 
-  if [ "$PASSED" = false ]; then
+  if [ ! $PASSED ]; then
     echo "Failed to finish deploying $1"
 
     kubectl -n openwhisk logs $(kubectl -n openwhisk get pods -o wide | grep "$1"-0 | awk '{print $1}')
@@ -95,7 +95,7 @@ jobHealthCheck () {
     sleep 10
   done
 
-  if [ "$PASSED" = false ]; then
+  if [ ! $PASSED ]; then
     echo "Failed to finish running $1"
 
     kubectl -n openwhisk logs jobs/$1
@@ -123,7 +123,7 @@ verifyHealthyInvoker () {
     sleep 10
   done
 
-  if [ "$PASSED" = false ]; then
+  if [ ! $PASSED ]; then
     echo "No healthy invokers available"
 
     exit 1
diff --git a/tools/travis/deploy.sh b/tools/travis/deploy.sh
index 7ba06a9..1cc692e 100755
--- a/tools/travis/deploy.sh
+++ b/tools/travis/deploy.sh
@@ -9,11 +9,5 @@ ROOTDIR="$SCRIPTDIR/../../"
 
 cd $ROOTDIR
 
-echo "Publishing kube-whisk-script-runner image"
-./tools/travis/publish.sh openwhisk kube-whisk-script-runner latest docker/whisk-script-runner
-
-echo "Publishing kube-whisk-ansible-runner image"
-./tools/travis/publish.sh openwhisk kube-whisk-ansible-runner latest docker/whisk-ansible-runner
-
 echo "Publishing kube-invoker-agent image"
 ./tools/travis/publish.sh openwhisk kube-invoker-agent latest docker/invoker-agent