[GitHub] dgrove-oss closed pull request #380: Document ICP and Dynamic DNS Provisioning

2018-11-30 Thread GitBox
dgrove-oss closed pull request #380: Document ICP and Dynamic DNS Provisioning
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/pull/380
 
 
   

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 328ef15..b8907e5 100644
--- a/README.md
+++ b/README.md
@@ -189,7 +189,8 @@ appropriate to your Kubernetes cluster:
 * [Docker for Mac](docs/k8s-docker-for-mac.md#configuring-openwhisk)
 * [kubeadm-dind-cluster](docs/k8s-dind-cluster.md#configuring-openwhisk)
 * [Minikube](docs/k8s-minikube.md#configuring-openwhisk)
-* [IBM (IKS)](docs/k8s-ibm-public.md#configuring-openwhisk)
+* [IBM Kubernetes Service (IKS)](docs/k8s-ibm-public.md#configuring-openwhisk)
+* [IBM Cloud Private (ICP)](docs/k8s-ibm-private.md#configuring-openwhisk)
 * [Google (GKE)](docs/k8s-google.md#configuring-openwhisk)
 * [Amazon (EKS)](docs/k8s-aws.md#configuring-openwhisk)
 
diff --git a/docs/configurationChoices.md b/docs/configurationChoices.md
index 54b68d2..3ffad96 100644
--- a/docs/configurationChoices.md
+++ b/docs/configurationChoices.md
@@ -174,6 +174,10 @@ be scheduled.  If your Kubernetes cluster is properly 
configured to support
 including having a DefaultStorageClass admission controller and a
 designated default StorageClass, then this will all happen seamlessly.
 
+See [NFS Dynamis Storage Provisioning](./k8s-nfs-dynamic-storage.md) for one
+approach to provisioning dynamic storage if it's not already provisioned
+on your cluster.
+
 If your cluster is not properly configured, then you will need to
 manually create the necessary PersistentVolumes when deploying the
 Helm chart. In this case, you should also disable the use of dynamic
diff --git a/docs/k8s-ibm-private.md b/docs/k8s-ibm-private.md
new file mode 100644
index 000..53b429d
--- /dev/null
+++ b/docs/k8s-ibm-private.md
@@ -0,0 +1,194 @@
+
+
+# IBM IKS for OpenWhisk
+
+## Overview
+
+IBM Cloud Private (ICP) provides the core infrastructure needed to provision a
+production-quality OpenWhisk installation.  This document outlines
+ICP-specific steps needed to provision that installation, and calls out
+shortcuts that could be taken for development-grade installation.
+
+## Initial setup
+
+### Creating the Kubernetes Cluster
+
+Follow IBM Cloud Private instructions to provision your cluster.  Include
+GlusterFS provisioning, add
+[dynamic NFS provisioning](./k8s-nfs-dynamic-storage.md),
+or be prepared to provision volumes manually for OpenWhisk
+(see [here](./configurationChoices#persistence)).
+
+### Configuring OpenWhisk
+
+ Configuring Image Security
+
+IBM Cloud Private includes a provision for filtering the images that are
+allowed to be deployed into a particular namespace.  One _could_ disable this
+capability for the OpenWhisk namespace, but initally it is best to define
+a policy for the namespace:  (In this case we assume the namespace is
+`openwhisk`)
+
+```yaml
+apiVersion: securityenforcement.admission.cloud.ibm.com/v1beta1
+kind: ImagePolicy
+metadata:
+  name: openwhisk-image-policy
+  namespace: openwhisk
+spec:
+  repositories:
+  - name: docker.io/openwhisk/*
+policy:
+  va:
+enabled: false
+  - name: docker.io/apache/couchdb:*
+policy:
+  va:
+enabled: false
+  - name: docker.io/nginx:*
+policy:
+  va:
+enabled: false
+  - name: docker.io/redis:*
+policy:
+  va:
+enabled: false
+  - name: docker.io/zookeeper:*
+policy:
+  va:
+enabled: false
+  - name: docker.io/wurstmeister/kafka:*
+policy:
+  va:
+enabled: false
+```
+
+ Configuring Ingress
+
+An IBM Cloud Private cluster has full support for TLS
+and can be configured with additional annotations to
+fine tune ingress performance.
+
+A prerequisite for OpenWhisk TLS access via Ingress as currently configured
+is a Fully Qualified Domain Name (FQDN) that can be resolved correctly from
+within OpenWhisk and points to the SSL Ingress point, usually your load
+balancer or proxy node.
+
+You will also need to create a TLS certificate to be used by the Ingress
+controller for your domain.  The YAML to create in Kubernetes is
+(substituting the real values for ``):
+
+```yaml
+apiVersion: certmanager.k8s.io/v1alpha1
+kind: Certificate
+metadata:
+  name: openwhisk-tls-secret-1
+  namespace: openwhisk
+spec:
+  commonName: 
+  dnsNames:
+  - 
+  issuerRef:
+kind: ClusterIssuer
+name: icp-ca-issuer
+  secretName: openwhisk-tls-secret-1
+```
+
+ Putting it all together
+
+Now define `mycluster.yaml` as below (substituting the real values for
+``).
+
+```yaml
+whisk:
+  ingress:
+apiHostName: 
+apiHostPort: 443
+apiHostProto: https
+type: standard
+domain: 
+tls:
+  enabled: true
+  

[GitHub] dubee commented on a change in pull request #388: Save Code Associated with Blackbox Actions

2018-11-30 Thread GitBox
dubee commented on a change in pull request #388: Save Code Associated with 
Blackbox Actions
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/388#discussion_r237898444
 
 

 ##
 File path: commands/action.go
 ##
 @@ -692,7 +692,7 @@ func saveCode(action whisk.Action, filename string) (err 
error) {
exec = *action.Exec
runtime = strings.Split(exec.Kind, ":")[0]
 
-   if strings.ToLower(runtime) == BLACKBOX {
+   if strings.ToLower(runtime) == BLACKBOX && exec.Code == nil && 
*exec.Binary == false {
 
 Review comment:
   `exec.Code == nil and exec.Binary == true` would be an action that has a zip 
file as code or a Java action. `exec.Code == nil and exec.Binary == false` 
represents a blackbox action without any code provided when the action was 
created. @mdeuser 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dgrove-oss commented on issue #378: cleanup specification of storageclasses and persistence

2018-11-30 Thread GitBox
dgrove-oss commented on issue #378: cleanup specification of storageclasses and 
persistence
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/pull/378#issuecomment-443255218
 
 
   i'm going to merge #380 first, then reconcile the changed variable names and 
enhance the docs as discussed with daisy.  Please hold off merging until I 
remove the wip label from this PR.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #388: Save Code Associated with Blackbox Actions

2018-11-30 Thread GitBox
dubee commented on a change in pull request #388: Save Code Associated with 
Blackbox Actions
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/388#discussion_r237894295
 
 

 ##
 File path: commands/action.go
 ##
 @@ -692,7 +692,7 @@ func saveCode(action whisk.Action, filename string) (err 
error) {
exec = *action.Exec
runtime = strings.Split(exec.Kind, ":")[0]
 
-   if strings.ToLower(runtime) == BLACKBOX {
+   if strings.ToLower(runtime) == BLACKBOX && exec.Code == nil && 
*exec.Binary == false {
 
 Review comment:
   Blackbox actions.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] moritzraho opened a new pull request #330: Security: Disable use of X-Accel-Redirect header

2018-11-30 Thread GitBox
moritzraho opened a new pull request #330: Security: Disable use of 
X-Accel-Redirect header
URL: https://github.com/apache/incubator-openwhisk-apigateway/pull/330
 
 
   This PR addresses a security issue in which web actions could access 
internal locations defined in the nginx config files by setting the 
X-Accel-Redirect response header.
   
   *X-accel allows for internal redirection to a location determined by a 
header returned from a backend.*
   see https://www.nginx.com/resources/wiki/start/topics/examples/x-accel/
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #388: Save Code Associated with Blackbox Actions

2018-11-30 Thread GitBox
dubee commented on a change in pull request #388: Save Code Associated with 
Blackbox Actions
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/388#discussion_r237899789
 
 

 ##
 File path: commands/action.go
 ##
 @@ -692,7 +692,7 @@ func saveCode(action whisk.Action, filename string) (err 
error) {
exec = *action.Exec
runtime = strings.Split(exec.Kind, ":")[0]
 
-   if strings.ToLower(runtime) == BLACKBOX {
+   if strings.ToLower(runtime) == BLACKBOX && exec.Code == nil && 
*exec.Binary == false {
 
 Review comment:
   When creating a blackbox action, code can be added to the action for 
initialization purposes. For documentation see 
https://github.com/apache/incubator-openwhisk/blob/master/docs/actions-docker.md#creating-native-actions.
   
   Here's a example of creating a blackbox action with additional 
initialization code: `wsk action create actionName code.zip --docker 
dockerImage`. @mdeuser 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #388: Save Code Associated with Blackbox Actions

2018-11-30 Thread GitBox
dubee commented on a change in pull request #388: Save Code Associated with 
Blackbox Actions
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/388#discussion_r237898444
 
 

 ##
 File path: commands/action.go
 ##
 @@ -692,7 +692,7 @@ func saveCode(action whisk.Action, filename string) (err 
error) {
exec = *action.Exec
runtime = strings.Split(exec.Kind, ":")[0]
 
-   if strings.ToLower(runtime) == BLACKBOX {
+   if strings.ToLower(runtime) == BLACKBOX && exec.Code == nil && 
*exec.Binary == false {
 
 Review comment:
   `exec.Code == nil and exec.Binary == true` would be an action that has a zip 
file as code or Java code. `exec.Code == nil and exec.Binary == false` 
represents a blackbox action without any code provided when the action was 
created. @mdeuser 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #388: Save Code Associated with Blackbox Actions

2018-11-30 Thread GitBox
dubee commented on a change in pull request #388: Save Code Associated with 
Blackbox Actions
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/388#discussion_r237898444
 
 

 ##
 File path: commands/action.go
 ##
 @@ -692,7 +692,7 @@ func saveCode(action whisk.Action, filename string) (err 
error) {
exec = *action.Exec
runtime = strings.Split(exec.Kind, ":")[0]
 
-   if strings.ToLower(runtime) == BLACKBOX {
+   if strings.ToLower(runtime) == BLACKBOX && exec.Code == nil && 
*exec.Binary == false {
 
 Review comment:
   `exec.Code == nil and exec.Binary == true` would be an action that has a zip 
file as code or a Java code. `exec.Code == nil and exec.Binary == false` 
represents a blackbox action without any code provided when the action was 
created. @mdeuser 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #388: Save Code Associated with Blackbox Actions

2018-11-30 Thread GitBox
dubee commented on a change in pull request #388: Save Code Associated with 
Blackbox Actions
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/388#discussion_r237899789
 
 

 ##
 File path: commands/action.go
 ##
 @@ -692,7 +692,7 @@ func saveCode(action whisk.Action, filename string) (err 
error) {
exec = *action.Exec
runtime = strings.Split(exec.Kind, ":")[0]
 
-   if strings.ToLower(runtime) == BLACKBOX {
+   if strings.ToLower(runtime) == BLACKBOX && exec.Code == nil && 
*exec.Binary == false {
 
 Review comment:
   When creating a blackbox action, code can be added to the action. For 
documentation see 
https://github.com/apache/incubator-openwhisk/blob/master/docs/actions-docker.md#creating-native-actions.
   
   Here's a example of creating a blackbox action with additional 
initialization code: `wsk action create actionName code.zip --docker 
dockerImage`. @mdeuser 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] pritidesai opened a new issue #1018: Find out how to package runtimes.json into wskdeploy binary

2018-11-30 Thread GitBox
pritidesai opened a new issue #1018: Find out how to package runtimes.json into 
wskdeploy binary
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/1018
 
 
   As a quick fix in PR #1017, I have moved runtime `json` into `runtimes.go` 
but we want to bring back `runtimes.json` back to maintain portability of 
`wskdeploy` where for adding any new runtime, we can just update the `json` 
file. I found a way to bundle `json` into wskdeploy binary using `packr` but 
need to look into it more and see how we can make it part of binary.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] pritidesai commented on issue #1017: Deleting static runtimes data file, instead, adding data to go file

2018-11-30 Thread GitBox
pritidesai commented on issue #1017: Deleting static runtimes data file, 
instead, adding data to go file
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/1017#issuecomment-443309146
 
 
   We are merging this PR but please address this issue 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/1018 as a high 
priority.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #388: Save Code Associated with Blackbox Actions

2018-11-30 Thread GitBox
dubee commented on a change in pull request #388: Save Code Associated with 
Blackbox Actions
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/388#discussion_r237894295
 
 

 ##
 File path: commands/action.go
 ##
 @@ -692,7 +692,7 @@ func saveCode(action whisk.Action, filename string) (err 
error) {
exec = *action.Exec
runtime = strings.Split(exec.Kind, ":")[0]
 
-   if strings.ToLower(runtime) == BLACKBOX {
+   if strings.ToLower(runtime) == BLACKBOX && exec.Code == nil && 
*exec.Binary == false {
 
 Review comment:
   Blackbox actions.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] starpit opened a new issue #13: conductor should obey INSECURE_SSL in wskprops

2018-11-30 Thread GitBox
starpit opened a new issue #13: conductor should obey INSECURE_SSL in wskprops
URL: https://github.com/apache/incubator-openwhisk-composer/issues/13
 
 
   conductor parses out wskprops, but ignores the INSECURE_SSL setting that 
might be asserted in that file:
   
https://github.com/apache/incubator-openwhisk-composer/blob/master/conductor.js#L52-L55
   
   i notice that in the tests, the insecure ssl part is asserted via an env var:
   
https://github.com/apache/incubator-openwhisk-composer/blob/master/test/conductor.js#L26
   
   i suggest that we should behave as does the go cli, in its INSECURE_SSL 
behavior.
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dgrove-oss opened a new issue #382: Improve configuration of invoker.containerFactory.nameservers

2018-11-30 Thread GitBox
dgrove-oss opened a new issue #382: Improve configuration of 
invoker.containerFactory.nameservers
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/issues/382
 
 
   When the providers are enabled with the DockerContainerFactory, we should 
probably default the nameserver configuration parameters of the invoker to use 
Kuberetes dns service.  This allows user action containers (including those 
used by the provider packages) to access other kubernetes services using 
cluster-internal dns.  The provider's actions need this to be able to reach 
couchdb and operate properly. 
   
   This is a less secure setup (it allows user actions to be aware they are 
running within a Kube cluster and to interact with other pods running in the 
cluster), but is probably what a user is expecting when they deploy OpenWhisk 
on their own Kubernetes cluster.
   
   Sketch of implementation, if the user didn't explicitly set 
invoker.containerFactory.nameservers when they deployed the chart, then we 
should run a script as part of invoker startup that parses /etc/resolv.conf to 
get the values set for the invoker pod by Kube.  We then pass those through the 
appropriate PureConfig env variables so that things are properly configured 
without a manual user step of figuring out the ClusterIP of kube-dns / core-dns 
service.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rabbah commented on a change in pull request #4129: Adding YARNContainerFactory. This allows OpenWhisk to run actions on Apache Hadoop clusters.

2018-11-30 Thread GitBox
rabbah commented on a change in pull request #4129: Adding 
YARNContainerFactory. This allows OpenWhisk to run actions on Apache Hadoop 
clusters.
URL: 
https://github.com/apache/incubator-openwhisk/pull/4129#discussion_r237980462
 
 

 ##
 File path: 
common/scala/src/main/scala/org/apache/openwhisk/core/yarn/YARNContainerFactory.scala
 ##
 @@ -0,0 +1,476 @@
+/*
+ * 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 org.apache.openwhisk.core.yarn
+
+import java.nio.charset.StandardCharsets
+import java.security.Principal
+
+import akka.actor.ActorSystem
+import akka.http.scaladsl.model._
+import akka.stream.ActorMaterializer
+import javax.security.sasl.AuthenticationException
+import org.apache.commons.io.IOUtils
+import org.apache.http.auth.{AuthSchemeProvider, AuthScope, Credentials}
+import org.apache.http.client.CredentialsProvider
+import org.apache.http.client.config.AuthSchemes
+import org.apache.http.client.methods._
+import org.apache.http.config.RegistryBuilder
+import org.apache.http.entity.StringEntity
+import org.apache.http.impl.auth.SPNegoSchemeFactory
+import org.apache.http.impl.client.{CloseableHttpClient, HttpClients, _}
+import org.apache.openwhisk.common.{Logging, TransactionId}
+import org.apache.openwhisk.core.containerpool._
+import org.apache.openwhisk.core.entity.ExecManifest.ImageName
+import org.apache.openwhisk.core.entity.{ByteSize, ExecManifest, 
InvokerInstanceId}
+import org.apache.openwhisk.core.{ConfigKeys, WhiskConfig}
+import pureconfig.loadConfigOrThrow
+import spray.json.{DefaultJsonProtocol, _}
+
+import scala.concurrent.{ExecutionContext, Future}
+
+case class YARNConfig(masterUrl: String,
+  yarnLinkLogMessage: Boolean,
+  serviceName: String,
+  authType: String,
+  kerberosPrincipal: String,
+  kerberosKeytab: String,
+  queue: String,
+  memory: String,
+  cpus: Int)
+
+case class KerberosPrincipalDefinition(principal_name: Option[String], keytab: 
Option[String])
+case class YARNResponseDefinition(diagnostics: String)
+case class ConfigurationDefinition(env: Map[String, String])
+case class ArtifactDefinition(id: String, `type`: String)
+case class ResourceDefinition(cpus: Int, memory: String)
+case class ContainerDefinition(ip: Option[String],
+   bare_host: Option[String],
+   component_instance_name: String,
+   hostname: Option[String],
+   id: String,
+   launch_time: Long,
+   state: String)
+case class ComponentDefinition(name: String,
+   number_of_containers: Int,
+   launch_command: String,
+   containers: Option[List[ContainerDefinition]],
+   artifact: ArtifactDefinition,
+   resource: ResourceDefinition,
+   configuration: ConfigurationDefinition)
+case class ServiceDefinition(name: String,
+ version: Option[String],
+ description: Option[String],
+ state: String,
+ queue: Option[String],
+ components: List[ComponentDefinition],
+ kerberos_principal: 
Option[KerberosPrincipalDefinition])
+
+object YARNJsonProtocol extends DefaultJsonProtocol {
+  implicit val KerberosPrincipalDefinitionFormat: 
RootJsonFormat[KerberosPrincipalDefinition] = jsonFormat2(
+KerberosPrincipalDefinition)
+  implicit val YARNResponseDefinitionFormat: 
RootJsonFormat[YARNResponseDefinition] = jsonFormat1(
+YARNResponseDefinition)
+  implicit val configurationDefinitionFormat: 
RootJsonFormat[ConfigurationDefinition] = jsonFormat1(
+ConfigurationDefinition)
+  implicit val artifactDefinitionFormat: RootJsonFormat[ArtifactDefinition] = 
jsonFormat2(ArtifactDefinition)
+  implicit val resourceDefinitionFormat: 

[GitHub] rabbah commented on a change in pull request #4129: Adding YARNContainerFactory. This allows OpenWhisk to run actions on Apache Hadoop clusters.

2018-11-30 Thread GitBox
rabbah commented on a change in pull request #4129: Adding 
YARNContainerFactory. This allows OpenWhisk to run actions on Apache Hadoop 
clusters.
URL: 
https://github.com/apache/incubator-openwhisk/pull/4129#discussion_r237980039
 
 

 ##
 File path: 
common/scala/src/main/scala/org/apache/openwhisk/core/yarn/YARNContainerFactory.scala
 ##
 @@ -0,0 +1,476 @@
+/*
+ * 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 org.apache.openwhisk.core.yarn
+
+import java.nio.charset.StandardCharsets
+import java.security.Principal
+
+import akka.actor.ActorSystem
+import akka.http.scaladsl.model._
+import akka.stream.ActorMaterializer
+import javax.security.sasl.AuthenticationException
+import org.apache.commons.io.IOUtils
+import org.apache.http.auth.{AuthSchemeProvider, AuthScope, Credentials}
+import org.apache.http.client.CredentialsProvider
+import org.apache.http.client.config.AuthSchemes
+import org.apache.http.client.methods._
+import org.apache.http.config.RegistryBuilder
+import org.apache.http.entity.StringEntity
+import org.apache.http.impl.auth.SPNegoSchemeFactory
+import org.apache.http.impl.client.{CloseableHttpClient, HttpClients, _}
+import org.apache.openwhisk.common.{Logging, TransactionId}
+import org.apache.openwhisk.core.containerpool._
+import org.apache.openwhisk.core.entity.ExecManifest.ImageName
+import org.apache.openwhisk.core.entity.{ByteSize, ExecManifest, 
InvokerInstanceId}
+import org.apache.openwhisk.core.{ConfigKeys, WhiskConfig}
+import pureconfig.loadConfigOrThrow
+import spray.json.{DefaultJsonProtocol, _}
+
+import scala.concurrent.{ExecutionContext, Future}
+
+case class YARNConfig(masterUrl: String,
+  yarnLinkLogMessage: Boolean,
+  serviceName: String,
+  authType: String,
+  kerberosPrincipal: String,
+  kerberosKeytab: String,
+  queue: String,
+  memory: String,
+  cpus: Int)
+
+case class KerberosPrincipalDefinition(principal_name: Option[String], keytab: 
Option[String])
+case class YARNResponseDefinition(diagnostics: String)
+case class ConfigurationDefinition(env: Map[String, String])
+case class ArtifactDefinition(id: String, `type`: String)
+case class ResourceDefinition(cpus: Int, memory: String)
+case class ContainerDefinition(ip: Option[String],
+   bare_host: Option[String],
+   component_instance_name: String,
+   hostname: Option[String],
+   id: String,
+   launch_time: Long,
+   state: String)
+case class ComponentDefinition(name: String,
+   number_of_containers: Int,
+   launch_command: String,
+   containers: Option[List[ContainerDefinition]],
+   artifact: ArtifactDefinition,
+   resource: ResourceDefinition,
+   configuration: ConfigurationDefinition)
+case class ServiceDefinition(name: String,
+ version: Option[String],
+ description: Option[String],
+ state: String,
+ queue: Option[String],
+ components: List[ComponentDefinition],
+ kerberos_principal: 
Option[KerberosPrincipalDefinition])
+
+object YARNJsonProtocol extends DefaultJsonProtocol {
+  implicit val KerberosPrincipalDefinitionFormat: 
RootJsonFormat[KerberosPrincipalDefinition] = jsonFormat2(
+KerberosPrincipalDefinition)
+  implicit val YARNResponseDefinitionFormat: 
RootJsonFormat[YARNResponseDefinition] = jsonFormat1(
+YARNResponseDefinition)
+  implicit val configurationDefinitionFormat: 
RootJsonFormat[ConfigurationDefinition] = jsonFormat1(
+ConfigurationDefinition)
+  implicit val artifactDefinitionFormat: RootJsonFormat[ArtifactDefinition] = 
jsonFormat2(ArtifactDefinition)
+  implicit val resourceDefinitionFormat: 

[GitHub] rabbah commented on a change in pull request #4129: Adding YARNContainerFactory. This allows OpenWhisk to run actions on Apache Hadoop clusters.

2018-11-30 Thread GitBox
rabbah commented on a change in pull request #4129: Adding 
YARNContainerFactory. This allows OpenWhisk to run actions on Apache Hadoop 
clusters.
URL: 
https://github.com/apache/incubator-openwhisk/pull/4129#discussion_r237981086
 
 

 ##
 File path: 
common/scala/src/main/scala/org/apache/openwhisk/core/yarn/YARNContainerFactory.scala
 ##
 @@ -0,0 +1,476 @@
+/*
+ * 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 org.apache.openwhisk.core.yarn
+
+import java.nio.charset.StandardCharsets
+import java.security.Principal
+
+import akka.actor.ActorSystem
+import akka.http.scaladsl.model._
+import akka.stream.ActorMaterializer
+import javax.security.sasl.AuthenticationException
+import org.apache.commons.io.IOUtils
+import org.apache.http.auth.{AuthSchemeProvider, AuthScope, Credentials}
+import org.apache.http.client.CredentialsProvider
+import org.apache.http.client.config.AuthSchemes
+import org.apache.http.client.methods._
+import org.apache.http.config.RegistryBuilder
+import org.apache.http.entity.StringEntity
+import org.apache.http.impl.auth.SPNegoSchemeFactory
+import org.apache.http.impl.client.{CloseableHttpClient, HttpClients, _}
+import org.apache.openwhisk.common.{Logging, TransactionId}
+import org.apache.openwhisk.core.containerpool._
+import org.apache.openwhisk.core.entity.ExecManifest.ImageName
+import org.apache.openwhisk.core.entity.{ByteSize, ExecManifest, 
InvokerInstanceId}
+import org.apache.openwhisk.core.{ConfigKeys, WhiskConfig}
+import pureconfig.loadConfigOrThrow
+import spray.json.{DefaultJsonProtocol, _}
+
+import scala.concurrent.{ExecutionContext, Future}
+
+case class YARNConfig(masterUrl: String,
+  yarnLinkLogMessage: Boolean,
+  serviceName: String,
+  authType: String,
+  kerberosPrincipal: String,
+  kerberosKeytab: String,
+  queue: String,
+  memory: String,
+  cpus: Int)
+
+case class KerberosPrincipalDefinition(principal_name: Option[String], keytab: 
Option[String])
+case class YARNResponseDefinition(diagnostics: String)
+case class ConfigurationDefinition(env: Map[String, String])
+case class ArtifactDefinition(id: String, `type`: String)
+case class ResourceDefinition(cpus: Int, memory: String)
+case class ContainerDefinition(ip: Option[String],
+   bare_host: Option[String],
+   component_instance_name: String,
+   hostname: Option[String],
+   id: String,
+   launch_time: Long,
+   state: String)
+case class ComponentDefinition(name: String,
+   number_of_containers: Int,
+   launch_command: String,
+   containers: Option[List[ContainerDefinition]],
+   artifact: ArtifactDefinition,
+   resource: ResourceDefinition,
+   configuration: ConfigurationDefinition)
+case class ServiceDefinition(name: String,
+ version: Option[String],
+ description: Option[String],
+ state: String,
+ queue: Option[String],
+ components: List[ComponentDefinition],
+ kerberos_principal: 
Option[KerberosPrincipalDefinition])
+
+object YARNJsonProtocol extends DefaultJsonProtocol {
+  implicit val KerberosPrincipalDefinitionFormat: 
RootJsonFormat[KerberosPrincipalDefinition] = jsonFormat2(
+KerberosPrincipalDefinition)
+  implicit val YARNResponseDefinitionFormat: 
RootJsonFormat[YARNResponseDefinition] = jsonFormat1(
+YARNResponseDefinition)
+  implicit val configurationDefinitionFormat: 
RootJsonFormat[ConfigurationDefinition] = jsonFormat1(
+ConfigurationDefinition)
+  implicit val artifactDefinitionFormat: RootJsonFormat[ArtifactDefinition] = 
jsonFormat2(ArtifactDefinition)
+  implicit val resourceDefinitionFormat: 

[GitHub] rabbah commented on a change in pull request #4129: Adding YARNContainerFactory. This allows OpenWhisk to run actions on Apache Hadoop clusters.

2018-11-30 Thread GitBox
rabbah commented on a change in pull request #4129: Adding 
YARNContainerFactory. This allows OpenWhisk to run actions on Apache Hadoop 
clusters.
URL: 
https://github.com/apache/incubator-openwhisk/pull/4129#discussion_r237981794
 
 

 ##
 File path: 
common/scala/src/main/scala/org/apache/openwhisk/core/yarn/YARNContainerFactory.scala
 ##
 @@ -0,0 +1,476 @@
+/*
+ * 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 org.apache.openwhisk.core.yarn
+
+import java.nio.charset.StandardCharsets
+import java.security.Principal
+
+import akka.actor.ActorSystem
+import akka.http.scaladsl.model._
+import akka.stream.ActorMaterializer
+import javax.security.sasl.AuthenticationException
+import org.apache.commons.io.IOUtils
+import org.apache.http.auth.{AuthSchemeProvider, AuthScope, Credentials}
+import org.apache.http.client.CredentialsProvider
+import org.apache.http.client.config.AuthSchemes
+import org.apache.http.client.methods._
+import org.apache.http.config.RegistryBuilder
+import org.apache.http.entity.StringEntity
+import org.apache.http.impl.auth.SPNegoSchemeFactory
+import org.apache.http.impl.client.{CloseableHttpClient, HttpClients, _}
+import org.apache.openwhisk.common.{Logging, TransactionId}
+import org.apache.openwhisk.core.containerpool._
+import org.apache.openwhisk.core.entity.ExecManifest.ImageName
+import org.apache.openwhisk.core.entity.{ByteSize, ExecManifest, 
InvokerInstanceId}
+import org.apache.openwhisk.core.{ConfigKeys, WhiskConfig}
+import pureconfig.loadConfigOrThrow
+import spray.json.{DefaultJsonProtocol, _}
+
+import scala.concurrent.{ExecutionContext, Future}
+
+case class YARNConfig(masterUrl: String,
+  yarnLinkLogMessage: Boolean,
+  serviceName: String,
+  authType: String,
+  kerberosPrincipal: String,
+  kerberosKeytab: String,
+  queue: String,
+  memory: String,
+  cpus: Int)
+
+case class KerberosPrincipalDefinition(principal_name: Option[String], keytab: 
Option[String])
+case class YARNResponseDefinition(diagnostics: String)
+case class ConfigurationDefinition(env: Map[String, String])
+case class ArtifactDefinition(id: String, `type`: String)
+case class ResourceDefinition(cpus: Int, memory: String)
+case class ContainerDefinition(ip: Option[String],
+   bare_host: Option[String],
+   component_instance_name: String,
+   hostname: Option[String],
+   id: String,
+   launch_time: Long,
+   state: String)
+case class ComponentDefinition(name: String,
+   number_of_containers: Int,
+   launch_command: String,
+   containers: Option[List[ContainerDefinition]],
+   artifact: ArtifactDefinition,
+   resource: ResourceDefinition,
+   configuration: ConfigurationDefinition)
+case class ServiceDefinition(name: String,
+ version: Option[String],
+ description: Option[String],
+ state: String,
+ queue: Option[String],
+ components: List[ComponentDefinition],
+ kerberos_principal: 
Option[KerberosPrincipalDefinition])
+
+object YARNJsonProtocol extends DefaultJsonProtocol {
+  implicit val KerberosPrincipalDefinitionFormat: 
RootJsonFormat[KerberosPrincipalDefinition] = jsonFormat2(
+KerberosPrincipalDefinition)
+  implicit val YARNResponseDefinitionFormat: 
RootJsonFormat[YARNResponseDefinition] = jsonFormat1(
+YARNResponseDefinition)
+  implicit val configurationDefinitionFormat: 
RootJsonFormat[ConfigurationDefinition] = jsonFormat1(
+ConfigurationDefinition)
+  implicit val artifactDefinitionFormat: RootJsonFormat[ArtifactDefinition] = 
jsonFormat2(ArtifactDefinition)
+  implicit val resourceDefinitionFormat: 

[GitHub] dgrove-oss commented on issue #378: cleanup specification of storageclasses and persistence

2018-11-30 Thread GitBox
dgrove-oss commented on issue #378: cleanup specification of storageclasses and 
persistence
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/pull/378#issuecomment-443342337
 
 
   ready to be merged.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dgrove-oss commented on issue #379: Where is docs/ingress.md?

2018-11-30 Thread GitBox
dgrove-oss commented on issue #379: Where is docs/ingress.md?
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/issues/379#issuecomment-443348326
 
 
   @xieweicarl2018  - thanks for reporting the dangling reference in the docs.  
I have submitted a PR to fix values.yaml (as described by @daisy-ycguo above).


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jonpspri opened a new pull request #109: Add CA certificate processing

2018-11-30 Thread GitBox
jonpspri opened a new pull request #109: Add CA certificate processing
URL: https://github.com/apache/incubator-openwhisk-client-go/pull/109
 
 
   Create a '--cacert' flag that allows `wsk` to honor self-signing CAs if the 
certificate is provided.  While not eliminating the need for `wsk -i` this does 
provide a more secure alternative for environments where the signing authority 
is stable, not needed in the system setup, and not easily changed (e.g. 
Kubernetes cluster development/integration installs).
   
   There will be a corresponding PR for the CLI proper.  This change should be 
committed first.
   
   I have an Apache CLA on file.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jonpspri opened a new pull request #389: Add CA certificate processing.

2018-11-30 Thread GitBox
jonpspri opened a new pull request #389: Add CA certificate processing.
URL: https://github.com/apache/incubator-openwhisk-cli/pull/389
 
 
   Create a '--cacert' flag that allows wsk to honor self-signing CAs if the 
certificate is provided. While not eliminating the need for wsk -i this does 
provide a more secure alternative for environments where the signing authority 
is stable, not needed in the system setup, and not easily changed (e.g. 
Kubernetes cluster development/integration installs).
   
   https://github.com/apache/incubator-openwhisk-client-go/pull/109 should be 
committed prior to this CR.
   
   I have an Apache CLA on file.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dgrove-oss opened a new pull request #351: deploy kube now documents both IBM Cloud and IBM Cloud Private

2018-11-30 Thread GitBox
dgrove-oss opened a new pull request #351: deploy kube now documents both IBM 
Cloud and IBM Cloud Private
URL: https://github.com/apache/incubator-openwhisk-website/pull/351
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] akrabat opened a new pull request #4149: Do not link the `/run/runc` volume unless invoker_use_runc is set

2018-11-30 Thread GitBox
akrabat opened a new pull request #4149: Do not link the `/run/runc` volume 
unless invoker_use_runc is set
URL: https://github.com/apache/incubator-openwhisk/pull/4149
 
 
   
   
   On Mac, `/run/runc` doesn't exist and trying to set it as a volume causes an 
error. 
   
   ## My changes affect the following components
   
   
   - [ ] API
   - [ ] Controller
   - [ ] Message Bus (e.g., Kafka)
   - [ ] Loadbalancer
   - [x ] Invoker
   - [ ] Intrinsic actions (e.g., sequences, conductors)
   - [ ] Data stores (e.g., CouchDB)
   - [ ] Tests
   - [ ] Deployment
   - [ ] CLI
   - [ ] General tooling
   - [ ] Documentation
   
   ## Types of changes
   
   - [x] Bug fix (generally a non-breaking change which closes an issue).
   - [ ] Enhancement or new feature (adds new functionality).
   - [ ] Breaking change (a bug fix or enhancement which changes existing 
behavior).
   
   ## Checklist:
   
   
   - [x ] I signed an [Apache 
CLA](https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md).
   - [x ] I reviewed the [style 
guides](https://github.com/apache/incubator-openwhisk/wiki/Contributing:-Git-guidelines#code-readiness)
 and followed the recommendations (Travis CI will check :).
   - [ ] I added tests to cover my changes.
   - [ ] My changes require further changes to the documentation.
   - [ ] I updated the documentation where necessary.
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dgrove-oss closed pull request #4144: add wskdeploy to scriptRunner Dockerfile

2018-11-30 Thread GitBox
dgrove-oss closed pull request #4144: add wskdeploy to scriptRunner Dockerfile
URL: https://github.com/apache/incubator-openwhisk/pull/4144
 
 
   

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/tools/scriptRunner/Dockerfile b/tools/scriptRunner/Dockerfile
index 5cc2be2303..868a4d5562 100644
--- a/tools/scriptRunner/Dockerfile
+++ b/tools/scriptRunner/Dockerfile
@@ -14,6 +14,12 @@ RUN wget -q 
https://github.com/apache/incubator-openwhisk-cli/releases/download/
 tar xzf OpenWhisk_CLI-$WHISK_CLI_VERSION-linux-amd64.tgz -C /usr/local/bin 
wsk && \
 rm OpenWhisk_CLI-$WHISK_CLI_VERSION-linux-amd64.tgz
 
+# Install `wskdeploy` cli in /usr/local/bin
+ENV WHISKDEPLOY_CLI_VERSION latest
+RUN wget -q 
https://github.com/apache/incubator-openwhisk-wskdeploy/releases/download/$WHISKDEPLOY_CLI_VERSION/openwhisk_wskdeploy-$WHISKDEPLOY_CLI_VERSION-linux-amd64.tgz
 && \
+tar xzf openwhisk_wskdeploy-$WHISK_CLI_VERSION-linux-amd64.tgz -C 
/usr/local/bin wskdeploy && \
+rm openwhisk_wskdeploy-$WHISK_CLI_VERSION-linux-amd64.tgz
+
 COPY init.sh /init.sh
 RUN chmod +x /init.sh
 


 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] csantanapr closed pull request #331: package rename for whisk.core is now org.apache.openwhisk.core

2018-11-30 Thread GitBox
csantanapr closed pull request #331: package rename for whisk.core is now 
org.apache.openwhisk.core
URL: https://github.com/apache/incubator-openwhisk-apigateway/pull/331
 
 
   

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/tools/travis/build.sh b/tools/travis/build.sh
index 91c5908..051670e 100755
--- a/tools/travis/build.sh
+++ b/tools/travis/build.sh
@@ -67,6 +67,6 @@ WSK_TESTS_DEPS_EXCLUDE=""
 
 TERM=dumb ./gradlew tests:test --tests apigw.healthtests.* 
${WSK_TESTS_DEPS_EXCLUDE}
 sleep 60
-TERM=dumb ./gradlew tests:test --tests whisk.core.apigw.* 
${WSK_TESTS_DEPS_EXCLUDE}
+TERM=dumb ./gradlew tests:test --tests org.apache.openwhisk.core.apigw.* 
${WSK_TESTS_DEPS_EXCLUDE}
 sleep 60
-TERM=dumb ./gradlew tests:test --tests whisk.core.cli.test.ApiGwRestTests 
${WSK_TESTS_DEPS_EXCLUDE}
+TERM=dumb ./gradlew tests:test --tests 
org.apache.openwhisk.core.cli.test.ApiGwRestTests ${WSK_TESTS_DEPS_EXCLUDE}


 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] csantanapr closed pull request #351: deploy kube now documents both IBM Cloud and IBM Cloud Private

2018-11-30 Thread GitBox
csantanapr closed pull request #351: deploy kube now documents both IBM Cloud 
and IBM Cloud Private
URL: https://github.com/apache/incubator-openwhisk-website/pull/351
 
 
   

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/_layouts/documentation.html b/_layouts/documentation.html
index 42a705a..70d3592 100644
--- a/_layouts/documentation.html
+++ b/_layouts/documentation.html
@@ -2281,7 +2281,7 @@ Kubernetes
   for detailed deployment instructions which includes specific
   https://github.com/apache/incubator-openwhisk-deploy-kube/blob/master/README.md#customize-the-deployment;>customizations
   including Docker Desktop (Mac, Windows), Minikube,
-  Google, IBM Cloud, etc.).
+  Google, IBM Cloud, IBM Cloud Private, etc.).
 
 
 Alternative options


 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ddragosd commented on a change in pull request #4142: tools/dev - updated intellij script to accommodate docker-compose

2018-11-30 Thread GitBox
ddragosd commented on a change in pull request #4142: tools/dev - updated 
intellij script to accommodate docker-compose
URL: 
https://github.com/apache/incubator-openwhisk/pull/4142#discussion_r238041104
 
 

 ##
 File path: 
core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerContainerFactory.scala
 ##
 @@ -141,3 +141,55 @@ object DockerContainerFactoryProvider extends 
ContainerFactoryProvider {
   }
 
 }
+
+/**
+ * This contains factory provides a Docker for Mac client which exposes action 
container's ports on the host.
+ */
+object DockerForMacContainerFactoryProvider extends ContainerFactoryProvider {
+  override def instance(actorSystem: ActorSystem,
+logging: Logging,
+config: WhiskConfig,
+instanceId: InvokerInstanceId,
+parameters: Map[String, Set[String]]): 
ContainerFactory = {
+
+new DockerContainerFactory(instanceId, parameters)(
+  actorSystem,
+  actorSystem.dispatcher,
+  logging,
+  new DockerForMacClient()(actorSystem.dispatcher)(logging, actorSystem),
+  new RuncClient()(actorSystem.dispatcher)(logging, actorSystem))
+  }
+
+}
+
+class DockerForMacClient(dockerHost: Option[String] = None)(executionContext: 
ExecutionContext)(implicit log: Logging,
+   
 as: ActorSystem)
+extends DockerClientWithFileAccess(dockerHost)(executionContext)
+with DockerApiWithFileAccess {
+
+  implicit private val ec: ExecutionContext = executionContext
+
+  override def run(image: String, args: Seq[String] = Seq.empty[String])(
+implicit transid: TransactionId): Future[ContainerId] = {
+// b/c docker for mac doesn't have a routing to the action containers
+// the port 8080 is exposed on the host on a random port number
+val extraArgs: Seq[String] = Seq("-p", "0:8080") ++ args
+super.run(image, extraArgs)
+  }
+  // See extended trait for description
+  override def inspectIPAddress(id: ContainerId, network: String)(
+implicit transid: TransactionId): Future[ContainerAddress] = {
+super
+  .runCmd(
+Seq(
+  "inspect",
+  "--format",
+  s"""{{(index (index .NetworkSettings.Ports "8080/tcp") 
0).HostPort}}""",
 
 Review comment:
   done


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ddragosd commented on a change in pull request #4142: tools/dev - updated intellij script to accommodate docker-compose

2018-11-30 Thread GitBox
ddragosd commented on a change in pull request #4142: tools/dev - updated 
intellij script to accommodate docker-compose
URL: 
https://github.com/apache/incubator-openwhisk/pull/4142#discussion_r238041114
 
 

 ##
 File path: 
core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerContainerFactory.scala
 ##
 @@ -141,3 +141,55 @@ object DockerContainerFactoryProvider extends 
ContainerFactoryProvider {
   }
 
 }
+
+/**
+ * This contains factory provides a Docker for Mac client which exposes action 
container's ports on the host.
+ */
+object DockerForMacContainerFactoryProvider extends ContainerFactoryProvider {
+  override def instance(actorSystem: ActorSystem,
+logging: Logging,
+config: WhiskConfig,
+instanceId: InvokerInstanceId,
+parameters: Map[String, Set[String]]): 
ContainerFactory = {
+
+new DockerContainerFactory(instanceId, parameters)(
+  actorSystem,
+  actorSystem.dispatcher,
+  logging,
+  new DockerForMacClient()(actorSystem.dispatcher)(logging, actorSystem),
+  new RuncClient()(actorSystem.dispatcher)(logging, actorSystem))
+  }
+
+}
+
+class DockerForMacClient(dockerHost: Option[String] = None)(executionContext: 
ExecutionContext)(implicit log: Logging,
+   
 as: ActorSystem)
+extends DockerClientWithFileAccess(dockerHost)(executionContext)
+with DockerApiWithFileAccess {
+
+  implicit private val ec: ExecutionContext = executionContext
+
+  override def run(image: String, args: Seq[String] = Seq.empty[String])(
+implicit transid: TransactionId): Future[ContainerId] = {
+// b/c docker for mac doesn't have a routing to the action containers
+// the port 8080 is exposed on the host on a random port number
+val extraArgs: Seq[String] = Seq("-p", "0:8080") ++ args
+super.run(image, extraArgs)
+  }
+  // See extended trait for description
+  override def inspectIPAddress(id: ContainerId, network: String)(
+implicit transid: TransactionId): Future[ContainerAddress] = {
+super
+  .runCmd(
+Seq(
+  "inspect",
+  "--format",
+  s"""{{(index (index .NetworkSettings.Ports "8080/tcp") 
0).HostPort}}""",
+  id.asString),
+Duration(1, "millis"))
 
 Review comment:
   done


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ddragosd commented on a change in pull request #4142: tools/dev - updated intellij script to accommodate docker-compose

2018-11-30 Thread GitBox
ddragosd commented on a change in pull request #4142: tools/dev - updated 
intellij script to accommodate docker-compose
URL: 
https://github.com/apache/incubator-openwhisk/pull/4142#discussion_r238041201
 
 

 ##
 File path: 
core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerContainerFactory.scala
 ##
 @@ -141,3 +141,55 @@ object DockerContainerFactoryProvider extends 
ContainerFactoryProvider {
   }
 
 }
+
+/**
+ * This contains factory provides a Docker for Mac client which exposes action 
container's ports on the host.
+ */
+object DockerForMacContainerFactoryProvider extends ContainerFactoryProvider {
 
 Review comment:
   done. Created `DockerForMacContainerFactory.scala`


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] chetanmeh commented on issue #3246: ActionLimitsTests memory test failing

2018-11-30 Thread GitBox
chetanmeh commented on issue #3246: ActionLimitsTests memory test failing
URL: 
https://github.com/apache/incubator-openwhisk/issues/3246#issuecomment-443404992
 
 
   On my local Ubuntu box 
   
   ```
   Kernel Version: 4.15.0-39-generic
   Operating System: Ubuntu 16.04.5 LTS
   Total Memory: 62.84GiB
   Server Version: 18.09.0
   ```
   
   The test case does not pass i.e. no memory error seen at all no matter what 
memory I use. Changed the `memoryWithGC.js` like below to somewhat follow 
suggested approach also did not helped 
   
   ```js
   function eat(memoryMB) {
   var bytes = 1*1024*1024*memoryMB;
   var pageSize = 1024;
   var buffer = new Buffer.alloc(bytes);
   for (i = 0; i < bytes - 4; i+= pageSize) {
   buffer.writeFloatBE(Math.random(), i)
   }
   console.log('done.' + buffer.length);
   }
   ```
   
   Below is the docker launch command which shows that memory option being 
passed is `--memory 128m --memory-swap 128m`
   
   ```
   [2018-11-30T10:34:09.194Z] [INFO] [#tid_a4b92326abc919a358937dde59e22b2f] 
[DockerClientWithFileAccess] running /usr/bin/docker run -d --cpu-shares 64 
--memory 128m --memory-swap 128m --network bridge -e 
__OW_API_HOST=https://172.17.0.1:443 --name 
wsk00_18_guest_TestNodeJsMemoryExceeding --pids-limit 1024 --cap-drop NET_RAW 
--cap-drop NET_ADMIN --ulimit nofile=1024:1024 --log-driver json-file --env 
__OW_ALLOW_CONCURRENT=True openwhisk/nodejs6action:latest (timeout: 1 minute) 
[marker:invoker_docker.run_start:37]
   ```
   
   Would now check the cgroup stats to see why limits are not being enforced


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] csantanapr closed issue #300: .dockerignore should not leave out LICENSE.txt

2018-11-30 Thread GitBox
csantanapr closed issue #300: .dockerignore should not leave out LICENSE.txt
URL: https://github.com/apache/incubator-openwhisk-apigateway/issues/300
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] csantanapr closed pull request #328: Include license in container image

2018-11-30 Thread GitBox
csantanapr closed pull request #328: Include license in container image
URL: https://github.com/apache/incubator-openwhisk-apigateway/pull/328
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] csantanapr closed pull request #319: Add package tzdata to the image

2018-11-30 Thread GitBox
csantanapr closed pull request #319: Add package tzdata to the image
URL: https://github.com/apache/incubator-openwhisk-apigateway/pull/319
 
 
   

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/Dockerfile b/Dockerfile
index 124e2e1..85209d7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -25,7 +25,7 @@ FROM alpine:latest
 
 # install dependencies
 RUN apk --update add \
-gcc tar libtool zlib jemalloc jemalloc-dev perl \
+gcc tar libtool zlib jemalloc jemalloc-dev perl tzdata \
 ca-certificates wget make musl-dev openssl-dev openssl pcre-dev g++ 
zlib-dev curl python \
 perl-test-longstring perl-list-moreutils perl-http-message geoip-dev 
dumb-init jq \
 && update-ca-certificates \


 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dgrove-oss opened a new pull request #381: fix dangling links to docs/ingress.md (was split into multiple files).

2018-11-30 Thread GitBox
dgrove-oss opened a new pull request #381: fix dangling links to 
docs/ingress.md (was split into multiple files).
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/pull/381
 
 
   Fixes #379.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] pritidesai closed pull request #350: Adjust Home page and add Swift Action examples

2018-11-30 Thread GitBox
pritidesai closed pull request #350: Adjust Home page and add Swift Action 
examples
URL: https://github.com/apache/incubator-openwhisk-website/pull/350
 
 
   

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/_includes/code/hello.swift b/_includes/code/hello.swift
new file mode 100644
index 000..8ccaf5f
--- /dev/null
+++ b/_includes/code/hello.swift
@@ -0,0 +1,7 @@
+func main(args: [String:Any]) -> [String:Any] {
+if let name = args["name"] as? String {
+return [ "greeting" : "Hello \(name)!" ]
+} else {
+return [ "greeting" : "Hello swif4!" ]
+}
+}
diff --git a/_includes/code/manifest-for-helloSwift.yaml 
b/_includes/code/manifest-for-helloSwift.yaml
new file mode 100644
index 000..425c46d
--- /dev/null
+++ b/_includes/code/manifest-for-helloSwift.yaml
@@ -0,0 +1,5 @@
+packages:
+default:
+actions:
+helloSwift:
+function: hello.swift
diff --git a/_includes/index/index.js b/_includes/index/index.js
index 1864aef..f1465dc 100644
--- a/_includes/index/index.js
+++ b/_includes/index/index.js
@@ -9,7 +9,7 @@ function toggleReferencedSection( parentId, expand )
   console.log( "toggleReferencedSection(): parentId=" + parentId + " expand=" 
+ expand);
   if (parentId !== ""){
 sectionName = parentId.replace("index", "section");
-console.log( "toggleReferencedSection(): sectionName=" + sectionName);
+//console.log( "toggleReferencedSection(): sectionName=" + sectionName);
 sectionHeader = document.getElementById(sectionName);
 section = sectionHeader.nextElementSibling;
 if(expand){
@@ -34,8 +34,7 @@ function addListenersToIndex()
 
 if(sibling!==null){
 coll[i].style.listStyleImage = 
"url('../images/elements/arrow-right-12px.png')";
-// (top right bottom left)
-// make room on left for image/icon
+// make room on left for image/icon (top right bottom left)
 sibling.style.padding = "0px 0px 0px 20px";
 
 if(sibling.classList.contains('index-menu-start-open')){
@@ -87,7 +86,7 @@ function addListenersToSections()
 coll[i].style.backgroundImage = 
"url('../images/elements/circle-plus.png')";
 sibling.style.display = "none";
   } else {
-console.log( "addListenersToSections(): No Toggle style foun; default 
to open");
+//console.log( "addListenersToSections(): No Toggle style foun; 
default to open");
 coll[i].style.backgroundImage = 
"url('../images/elements/circle-minus.png')";
 sibling.style.display = "block";
   }
@@ -98,18 +97,18 @@ function addListenersToSections()
   var sibling = this.nextElementSibling;
   // toggle menu open/close states
   if(sibling!==null){
-console.log("sibling.style.display: ["+sibling.style.display+"]");
+//console.log("sibling.style.display: ["+sibling.style.display+"]");
 if (sibling.style.display !== "none") {
-  console.log("collapsing");
+  //console.log("collapsing");
   sibling.style.display = "none";
   this.style.backgroundImage = 
"url('../images/elements/circle-plus.png')";
 } else {
-  console.log("expanding");
+  //console.log("expanding");
   sibling.style.display = "block";
   this.style.backgroundImage = 
"url('../images/elements/circle-minus.png')";
 }
   }
-  
+
 });
   }
 }
diff --git a/_layouts/community.html b/_layouts/community.html
index 290c680..8be8303 100644
--- a/_layouts/community.html
+++ b/_layouts/community.html
@@ -52,7 +52,7 @@ Community
   
   
   
-  Media
+  Media
   The Apache OpenWhisk project is active on several content 
sharing and social media channels which aim to make it easier for users to get 
started, ask questions, stay informed and to interact with our community.
   Icons that link to each of the following channels are located 
in the header of our website and include:
   
@@ -77,25 +77,37 @@ Media
   
   
   
-  Mailing Lists
-  
-  How to join the Apache OpenWhisk mailing list
-  The Dev Mailing List is where we discuss the development of 
Apache OpenWhisk. It is not a place for technical support; if 
you're looking for help on the project, please try our Documentation page and 
engage with us on one of the Social Media channels listed above.
-  To subscribe, unsubscribe or post our developer list, send an 
email message to one of the following addresses:
+  Mailing Lists
+  The developer or "dev" mailing list is where we discuss the 
design and
+development of Apache 

[GitHub] jthomas commented on issue #325: Support for invocations based on websocket messages

2018-11-30 Thread GitBox
jthomas commented on issue #325: Support for invocations based on websocket 
messages
URL: 
https://github.com/apache/incubator-openwhisk-apigateway/issues/325#issuecomment-443140036
 
 
   I can't find any documentation about this feature in AWS at the moment. 
We'll have to wait and see what their implementation looks like. It'll be 
interesting to see how they handle errors and whether they support sending 
messages back outside of the invocation response. 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mdeuser commented on a change in pull request #388: Save Code Associated with Blackbox Actions

2018-11-30 Thread GitBox
mdeuser commented on a change in pull request #388: Save Code Associated with 
Blackbox Actions
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/388#discussion_r237851733
 
 

 ##
 File path: commands/action.go
 ##
 @@ -692,7 +692,7 @@ func saveCode(action whisk.Action, filename string) (err 
error) {
exec = *action.Exec
runtime = strings.Split(exec.Kind, ":")[0]
 
-   if strings.ToLower(runtime) == BLACKBOX {
+   if strings.ToLower(runtime) == BLACKBOX && exec.Code == nil && 
*exec.Binary == false {
 
 Review comment:
   @dubee - and the kind of actions represented by the following states?
   - exec.Code == nil and exec.Binary == true
   - exec.Code == nil and exec.Binary == false
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] daisy-ycguo commented on a change in pull request #378: cleanup specification of storageclasses and persistence

2018-11-30 Thread GitBox
daisy-ycguo commented on a change in pull request #378: cleanup specification 
of storageclasses and persistence
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/pull/378#discussion_r237733194
 
 

 ##
 File path: docs/k8s-ibm-public.md
 ##
 @@ -97,12 +97,15 @@ whisk:
 
 k8s:
   persistence:
-defaultStorageClass: default
+hasDefaultStorageClass: false
+explicitStorageClass: default
 ```
 
 Review comment:
   I tested it on both IKS 11.4 and IKS 10.08. It didn't work for all. Do you 
enable any special settings  on IKS ?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jonpspri opened a new pull request #380: Document ICP and Dynamic DNS Provisioning

2018-11-30 Thread GitBox
jonpspri opened a new pull request #380: Document ICP and Dynamic DNS 
Provisioning
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/pull/380
 
 
   Edits to documentation to address two concerns:
   
   1.  Directions for deploying OpenWhisk onto IBM Cloud Private,
   including configuration of the IBM Image Security engine.
   2.  Further instructions on how to deploy an NFS-based dynamic
   storage provisioning engine (which can be the easiest way
   around the PersistentVolumeClaim needs of OpenWhisk).
   
   I have an Apache CLA on file.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] daisy-ycguo commented on issue #378: cleanup specification of storageclasses and persistence

2018-11-30 Thread GitBox
daisy-ycguo commented on issue #378: cleanup specification of storageclasses 
and persistence
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/pull/378#issuecomment-443207834
 
 
   Sorry for my misleading messages. Finally I verified this PR worked well for 
IKS 10.8, just **with more patience**. The pvc binding may take 1-2 minutes. If 
it shows pending, it doesn't mean it fails. Just waiting for 2 minutes, it will 
work fine. 
   
   Thanks, David. After you remove document about the additional configuration 
for Docker for Mac, I'm OK to merge this PR. 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] lionelvillard opened a new issue #53: support for .py license header

2018-11-30 Thread GitBox
lionelvillard opened a new issue #53: support for .py license header
URL: https://github.com/apache/incubator-openwhisk-utilities/issues/53
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dgrove-oss commented on a change in pull request #381: fix dangling links to docs/ingress.md (was split into multiple files).

2018-11-30 Thread GitBox
dgrove-oss commented on a change in pull request #381: fix dangling links to 
docs/ingress.md (was split into multiple files).
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/pull/381#discussion_r238007888
 
 

 ##
 File path: helm/openwhisk/templates/ow-whisk-cm.yaml
 ##
 @@ -1,15 +1,6 @@
 # Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
 # license agreements; and to You under the Apache License, Version 2.0.
 
-# There are some variables that a user must define for their deployment.
-# Check for those values here and attempt to give helpful error messages.
-#
-{{- if ne .Values.whisk.ingress.type "LoadBalancer" }}
-# whisk.ingress.type is {{ required "You must provide a value for 
whisk.ingress.type (See docs/ingress.md)" .Values.whisk.ingress.type }}
-# whisk.ingress.apiHostName is {{ required "You must provide a value for 
whisk.ingress.apiHostName (See docs/ingress.md)" 
.Values.whisk.ingress.apiHostName }}
-# whisk.ingress.apiHostPort is {{ required "You must provide a value for 
whisk.ingress.apiHostPort (See docs/ingress.md)" 
.Values.whisk.ingress.apiHostPort }}
-{{- end }}
-
 
 Review comment:
   Note to reviewer:  these tests were no longer functional.  We now provide 
default values for every variable in values.yaml to pass `helm lint`


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:
us...@infra.apache.org


With regards,
Apache Git Services