jonpspri commented on a change in pull request #3216: Download Nginx Tarball 
from OpenWhisk CLI release, rather than constructing file-by-file
URL: 
https://github.com/apache/incubator-openwhisk/pull/3216#discussion_r166058016
 
 

 ##########
 File path: ansible/roles/cli/tasks/deploy.yml
 ##########
 @@ -1,29 +1,81 @@
 ---
 # Tasks for handling CLI customization and publishing
+#
+# Note:  The configuration directory is actually located on the local machine;
+#        this script is run under the local host, usually 172.17.0.1 (docker 
local)
 
-- name: "ensure nginx directory for cli exists"
+- name: "Ensure nginx directory for cli exists"
   file:
-    path: "{{ cli.nginxdir  }}"
+    path: "{{ openwhisk_cli.nginxdir.name }}"
     state: directory
-  become: "{{ cli.dir.become }}"
+  become: "{{ openwhisk_cli.nginxdir.become }}"
 
-- set_fact:
-    cli_installation_mode="{{ openwhisk_cli.installation_mode }}"
+- name: "Ensure OpenWhisk build directory exists (for temp archive work)"
+  file:
+    path: "{{ openwhisk_build_dir }}/{{ openwhisk_cli.archive_name }}"
+    state: directory
+
+#
+#  Why are we unarchiving into the build directory instead of directly into
+#  the Nginx config directory?  Because the Nginx config directory is (by
+#  default) located in the /tmp/... directory tree, which has a sticky bit
+#  set.  Said sticky bit creates no end of troubles for tar, so we're going
+#  to just avoid it entirely, rather than muck about with who's got which tar
+#  with which right tar options installed where.  It makes for many more
+#  items in this ansible playbook than we'd hoped, but at least it's (fairly)
+#  straightforward.
+#
+- name: "Download release archive to build directory ..."
+  get_url:
+    url: "{{ openwhisk_cli.remote.location }}/{{ 
openwhisk_cli.archive_name}}-{{ openwhisk_cli_tag }}-all.tgz"
 
 Review comment:
   Why?  We'd be adding significant complexity to what is already a complex 
local build:
   
   1.  Adjustment/re-generation of content.json
   2.  Specification and parsing of local build architecture(s)
   3.  Potentially not having the binary that's needed for the remainder of 
setup
   
   For what benefit?  Saving a few megabytes of disk space and trimming a 
directory structure that is unseen.  Users running the CLI still have the 
option of downloading the appropriate architecture from the nginx server that's 
running.  So I suppose my core question is "who are 'users' in the conversation 
above"?
   
   I'll do the change if it's what's needed to get this off my plate, but the 
whole rationale was to avoid complicating the build and to avoid having a 
circular dependency where the list of architectures was to be kept in the 
`incubator-openwhisk` repository.  If we're doing individual downloads, I'd 
abandon the archive download regardless of network connections.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to