markusthoemmes commented on a change in pull request #3886: Proposing Lean
OpenWhisk
URL:
https://github.com/apache/incubator-openwhisk/pull/3886#discussion_r206267591
##########
File path: ansible/tasks/invoker_lean.yml
##########
@@ -0,0 +1,141 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+---
+
+# Provides invoker data common to Lean controller and invoker (volumes,
environment variables). To avoid duplication eventually should be used in
invoker/tasks/deploy.yml as well
+
+###
+# This task assumes that the images are local to the invoker host already if
there is no prefix or tag
+# which is usually the case for a local deployment. A distributed deployment
will specify the prefix, or tag
+# to pull the images from the appropriate registry. If a runtimes_registry is
optionally specified, pull images
+# from there; this permits a (private) registry to be used for caching the
images. The registry if specified
+# must include a trailing '/'.
+#
+- name: "pull runtime action images per manifest"
+ shell: "docker pull {{runtimes_registry |
default()}}{{item.prefix}}/{{item.name}}:{{item.tag | default()}}"
+ loop: "{{ runtimesManifest.runtimes.values() | sum(start=[]) |
selectattr('deprecated', 'equalto',false) | map(attribute='image') | list |
unique }}"
+ when: skip_pull_runtimes is not defined or skip_pull_runtimes != True
+ register: result
+ until: (result.rc == 0)
+ retries: "{{ docker.pull.retries }}"
+ delay: "{{ docker.pull.delay }}"
+
+###
+# See comment above for pulling other runtime images.
+#
+- name: "pull blackboxes action images per manifest"
+ shell: "docker pull {{runtimes_registry |
default()}}{{item.prefix}}/{{item.name}}:{{item.tag | default()}}"
+ loop: "{{ runtimesManifest.blackboxes }}"
+ when: skip_pull_runtimes is not defined or skip_pull_runtimes != True
+ register: result
+ until: (result.rc == 0)
+ retries: "{{ docker.pull.retries }}"
+ delay: "{{ docker.pull.delay }}"
+
+- name: "determine docker root dir on docker-machine"
+ uri: url="http://{{ ansible_host }}:{{ docker.port }}/info"
return_content=yes
+ register: dockerInfo_output
+ when: environmentInformation.type == 'docker-machine'
+
+- set_fact:
+ dockerInfo: "{{ dockerInfo_output['json'] }}"
+ when: environmentInformation.type == "docker-machine"
+
+- name: "determine docker root dir"
+ shell: echo -e "GET http:/v1.24/info HTTP/1.0\r\n" | nc -U
/var/run/docker.sock | grep "{"
+ args:
+ executable: /bin/bash
+ register: dockerInfo_output
+ when: environmentInformation.type != "docker-machine"
+
+- set_fact:
+ dockerInfo: "{{ dockerInfo_output.stdout|from_json }}"
+ when: environmentInformation.type != "docker-machine"
+
+- name: expose additional ports if jmxremote is enabled
+ when: jmx.enabled
+ set_fact:
+ invoker_ports: "[ \"{{ jmx.basePortInvoker }}:{{ jmx.basePortInvoker }}\"
] + [ \"{{ jmx.rmiBasePortInvoker }}:{{ jmx.rmiBasePortInvoker }}\" ]"
+
+- name: prepare invoker env
+ set_fact:
+ invoker_env:
+ "INVOKER_OPTS": "{{ invoker_args | default(invoker.arguments) }}"
+ "JMX_REMOTE": "{{ jmx.enabled }}"
+ "PORT": 8080
+ "KAFKA_HOSTS": "{{ kafka_connect_string }}"
+ "CONFIG_whisk_kafka_replicationFactor": "{{ kafka.replicationFactor |
default() }}"
+ "CONFIG_whisk_kafka_topics_invoker_retentionBytes": "{{
kafka_topics_invoker_retentionBytes | default() }}"
+ "CONFIG_whisk_kafka_topics_invoker_retentionMs": "{{
kafka_topics_invoker_retentionMS | default() }}"
+ "CONFIG_whisk_kakfa_topics_invoker_segmentBytes": "{{
kafka_topics_invoker_segmentBytes | default() }}"
+ "CONFIG_whisk_kafka_common_securityProtocol": "{{ kafka.protocol }}"
+ "CONFIG_whisk_kafka_common_sslTruststoreLocation": "/conf/{{
kafka.ssl.keystore.name }}"
+ "CONFIG_whisk_kafka_common_sslTruststorePassword": "{{
kafka.ssl.keystore.password }}"
+ "CONFIG_whisk_kafka_common_sslKeystoreLocation": "/conf/{{
kafka.ssl.keystore.name }}"
+ "CONFIG_whisk_kafka_common_sslKeystorePassword": "{{
kafka.ssl.keystore.password }}"
Review comment:
Are all of the Kafka/Zookeeper settings needed?
----------------------------------------------------------------
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