You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by cs...@apache.org on 2017/11/16 20:12:37 UTC
[incubator-openwhisk] branch master updated: Switch to use the
remote mode to install the binaries (#2969)
This is an automated email from the ASF dual-hosted git repository.
csantanapr 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 5fef9ac Switch to use the remote mode to install the binaries (#2969)
5fef9ac is described below
commit 5fef9ac41be1b360c211f00680c965a06e229adc
Author: Vincent <sh...@us.ibm.com>
AuthorDate: Thu Nov 16 15:12:34 2017 -0500
Switch to use the remote mode to install the binaries (#2969)
---
ansible/group_vars/all | 12 +++++-------
ansible/roles/cli/tasks/cli_remote_mode.yml | 7 +++++++
ansible/roles/cli/tasks/copy_local_openwhisk_cli.yml | 7 +++++++
ansible/roles/cli/tasks/download_openwhisk_cli.yml | 2 ++
4 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/ansible/group_vars/all b/ansible/group_vars/all
index c6ad149..d25b84e 100644
--- a/ansible/group_vars/all
+++ b/ansible/group_vars/all
@@ -304,15 +304,13 @@ openwhisk_cli_tag: "{{ lookup('ini', 'git_tag section=openwhisk-cli file={{ open
#
openwhisk_cli:
- installation_mode: local
+ installation_mode: "{{ cli_installation_mode | default('local') }}"
local:
location: "{{ openwhisk_cli_home }}/bin"
-
-# If you would like to use the remote mode, you can uncomment the following section.
-# remote:
-# name: OpenWhisk_CLI
-# dest_name: OpenWhisk_CLI
-# location: "https://github.com/apache/incubator-openwhisk-cli/releases/download/{{ openwhisk_cli_tag }}"
+ remote:
+ name: OpenWhisk_CLI
+ dest_name: OpenWhisk_CLI
+ location: "https://github.com/apache/incubator-openwhisk-cli/releases/download/{{ openwhisk_cli_tag }}"
# The list of operating systems for which openwhisk cli binaries are downloaded,
# if the installation_mode is remote.
diff --git a/ansible/roles/cli/tasks/cli_remote_mode.yml b/ansible/roles/cli/tasks/cli_remote_mode.yml
index 3c3eb57..063ac51 100644
--- a/ansible/roles/cli/tasks/cli_remote_mode.yml
+++ b/ansible/roles/cli/tasks/cli_remote_mode.yml
@@ -11,6 +11,13 @@
- name: "generate content.json locally for Nginx CLI directory"
local_action: shell "./createContentJson.sh" "{{ config_root_dir }}" "{{ openwhisk_cli_tag }}" "{{ cli_os | join(" ") }}" "{{ openwhisk_cli.remote.dest_name }}" chdir="{{ openwhisk_home }}/ansible/roles/cli/files"
+- name: "ensure Nginx cli directory is writable"
+ file:
+ path: "{{ cli.nginxdir }}"
+ state: directory
+ mode: 0777
+ become: "{{ cli.dir.become }}"
+
- name: "copy the local content.json to the remote node"
copy: src={{ config_root_dir }}/content.json dest={{ cli.nginxdir }}/
diff --git a/ansible/roles/cli/tasks/copy_local_openwhisk_cli.yml b/ansible/roles/cli/tasks/copy_local_openwhisk_cli.yml
index 3839ddf..50bce81 100644
--- a/ansible/roles/cli/tasks/copy_local_openwhisk_cli.yml
+++ b/ansible/roles/cli/tasks/copy_local_openwhisk_cli.yml
@@ -5,6 +5,13 @@
- local_action: stat path={{ openwhisk_cli.local.location }}/{{ item }}
register: binary_path
+- name: "ensure Nginx cli directory is writable"
+ file:
+ path: "{{ cli.nginxdir }}"
+ state: directory
+ mode: 0777
+ become: "{{ cli.dir.become }}"
+
- name: "copy the local binaries from a local directory to Nginx directory"
copy: src={{ openwhisk_cli.local.location }}/{{ item }} dest={{ cli.nginxdir }}/
when: binary_path.stat.exists
diff --git a/ansible/roles/cli/tasks/download_openwhisk_cli.yml b/ansible/roles/cli/tasks/download_openwhisk_cli.yml
index 7ff8852..7ea209b 100644
--- a/ansible/roles/cli/tasks/download_openwhisk_cli.yml
+++ b/ansible/roles/cli/tasks/download_openwhisk_cli.yml
@@ -48,6 +48,8 @@
file:
path: "{{ cli.nginxdir }}/{{ os }}/{{ arc }}"
state: directory
+ mode: 0777
+ become: "{{ cli.dir.become }}"
- name: "download cli ({{ os }}) {{ arc }} to Nginx directory"
get_url:
--
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].