You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ra...@apache.org on 2017/05/31 17:55:18 UTC
[incubator-openwhisk] branch master updated: Distributed deployment
improvements (#2227)
This is an automated email from the ASF dual-hosted git repository.
rabbah 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 f228784 Distributed deployment improvements (#2227)
f228784 is described below
commit f228784fefd100963df317e55bfc57824d367ae7
Author: digmore <di...@users.noreply.github.com>
AuthorDate: Thu Jun 1 05:55:16 2017 +1200
Distributed deployment improvements (#2227)
* Add apigateway group to the ansible distributed deployment
The apigateway role of the Ansible deployment expects an apigateway
group to be present in the inventory. The default Openstack deployment
does not provision a dedicated instance for this though. This change
configures the apigateway group to target the edge instance by default.
This will also hopefully act as a hint for those skipping the Openstack
provisioning step.
* Restrict system reboots to only occur if there was a kernel package change
Currently the whiskhost role will reboot Openwhisk instances whenever it is
applied. This modification will restrict reboots to situations where the apt
module actually reports a package change.
This is particularly necessary when the bootstrapper instance itself is in
the inventory for the deployment. Previously this situation would result in
the playbook always terminating prematurely. Now the playbook may be run
again to continue where it left off.
* Improve default docker user guess when docker.user is not explicitly defined
Previously the docker Ansible role from the deployment would default
docker group membership to the contents of ansible_user. This variable
is no longer being populated when following the distributed deployment
instructions. This change attempts to improve the default selection.
Ansible issues 13982, 14195 and 16072 demonstrate that making a better
selection is not straight forward. This modification changes the
default to ansible_user_id. The rationale for this is that root
does not strictly need to be a member of the docker group, and if
another user is in play then it was more likely the account used as
an initial entry point to the host than the result of become in the
playbook.
* Remove unused template from ansible distributed inventory
There is a template within the ansible distributed deployment
inventory that is not used but is causing ansible inventory
generation to report errors. This change removes the unnecessary
file and the resulting empty templates directory.
---
ansible/environments/distributed/hosts | 2 ++
ansible/environments/distributed/templates/hosts.j2 | 13 -------------
ansible/roles/docker/tasks/deploy.yml | 2 +-
ansible/roles/whiskhost/tasks/patchKernel.yml | 2 ++
4 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/ansible/environments/distributed/hosts b/ansible/environments/distributed/hosts
index eaeafab..23d4cea 100755
--- a/ansible/environments/distributed/hosts
+++ b/ansible/environments/distributed/hosts
@@ -8,6 +8,8 @@ ansible ansible_connection=local
10.3.2.153
[edge]
10.3.2.154
+[apigateway:children]
+edge
[controllers]
10.3.2.155
[kafka]
diff --git a/ansible/environments/distributed/templates/hosts.j2 b/ansible/environments/distributed/templates/hosts.j2
deleted file mode 100644
index 0d8e4ac..0000000
--- a/ansible/environments/distributed/templates/hosts.j2
+++ /dev/null
@@ -1,13 +0,0 @@
-; the first parameter in a host is the inventory_hostname which has to be
-; either an ip
-; or a resolvable hostname
-
-; used for local actions only
-ansible ansible_connection=local
-
-{% for group in group_names%}
-[{{group}}]
-{% for host in groups[group] %}
-{{ hostvars[host]["ansible_lo"]["ipv4"]["address"] }}
-{% endfor %}
-{% endfor %}
diff --git a/ansible/roles/docker/tasks/deploy.yml b/ansible/roles/docker/tasks/deploy.yml
index b215780..62252d9 100644
--- a/ansible/roles/docker/tasks/deploy.yml
+++ b/ansible/roles/docker/tasks/deploy.yml
@@ -23,7 +23,7 @@
- name: add user to docker group
user:
- name: "{{docker.user|default(ansible_user)}}"
+ name: "{{docker.user|default(ansible_user_id)}}"
groups: docker
append: true
become: true
diff --git a/ansible/roles/whiskhost/tasks/patchKernel.yml b/ansible/roles/whiskhost/tasks/patchKernel.yml
index 1dcbf80..b345e60 100644
--- a/ansible/roles/whiskhost/tasks/patchKernel.yml
+++ b/ansible/roles/whiskhost/tasks/patchKernel.yml
@@ -24,9 +24,11 @@
state: present
force: yes
become: true
+ register: patchKernel_apt
- name: restart host to load new kernel
shell: shutdown -r now
+ when: patchKernel_apt.changed
ignore_errors: true
become: true
--
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].