You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/03/21 20:57:11 UTC

[GitHub] dubee closed pull request #3435: CLI docs update and markdown linting.

dubee closed pull request #3435: CLI docs update and markdown linting.
URL: https://github.com/apache/incubator-openwhisk/pull/3435
 
 
   

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/ansible/README.md b/ansible/README.md
index 7152772136..894bee1ed1 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


 

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


With regards,
Apache Git Services