diff --git a/docker/README.md b/docker/README.md index 25f3c540..919dddf1 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 7b87b74b..00000000 --- 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 b7801d1b..00000000 --- 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 e76c2caa..00000000 --- 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 a17b0f51..5430e838 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 2d2c729b..d2d661fe 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 a30c8878..3001bf64 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 0856b070..e13da6d7 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 41d41abc..38577454 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 3d14ddb9..35597182 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 b8b4bca9..25a4fa31 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 4daad535..5bec6521 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 ae436c85..b5cf333a 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 7ba06a90..1cc692e3 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