You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/07/07 17:20:24 UTC

[GitHub] rabbah closed pull request #248: Split Helm chart for core OpenWhisk and providers

rabbah closed pull request #248: Split Helm chart for core OpenWhisk and providers
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/pull/248
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/README.md b/README.md
index b93308b..1e83747 100644
--- a/README.md
+++ b/README.md
@@ -28,6 +28,7 @@ This repository can be used to deploy OpenWhisk to a Kubernetes cluster.
 
 * [Setting up Kubernetes and Helm](#setting-up-kubernetes-and-helm)
 * [Deploying OpenWhisk](#deploying-openwhisk)
+* [Deploying OpenWhisk Providers](#deploying-openwhisk-providers)
 * [Cleanup](#cleanup)
 * [Issues](#issues)
 
@@ -94,7 +95,7 @@ Kubernetes worker nodes to be used to execute user actions.
 create a `mycluster.yaml` that specifies key facts about your
 Kubernetes cluster and the OpenWhisk configuration you wish to
 deploy.
-3. [Deploy with Helm](#deploy-with-helm). You will use Helm and
+3. [Deploy OpenWhisk with Helm](#deploy-with-helm). You will use Helm and
 `mycluster.yaml` to deploy OpenWhisk to your Kubernetes cluster.
 4. [Configure the `wsk` CLI](#configure-the-wsk-cli). You need to
 tell the `wsk` CLI how to connect to your OpenWhisk deployment.
@@ -150,7 +151,7 @@ discussion of the primary options.
 
 Deployment can be done by using the following single command:
 ```shell
-helm install ./helm --namespace=openwhisk --name=owdev -f mycluster.yaml
+helm install ./helm/openwhisk --namespace=openwhisk --name=owdev -f mycluster.yaml
 ```
 For simplicity, in this README, we have used `owdev` as the release name.
 You can use a different name, or not specify a name at all and let
@@ -188,6 +189,27 @@ certificate` errors from the `wsk` CLI.
 If your deployment is not working, check our
 [troubleshooting guide](./docs/troubleshooting.md) for ideas.
 
+
+# Deploying OpenWhisk Providers
+
+Now that you have a working OpenWhisk installation, you may optionally
+deploy additional packages and event providers. A standard set of
+event providers is available as a collection of Helm charts in the
+`helm/providers` directory.  You may install all the providers in a
+single command with
+```shell
+helm install ./helm/providers --namespace=openwhisk --name=owdev-providers
+```
+or you may selectively install the charts for individual providers
+with commands like
+```shell
+helm install ./helm/providers/charts/kafka --namespace=openwhisk --name=owdev-kafka-provider
+```
+
+Please see the `values.yaml` file and/or README.md in the individual
+charts for instructions on enabling any optional customizations of the
+providers.
+
 # Cleanup
 
 Use the following command to remove all the deployed OpenWhisk components:
diff --git a/helm/Chart.yaml b/helm/openwhisk/Chart.yaml
similarity index 100%
rename from helm/Chart.yaml
rename to helm/openwhisk/Chart.yaml
diff --git a/helm/runtimes-minimal-travis.json b/helm/openwhisk/runtimes-minimal-travis.json
similarity index 100%
rename from helm/runtimes-minimal-travis.json
rename to helm/openwhisk/runtimes-minimal-travis.json
diff --git a/helm/runtimes.json b/helm/openwhisk/runtimes.json
similarity index 100%
rename from helm/runtimes.json
rename to helm/openwhisk/runtimes.json
diff --git a/helm/templates/NOTES.txt b/helm/openwhisk/templates/NOTES.txt
similarity index 100%
rename from helm/templates/NOTES.txt
rename to helm/openwhisk/templates/NOTES.txt
diff --git a/helm/templates/_affinity.tpl b/helm/openwhisk/templates/_affinity.tpl
similarity index 100%
rename from helm/templates/_affinity.tpl
rename to helm/openwhisk/templates/_affinity.tpl
diff --git a/helm/templates/_helpers.tpl b/helm/openwhisk/templates/_helpers.tpl
similarity index 100%
rename from helm/templates/_helpers.tpl
rename to helm/openwhisk/templates/_helpers.tpl
diff --git a/helm/templates/_invokerHelpers.tpl b/helm/openwhisk/templates/_invokerHelpers.tpl
similarity index 100%
rename from helm/templates/_invokerHelpers.tpl
rename to helm/openwhisk/templates/_invokerHelpers.tpl
diff --git a/helm/templates/_readiness.tpl b/helm/openwhisk/templates/_readiness.tpl
similarity index 100%
rename from helm/templates/_readiness.tpl
rename to helm/openwhisk/templates/_readiness.tpl
diff --git a/helm/templates/apigateway.yaml b/helm/openwhisk/templates/apigateway.yaml
similarity index 100%
rename from helm/templates/apigateway.yaml
rename to helm/openwhisk/templates/apigateway.yaml
diff --git a/helm/templates/authSecrets.yaml b/helm/openwhisk/templates/authSecrets.yaml
similarity index 100%
rename from helm/templates/authSecrets.yaml
rename to helm/openwhisk/templates/authSecrets.yaml
diff --git a/helm/templates/clusterConfigMaps.yaml b/helm/openwhisk/templates/clusterConfigMaps.yaml
similarity index 100%
rename from helm/templates/clusterConfigMaps.yaml
rename to helm/openwhisk/templates/clusterConfigMaps.yaml
diff --git a/helm/templates/controller.yaml b/helm/openwhisk/templates/controller.yaml
similarity index 100%
rename from helm/templates/controller.yaml
rename to helm/openwhisk/templates/controller.yaml
diff --git a/helm/templates/couchdb.yaml b/helm/openwhisk/templates/couchdb.yaml
similarity index 100%
rename from helm/templates/couchdb.yaml
rename to helm/openwhisk/templates/couchdb.yaml
diff --git a/helm/templates/ingress.yaml b/helm/openwhisk/templates/ingress.yaml
similarity index 100%
rename from helm/templates/ingress.yaml
rename to helm/openwhisk/templates/ingress.yaml
diff --git a/helm/templates/installCatalogJob.yaml b/helm/openwhisk/templates/installCatalogJob.yaml
similarity index 100%
rename from helm/templates/installCatalogJob.yaml
rename to helm/openwhisk/templates/installCatalogJob.yaml
diff --git a/helm/templates/installRouteMgmtJob.yaml b/helm/openwhisk/templates/installRouteMgmtJob.yaml
similarity index 100%
rename from helm/templates/installRouteMgmtJob.yaml
rename to helm/openwhisk/templates/installRouteMgmtJob.yaml
diff --git a/helm/templates/invoker.yaml b/helm/openwhisk/templates/invoker.yaml
similarity index 100%
rename from helm/templates/invoker.yaml
rename to helm/openwhisk/templates/invoker.yaml
diff --git a/helm/templates/kafka.yaml b/helm/openwhisk/templates/kafka.yaml
similarity index 100%
rename from helm/templates/kafka.yaml
rename to helm/openwhisk/templates/kafka.yaml
diff --git a/helm/templates/nginx.yaml b/helm/openwhisk/templates/nginx.yaml
similarity index 100%
rename from helm/templates/nginx.yaml
rename to helm/openwhisk/templates/nginx.yaml
diff --git a/helm/templates/nginxConfigMap.yaml b/helm/openwhisk/templates/nginxConfigMap.yaml
similarity index 100%
rename from helm/templates/nginxConfigMap.yaml
rename to helm/openwhisk/templates/nginxConfigMap.yaml
diff --git a/helm/templates/nginxSecret.yaml b/helm/openwhisk/templates/nginxSecret.yaml
similarity index 100%
rename from helm/templates/nginxSecret.yaml
rename to helm/openwhisk/templates/nginxSecret.yaml
diff --git a/helm/templates/redis.yaml b/helm/openwhisk/templates/redis.yaml
similarity index 100%
rename from helm/templates/redis.yaml
rename to helm/openwhisk/templates/redis.yaml
diff --git a/helm/templates/rolebindings.yaml b/helm/openwhisk/templates/rolebindings.yaml
similarity index 100%
rename from helm/templates/rolebindings.yaml
rename to helm/openwhisk/templates/rolebindings.yaml
diff --git a/helm/templates/zookeeper.yaml b/helm/openwhisk/templates/zookeeper.yaml
similarity index 100%
rename from helm/templates/zookeeper.yaml
rename to helm/openwhisk/templates/zookeeper.yaml
diff --git a/helm/values.yaml b/helm/openwhisk/values.yaml
similarity index 95%
rename from helm/values.yaml
rename to helm/openwhisk/values.yaml
index 9b86d11..5a71a4f 100644
--- a/helm/values.yaml
+++ b/helm/openwhisk/values.yaml
@@ -211,13 +211,3 @@ affinity:
   invokerNodeLabel: invoker
   providerNodeLabel: provider
 
-# Kafka provider configurations
-kafkaprovider:
-  name: "kafkaprovider"
-  image: "openwhisk/kafkaprovider:latest"
-  # NOTE: setting replicaCount > 1 has not been tested and may not work
-  replicaCount: 1
-  imagePullPolicy: "IfNotPresent"
-  restartPolicy: "Always"
-  apiPort: 8080
-  dbPrefix: "kp"
diff --git a/helm/providers/Chart.yaml b/helm/providers/Chart.yaml
new file mode 100644
index 0000000..f06a2e3
--- /dev/null
+++ b/helm/providers/Chart.yaml
@@ -0,0 +1,12 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+
+apiVersion: v1
+description: A Helm chart to deploy Apache OpenWhisk providers on Kubernetes
+name: Apache OpenWhisk Providers
+version: 0.1.0
+keywords:
+  - Apache OpenWhisk
+maintainers:
+  - name: Apache OpenWhisk committers
+    email: dev@openwhisk.apache.org
diff --git a/helm/providers/charts/kafka/Chart.yaml b/helm/providers/charts/kafka/Chart.yaml
new file mode 100644
index 0000000..23a382e
--- /dev/null
+++ b/helm/providers/charts/kafka/Chart.yaml
@@ -0,0 +1,12 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+
+apiVersion: v1
+description: A Helm chart to deploy the Apache OpenWhisk Kafka provider on Kubernetes
+name: Apache OpenWhisk Kafka Provider
+version: 0.1.0
+keywords:
+  - Apache OpenWhisk
+maintainers:
+  - name: Apache OpenWhisk committers
+    email: dev@openwhisk.apache.org
diff --git a/helm/providers/charts/kafka/templates/NOTES.txt b/helm/providers/charts/kafka/templates/NOTES.txt
new file mode 100644
index 0000000..b01e731
--- /dev/null
+++ b/helm/providers/charts/kafka/templates/NOTES.txt
@@ -0,0 +1,14 @@
+{{/* Licensed to the Apache Software Foundation (ASF) under one or more contributor */}}
+{{/* license agreements; and to You under the Apache License, Version 2.0. */}}
+Apache OpenWhisk Kafka Provider
+Copyright 2016-2018 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+Your release is named {{ .Release.Name }}.
+
+To learn more about the release, try:
+
+  $ helm status {{ .Release.Name }}
+  $ helm get {{ .Release.Name }}
diff --git a/helm/templates/installPkgKafkaJob.yaml b/helm/providers/charts/kafka/templates/installPkgKafkaJob.yaml
similarity index 90%
rename from helm/templates/installPkgKafkaJob.yaml
rename to helm/providers/charts/kafka/templates/installPkgKafkaJob.yaml
index 8aac792..5a742b9 100644
--- a/helm/templates/installPkgKafkaJob.yaml
+++ b/helm/providers/charts/kafka/templates/installPkgKafkaJob.yaml
@@ -13,9 +13,6 @@ spec:
       name: install-package-kafka
     spec:
       restartPolicy: Never
-      initContainers:
-      # Wait for a controller to be up so we can perfom our CRUD actions with the CLI
-{{ include "readiness.waitForController" . | indent 6 }}
       containers:
       - name: kafkapkginstaller
         image: openwhisk/kube-kafkapkginstaller
diff --git a/helm/templates/pkgKafkaProvider.yaml b/helm/providers/charts/kafka/templates/pkgKafkaProvider.yaml
similarity index 91%
rename from helm/templates/pkgKafkaProvider.yaml
rename to helm/providers/charts/kafka/templates/pkgKafkaProvider.yaml
index 658160a..3717877 100644
--- a/helm/templates/pkgKafkaProvider.yaml
+++ b/helm/providers/charts/kafka/templates/pkgKafkaProvider.yaml
@@ -16,10 +16,6 @@ spec:
         name: {{ .Values.kafkaprovider.name | quote }}
     spec:
       restartPolicy: {{ .Values.kafkaprovider.restartPolicy }}
-      initContainers:
-      # The controller must wait for kafka and couchdb to be ready before it starts
-{{ include "readiness.waitForCouchDB" . | indent 6 }}
-
       containers:
       - name: {{ .Values.kafkaprovider.name | quote }}
         imagePullPolicy: {{ .Values.kafkaprovider.imagePullPolicy | quote }}
diff --git a/helm/providers/charts/kafka/values.yaml b/helm/providers/charts/kafka/values.yaml
new file mode 100644
index 0000000..9b0badc
--- /dev/null
+++ b/helm/providers/charts/kafka/values.yaml
@@ -0,0 +1,13 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+
+# Kafka provider configurations
+kafkaprovider:
+  name: "kafkaprovider"
+  image: "openwhisk/kafkaprovider:latest"
+  # NOTE: setting replicaCount > 1 has not been tested and may not work
+  replicaCount: 1
+  imagePullPolicy: "IfNotPresent"
+  restartPolicy: "Always"
+  apiPort: 8080
+  dbPrefix: "kp"
diff --git a/helm/providers/templates/NOTES.txt b/helm/providers/templates/NOTES.txt
new file mode 100644
index 0000000..faf65e0
--- /dev/null
+++ b/helm/providers/templates/NOTES.txt
@@ -0,0 +1,14 @@
+{{/* Licensed to the Apache Software Foundation (ASF) under one or more contributor */}}
+{{/* license agreements; and to You under the Apache License, Version 2.0. */}}
+Apache OpenWhisk Providers
+Copyright 2016-2018 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+Your release is named {{ .Release.Name }}.
+
+To learn more about the release, try:
+
+  $ helm status {{ .Release.Name }}
+  $ helm get {{ .Release.Name }}
diff --git a/helm/providers/values.yaml b/helm/providers/values.yaml
new file mode 100644
index 0000000..44d46e4
--- /dev/null
+++ b/helm/providers/values.yaml
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+
+# Used to define pod affinity and anti-affinity for the Kubernetes scheduler.
+# If affinity.enabled is true, then all of the deployments for the OpenWhisk
+# microservices will use node and pod affinity directives to inform the
+# scheduler how to best distribute the pods on the available nodes in the cluster.
+# NOTE: These labels must match the ones defined in the core openwhisk chart.
+global:
+  affinity:
+    enabled: true
+    coreNodeLabel: core
+    edgeNodeLabel: edge
+    invokerNodeLabel: invoker
+    providerNodeLabel: provider
+
diff --git a/tools/travis/build-helm.sh b/tools/travis/build-helm.sh
index 35e39dc..736b3bb 100755
--- a/tools/travis/build-helm.sh
+++ b/tools/travis/build-helm.sh
@@ -138,7 +138,7 @@ if [ "$WSK_HOST" = "minikube" ]; then
 fi
 
 # Deploy OpenWhisk using Helm
-cd $ROOTDIR/helm
+cd $ROOTDIR
 
 cat > mycluster.yaml <<EOF
 whisk:
@@ -162,7 +162,7 @@ EOF
 echo "Contents of mycluster.yaml are:"
 cat mycluster.yaml
 
-helm install . --namespace=openwhisk --name=ow4travis -f mycluster.yaml
+helm install helm/openwhisk --namespace=openwhisk --name=ow4travis -f mycluster.yaml
 
 # Wait for controller to be up
 statefulsetHealthCheck "controller"


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services