You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by du...@apache.org on 2018/03/21 20:57:12 UTC
[incubator-openwhisk] branch master updated: CLI docs update and
markdown linting. (#3435)
This is an automated email from the ASF dual-hosted git repository.
dubeejw 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 dfd20d8 CLI docs update and markdown linting. (#3435)
dfd20d8 is described below
commit dfd20d84329f18b5fde03d21bbe07b4e8c00f6ec
Author: Jonathan Springer <jo...@gmail.com>
AuthorDate: Wed Mar 21 13:57:09 2018 -0700
CLI docs update and markdown linting. (#3435)
* CLI docs update and markdown linting.
* Added a link to additional CLI docs
---
ansible/README.md | 48 ++++++++++++++++++++++++++++++++++--------------
1 file changed, 34 insertions(+), 14 deletions(-)
diff --git a/ansible/README.md b/ansible/README.md
index 7152772..894bee1 100644
--- a/ansible/README.md
+++ b/ansible/README.md
@@ -15,7 +15,7 @@ sudo pip install jinja2==2.9.6
#### Vagrant users
Nothing to be done, Ansible is already installed during vagrant provisioning.
-You can skip setup and prereq steps as those have been done by vagrant for you.
+You can skip setup and prereq steps as those have been done by vagrant for you.
You may jump directly to [Deploying Using CouchDB](#deploying-using-couchdb)
#### Docker for Mac users
@@ -119,7 +119,7 @@ ansible-playbook -i environments/<environment> prereq.yml
**Hint:** During playbook execution the `TASK [prereq : check for pip]` can show as failed. This is normal if no pip is installed. The playbook will then move on and install pip on the target machines.
### Deploying Using CouchDB
-- Make sure your `db_local.ini` file is [setup for](#setup) CouchDB then execute:
+- Make sure your `db_local.ini` file is [setup for](#setup) CouchDB then execute:
```
cd <openwhisk_home>
@@ -147,8 +147,8 @@ So if you want to deploy multiple CouchDB nodes, all nodes should be placed on d
### Deploying Using Cloudant
-- Make sure your `db_local.ini` file is set up for Cloudant. See [Setup](#setup)
-- Then execute
+- Make sure your `db_local.ini` file is set up for Cloudant. See [Setup](#setup)
+- Then execute
```
cd <openwhisk_home>
@@ -172,24 +172,44 @@ Use `ansible-playbook -i environments/<environment> openwhisk.yml` to avoid wipi
### Configuring the installation of `wsk` CLI
There are two installation modes to install `wsk` CLI: remote and local.
-The mode "remote" means to download the `wsk` binaries from available web links. By default, OpenWhisk sets
-the installation mode to remote and downloads the binaries from the CLI [release page](https://github.com/apache/incubator-openwhisk-cli/releases), where OpenWhisk publishes the official `wsk` binaries.
+The mode "remote" means to download the `wsk` binaries from available web links.
+By default, OpenWhisk sets the installation mode to remote and downloads the
+binaries from the CLI
+[release page](https://github.com/apache/incubator-openwhisk-cli/releases),
+where OpenWhisk publishes the official `wsk` binaries.
-The mode "local" means to build and install the `wsk` binaries from local CLI project. You can download the source code
-of OpenWhisk CLI via [this link](https://github.com/apache/incubator-openwhisk-cli). Let's assume your OpenWhisk CLI home directory is <openwhisk_cli_home>. After you download the source code, use the gradle command to build the binaries:
+The mode "local" means to build and install the `wsk` binaries from local CLI
+project. You can download the source code of OpenWhisk CLI
+[here](https://github.com/apache/incubator-openwhisk-cli).
+Let's assume your OpenWhisk CLI home directory is
+`$OPENWHISK_HOME/../incubator-openwhisk-cli` and you've already `export`ed
+`OPENWHISK_HOME` to be the root directory of this project. After you download
+the CLI repository, use the gradle command to build the binaries (you can omit
+the `-PnativeBuild` if you want to cross-compile for all supported platforms):
```
-cd <openwhisk_cli_home>
-./gradlew buildBinaries
+cd "$OPENWHISK_HOME/../incubator-openwhisk-cli"
+./gradlew release -PnativeBuild
```
-All the binaries are generated and put under the folder of <openwhisk_cli_home>/bin. Then, use the following ansible command to configure the CLI installation mode:
+The binaries are generated and put into a tarball in the folder
+`../incubator-openwhisk-cli/release`. Then, use the following ansible command
+to (re-)configure the CLI installation:
```
-ansible-playbook -i environments/<environment> openwhisk.yml -e cli_installation_mode=local -e openwhisk_cli_home=<openwhisk_cli_home>
+export OPENWHISK_ENVIRONMENT=local # ... or whatever
+ansible-playbook -i environments/$OPENWHISK_ENVIRONMENT edge.yml -e mode=clean
+ansible-playbook -i environments/$OPENWHISK_ENVIRONMENT edge.yml \
+ -e cli_installation_mode=local \
+ -e openwhisk_cli_home="$OPENWHISK_HOME/../incubator-openwhisk-cli"
```
-The parameter cli_installation_mode specifies the CLI installation mode and the parameter openwhisk_cli_home specifies the home directory of your local OpenWhisk CLI.
+The parameter `cli_installation_mode` specifies the CLI installation mode and
+the parameter `openwhisk_cli_home` specifies the home directory of your local
+OpenWhisk CLI. (_n.b._ `openwhisk_cli_home` defaults to
+`$OPENWHISK_HOME/../incubator-openwhisk-cli`.)
+
+Once the CLI is installed, you can [use it to work with Whisk](../docs/cli.md).
### Hot-swapping a Single Component
The playbook structure allows you to clean, deploy or re-deploy a single component as well as the entire OpenWhisk stack. Let's assume you have deployed the entire stack using the `openwhisk.yml` playbook. You then make a change to a single component, for example the invoker. You will probably want a new tag on the invoker image so you first build it using:
@@ -289,7 +309,7 @@ If you need Python to find the installed site-packages:
mkdir -p ~/Library/Python/2.7/lib/python/site-packages
echo '/usr/local/lib/python2.7/site-packages' > ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth
```
-
+
Just run the two commands to fix this issue.
#### Spaces in Paths
--
To stop receiving notification emails like this one, please contact
dubeejw@apache.org.