openwhisk-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] kpavel commented on a change in pull request #4216: Proposing Lean OpenWhisk
Date Mon, 04 Feb 2019 15:35:30 GMT
kpavel commented on a change in pull request #4216: Proposing Lean OpenWhisk
URL: https://github.com/apache/incubator-openwhisk/pull/4216#discussion_r253517150
 
 

 ##########
 File path: ansible/roles/controller/tasks/lean.yml
 ##########
 @@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+---
+# This plugin will  provide controller with Lean Controller parameters
+
+- name: set inventory_hostname to invoker and save controllers data that can be changed by
invoker task
+  set_fact:
+    controller_env: "{{ env }}"
+    controller_ports: "{{ ports_to_expose }}"
+    inventory_hostname: "invoker0"
+    invoker_index_base: 0
+    name_prefix: "invoker"
+    host_group: "{{ groups['invokers'] }}"
+
+- name: include invoker data
+  include_tasks: "../invoker/tasks/deploy.yml"
+
+- name: filter invoker ports
+  set_fact:
+    invoker_ports_to_expose: "{{ ports_to_expose | reject('search','8080') | reject('search','jmx_remote_port')
| reject('search','jmx_remote_rmi_port') | list }}"
+
+- name: add invoker ports to ports_to_expose
+  set_fact:
+    ports_to_expose: >-
+      {{ controller_ports }} +
+      {{ invoker_ports_to_expose }}
+
+- name: save invoker volumes
+  set_fact:
+    invoker_volumes: "{{ volumes.split(',') | reject('search','/logs') | reject('search','/conf')
| reject('search','/coverage') | list }}"
+
+- name: populate volumes
+  set_fact:
+    controller_volumes: >-
+      {{ invoker_volumes }} +
+      {{ controller_volumes }}
+
+- name: populate environment variables for LEAN controller
+  vars:
+    lean_env:
+      "CONFIG_whisk_spi_MessagingProvider": "org.apache.openwhisk.connector.lean.LeanMessagingProvider"
+      "CONFIG_whisk_spi_LoadBalancerProvider": "org.apache.openwhisk.core.loadBalancer.LeanBalancer"
+  set_fact:
+    env: "{{ env | combine(controller_env) | combine(lean_env) }}"
+
+- name: update controller docker container params
+  vars:
+    lean_controller_params:
+      userns_mode: "host"
+      pid_mode: "host"
+      privileged: "yes"
+  set_fact:
+    controller_container_params: "{{ controller_container_params | combine(lean_controller_params)
}}"
+
+# VIM: let b:syntastic_yaml_yamllint_args="-c '".expand('%:p:h')."../../../yamllint.yml'"
 
 Review comment:
   > I'm seeing this ansible warning also which I don't think I noticed previously. If
it's not specific to this PR then please defer (will try to confirm on my own).
   > 
   > ```
   > TASK [controller : (re)start controller] ********************************************************************************************************************
   > Sunday 03 February 2019  02:32:07 +0000 (0:00:00.105)       0:00:29.646 ******* 
   > [DEPRECATION WARNING]: Using variables for task params is unsafe, especially if the
variables come from an external source like facts. This feature will be 
   > removed in version 2.6. Deprecation warnings can be disabled by setting deprecation_warnings=False
in ansible.cfg.
   > changed: [controller0]
   > ```
   
   Resolved. This was due to specifying docker_container dynamically. Fixed it by changing
approach.

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

Mime
View raw message