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

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


The following commit(s) were added to refs/heads/master by this push:
     new 2bacbba  remove invoker-agent (companion to core PR#4785) (#566)
2bacbba is described below

commit 2bacbba882c2ba054d7567b8473fc8f3ed3600be
Author: David Grove <[email protected]>
AuthorDate: Tue Jan 7 11:23:56 2020 -0500

    remove invoker-agent (companion to core PR#4785) (#566)
---
 docker/README.md                                |   3 +-
 docker/invoker-agent/Dockerfile                 |  51 --------
 docker/invoker-agent/main.go                    | 151 ------------------------
 docs/configurationChoices.md                    |  16 ---
 helm/openwhisk/templates/invoker-agent-pod.yaml |  72 -----------
 helm/openwhisk/templates/invoker-pod.yaml       |   7 --
 helm/openwhisk/values-metadata.yaml             |  38 ------
 helm/openwhisk/values.yaml                      |   7 --
 tools/travis/deploy-chart.sh                    |   3 -
 tools/travis/publish-images.sh                  |   3 -
 10 files changed, 1 insertion(+), 350 deletions(-)

diff --git a/docker/README.md b/docker/README.md
index 919dddf..3626578 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -24,5 +24,4 @@ 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:
-  * invoker-agent - worker node invoker agent -- used to implement
-    suspend/resume on action containers for a remote invoker
+* currently no images are being actively built.
diff --git a/docker/invoker-agent/Dockerfile b/docker/invoker-agent/Dockerfile
deleted file mode 100644
index 000a54a..0000000
--- a/docker/invoker-agent/Dockerfile
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-######
-# build-stage
-######
-FROM golang:alpine AS build-env
-
-RUN apk add --no-cache curl git openssh
-
-# Build the invoker-agent executable
-RUN mkdir -p /openwhisk/src/invoker-agent
-COPY main.go /openwhisk/src/invoker-agent
-ENV GOPATH=/openwhisk
-RUN go get github.com/gorilla/mux
-RUN go install invoker-agent
-
-# Get docker CLI for interactive debugging when running
-ENV DOCKER_VERSION 1.12.0
-RUN curl -sSL -o docker-${DOCKER_VERSION}.tgz 
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
-
-
-######
-# Final stage
-######
-FROM alpine
-
-RUN mkdir -p /openwhisk/bin
-COPY --from=build-env /openwhisk/bin/invoker-agent /openwhisk/bin/invoker-agent
-
-# For ease of debugging/inspection.  Not needed by invoker-agent
-COPY --from=build-env /usr/bin/docker /usr/bin/docker
-
-CMD ["/openwhisk/bin/invoker-agent"]
diff --git a/docker/invoker-agent/main.go b/docker/invoker-agent/main.go
deleted file mode 100644
index 1a93678..0000000
--- a/docker/invoker-agent/main.go
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package main
-
-import (
-       "fmt"
-       "github.com/gorilla/mux"
-       "log"
-       "net"
-       "net/http"
-       "os"
-       "strconv"
-       "strings"
-       "time"
-)
-
-/* Should we measure and report time taken for each operation? */
-const timeOps = false
-
-/* configuration variables; may be overridden by setting matching envvar */
-var (
-       dockerSock       string = "/var/run/docker.sock"
-       containerDir     string = "/containers"
-       invokerAgentPort int    = 3233
-)
-
-/* http.Client instance bound to dockerSock */
-var client *http.Client
-
-
-/*
- * Suppout for suspend/resume operations
- */
-
-// handler for /resume/<container> route
-// The container was given as part of the URL; gorilla makes it available in 
vars["container"]
-func resumeUserAction(w http.ResponseWriter, r *http.Request) {
-       var start time.Time
-       if timeOps {
-               start = time.Now()
-       }
-
-       vars := mux.Vars(r)
-       container := vars["container"]
-       dummy := strings.NewReader("")
-       resp, err := 
client.Post("http://localhost/containers/"+container+"/unpause";, "text/plain", 
dummy)
-       if err != nil {
-               w.WriteHeader(500)
-               fmt.Fprintf(w, "Unpausing %s failed with error: %v\n", 
container, err)
-       } else if resp.StatusCode < 200 || resp.StatusCode > 299 {
-               w.WriteHeader(500)
-               fmt.Fprint(w, "Unpausing %s failed with status code: %d\n", 
container, resp.StatusCode)
-       } else {
-               w.WriteHeader(204) // success!
-       }
-
-       if timeOps {
-               end := time.Now()
-               elapsed := end.Sub(start)
-               fmt.Fprintf(os.Stdout, "Unpause took %s\n", elapsed.String())
-       }
-}
-
-// handler for /resume/<container> route
-// The container was given as part of the URL; gorilla makes it available in 
vars["container"]
-func suspendUserAction(w http.ResponseWriter, r *http.Request) {
-       var start time.Time
-       if timeOps {
-               start = time.Now()
-       }
-
-       vars := mux.Vars(r)
-       container := vars["container"]
-       dummy := strings.NewReader("")
-       resp, err := 
client.Post("http://localhost/containers/"+container+"/pause";, "text/plain", 
dummy)
-       if err != nil {
-               w.WriteHeader(500)
-               fmt.Fprintf(w, "Pausing %s failed with error: %v\n", container, 
err)
-       } else if resp.StatusCode < 200 || resp.StatusCode > 299 {
-               w.WriteHeader(500)
-               fmt.Fprint(w, "Pausing %s failed with status code: %d\n", 
container, resp.StatusCode)
-       } else {
-               w.WriteHeader(204) // success!
-       }
-
-       if timeOps {
-               end := time.Now()
-               elapsed := end.Sub(start)
-               fmt.Fprintf(os.Stdout, "Pause took %s\n", elapsed.String())
-       }
-}
-
-/*
- * Initialization and main function
- */
-
-// Process configuration overrides from environment
-func initializeFromEnv() {
-       var err error
-       if os.Getenv("INVOKER_AGENT_DOCKER_SOCK") != "" {
-               dockerSock = os.Getenv("INVOKER_AGENT_DOCKER_SOCK")
-       }
-       if os.Getenv("INVOKER_AGENT_CONTAINER_DIR") != "" {
-               containerDir = os.Getenv("INVOKER_AGENT_CONTAINER_DIR")
-       }
-       if os.Getenv("INVOKER_AGENT_PORT") != "" {
-               str := os.Getenv("INVOKER_AGENT_PORT")
-               invokerAgentPort, err = strconv.Atoi(str)
-               if err != nil {
-                       fmt.Fprintf(os.Stderr, "Invalid INVOKER_AGENT_PORT %s; 
error was %v\n", str, err)
-                       panic(err)
-               }
-       }
-}
-
-func handleRequests() {
-       myRouter := mux.NewRouter().StrictSlash(true)
-       myRouter.HandleFunc("/suspend/{container}", suspendUserAction)
-       myRouter.HandleFunc("/resume/{container}", resumeUserAction)
-       log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", invokerAgentPort), 
myRouter))
-}
-
-func main() {
-       initializeFromEnv()
-
-       // Open http client to dockerSock
-       fd := func(proto, addr string) (conn net.Conn, err error) {
-               return net.Dial("unix", dockerSock)
-       }
-       tr := &http.Transport{
-               Dial: fd,
-       }
-       client = &http.Client{Transport: tr}
-
-       handleRequests()
-}
diff --git a/docs/configurationChoices.md b/docs/configurationChoices.md
index 1b0e24c..d105c79 100644
--- a/docs/configurationChoices.md
+++ b/docs/configurationChoices.md
@@ -212,22 +212,6 @@ invoker:
   options: 
"-Dwhisk.spi.LogStoreProvider=org.apache.openwhisk.core.containerpool.logging.LogDriverLogStoreProvider"
 ```
 
-There is an experimental configuration of the KubernetesContainerFactory
-that deploys an additional invokerAgent DaemonSet that implements container 
suspend/resume
-operations on behalf of a remote Invoker. The agent does this by attempting to
-connect directly to the Docker engine running on the worker node.  If your 
worker nodes
-do not use Docker as their underlying container engine, the invoker agent will 
go into
-a `CrashLoopBackOff`. If you want to experiment with this feature,
-you can enable it by adding the stanza:
-```yaml
-invoker:
-  containerFactory:
-    impl: "kubernetes"
-      agent:
-        enabled: true
-```
-to your `mycluster.yaml`
-
 ### User action container DNS
 
 By default, your user actions containers will be configured to use the same
diff --git a/helm/openwhisk/templates/invoker-agent-pod.yaml 
b/helm/openwhisk/templates/invoker-agent-pod.yaml
deleted file mode 100644
index 698eaac..0000000
--- a/helm/openwhisk/templates/invoker-agent-pod.yaml
+++ /dev/null
@@ -1,72 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-{{ if .Values.invoker.containerFactory.kubernetes.agent.enabled }}
-apiVersion: apps/v1
-kind: DaemonSet
-metadata:
-  name: {{ .Release.Name }}-invoker-agent
-  labels:
-    name: {{ .Release.Name }}-invoker-agent
-{{ include "openwhisk.label_boilerplate" .| indent 4 }}
-spec:
-  selector:
-    matchLabels:
-      name: {{ .Release.Name }}-invoker-agent
-  template:
-    metadata:
-      labels:
-        name: {{ .Release.Name }}-invoker-agent
-{{ include "openwhisk.label_boilerplate" . | indent 8 }}
-    spec:
-      restartPolicy: Always
-      hostNetwork: true
-
-      affinity:
-{{ include "openwhisk.affinity.invoker" . | indent 8 }}
-
-{{- if .Values.toleration.enabled }}
-      tolerations:
-{{ include "openwhisk.toleration.invoker" . | indent 8 }}
-{{- end }}
-
-      volumes:
-{{ include "openwhisk.docker_volumes" . | indent 6 }}
-      - name: userlogs
-        emptyDir: {}
-      - name: scripts-dir
-        configMap:
-          name: {{ .Release.Name }}-invoker-scripts
-
-      initContainers:
-      # Pull images for all default runtimes before starting invoker
-{{ include "openwhisk.docker_pull_runtimes" . | indent 6 }}
-{{ include "openwhisk.docker.imagePullSecrets" . | indent 6 }}
-      containers:
-      - name: invoker-agent
-        image: "{{- .Values.docker.registry.name -}}{{- 
.Values.invoker.containerFactory.kubernetes.agent.imageName -}}:{{- 
.Values.invoker.containerFactory.kubernetes.agent.imageTag -}}"
-        imagePullPolicy: {{ 
.Values.invoker.containerFactory.kubernetes.agent.imagePullPolicy | quote }}
-        securityContext:
-          privileged: true
-        ports:
-        - name: agent
-          containerPort: {{ 
.Values.invoker.containerFactory.kubernetes.agent.port }}
-        volumeMounts:
-{{ include "openwhisk.docker_volume_mounts" . | indent 8 }}
-        - name: userlogs
-          mountPath: "/action-logs"
-{{- end }}
diff --git a/helm/openwhisk/templates/invoker-pod.yaml 
b/helm/openwhisk/templates/invoker-pod.yaml
index d529ce9..6747ff0 100644
--- a/helm/openwhisk/templates/invoker-pod.yaml
+++ b/helm/openwhisk/templates/invoker-pod.yaml
@@ -142,13 +142,6 @@ spec:
           - name: "INVOKER_OPTS"
             value: "{{ .Values.invoker.options }} {{ include 
"openwhisk.invoker.add_opts" . }}"
 
-{{ if .Values.invoker.containerFactory.kubernetes.agent.enabled }}
-          - name: "CONFIG_whisk_kubernetes_invokerAgent_enabled"
-            value:  "TRUE"
-          - name: "CONFIG_whisk_kubernetes_invokerAgent_port"
-            value: {{ .Values.invoker.containerFactory.kubernetes.agent.port | 
quote }}
-{{ end }}
-
           # action runtimes
           - name: "RUNTIMES_MANIFEST"
             value: {{ template "openwhisk.runtimes_manifest" . }}
diff --git a/helm/openwhisk/values-metadata.yaml 
b/helm/openwhisk/values-metadata.yaml
index 8e7b775..91651d7 100644
--- a/helm/openwhisk/values-metadata.yaml
+++ b/helm/openwhisk/values-metadata.yaml
@@ -1082,44 +1082,6 @@ invoker:
           description: "How many instances of the KubernetesContainerFactory 
should be deployed?"
           type: "number"
           required: true
-      agent:
-        imageName:
-          __metadata:
-            label: "InvokerAgent image name"
-            description: "The docker image name for the invoker agent"
-            type: "string"
-            required: true
-        imageTag:
-          __metadata:
-            label: "InvokerAgent image tag"
-            description: "The docker image tag for the invoker agent"
-            type: "string"
-            required: true
-        imagePullPolicy:
-          __metadata:
-            label: "Image pull policy"
-            description: "The image pull policy to apply for this image."
-            type: "string"
-            required: true
-            options:
-            - label: "Always"
-              value: "Always"
-            - label: "Never"
-              value: "Never"
-            - label: "IfNotPresent"
-              value: "IfNotPresent"
-        enabled:
-          __metadata:
-            label: "Agent enabled"
-            description: "If the experimental invoker agent should be enabled"
-            type: "boolean"
-            required: true
-        port:
-          __metadata:
-            label: "Agent port"
-            description: "The primary invoker agent port"
-            type: "string"
-            required: true
 
 apigw:
   __metadata:
diff --git a/helm/openwhisk/values.yaml b/helm/openwhisk/values.yaml
index 7152c51..b925aa2 100644
--- a/helm/openwhisk/values.yaml
+++ b/helm/openwhisk/values.yaml
@@ -272,13 +272,6 @@ invoker:
           options: ""
     kubernetes:
       replicaCount: 1
-      # WARNING: the invoker agent is an experimental feature and is not 
recommend for general use
-      agent:
-        imageName: "openwhisk/kube-invoker-agent"
-        imageTag: "7314d75"
-        imagePullPolicy: "IfNotPresent"
-        enabled: false
-        port: 3233
 
 # API Gateway configurations
 apigw:
diff --git a/tools/travis/deploy-chart.sh b/tools/travis/deploy-chart.sh
index 8abccfd..d7b1c40 100755
--- a/tools/travis/deploy-chart.sh
+++ b/tools/travis/deploy-chart.sh
@@ -207,9 +207,6 @@ whisk:
 invoker:
   containerFactory:
     impl: $OW_CONTAINER_FACTORY
-    kubernetes:
-      agent:
-        enabled: false
 
 nginx:
   httpsNodePort: $WSK_PORT
diff --git a/tools/travis/publish-images.sh b/tools/travis/publish-images.sh
index 7f1b789..8885d64 100755
--- a/tools/travis/publish-images.sh
+++ b/tools/travis/publish-images.sh
@@ -22,6 +22,3 @@ SCRIPTDIR=$(cd $(dirname "$0") && pwd)
 ROOTDIR="$SCRIPTDIR/../../"
 
 cd $ROOTDIR
-
-echo "Publishing kube-invoker-agent image"
-./tools/travis/publish.sh openwhisk kube-invoker-agent nightly 
docker/invoker-agent

Reply via email to