openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rab...@apache.org
Subject [incubator-openwhisk-deploy-kube] branch master updated: Split Helm chart for core OpenWhisk and providers (#248)
Date Sat, 07 Jul 2018 17:20:24 GMT
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 489ce8e  Split Helm chart for core OpenWhisk and providers (#248)
489ce8e is described below

commit 489ce8e90abf3bc411f8dd7087d42916c8a004be
Author: David Grove <dgrove-oss@users.noreply.github.com>
AuthorDate: Sat Jul 7 13:20:22 2018 -0400

    Split Helm chart for core OpenWhisk and providers (#248)
    
    Split the current single Helm chart for deploying OpenWhisk and its
    providers into multiple Helm charts. In both production and CI/CD
    environments it may be desirable to separately deploy the core
    OpenWhisk system and the associated providers.
    
    Fixes #246.
---
 README.md                                          | 26 ++++++++++++++++++++--
 helm/{ => openwhisk}/Chart.yaml                    |  0
 helm/{ => openwhisk}/runtimes-minimal-travis.json  |  0
 helm/{ => openwhisk}/runtimes.json                 |  0
 helm/{ => openwhisk}/templates/NOTES.txt           |  0
 helm/{ => openwhisk}/templates/_affinity.tpl       |  0
 helm/{ => openwhisk}/templates/_helpers.tpl        |  0
 helm/{ => openwhisk}/templates/_invokerHelpers.tpl |  0
 helm/{ => openwhisk}/templates/_readiness.tpl      |  0
 helm/{ => openwhisk}/templates/apigateway.yaml     |  0
 helm/{ => openwhisk}/templates/authSecrets.yaml    |  0
 .../templates/clusterConfigMaps.yaml               |  0
 helm/{ => openwhisk}/templates/controller.yaml     |  0
 helm/{ => openwhisk}/templates/couchdb.yaml        |  0
 helm/{ => openwhisk}/templates/ingress.yaml        |  0
 .../templates/installCatalogJob.yaml               |  0
 .../templates/installRouteMgmtJob.yaml             |  0
 helm/{ => openwhisk}/templates/invoker.yaml        |  0
 helm/{ => openwhisk}/templates/kafka.yaml          |  0
 helm/{ => openwhisk}/templates/nginx.yaml          |  0
 helm/{ => openwhisk}/templates/nginxConfigMap.yaml |  0
 helm/{ => openwhisk}/templates/nginxSecret.yaml    |  0
 helm/{ => openwhisk}/templates/redis.yaml          |  0
 helm/{ => openwhisk}/templates/rolebindings.yaml   |  0
 helm/{ => openwhisk}/templates/zookeeper.yaml      |  0
 helm/{ => openwhisk}/values.yaml                   | 10 ---------
 helm/{ => providers}/Chart.yaml                    |  4 ++--
 helm/{ => providers/charts/kafka}/Chart.yaml       |  4 ++--
 .../charts/kafka}/templates/NOTES.txt              |  6 +----
 .../kafka}/templates/installPkgKafkaJob.yaml       |  3 ---
 .../charts/kafka}/templates/pkgKafkaProvider.yaml  |  4 ----
 helm/providers/charts/kafka/values.yaml            | 13 +++++++++++
 helm/{ => providers}/templates/NOTES.txt           |  6 +----
 helm/providers/values.yaml                         | 16 +++++++++++++
 tools/travis/build-helm.sh                         |  4 ++--
 35 files changed, 61 insertions(+), 35 deletions(-)

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%
copy from helm/Chart.yaml
copy 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%
copy from helm/templates/NOTES.txt
copy 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/Chart.yaml b/helm/providers/Chart.yaml
similarity index 73%
copy from helm/Chart.yaml
copy to helm/providers/Chart.yaml
index 5923669..f06a2e3 100644
--- a/helm/Chart.yaml
+++ b/helm/providers/Chart.yaml
@@ -2,8 +2,8 @@
 # license agreements; and to You under the Apache License, Version 2.0.
 
 apiVersion: v1
-description: A Helm chart to deploy Apache OpenWhisk for Kubernetes
-name: Apache OpenWhisk
+description: A Helm chart to deploy Apache OpenWhisk providers on Kubernetes
+name: Apache OpenWhisk Providers
 version: 0.1.0
 keywords:
   - Apache OpenWhisk
diff --git a/helm/Chart.yaml b/helm/providers/charts/kafka/Chart.yaml
similarity index 70%
rename from helm/Chart.yaml
rename to helm/providers/charts/kafka/Chart.yaml
index 5923669..23a382e 100644
--- a/helm/Chart.yaml
+++ b/helm/providers/charts/kafka/Chart.yaml
@@ -2,8 +2,8 @@
 # license agreements; and to You under the Apache License, Version 2.0.
 
 apiVersion: v1
-description: A Helm chart to deploy Apache OpenWhisk for Kubernetes
-name: Apache OpenWhisk
+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
diff --git a/helm/templates/NOTES.txt b/helm/providers/charts/kafka/templates/NOTES.txt
similarity index 67%
copy from helm/templates/NOTES.txt
copy to helm/providers/charts/kafka/templates/NOTES.txt
index 95007e4..b01e731 100644
--- a/helm/templates/NOTES.txt
+++ b/helm/providers/charts/kafka/templates/NOTES.txt
@@ -1,15 +1,11 @@
 {{/* 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
+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/).
 
-To configure your wsk cli to connect to it, set the apihost property
-using the command below:
-  $ wsk property set --apihost {{ .Values.whisk.ingress.api_host_name -}}:{{- .Values.whisk.ingress.api_host_port
}}
-
 Your release is named {{ .Release.Name }}.
 
 To learn more about the release, try:
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/templates/NOTES.txt b/helm/providers/templates/NOTES.txt
similarity index 67%
rename from helm/templates/NOTES.txt
rename to helm/providers/templates/NOTES.txt
index 95007e4..faf65e0 100644
--- a/helm/templates/NOTES.txt
+++ b/helm/providers/templates/NOTES.txt
@@ -1,15 +1,11 @@
 {{/* 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
+Apache OpenWhisk Providers
 Copyright 2016-2018 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
 
-To configure your wsk cli to connect to it, set the apihost property
-using the command below:
-  $ wsk property set --apihost {{ .Values.whisk.ingress.api_host_name -}}:{{- .Values.whisk.ingress.api_host_port
}}
-
 Your release is named {{ .Release.Name }}.
 
 To learn more about the release, try:
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"


Mime
View raw message