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 b2dd4a2 Revert "Mount an optional html directory for serving static
content. (#4252)" (#4257)
b2dd4a2 is described below
commit b2dd4a2ed28e2b1313dff53949b959cc9cbcb19d
Author: Carlos Santana <[email protected]>
AuthorDate: Thu Feb 7 20:30:34 2019 -0500
Revert "Mount an optional html directory for serving static content.
(#4252)" (#4257)
This reverts commit fb40eb621f24fa0165654a9b039aa41a7928f609.
---
ansible/group_vars/all | 1 -
ansible/roles/cli-install/tasks/deploy.yml | 2 +-
ansible/roles/nginx/tasks/deploy.yml | 26 +++-------------------
ansible/roles/nginx/templates/nginx.conf.j2 | 16 +++++--------
.../test/scala/system/rest/GoCLINginxTests.scala | 2 +-
5 files changed, 11 insertions(+), 36 deletions(-)
diff --git a/ansible/group_vars/all b/ansible/group_vars/all
index 27c8408..a806200 100755
--- a/ansible/group_vars/all
+++ b/ansible/group_vars/all
@@ -205,7 +205,6 @@ userLogs:
nginx:
confdir: "{{ config_root_dir }}/nginx"
- htmldir: "{{ ui_path | default(false) }}"
dir:
become: "{{ nginx_dir_become | default(false) }}"
version: "{{ nginx_version | default('1.13') }}"
diff --git a/ansible/roles/cli-install/tasks/deploy.yml
b/ansible/roles/cli-install/tasks/deploy.yml
index b25e7e2..0d6589e 100644
--- a/ansible/roles/cli-install/tasks/deploy.yml
+++ b/ansible/roles/cli-install/tasks/deploy.yml
@@ -5,7 +5,7 @@
- name: grab the local CLI from the binaries unarchived into nginx
get_url:
- url: "https://{{host}}/cli/{{os}}/{{arch}}/{{wsk}}"
+ url: "https://{{host}}/cli/go/download/{{os}}/{{arch}}/{{wsk}}"
dest: "{{ openwhisk_home }}/bin"
mode: "0755"
validate_certs: no
diff --git a/ansible/roles/nginx/tasks/deploy.yml
b/ansible/roles/nginx/tasks/deploy.yml
index 53ee828..705d462 100644
--- a/ansible/roles/nginx/tasks/deploy.yml
+++ b/ansible/roles/nginx/tasks/deploy.yml
@@ -52,28 +52,6 @@
retries: "{{ docker.pull.retries }}"
delay: "{{ docker.pull.delay }}"
-- name: ensure html directory exists
- stat:
- path: "{{ nginx.htmldir }}"
- register: nginx_html_dir_exists
- when: nginx.htmldir
-
-- name: check if html directory exists
- fail:
- msg: html directory does not exist '{{ nginx.htmldir }}'
- when: nginx.htmldir and not (nginx_html_dir_exists.stat.exists and
nginx_html_dir_exists.stat.isdir)
-
-- name: configuration volumes to mount
- set_fact:
- volumes:
- - "{{ whisk_logs_dir }}/nginx:/logs"
- - "{{ nginx.confdir }}:/etc/nginx"
-
-- name: "optional html volume to mount"
- set_fact:
- volumes: "{{ volumes }} + [ '{{ nginx.htmldir }}:/usr/share/nginx/html' ]"
- when: nginx.htmldir
-
- name: (re)start nginx
docker_container:
name: nginx
@@ -82,7 +60,9 @@
recreate: true
restart_policy: "{{ docker.restart.policy }}"
hostname: "nginx"
- volumes: "{{ volumes }}"
+ volumes:
+ - "{{ whisk_logs_dir }}/nginx:/logs"
+ - "{{ nginx.confdir }}:/etc/nginx"
expose:
- 8443
ports:
diff --git a/ansible/roles/nginx/templates/nginx.conf.j2
b/ansible/roles/nginx/templates/nginx.conf.j2
index e6f3b2e..a86593f 100644
--- a/ansible/roles/nginx/templates/nginx.conf.j2
+++ b/ansible/roles/nginx/templates/nginx.conf.j2
@@ -33,8 +33,6 @@ http {
proxy_ssl_certificate_key /etc/nginx/{{ controller.ssl.key }};
{% endif %}
- gzip_static on;
-
upstream controllers {
# fail_timeout: period of time the server will be considered
unavailable
# Mark the controller as unavailable for at least 60 seconds, to not
get any requests during restart.
@@ -117,20 +115,18 @@ http {
location /blackbox.tar.gz {
return 301
https://github.com/apache/incubator-openwhisk-runtime-docker/releases/download/sdk%400.1.0/blackbox-0.1.0.tar.gz;
}
+ # leaving this for a while for clients out there to update to the new
endpoint
+ location /blackbox-0.1.0.tar.gz {
+ return 301 /blackbox.tar.gz;
+ }
location /OpenWhiskIOSStarterApp.zip {
return 301
https://github.com/apache/incubator-openwhisk-client-swift/releases/download/0.3.0/starterapp-0.3.0.zip;
}
- location /cli {
+ location /cli/go/download {
autoindex on;
- alias /etc/nginx/cli/go/download;
+ root /etc/nginx;
}
-
-{% if nginx.htmldir %}
- location /ui {
- alias /usr/share/nginx/html;
- }
-{% endif %}
}
}
diff --git a/tests/src/test/scala/system/rest/GoCLINginxTests.scala
b/tests/src/test/scala/system/rest/GoCLINginxTests.scala
index caf17ed..3621a4d 100644
--- a/tests/src/test/scala/system/rest/GoCLINginxTests.scala
+++ b/tests/src/test/scala/system/rest/GoCLINginxTests.scala
@@ -32,7 +32,7 @@ import DefaultJsonProtocol._
*/
@RunWith(classOf[JUnitRunner])
class GoCLINginxTests extends FlatSpec with Matchers with RestUtil {
- val DownloadLinkGoCli = "cli"
+ val DownloadLinkGoCli = "cli/go/download"
val ServiceURL = getServiceURL()
it should s"respond to all files in root directory" in {