You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by mr...@apache.org on 2017/06/09 15:57:03 UTC

[incubator-openwhisk] branch master updated: updating distributed readme (#2320)

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 c819b13  updating distributed readme (#2320)
c819b13 is described below

commit c819b1344689dab49038daec36d50ec255578c33
Author: Kalonji Bankole <kk...@us.ibm.com>
AuthorDate: Fri Jun 9 08:56:59 2017 -0700

    updating distributed readme (#2320)
---
 ansible/README_DISTRIBUTED.md                      | 49 +++-------------------
 .../distributed/files/openstack/README_OS.md       | 23 ++++++++++
 .../distributed/files/openstack/openstack.env      | 20 +++++++++
 3 files changed, 49 insertions(+), 43 deletions(-)

diff --git a/ansible/README_DISTRIBUTED.md b/ansible/README_DISTRIBUTED.md
index 447f565..16cd57a 100644
--- a/ansible/README_DISTRIBUTED.md
+++ b/ansible/README_DISTRIBUTED.md
@@ -8,43 +8,13 @@ By default, if you omit the `-i` parameter in Ansible commands, the `local` envi
 
 In all instructions, replace `<openwhisk_home>` with the base directory of your OpenWhisk source tree. e.g., `openwhisk`.
 
-Login to your bootstrapper VM. Your local machine can act as the bootstrapping machine as well, if it can connect to the VMs deployed in your IaaS (Infrastructure as a Service platform).
 
-#### Distributed Deployment using OpenStack as IaaS
-
-This installs modules and packages to manage cloud instances via Ansible.
-
-```
-sudo apt-get -y install python-setuptools python-dev libssl-dev build-essential libssl-dev libffi-dev python-dev python-novaclient
-sudo pip install shade pytz positional appdirs monotonic rfc3986 pyparsing stevedore debtcollector netaddr oslo.config futures warlock six
-```
-If you would like the environment instances and hosts file to be generated and managed by Ansible, set values for the following keys using environment variables. Some of these values can be pulled from the Openstack UI (`https://${openstack_dashboard_url}/project/access_and_security/`) as an [RC](http://docs.openstack.org/user-guide/common/cli-set-environment-variables-using-openstack-rc.html) file.
-
-Please note that OS_WSK_DB_VOLUME is optional. If not specified, local disk will be used instead of persistent disk for CouchDB.
-
-```
-export OS_FLAVOR=m1.medium
-export OS_IMAGE=Ubuntu14.04-1Nic
-export OS_KEY_NAME=key_name
-export OS_NET_NAME=network_name
-export OS_NET_ID=e489dcf2-4601-4809-a459-e3821a95d23a
-export OS_USERNAME=abcxyz
-export OS_PASSWORD=*******
-export OS_PROJECT_NAME=OpenWhisk
-export OS_SECURITY_GROUPS=sec_group
-export OS_WSK_DB_VOLUME=15
+#### Setup and provision OpenWhisk component VMs
+A set of Ubuntu 14.04 machines will need to be provisioned in the targeted IaaS (Infrastructure as a Service platform). These VMs will need to provisioned manually in most IaaS providers, but we have added some scripts to automate VM/disk provisioning against Openstack CPIs. These scripts are not being actively maintained at the moment, but PRs to enhance the scripts and add support for other IaaS offerings (AWS, GCE, etc) are certainly encouraged. Once the VMs are up and reachable by th [...]
 
-## Keystone v2
-export OS_AUTH_URL=https://OpenStack_URL:5000/v2.0
-export OS_TENANT_NAME="OpenWhisk"
-export OS_TENANT_ID=a9e6a61ab914455cb4329592d5733325
+If using Openstack, please follow the README at [environments/distributed/files/openstack/README_OS.md](environments/distributed/files/openstack/README_OS.md) to manage the required VMs. Otherwise, provision each VM manually.
 
-## Keystone v3
-export OS_AUTH_URL=https://OpenStack_URL:5000/v3
-export OS_PROJECT_ID=a9e6a61ab914455cb4329592d5733325
-export OS_USER_DOMAIN_NAME="domain"
-```
-#### Setup and provision OpenWhisk component VMs
+Login to your bootstrapper VM. Your local machine can act as the bootstrapping machine as well, as long as it can connect to the VMs deployed in your IaaS.
 
 Add the remote_user and private_key_file values to the defaults section of the `ansible.cfg` file. The remote_user value sets the default ssh user. The private_key_file is required when using a private key that is not in the default `~/.ssh` folder.
 
@@ -54,13 +24,6 @@ remote_user = ubuntu
 private_key_file=/path/to/file.pem
 ```
 
-By default, 2 invokers are created. To adjust this value, simply change the num_instances value in the [environments/distributed/group_vars/all](environments/distributed/group_vars/all:67) file.
-
-- Run the following playbook to boot instances and generate the respective hosts file.
-```
-ansible-playbook -i environments/distributed provision_env_dist.yml
-```
-
 Ensure that the Ansible VM can authenticate to the OpenWhisk VMs via SSH using the following command.
 
 ```
@@ -87,7 +50,7 @@ Deploy registry.
 ansible-playbook -i environments/distributed registry.yml
 ```
 
-Build and distribute OpenWhisk docker images. Must be executed with root privileges.
+Build and distribute OpenWhisk docker images. Must be executed with root privileges. The IP for the registry VM can be found in the [hosts](environments/distributed/hosts) file.
 
 ```
 cd ..
@@ -110,5 +73,5 @@ Setup your CLI and verify that OpenWhisk is working.
 
 ```
 ../bin/wsk property set --auth $(cat files/auth.whisk.system) --apihost <edge_url>
-../bin/wsk -i -v action invoke /whisk.system/samples/helloWorld --result
+../bin/wsk -i -v action invoke /whisk.system/samples/helloWorld --blocking --result
 ```
diff --git a/ansible/environments/distributed/files/openstack/README_OS.md b/ansible/environments/distributed/files/openstack/README_OS.md
new file mode 100644
index 0000000..98fba8a
--- /dev/null
+++ b/ansible/environments/distributed/files/openstack/README_OS.md
@@ -0,0 +1,23 @@
+#### Distributed Deployment using OpenStack as IaaS
+
+To communicate with the Openstack APIs, the bootstapper will need a few additional dependencies to be installed.
+
+Install prerequisites
+```
+sudo apt-get -y install python-setuptools python-dev libssl-dev build-essential libssl-dev libffi-dev python-dev python-novaclient
+sudo pip install shade pytz positional appdirs monotonic rfc3986 pyparsing stevedore debtcollector netaddr oslo.config futures warlock six
+```
+
+Populate the [OpenStack .env file](openstack.env) with valid credentials/endpoint. Please note that OS_WSK_DB_VOLUME is optional. If not specified, local disk will be used instead of persistent disk for CouchDB.
+
+By default, 2 invokers are created. To adjust this value, simply change the num_instances value in the [environments/distributed/group_vars/all](environments/distributed/group_vars/all:67) file.
+
+Once the group_vars and .env files have been populated, run the following playbook to boot instances and generate the respective hosts file.
+```
+ansible-playbook -i environments/distributed provision_env_dist.yml
+```
+
+Ensure the VMs are up and that the bootstrapper can reach them
+```
+ansible all -i environments/distributed -m ping
+```
diff --git a/ansible/environments/distributed/files/openstack/openstack.env b/ansible/environments/distributed/files/openstack/openstack.env
new file mode 100644
index 0000000..0b3637e
--- /dev/null
+++ b/ansible/environments/distributed/files/openstack/openstack.env
@@ -0,0 +1,20 @@
+export OS_FLAVOR=m1.medium
+export OS_IMAGE=Ubuntu14.04-1Nic
+export OS_KEY_NAME=key_name
+export OS_NET_NAME=network_name
+export OS_NET_ID=e489dcf2-4601-4809-a459-e3821a95d23a
+export OS_USERNAME=abcxyz
+export OS_PASSWORD=*******
+export OS_PROJECT_NAME=OpenWhisk
+export OS_SECURITY_GROUPS=sec_group
+export OS_WSK_DB_VOLUME=15
+
+## Keystone v2
+export OS_AUTH_URL=https://OpenStack_URL:5000/v2.0
+export OS_TENANT_NAME="OpenWhisk"
+export OS_TENANT_ID=a9e6a61ab914455cb4329592d5733325
+
+## Keystone v3
+export OS_AUTH_URL=https://OpenStack_URL:5000/v3
+export OS_PROJECT_ID=a9e6a61ab914455cb4329592d5733325
+export OS_USER_DOMAIN_NAME="domain"

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].