This is an automated email from the ASF dual-hosted git repository.
mrutkowski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new fa624b9 Add license headers (#3566)
fa624b9 is described below
commit fa624b96dbb2da60f85bb133caea01ca1b220108
Author: Ying Chun Guo <[email protected]>
AuthorDate: Mon Apr 23 23:25:00 2018 +0800
Add license headers (#3566)
---
actionRuntimes/nodejs6Action/Dockerfile | 1 -
actionRuntimes/nodejs8Action/Dockerfile | 1 -
common/scala/Dockerfile | 18 +++++++++-
core/controller/Dockerfile | 18 +++++++++-
core/controller/init.sh | 3 ++
core/invoker/Dockerfile | 16 +++++++++
core/invoker/init.sh | 3 ++
docs/README.md | 19 ++++++++++-
docs/about.md | 19 ++++++++++-
docs/actions.md | 17 ++++++++++
docs/annotations.md | 19 ++++++++++-
docs/apigateway.md | 17 ++++++++++
docs/catalog.md | 19 ++++++++++-
docs/cli.md | 17 ++++++++++
docs/conductors.md | 19 +++++++++--
docs/deploy.md | 17 ++++++++++
docs/dev/configuration.md | 17 ++++++++++
docs/dev/future.md | 17 ++++++++++
docs/feeds.md | 17 ++++++++++
docs/images/README.md | 19 ++++++++++-
docs/logging.md | 23 +++++++++++--
docs/mesos.md | 29 +++++++++++-----
docs/metrics.md | 25 +++++++++++---
docs/mobile_sdk.md | 23 +++++++++++--
docs/packages.md | 17 ++++++++++
docs/parameters.md | 17 ++++++++++
docs/reference.md | 17 ++++++++++
docs/rest_api.md | 17 ++++++++++
docs/samples.md | 19 ++++++++++-
docs/spi.md | 20 +++++++++--
docs/triggers_rules.md | 17 ++++++++++
docs/use_cases.md | 25 +++++++++++---
docs/webactions.md | 39 ++++++++++++++++------
performance/README.md | 17 ++++++++++
.../src/gatling/resources/data/nodeJSAction.js | 3 ++
.../src/gatling/resources/data/pythonAction.py | 3 ++
.../src/gatling/resources/data/swiftAction.swift | 3 ++
performance/preparation/create.sh | 16 +++++++++
performance/preparation/deploy.sh | 17 +++++++++-
performance/wrk_tests/latency.sh | 16 +++++++++
performance/wrk_tests/throughput.sh | 16 +++++++++
tools/vagrant/Vagrantfile | 15 +++++++++
tools/vagrant/hello | 4 ++-
tools/vagrant/hello.cmd | 3 ++
44 files changed, 644 insertions(+), 50 deletions(-)
diff --git a/actionRuntimes/nodejs6Action/Dockerfile
b/actionRuntimes/nodejs6Action/Dockerfile
index c0fa3fe..482e4d4 100644
--- a/actionRuntimes/nodejs6Action/Dockerfile
+++ b/actionRuntimes/nodejs6Action/Dockerfile
@@ -1,2 +1 @@
FROM openwhisk/nodejs6action:1.8.1
-
diff --git a/actionRuntimes/nodejs8Action/Dockerfile
b/actionRuntimes/nodejs8Action/Dockerfile
index 51d4ea6..c4aafd8 100644
--- a/actionRuntimes/nodejs8Action/Dockerfile
+++ b/actionRuntimes/nodejs8Action/Dockerfile
@@ -1,2 +1 @@
FROM openwhisk/action-nodejs-v8:1.5.1
-
diff --git a/common/scala/Dockerfile b/common/scala/Dockerfile
index 17849dc..885880d 100644
--- a/common/scala/Dockerfile
+++ b/common/scala/Dockerfile
@@ -1,3 +1,19 @@
+#
+# 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.
+#
+
FROM alpine:3.6
ENV LANG en_US.UTF-8
@@ -75,4 +91,4 @@ COPY transformEnvironment.sh /
RUN chmod +x transformEnvironment.sh
COPY copyJMXFiles.sh /
-RUN chmod +x copyJMXFiles.sh
\ No newline at end of file
+RUN chmod +x copyJMXFiles.sh
diff --git a/core/controller/Dockerfile b/core/controller/Dockerfile
index ce772b4..32fc06f 100644
--- a/core/controller/Dockerfile
+++ b/core/controller/Dockerfile
@@ -1,3 +1,19 @@
+#
+# 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.
+#
+
FROM scala
# Install swagger-ui
@@ -15,4 +31,4 @@ COPY init.sh /
RUN chmod +x init.sh
EXPOSE 8080
-CMD ["./init.sh", "0"]
\ No newline at end of file
+CMD ["./init.sh", "0"]
diff --git a/core/controller/init.sh b/core/controller/init.sh
index 1ffa7d7..cd20975 100644
--- a/core/controller/init.sh
+++ b/core/controller/init.sh
@@ -1,5 +1,8 @@
#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+
./copyJMXFiles.sh
export CONTROLLER_OPTS
diff --git a/core/invoker/Dockerfile b/core/invoker/Dockerfile
index 0dbe11a..894d367 100644
--- a/core/invoker/Dockerfile
+++ b/core/invoker/Dockerfile
@@ -1,3 +1,19 @@
+#
+# 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.
+#
+
FROM scala
ENV DOCKER_VERSION 1.12.0
diff --git a/core/invoker/init.sh b/core/invoker/init.sh
index cfcf056..ec09b6f 100644
--- a/core/invoker/init.sh
+++ b/core/invoker/init.sh
@@ -1,5 +1,8 @@
#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+
./copyJMXFiles.sh
export INVOKER_OPTS
diff --git a/docs/README.md b/docs/README.md
index 89f4465..14e8a7c 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,6 +1,23 @@
+<!--
+#
+# 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.
+#
+-->
# Getting started with OpenWhisk
-OpenWhisk is an [Apache Incubator
Project](https://incubator.apache.org/projects/openwhisk.html). It is an open
source implementation of a distributed, event-driven compute service. You can
run it on your own hardware on-prem, or in the cloud. When running in the cloud
you could use a Platform as as Service (PaaS) version of the OpenWhisk provided
by IBM Bluemix, or you can provision it yourself into Infrastructure as a
Service (IaaS) clouds, such as Bluemix, Amazon EC2, Microsoft Azure, [...]
+OpenWhisk is an [Apache Incubator
Project](https://incubator.apache.org/projects/openwhisk.html). It is an open
source implementation of a distributed, event-driven compute service. You can
run it on your own hardware on-prem, or in the cloud. When running in the cloud
you could use a Platform as as Service (PaaS) version of the OpenWhisk provided
by IBM Bluemix, or you can provision it yourself into Infrastructure as a
Service (IaaS) clouds, such as Bluemix, Amazon EC2, Microsoft Azure, [...]
OpenWhisk runs application logic in response to events or direct invocations
from web or mobile apps over HTTP. Events can be provided from Bluemix services
like Cloudant and from external sources. Developers can focus on writing
application logic, and creating actions that are executed on demand. The
benefits of this new paradigm are that you do not explicitly provision servers
and worry about auto-scaling, or worry about high availability, updates,
maintenance and pay for hours of proc [...]
diff --git a/docs/about.md b/docs/about.md
index f03efa5..5855f5c 100644
--- a/docs/about.md
+++ b/docs/about.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# System overview
OpenWhisk is an event-driven compute platform also referred to as Serverless
computing or as Function as a Service (FaaS) that runs code in response to
events or direct invocations. The following figure shows the high-level
OpenWhisk architecture.
@@ -102,7 +119,7 @@ Once Kafka has confirmed that it got the message, the HTTP
request to the user i
The **Invoker** is the heart of OpenWhisk. The Invoker’s duty is to invoke an
action. It is also implemented in Scala. But there’s much more to it. To
execute actions in an isolated and safe way it uses **Docker**.
-Docker is used to setup a new self-encapsulated environment (called
*container*) for each action that we invoke in a fast, isolated and controlled
way. In a nutshell, for each action invocation a Docker container is spawned,
the action code gets injected, it gets executed using the parameters passed to
it, the result is obtained, the container gets destroyed. This is also the
place where a lot of performance optimization is done to reduce overhead and
make low response times possible.
+Docker is used to setup a new self-encapsulated environment (called
*container*) for each action that we invoke in a fast, isolated and controlled
way. In a nutshell, for each action invocation a Docker container is spawned,
the action code gets injected, it gets executed using the parameters passed to
it, the result is obtained, the container gets destroyed. This is also the
place where a lot of performance optimization is done to reduce overhead and
make low response times possible.
In our specific case, as we’re having a *Node.js* based action at hand, the
Invoker will start a Node.js container, inject the code from *myAction*, run it
with no parameters, extract the result, save the logs and destroy the Node.js
container again.
diff --git a/docs/actions.md b/docs/actions.md
index 6e79509..49f6d80 100644
--- a/docs/actions.md
+++ b/docs/actions.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# Creating and invoking OpenWhisk actions
diff --git a/docs/annotations.md b/docs/annotations.md
index ab31bca..ec83944 100644
--- a/docs/annotations.md
+++ b/docs/annotations.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# Annotations on OpenWhisk assets
OpenWhisk actions, triggers, rules and packages (collectively referred to as
assets) may be decorated with `annotations`. Annotations are attached to assets
just like parameters with a `key` that defines a name and `value` that defines
the value. It is convenient to set them from the command line interface (CLI)
via `--annotation` or `-a` for short.
@@ -21,7 +38,7 @@ The annotations we have used for describing packages are:
* `description`: a pithy description of the package
* `parameters`: an array describing parameters that are scoped to the package
(described further below)
-Similarly, for actions:
+Similarly, for actions:
* `description`: a pithy description of the action
* `parameters`: an array describing actions that are required to execute the
action
diff --git a/docs/apigateway.md b/docs/apigateway.md
index 49c88bb..b821898 100644
--- a/docs/apigateway.md
+++ b/docs/apigateway.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# API Gateway
OpenWhisk actions can benefit from being managed by API management.
diff --git a/docs/catalog.md b/docs/catalog.md
index 0605de0..747dd75 100644
--- a/docs/catalog.md
+++ b/docs/catalog.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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 OpenWhisk-enabled services
@@ -22,7 +39,7 @@ The catalog is available as packages in the `/whisk.system`
namespace. See [Brow
|
[/whisk.system/websocket](https://github.com/apache/incubator-openwhisk-catalog/blob/master/packages/websocket/README.md)
| Package to work with a [Web
Socket](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) server
|
<!--
-TODO: place holder until we have a README for samples
+TODO: place holder until we have a README for samples
|
[/whisk.system/samples](https://github.com/apache/incubator-openwhisk-catalog/blob/master/packages/samples/README.md)
| offers sample actions in different languages |
-->
<!--
diff --git a/docs/cli.md b/docs/cli.md
index 5eee4fa..3dd7f52 100644
--- a/docs/cli.md
+++ b/docs/cli.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# OpenWhisk CLI
OpenWhisk offers a powerful command line interface that allows complete
management of all aspects of the system.
diff --git a/docs/conductors.md b/docs/conductors.md
index 895efa7..8368b78 100644
--- a/docs/conductors.md
+++ b/docs/conductors.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# Conductor Actions
Conductor actions make it possible to build and invoke a series of actions,
similar to sequences. However, whereas the components of a sequence action must
be specified before invoking the sequence, conductor actions can decide the
series of actions to invoke at run time.
@@ -250,5 +267,3 @@ There are limits on the number of component action
activations and secondary con
The maximum number _n_ of permitted component activations is equal to the
maximum number of components in a sequence action. It is configured via the
same configuration parameter. The maximum number of secondary conductor
activations is _2n+1_.
If either of these limits is exceeded, the conductor action invocation ends
with an _application error_ status code and an error message describing the
reason for the failure.
-
-
diff --git a/docs/deploy.md b/docs/deploy.md
index a1abad0..b12504b 100644
--- a/docs/deploy.md
+++ b/docs/deploy.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
This page documents configuration options that should be considered when
deploying OpenWhisk. Some deployment options require special treatment wrt to
the underlying infrastructure/deployment model. Please carefully read about the
constraints before you decide to enable them.
# Controller Clustering
diff --git a/docs/dev/configuration.md b/docs/dev/configuration.md
index cedc31c..fa6ad98 100644
--- a/docs/dev/configuration.md
+++ b/docs/dev/configuration.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# Scala component configuration
Our Scala components are in the process of switching from our own
`WhiskConfig` to the TypesafeConfig based `pureconfig`. That will give us a
more sane way of parsing environment values, overriding them and defining
sensible defaults for them.
diff --git a/docs/dev/future.md b/docs/dev/future.md
index 82a2f41..2d79512 100644
--- a/docs/dev/future.md
+++ b/docs/dev/future.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# Potential Future Enhancements
## Web actions potential future enhancements
diff --git a/docs/feeds.md b/docs/feeds.md
index 03052d9..50df1bb 100644
--- a/docs/feeds.md
+++ b/docs/feeds.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# Implementing feeds
OpenWhisk supports an open API, where any user can expose an event producer
service as a **feed** in a **package**. This section describes architectural
and implementation options for providing your own feed.
diff --git a/docs/images/README.md b/docs/images/README.md
index f6ecdf9..1211476 100644
--- a/docs/images/README.md
+++ b/docs/images/README.md
@@ -1,2 +1,19 @@
+<!--
+#
+# 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.
+#
+-->
This folder contains approved OpenWhisk logo images bearing the Trademark (TM)
symbol
-that indicates that the OpenWhisk project has filed to register the OpenWhisk
logo.
+that indicates that the OpenWhisk project has filed to register the OpenWhisk
logo.
diff --git a/docs/logging.md b/docs/logging.md
index 7846a4e..48a59b0 100644
--- a/docs/logging.md
+++ b/docs/logging.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# Logging in OpenWhisk
## Default Logging Provider
@@ -6,7 +23,7 @@ OpenWhisk uses Logback as default logging provider via slf4j.
Logback can be configured in the configuration file
[logback.xml](../common/scala/src/main/resources/logback.xml).
-Besides other things this configuration file defines the default log level for
OpenWhisk.
+Besides other things this configuration file defines the default log level for
OpenWhisk.
Akka Logging inherits the log level defined here.
## Enable debug-level logging for selected namespaces
@@ -24,9 +41,9 @@ nginx_special_users:
## Using JMX to adapt the loglevel at run-time
-One can alter the log level of a single component (Controller or Invoker) on
the fly using JMX.
+One can alter the log level of a single component (Controller or Invoker) on
the fly using JMX.
-### Example for using [jmxterm](ttp://wiki.cyclopsgroup.org/jmxterm/) to alter
the log level
+### Example for using [jmxterm](ttp://wiki.cyclopsgroup.org/jmxterm/) to alter
the log level
1. Create a command file for jmxterm
```
diff --git a/docs/mesos.md b/docs/mesos.md
index eefa263..bde959a 100644
--- a/docs/mesos.md
+++ b/docs/mesos.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# Mesos Support
The `MesosContainerFactory` enables launching action containers within a Mesos
cluster. It does not affect the deployment of OpenWhisk components (invoker,
controller).
@@ -30,11 +47,11 @@ CONFIG_whisk_mesos_masterUrl=http://192.168.99.100:5050
* Logs are not collected from action containers.
For now, the Mesos public URL will be included in the logs retrieved via the
wsk CLI. Once log retrieval from external sources is enabled, logs from mesos
containers would have to be routed to the external source, and then retrieved
from that source.
-
+
* No HA or failover support (single invoker per cluster).
-
+
Currently the version of `mesos-actor` in use does not support HA or
failover. Failover support is planned to be provided by:
-
+
* multiple invokers running in an Akka cluster
* the Mesos framework actor is a singleton within the cluster
* the Mesos framework actor is available from the other invoker nodes
@@ -43,9 +60,3 @@ CONFIG_whisk_mesos_masterUrl=http://192.168.99.100:5050
* the actor will resubscribe to mesos scheduler API with the same ID
* the tasks that were previously launched by the actor will be reconciled
* normal operation resumes
-
-
-
-
-
-
diff --git a/docs/metrics.md b/docs/metrics.md
index 00544e2..9ba60ef 100644
--- a/docs/metrics.md
+++ b/docs/metrics.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# Openwhisk Metric Support
Openwhick contains the capability to send metric information to a statsd
server. This capability is disabled per default. Instead metric information is
normally written to the log files in logmarker format.
@@ -8,10 +25,10 @@ Both capabilties can be enabled or disabled separately
during deployment via Ans
There are four configurations options available:
-- **metrics_log** [true / false (default: true)]
+- **metrics_log** [true / false (default: true)]
+
+ Enable/disable whether the metric information is written out to the log
files in logmarker format.
- Enable/disable whether the metric information is written out to the log
files in logmarker format.
-
*Beware: Even if set to false all messages adjourning the log markers are
still written out to the log*
- **metrics_kamon** [true / false (default: false)]
@@ -21,7 +38,7 @@ There are four configurations options available:
- **metrics_kamon_tags: false** [true / false (default: false)]
Enable/disable whether to use the Kamon tags when sending metrics.
-
+
*Notice: Tag is supported in some kamon-backend. (OpenTSDB, Datadog,
InfluxDB)*
- **metrics_kamon_statsd_host** [hostname or ip address]
diff --git a/docs/mobile_sdk.md b/docs/mobile_sdk.md
index fab9aa7..84e71ee 100644
--- a/docs/mobile_sdk.md
+++ b/docs/mobile_sdk.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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 the OpenWhisk mobile SDK
@@ -21,12 +38,12 @@ target 'MyApp' do
pod 'OpenWhisk', :git =>
'https://github.com/apache/incubator-openwhisk-client-swift.git', :tag =>
'0.2.2'
end
-target 'MyApp WatchKit Extension' do
+target 'MyApp WatchKit Extension' do
pod 'OpenWhisk', :git =>
'https://github.com/apache/incubator-openwhisk-client-swift.git', :tag =>
'0.2.2'
end
```
-From the command line, type `pod install`. This command installs the SDK for
an iOS app with a watchOS extension. Use the workspace file CocoaPods creates
for your app to open the project in Xcode.
+From the command line, type `pod install`. This command installs the SDK for
an iOS app with a watchOS extension. Use the workspace file CocoaPods creates
for your app to open the project in Xcode.
After installation, open your project workspace. You may get the following
warning when building:
`Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be
configured correctly for targets which use Swift. Use the [Edit > Convert > To
Current Swift Syntax…] menu to choose a Swift version or use the Build Settings
editor to configure the build setting directly.`
@@ -69,7 +86,7 @@ To install the starter app example, enter the following
command:
wsk sdk install iOS
```
-This command downloads a compressed file that contains the starter app. Inside
the project directory is a podfile.
+This command downloads a compressed file that contains the starter app. Inside
the project directory is a podfile.
To install the SDK, enter the following command:
```
diff --git a/docs/packages.md b/docs/packages.md
index d4811f1..1027a99 100644
--- a/docs/packages.md
+++ b/docs/packages.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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 and creating OpenWhisk packages
diff --git a/docs/parameters.md b/docs/parameters.md
index 18c4b22..b411a3b 100644
--- a/docs/parameters.md
+++ b/docs/parameters.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# Working with parameters
When working with serverless actions, data is supplied by adding parameters to
the actions; these are in the parameter declared as an argument to the main
serverless function. All data arrives this way and the values can be set in a
few different ways. The first option is to supply parameters when an action or
package is created (or updated). This approach is useful for data that stays
the same on every execution, equivalent to environment variables on other
platforms, or for default val [...]
diff --git a/docs/reference.md b/docs/reference.md
index 78e429b..8e361f7 100644
--- a/docs/reference.md
+++ b/docs/reference.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# OpenWhisk system details
diff --git a/docs/rest_api.md b/docs/rest_api.md
index 7055151..370318d 100644
--- a/docs/rest_api.md
+++ b/docs/rest_api.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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 REST APIs with OpenWhisk
After your OpenWhisk environment is enabled, you can use OpenWhisk with your
web apps or mobile apps with REST API calls.
diff --git a/docs/samples.md b/docs/samples.md
index bafbd89..bf3cd63 100644
--- a/docs/samples.md
+++ b/docs/samples.md
@@ -1,7 +1,24 @@
+<!--
+#
+# 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.
+#
+-->
# OpenWhisk samples
Here is a list of [OpenWhisk community
resources](https://github.com/apache/incubator-openwhisk-external-resources),
which includes more samples, complete OpenWhisk applications, articles,
tutorials, podcasts and much more.
-<!-- TODO
+<!-- TODO
"Complete listing of OpenWhisk samples can be found here." <- need to insert a
link to the OpenWhisk samples repo when there is one -->
## OpenWhisk Hello World example
diff --git a/docs/spi.md b/docs/spi.md
index 15029d1..2774334 100644
--- a/docs/spi.md
+++ b/docs/spi.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# SPI extensions in OpenWhisk
Alternate implementations of various components follow an SPI (Service
Provider Interface) pattern:
@@ -37,7 +54,7 @@ The config key used to find the implementations classname is
`whisk.spi.<SpiInte
For example, the SPI interface `whisk.core.database.ArtifactStoreProvider`
would load a specific implementation indicated by the
`whisk.spi.ArtifactStoreProvider` config key.
(so you cannot use multiple SPI interfaces with the same class name in
different packages)
-
+
Invoke the loader using `SpiLoader.get[<the SPI interface>](<implicit
resolver>)`
@@ -73,4 +90,3 @@ The application jars can be added to `$APP_HOME/ext-lib` for
e.g. in `openwhisk/
### Application Configuration
The configuration files can be added to `$APP_HOME/config`.
-
diff --git a/docs/triggers_rules.md b/docs/triggers_rules.md
index 7fe83a8..239753e 100644
--- a/docs/triggers_rules.md
+++ b/docs/triggers_rules.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# Creating triggers and rules
diff --git a/docs/use_cases.md b/docs/use_cases.md
index 83e7696..4bbbad5 100644
--- a/docs/use_cases.md
+++ b/docs/use_cases.md
@@ -1,16 +1,33 @@
+<!--
+#
+# 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.
+#
+-->
# Common use cases
The execution model that is offered by OpenWhisk supports a variety of use
cases. The following sections include typical examples. For a more detailed
discussion of Serverless architecture, example uses cases, pros and cons
discussion and implementation best practices, please read excellent [Mike
Roberts article on Martin Fowler's
blog](https://martinfowler.com/articles/serverless.html).
## Microservices
-Despite their benefit, microservice-based solutions remain difficult to build
using mainstream cloud technologies, often requiring control of a complex
toolchain, and separate build and operations pipelines. Small and agile teams,
spending too much time dealing with infrastructural and operational
complexities (fault-tolerance, load balancing, auto-scaling, and logging),
especially want a way to develop streamlined, value-adding code with
programming languages they already know and love [...]
+Despite their benefit, microservice-based solutions remain difficult to build
using mainstream cloud technologies, often requiring control of a complex
toolchain, and separate build and operations pipelines. Small and agile teams,
spending too much time dealing with infrastructural and operational
complexities (fault-tolerance, load balancing, auto-scaling, and logging),
especially want a way to develop streamlined, value-adding code with
programming languages they already know and love [...]
The modular and inherently scalable nature of OpenWhisk makes it ideal for
implementing granular pieces of logic in actions. OpenWhisk actions are
independent of each other and can be implemented using variety of different
languages supported by OpenWhisk and access various backend systems. Each
action can be independently deployed and managed, is scaled independently of
other actions. Interconnectivity between actions is provided by OpenWhisk in
the form of rules, sequences and naming c [...]
## Web apps
-Even though OpenWhisk was originally designed for event based programming, it
offers several benefits for user-facing applications. For example, when you
combine it with a small Node.js stub, you can use it to serve applications that
are relatively easy to debug. And because OpenWhisk applications are a lot less
computationally intensive than running a server process on a PaaS platform,
they are considerably cheaper, as well.
+Even though OpenWhisk was originally designed for event based programming, it
offers several benefits for user-facing applications. For example, when you
combine it with a small Node.js stub, you can use it to serve applications that
are relatively easy to debug. And because OpenWhisk applications are a lot less
computationally intensive than running a server process on a PaaS platform,
they are considerably cheaper, as well.
Full web applications can be built and run with OpenWhisk. Combining
serverless APIs with static file hosting for site resources, e.g. HTML,
JavaScript and CSS, means we can build entire serverless web applications. The
simplicity of operating a hosted OpenWhisk environment (or rather not having to
operate anything at all since it is hosted on Bluemix) is a great benefit
compared to standing up and operating a Node.js Express or other traditional
server runtime.
@@ -33,7 +50,7 @@ Here is a sample IoT application that uses OpenWhisk,
NodeRed, Cognitive and oth
## API backend
-Serverless computing platforms give developers a rapid way to build APIs
without servers. OpenWhisk supports automatic generation of REST API for
actions and it is very easy to connect your API Management tool of choice (such
as [IBM API Connect](https://www-03.ibm.com/software/products/en/api-connect)
or other) to these REST APIs provided by OpenWhisk. Similar to other use cases,
all considerations for scalability, and other Qualities of Services (QoS)
apply.
+Serverless computing platforms give developers a rapid way to build APIs
without servers. OpenWhisk supports automatic generation of REST API for
actions and it is very easy to connect your API Management tool of choice (such
as [IBM API Connect](https://www-03.ibm.com/software/products/en/api-connect)
or other) to these REST APIs provided by OpenWhisk. Similar to other use cases,
all considerations for scalability, and other Qualities of Services (QoS) apply.
Here is an example and a discussion of [using Serverless as an API
backend](https://martinfowler.com/articles/serverless.html#ACoupleOfExamples).
@@ -47,6 +64,6 @@ With the amount of data now available, application
development requires the abil
## Cognitive
-Cognitive technologies can be effectively combined with OpenWhisk to create
powerful applications. For example, IBM Alchemy API and Watson Visual
Recognition can be used with OpenWhisk to automatically extract useful
information from videos without having to actually watch them.
+Cognitive technologies can be effectively combined with OpenWhisk to create
powerful applications. For example, IBM Alchemy API and Watson Visual
Recognition can be used with OpenWhisk to automatically extract useful
information from videos without having to actually watch them.
Here is a sample application [Dark
vision](https://github.com/IBM-Bluemix/openwhisk-darkvisionapp) that does just
that. In this application the user uploads a video or image using the Dark
Vision web application, which stores it in a Cloudant DB. Once the video is
uploaded, OpenWhisk detects the new video by listening to Cloudant changes
(trigger). OpenWhisk then triggers the video extractor action. During its
execution, the extractor produces frames (images) and stores them in Cloudant.
[...]
diff --git a/docs/webactions.md b/docs/webactions.md
index e08a9ea..cb8f83a 100644
--- a/docs/webactions.md
+++ b/docs/webactions.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# Web Actions
Web actions are OpenWhisk actions annotated to quickly enable you to build web
based applications. This allows you to program backend logic which your web
application can access anonymously without requiring an OpenWhisk
authentication key. It is up to the action developer to implement their own
desired authentication and authorization (i.e. OAuth flow).
@@ -50,7 +67,7 @@ $ curl
https://${APIHOST}/api/v1/web/guest/demo/hello.http?name=Jane
Here is an example of a web action that performs an HTTP redirect:
```javascript
function main() {
- return {
+ return {
headers: { location: 'http://openwhisk.org' },
statusCode: 302
}
@@ -60,11 +77,11 @@ function main() {
Or sets a cookie:
```javascript
function main() {
- return {
- headers: {
+ return {
+ headers: {
'Set-Cookie': 'UserID=Jane; Max-Age=3600; Version=',
'Content-Type': 'text/html'
- },
+ },
statusCode: 200,
body: '<html><body><h3>hello</h3></body></html>' }
}
@@ -73,14 +90,14 @@ function main() {
Or sets multiple cookies:
```javascript
function main() {
- return {
- headers: {
+ return {
+ headers: {
'Set-Cookie': [
'UserID=Jane; Max-Age=3600; Version=',
'SessionID=asdfgh123456; Path = /'
],
'Content-Type': 'text/html'
- },
+ },
statusCode: 200,
body: '<html><body><h3>hello</h3></body></html>' }
}
@@ -98,7 +115,7 @@ function main() {
Or returns `application/json`:
```javascript
-function main(params) {
+function main(params) {
return {
statusCode: 200,
headers: { 'Content-Type': 'application/json' },
@@ -152,7 +169,7 @@ Web actions bring some additional features that include:
The example below briefly sketches how you might use these features in a web
action. Consider an action `/guest/demo/hello` with the following body:
```javascript
-function main(params) {
+function main(params) {
return { response: params };
}
```
@@ -278,7 +295,7 @@ $ wsk action create /guest/demo/hello hello.js \
--web true
```
-The result of these changes is that the `name` is bound to `Jane` and may not
be overridden by query or body parameters because of the final annotation. This
secures the action against query or body parameters that try to change this
value whether by accident or intentionally.
+The result of these changes is that the `name` is bound to `Jane` and may not
be overridden by query or body parameters because of the final annotation. This
secures the action against query or body parameters that try to change this
value whether by accident or intentionally.
## Securing web actions
@@ -312,7 +329,7 @@ $ wsk action update /guest/demo/hello hello.js --web false
A web action may elect to interpret and process an incoming HTTP body
directly, without the promotion of a JSON object to first class properties
available to the action input (e.g., `args.name` vs parsing `args.__ow_query`).
This is done via a `raw-http` [annotation](annotations.md). Using the same
example show earlier, but now as a "raw" HTTP web action receiving `name` both
as a query parameters and as JSON value in the HTTP request body:
```bash
-$ curl https://${APIHOST}/api/v1/web/guest/demo/hello.json?name=Jane -X POST
-H "Content-Type: application/json" -d '{"name":"Jane"}'
+$ curl https://${APIHOST}/api/v1/web/guest/demo/hello.json?name=Jane -X POST
-H "Content-Type: application/json" -d '{"name":"Jane"}'
{
"response": {
"__ow_method": "post",
diff --git a/performance/README.md b/performance/README.md
index e8d2164..f817904 100644
--- a/performance/README.md
+++ b/performance/README.md
@@ -1,3 +1,20 @@
+<!--
+#
+# 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.
+#
+-->
# :electric_plug: Apache OpenWhisk - Performance Tests
A few simple but efficient test suites for determining the maximum throughput
and end-user latency of the Apache OpenWhisk system.
diff --git
a/performance/gatling_tests/src/gatling/resources/data/nodeJSAction.js
b/performance/gatling_tests/src/gatling/resources/data/nodeJSAction.js
index 8c71017..b48f2b8 100644
--- a/performance/gatling_tests/src/gatling/resources/data/nodeJSAction.js
+++ b/performance/gatling_tests/src/gatling/resources/data/nodeJSAction.js
@@ -1,3 +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.
+
function main(params) {
var greeting = "Hello" + (params.text || "stranger") + "!";
console.log(greeting);
diff --git
a/performance/gatling_tests/src/gatling/resources/data/pythonAction.py
b/performance/gatling_tests/src/gatling/resources/data/pythonAction.py
index c26b060..0accf23 100644
--- a/performance/gatling_tests/src/gatling/resources/data/pythonAction.py
+++ b/performance/gatling_tests/src/gatling/resources/data/pythonAction.py
@@ -1,3 +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.imitations under the License.
+
import sys
def main(dict):
if 'text' in dict:
diff --git
a/performance/gatling_tests/src/gatling/resources/data/swiftAction.swift
b/performance/gatling_tests/src/gatling/resources/data/swiftAction.swift
index 3f52f66..352e626 100644
--- a/performance/gatling_tests/src/gatling/resources/data/swiftAction.swift
+++ b/performance/gatling_tests/src/gatling/resources/data/swiftAction.swift
@@ -1,3 +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.imitations under the License.
+
func main(args: [String:Any]) -> [String:Any] {
if let text = args["text"] as? String {
print("Hello " + text + "!")
diff --git a/performance/preparation/create.sh
b/performance/preparation/create.sh
index 1a79649..a7249fe 100755
--- a/performance/preparation/create.sh
+++ b/performance/preparation/create.sh
@@ -1,4 +1,20 @@
#!/bin/sh
+#
+# 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.
+#
set -e
# Host to use. Needs to include the protocol.
diff --git a/performance/preparation/deploy.sh
b/performance/preparation/deploy.sh
index 8a11fd6..d2e4d57 100755
--- a/performance/preparation/deploy.sh
+++ b/performance/preparation/deploy.sh
@@ -1,5 +1,20 @@
#!/bin/sh
-
+#
+# 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.
+#
set -e
SCRIPTDIR="$(cd "$(dirname "$0")"; pwd)"
ROOTDIR="$SCRIPTDIR/../.."
diff --git a/performance/wrk_tests/latency.sh b/performance/wrk_tests/latency.sh
index bee706b..5031253 100755
--- a/performance/wrk_tests/latency.sh
+++ b/performance/wrk_tests/latency.sh
@@ -1,4 +1,20 @@
#!/bin/sh
+#
+# 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.
+#
set -e
currentDir="$(cd "$(dirname "$0")"; pwd)"
diff --git a/performance/wrk_tests/throughput.sh
b/performance/wrk_tests/throughput.sh
index 6ed2453..5629b92 100755
--- a/performance/wrk_tests/throughput.sh
+++ b/performance/wrk_tests/throughput.sh
@@ -1,4 +1,20 @@
#!/bin/sh
+#
+# 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.
+#
set -e
currentDir="$(cd "$(dirname "$0")"; pwd)"
diff --git a/tools/vagrant/Vagrantfile b/tools/vagrant/Vagrantfile
index 7d8f244..3d2bae2 100644
--- a/tools/vagrant/Vagrantfile
+++ b/tools/vagrant/Vagrantfile
@@ -1,3 +1,18 @@
+#
+# 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.
+#
# -*- mode: ruby -*-
# vi: set ft=ruby :
diff --git a/tools/vagrant/hello b/tools/vagrant/hello
index a776663..d180046 100755
--- a/tools/vagrant/hello
+++ b/tools/vagrant/hello
@@ -1,5 +1,8 @@
#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+
# Start with a new VM
if [ -d ".vagrant" ]; then
vagrant destroy
@@ -7,4 +10,3 @@ fi
vagrant plugin install vagrant-disksize
vagrant up
-
diff --git a/tools/vagrant/hello.cmd b/tools/vagrant/hello.cmd
index 9f60aef..f743f53 100644
--- a/tools/vagrant/hello.cmd
+++ b/tools/vagrant/hello.cmd
@@ -1,3 +1,6 @@
+@REM Licensed to the Apache Software Foundation (ASF) under one or more
contributor
+@REM license agreements; and to You under the Apache License, Version 2.0.
+
@REM Start with a new VM
IF NOT EXIST .vagrant\ GOTO SKIPDESTROY
vagrant destroy
--
To stop receiving notification emails like this one, please contact
[email protected].