You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ho...@apache.org on 2018/07/17 20:11:29 UTC

svn commit: r28185 - in /release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating: doc/ doc/INSTALL.md openwhisk-0.9.0-incubating-sources.tar.gz openwhisk-0.9.0-incubating-sources.tar.gz.asc openwhisk-0.9.0-incubating-sources.tar.gz.sha512

Author: houshengbo
Date: Tue Jul 17 20:11:29 2018
New Revision: 28185

Log:
Updating Apache OpenWhisk release 0.9.0-incubating.

Added:
    release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/doc/
    release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/doc/INSTALL.md
    release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-0.9.0-incubating-sources.tar.gz   (with props)
    release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-0.9.0-incubating-sources.tar.gz.asc
    release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-0.9.0-incubating-sources.tar.gz.sha512

Added: release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/doc/INSTALL.md
==============================================================================
--- release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/doc/INSTALL.md (added)
+++ release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/doc/INSTALL.md Tue Jul 17 20:11:29 2018
@@ -0,0 +1,263 @@
+<!--
+#
+# 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.
+#
+-->
+
+# Download OpenWhisk
+
+The OpenWhisk source code may be downloaded from https://dist.apache.org/repos/dist/release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating. The current release is version 0.9.0, and the artifact for this OpenWhisk source code release is called `"openwhisk-0.9.0-incubating-sources.tar.gz"`.
+
+```
+# download from your terminal with wget
+wget https://dist.apache.org/repos/dist/release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-0.9.0-incubating-sources.tar.gz
+```
+
+# Verify the SHA-512 checksums, and signature
+
+You need to install `gpg` on your local machine.
+
+- For Ubuntu user, run the following command:
+  ```
+  sudo apt-get install gnupg
+  ```
+
+- For Mac user, run the following command:
+  ```
+  brew install gpg
+  ```
+
+Before using `gpg` to verify the OpenWhisk release integrity, you should [verify `gpg`'s own integrity](https://gnupg.org/download/integrity_check.html).
+
+The public key used to verify the OpenWhisk checksums can be found [here](https://dist.apache.org/repos/dist/release/incubator/openwhisk/KEYS). Download the key and import it on your local machine.
+
+```
+gpg --import <key_file>
+```
+
+The parameter <key_file> is the file, where the public key is saved.
+
+To generate the SHA512 checksum:
+
+```
+gpg --print-md SHA512 <artifact>
+```
+
+The parameter <artifact> is the file of the artifact `"openwhisk-0.9.0-incubating-sources.tar.gz"`. Compare the content with the [SHA512 file](https://dist.apache.org/repos/dist/release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-0.9.0-incubating-sources.tar.gz.sha512).
+
+Download the [signature](https://dist.apache.org/repos/dist/release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-0.9.0-incubating-sources.tar.gz.asc), and verify it with the command:
+
+```
+gpg --verify openwhisk-0.9.0-incubating-sources.tar.gz.asc openwhisk-0.9.0-incubating-sources.tar.gz
+```
+
+You should receive the output messages similar to the following:
+
+```
+gpg: Signature made <time to generate the key> using RSA key ID <key ID>
+gpg: Good signature from "Release manager's name (Release manager of OpenWhisk) <Release manager's Email address>"
+```
+
+It is acceptable that gpg command pops-up some additional warning messages:
+
+```
+gpg: WARNING: This key is not certified with a trusted signature!
+gpg:          There is no indication that the signature belongs to the owner.
+```
+
+# Unpack the release
+
+Once you have verified the artifact checksums, unzip and extract the source code from the file `"openwhisk-0.9.0-incubating-sources.tar.gz"`. This will yield a directory called `"incubator-openwhisk-0.9.0-incubating"` on your local machine.
+
+You can use the following command to untar the package:
+
+```
+tar -xvzf openwhisk-0.9.0-incubating-sources.tar.gz 
+```
+
+# Verify the Apache license header
+
+OpenWhisk uses a tool called [`scanCode`](https://github.com/apache/incubator-openwhisk-utilities/tree/master/scancode) to check the license header of each source file included in the release. Please check the [`scanCode` tutorial](https://github.com/apache/incubator-openwhisk-utilities) for instructions to download and run the tool and scan all code in the release.
+Download the OpenWhisk utilities project with the following command:
+
+```
+git clone https://github.com/apache/incubator-openwhisk-utilities.git
+```
+
+Go to the directory of the OpenWhisk utilities and run the following command:
+
+```
+scancode/scanCode.py --config scancode/ASF-Release.cfg <Path of incubator-openwhisk-0.9.0-incubating>
+```
+
+All the checks have passed for Apache license header, if you receive the result as below:
+
+```
+Reading configuration file [scancode/ASF-Release.cfg]...
+Scanning files starting at [/Users/vincent/workspace/openwhisk]...
+All checks passed.
+```
+
+# Building OpenWhisk
+
+The following instructions walk you through the steps to build OpenWhisk 0.9.0 for the supported operation systems which are Ubuntu and Mac OS.
+
+## Prerequisites
+
+We recommend you set the environment variable `$OPENWHISK_HOME` on your local machine to the extracted directory `incubator-openwhisk-0.9.0-incubating`.
+It is an _error_ to set `$OPENWHISK_HOME` to an invalid or incorrect path (including an empty string). If you do not wish to use the environment variable, make sure it is not defined in your environment at all. The rest of the instructions assume you have defined this environment variable.
+
+### Ubuntu users
+
+If you are a Ubuntu user, our suggested version is between 14.04 and 16.04. Open a terminal, go to the directory of `"incubator-openwhisk-0.9.0-incubating"`, and run the script `"all.sh"` under `tools/ubuntu-setup`:
+
+```
+cd $OPENWHISK_HOME
+./tools/ubuntu-setup/all.sh
+```
+
+Then, you need to add the permission for the current Ubuntu user in Docker:
+
+```
+sudo usermod -a -G docker $USER
+```
+
+Install Gradle 4.8.1 or the latest version with the following commands:
+
+```
+sudo add-apt-repository ppa:cwchien/gradle
+sudo apt-get update
+sudo apt-get install gradle
+```
+
+### Mac users
+
+If you are a Mac user, please run the following script:
+
+```
+echo '
+# install homebrew
+/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+# install cask
+brew tap caskroom/cask
+# install for finding alternative versions (java8)
+brew tap caskroom/versions
+# install java 8
+brew cask install java8
+# install scala
+brew install scala
+# install pip
+sudo easy_install pip
+# install script prerequisites
+sudo -H pip install docker==2.2.1 ansible==2.5.2 jinja2==2.9.6 couchdb==1.1 httplib2==0.9.2 requests==2.10.0' | bash
+```
+
+Then, activate docker0 network with the following command:
+
+```
+sudo ifconfig lo0 alias 172.17.0.1/24
+```
+
+Install Gradle 4.8.1 or the latest version with the following commands:
+
+```
+brew install gradle
+```
+
+After running the script above, you should have all you need to install OpenWhisk. Normally there should be no error, but it
+some error messages pop-up, please [log an issue](https://github.com/apache/incubator-openwhisk/issues) for the OpenWhisk community to assist you.
+We suggest you restart your local machine to make sure all the packages have been well configured.
+
+
+## Build the source code
+
+Open the terminal, and go to the directory $OPENWHISK_HOME. Install the Gradle wrapper with the command:
+
+```
+gradle wrapper
+```
+
+Some files regarding gradle wrapper will be updated or generated with this command, so we recommend you to verify the source code based on Apache
+policies before running it. After this wrapper generation, run the following gradlew command to build the source code:
+
+```
+./gradlew distDocker
+```
+
+Once the build is complete, you will have Docker images necessary to run OpenWhisk. If your build fails,
+first make sure `docker` is running correctly by verifying with the command `docker images`. If you continue
+to encounter build problems, please seek help by opening [an issue](https://github.com/apache/incubator-openwhisk/issues) for the OpenWhisk community to assist you.
+
+
+## Deploy OpenWhisk
+
+Make sure you are in the `$OPENWHISK_HOME/ansible` directory, and run the following ansible
+scripts one after the other. If any of these commands fail, the rest of the deployment will
+not work correctly and you should [seek help](https://github.com/apache/incubator-openwhisk/issues).
+
+```
+ansible-playbook -i environments/local setup.yml
+ansible-playbook -i environments/local couchdb.yml
+ansible-playbook -i environments/local initdb.yml
+ansible-playbook -i environments/local wipe.yml
+ansible-playbook -i environments/local openwhisk.yml
+ansible-playbook -i environments/local postdeploy.yml
+ansible-playbook -i environments/local apigateway.yml
+```
+
+### Troubleshooting
+
+There are several know issues you may encounter:
+
+- The API gateway packages may not install correctly on some systems. You can try to recover, and then proceed with the rest of the playbooks by running `ansible-playbook -i environments/local routemgmt.yml`. See [this issue](https://github.com/apache/incubator-openwhisk/issues/3804) for more details. If you are not interested in the API gateway, you can ignore this error (and also skip the last playbook).
+
+- If the playbook fail, sometimes tearing down the (partially) deployed system and retrying is sufficient to recover. To clean your local environment, run the following commands:
+  ```
+  ansible-playbook -i environments/local apigateway.yml -e mode=clean
+  ansible-playbook -i environments/local openwhisk.yml -e mode=clean
+  ansible-playbook -i environments/local couchdb.yml -e mode=clean
+  ```
+  Then, run the ansible playbooks again to see if there are still failures. If you still fail to deploy OpenWhisk,
+please [log an issue](https://github.com/apache/incubator-openwhisk/issues) for the OpenWhisk community to assist you.
+
+- Since this release does not ship the code for test cases, any error regarding test cases can be ignored.
+
+## Run OpenWhisk
+
+Make sure you are in the `$OPENWHISK_HOME` directory. The easiest way to try out OpenWhisk is to use OpenWhisk CLI. Please find the configuration [steps here](https://github.com/apache/incubator-openwhisk/blob/master/docs/cli.md). Briefly, you can configure the CLI with the following command once you have deployed OpenWhisk locally:
+
+```
+bin/wsk property set --apihost 172.17.0.1 --auth $(cat ${OPENWHISK_HOME}/ansible/files/auth.guest)
+```
+
+Run the following command to invoke a built in "echo" action that returns the received input parameters as its result:
+
+```
+bin/wsk -i action invoke /whisk.system/utils/echo --param message hello --result
+```
+
+Output:
+
+```json
+{
+  "message": "hello"
+}
+```
+
+If you can get the above message, you have successfully deployed OpenWhisk on your local machine. You can learn more about the basics of working with OpenWhisk actions using this [tutorial](https://github.com/apache/incubator-openwhisk/blob/master/docs/actions.md#the-basics).
+
+For more comprehensive information about OpenWhisk, please visit the [OpenWhisk website](https://openwhisk.apache.org/) or the
+[OpenWhisk repository](https://github.com/apache/incubator-openwhisk/blob/master/README.md) on GitHub.

Added: release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-0.9.0-incubating-sources.tar.gz
==============================================================================
Binary file - no diff available.

Propchange: release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-0.9.0-incubating-sources.tar.gz
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-0.9.0-incubating-sources.tar.gz.asc
==============================================================================
--- release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-0.9.0-incubating-sources.tar.gz.asc (added)
+++ release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-0.9.0-incubating-sources.tar.gz.asc Tue Jul 17 20:11:29 2018
@@ -0,0 +1,17 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1
+
+iQIcBAABAgAGBQJbPoIZAAoJEHKvDMIsTPMg190P/j7UDkxcyakfOw1TZzCJgW1V
+jyDwviA6y3OVE/GxdQvVk5LyHvMgwQwNKubAwNU+7mGDnEid072PnWGdZYsoneMM
+KO5O5wGu6/w9NkmMuwwt5kA0nGzxCy/InktESZc0doI95P3LM1T0TQ1ekyP604h/
+MkZvHdc1NM87x5SIONhLfFAY/yz1PSI7iKiJjqaMD9Aw/d1iosenns0+GyA5T6Ec
+h5Xv8QyR0aalpevDiwzdohOA+PZCqiQavlpEUVAVgRTa+REOZEXu9aSOb6yI9roZ
+r08qG27HwGaOTd+Tc9PJeO22XOYKlSvJfLAIu+5A9omNn9tChAsAfg8foG8u0ZVv
+goji/g7V0lXzzlf8R1QDBAo02qeyRDiVUtL2bTO4Tdjnps5Qxdgf3xZ8iXb56Vu6
+AGT3IX/k+UGuVrQF2xb3luwe0v19JvZtkwkOwXSzbRPTd1fWlPWHzUjfAsuwpI5h
+kmSskxNA/2DNZ8y8rPQdzjjT+5P314ctjggahT9VpehYHiUMVKmwrckRluJeBU2a
+37hN7EAT/KcF5TbBZhJGg+9kt2hB0t2jz/hgazGnO4CkfzfkrxVm/ch0NdGp3b6M
+DUxCFCRDOmw7qskN0XwwJVeycdypCF8dCJIMsGyya64w1JYqIUjuW5xZ6M6ChhbN
+3/3tnTj5i1VZOBizSIpk
+=bKeF
+-----END PGP SIGNATURE-----

Added: release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-0.9.0-incubating-sources.tar.gz.sha512
==============================================================================
--- release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-0.9.0-incubating-sources.tar.gz.sha512 (added)
+++ release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-0.9.0-incubating-sources.tar.gz.sha512 Tue Jul 17 20:11:29 2018
@@ -0,0 +1,3 @@
+openwhisk-0.9.0-incubating-sources.tar.gz: 
+41D95F94 2BFFA939 09F78583 1DCB11C6 FAC018FA C9C6FD47 F541BF8E E274D2CC 36068B85
+ 9F9B2B99 50EC8336 1B9ADE0B 0ED9528E 6FEBE0F5 9E1F57B2 41D9DC1B