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/incubator-openwhisk-deploy-kube.git


The following commit(s) were added to refs/heads/master by this push:
     new f1db410  Add Windows documentation (#434)
f1db410 is described below

commit f1db410132b136aa801cb55adccefaed02136d69
Author: Andrei Alecu <[email protected]>
AuthorDate: Sun Feb 24 21:13:44 2019 +0200

    Add Windows documentation (#434)
    
    Add documentation for setting up OpenWhisk k8s on Docker Desktop on Windows
---
 README.md                      |  11 +--
 docs/k8s-docker-for-windows.md | 148 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 154 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 9407491..d4f891c 100644
--- a/README.md
+++ b/README.md
@@ -78,9 +78,10 @@ your cluster.
 [setup instructions](docs/k8s-dind-cluster.md) because the default
 setup of kubeadm-dind-cluster does *not* meet the requirements for
 running OpenWhisk.
-3. Windows: You should be able to use the built-in Kubernetes support
-in Docker for Windows version 18.06 or later.
-We would welcome a pull request with detailed setup instructions for Windows.
+3. Windows: Use the built-in Kubernetes support in Docker for Windows
+version 18.06 or later. Please follow our
+[setup instructions](docs/k8s-docker-for-windows.md) to initially create
+your cluster.
 
 ### Using Minikube
 
@@ -218,9 +219,9 @@ with the actual values from your mycluster.yaml.
 wsk property set --apihost 
<whisk.ingress.apiHostName>:<whisk.ingress.apiHostPort>
 wsk property set --auth 
23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP
 ```
-### Configuring the CLI for Kubernetes on Docker for Mac
+### Configuring the CLI for Kubernetes on Docker for Mac and Windows
 
-The `docker0` network interface does not exist in the Docker for Mac
+The `docker0` network interface does not exist in the Docker for Mac/Windows
 host environment. Instead, exposed NodePorts are forwarded from localhost
 to the appropriate containers.  This means that you will use `localhost`
 instead of `whisk.ingress.apiHostName` when configuring
diff --git a/docs/k8s-docker-for-windows.md b/docs/k8s-docker-for-windows.md
new file mode 100644
index 0000000..aa04a4c
--- /dev/null
+++ b/docs/k8s-docker-for-windows.md
@@ -0,0 +1,148 @@
+<!--
+#
+# 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.
+#
+-->
+
+# Using Kubernetes in Docker for Windows for OpenWhisk
+
+## Overview
+
+If you are using Windows as your development machine, the simplest way
+to get a Kubernetes cluster for local development is to use the
+built-in support for running a single node Kubernetes cluster that is
+available in Docker 18.06 and later. This will let you use Helm to
+deploy Apache OpenWhisk to Kubernetes on your computer without needing
+to install Minikube or otherwise run inside a virtual machine.
+
+## Quick-start
+
+### Chocolatey
+
+You can use the Chocolatey package manager to quickly set up your Docker
+cluster on Windows.
+
+- [Install Chocolatey](https://chocolatey.org/install)
+- Install Docker Desktop: `choco install docker-desktop`
+- Install helm: `choco install kubernetes-helm`
+
+## Initial setup
+
+### Creating the Kubernetes Cluster
+
+Step-by-step instructions on enabling Kubernetes in Docker are
+available as part of the
+[Getting started](https://docs.docker.com/docker-for-windows/#kubernetes)
+documentation from Docker.
+
+In a nutshell, open the Docker preferences window, switch to the
+`Advanced` panel and make sure you have **at least 4GB of Memory
+allocated to Docker**. Then switch to the Kubernetes panel, and check
+the box to enable Kubernetes.
+
+### Using Git to Clone this Repository
+
+`git clone https://github.com/apache/incubator-openwhisk-deploy-kube.git`
+
+### Configuring OpenWhisk
+
+You will be using a NodePort ingress to access OpenWhisk. Assuming
+`kubectl describe nodes | grep InternalIP` returns 192.168.65.3 and
+port 31001 is available to be used on your host machine, a
+mycluster.yaml for a standard deployment of OpenWhisk would be:
+
+```yaml
+whisk:
+  ingress:
+    type: NodePort
+    apiHostName: 192.168.65.3
+    apiHostPort: 31001
+
+nginx:
+  httpsNodePort: 31001
+```
+
+### Using helm to install OpenWhisk
+
+Execute these two commands and wait a few seconds for the tiller-deploy pod
+in the kube-system namespace to be in the Running state:
+
+```cmd
+helm init
+kubectl create clusterrolebinding tiller-cluster-admin 
--clusterrole=cluster-admin --serviceaccount=kube-system:default
+```
+
+Indicate the Kubernetes worker nodes that should be used to execute user
+containers by OpenWhisk's invokers. For a single node development cluster,
+simply run:
+
+`kubectl label nodes --all openwhisk-role=invoker`
+
+Now you're ready to run helm to set up OpenWhisk. Make sure you created your
+`mycluster.yaml` file as described above, and run:
+
+```cmd
+cd incubator-openwhisk-deploy-kube
+helm install ./helm/openwhisk --namespace=openwhisk --name=owdev -f 
mycluster.yaml
+```
+
+You can use the command `helm status owdev` to get a summary of the various
+Kubernetes artifacts that make up your OpenWhisk deployment. Once the
+`install-packages` Pod is in the Completed state, your OpenWhisk deployment
+is ready to be used.
+
+Tip: If you notice errors or pods stuck in the pending state (`init-couchdb`
+as an example), try running `kubectl get pvc --all-namespaces`. If you notice
+that claims are stuck in the Pending state, you may need to follow the
+workaround mentioned in this [Docker for Windows Github 
Issue](https://github.com/docker/for-win/issues/1758#issuecomment-376054370).
+
+You are now ready to set up the wsk cli. Further instructions can be
+[found 
here](https://github.com/apache/incubator-openwhisk-deploy-kube#https://github.com/apache/incubator-openwhisk-deploy-kube#configure-the-wsk-cli).
+Follow the Docker for Windows instructions.
+
+## Hints and Tips
+
+One nice feature of using Kubernetes in Docker, is that the
+containers being run in Kubernetes are also directly
+visible/accessible via the usual Docker commands. Furthermore, it is
+straightforward to deploy local images by adding a stanza to your
+mycluster.yaml. For example, to use a locally built controller image,
+just add the stanza below to your `mycluster.yaml` to override the default
+behavior of pulling a stable `openwhisk/controller` image from Docker Hub.
+
+```yaml
+controller:
+  imageName: "whisk/controller"
+  imageTag: "latest"
+```
+
+## Limitations
+
+Using Kubernetes in Docker for Windows is only appropriate for development
+and testing purposes. It is not recommended for production
+deployments of OpenWhisk.
+
+TLS termination will be handled by OpenWhisk's `nginx` service and
+will use self-signed certificates. You will need to invoke `wsk` with
+the `-i` command line argument to bypass certificate checking.
+
+The docker network is not exposed to the host on Windows. However, the
+exposed ports for NodePort services are forwarded from localhost.
+Therefore you must use different host names to connect to OpenWhisk
+from outside the cluster (with the `wsk` cli) and from inside the
+cluster (in `mycluster.yaml`). Continuing the example from above,
+when setting the `--apihost` for the `wsk` cli, you would use
+`localhost:31001`.

Reply via email to