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/01/25 18:50:36 UTC

[GitHub] houshengbo commented on a change in pull request #3216: Download Nginx Tarball from OpenWhisk CLI release, rather than constructing file-by-file

houshengbo 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_r163934054
 
 

 ##########
 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:
   It is a good idea to download all at once to reduce network connections.
   However, there is one remark I want to make: we should give the users the options to choose which type of architectures and operating system. By default, we can set to ALL, and download all the binaries in side one zip. Users should also be able to select the specified binaries, based on the configurations.
   In summary, I support to add this PR in terms of downloading all the binaries in one zip, but also keep the old mechanism to download them one by one. Add some configuration option to decide ALL or some binaries.

----------------------------------------------------------------
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