You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by di...@apache.org on 2018/04/26 01:08:54 UTC

[airavata] branch staging updated: Fixing ansible scripts to deploy staging helix distribution

This is an automated email from the ASF dual-hosted git repository.

dimuthuupe pushed a commit to branch staging
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/staging by this push:
     new ad72e82  Fixing ansible scripts to deploy staging helix distribution
ad72e82 is described below

commit ad72e82096cfc5cb4028c825d7cb6a2bf3e83532
Author: dimuthu <di...@gmail.com>
AuthorDate: Wed Apr 25 21:08:46 2018 -0400

    Fixing ansible scripts to deploy staging helix distribution
---
 dev-tools/ansible/helix.yml                        |  12 +-
 .../scigap/develop/group_vars/all/vars.yml         |   2 +-
 .../scigap/production/group_vars/all/vars.yml      |   2 +-
 .../scigap/staging/group_vars/all/vars.yml         |  24 +-
 dev-tools/ansible/inventories/scigap/staging/hosts |   5 +-
 .../inventories/standalone/group_vars/all/vars.yml |   2 +-
 .../standalone/group_vars/helix/vars.yml           |  22 +-
 .../inventories/template/group_vars/all/vars.yml   |   2 +-
 .../templates/airavata-server.properties.j2        |   3 +-
 .../gfac/templates/airavata-server.properties.j2   |   2 +-
 .../ansible/roles/helix_setup/defaults/main.yml    |   5 +-
 dev-tools/ansible/roles/helix_setup/tasks/main.yml |   7 +-
 .../controller/airavata-server.properties.j2       |   2 +-
 .../participant/airavata-server.properties.j2      |   2 +-
 .../templates/participant/logback.xml.j2           |   2 +-
 .../post-wm/airavata-server.properties.j2          |   8 +-
 .../templates/pre-wm/airavata-server.properties.j2 |   2 +-
 .../ansible/roles/job_monitor/defaults/main.yml    |   6 +-
 .../email-monitor/airavata-server.properties.j2    | 254 +--------------------
 .../realtime-monitor/airavata-server.properties.j2 |   4 +-
 dev-tools/ansible/roles/kafka/defaults/main.yml    |  11 +-
 dev-tools/ansible/roles/kafka/handlers/main.yml    |   9 +
 dev-tools/ansible/roles/kafka/tasks/main.yml       |  41 +++-
 .../kafka/templates/kafka-rest-proxy.service.j2    |  14 ++
 .../roles/kafka/templates/kafka-rest.properties.j2 |  26 +++
 .../ansible/roles/kafka/templates/kafka.service.j2 |   2 +-
 .../roles/kafka/templates/server.properties.j2     |   4 +-
 .../templates/airavata-server.properties.j2        |   2 +-
 28 files changed, 161 insertions(+), 316 deletions(-)

diff --git a/dev-tools/ansible/helix.yml b/dev-tools/ansible/helix.yml
index 79f14eb..9873126 100644
--- a/dev-tools/ansible/helix.yml
+++ b/dev-tools/ansible/helix.yml
@@ -19,18 +19,13 @@
 #
 
 ---
-
-- hosts: zookeeper
-  tags: zookeeper, airavata
-  roles:
-    - env_setup
-    - java
-    - zookeeper
-
 - hosts: kafka
   tags: kafka, airavata
   roles:
     - env_setup
+    - role: common
+      become: yes
+      become_user: "{{user}}"
     - zookeeper
     - kafka
 
@@ -46,5 +41,4 @@
     - role: job_monitor
       become: yes
       become_user: "{{user}}"
-
 ...
diff --git a/dev-tools/ansible/inventories/scigap/develop/group_vars/all/vars.yml b/dev-tools/ansible/inventories/scigap/develop/group_vars/all/vars.yml
index 81330b3..1300cf5 100644
--- a/dev-tools/ansible/inventories/scigap/develop/group_vars/all/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/develop/group_vars/all/vars.yml
@@ -61,7 +61,7 @@ rabbitmq_broker_url: "amqp://{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ rabb
 
 # Zoookeeper related variables
 zookeeper_client_port: 2181
-zookeeper_url: "{{ groups['zookeeper'][0] }}:{{ zookeeper_client_port }}"
+zookeeper_connection_url: "{{ groups['zookeeper'][0] }}:{{ zookeeper_client_port }}"
 
 # API Server related variables
 api_server_name: "apiserver-node0"
diff --git a/dev-tools/ansible/inventories/scigap/production/group_vars/all/vars.yml b/dev-tools/ansible/inventories/scigap/production/group_vars/all/vars.yml
index ca39f66..953cb1e 100644
--- a/dev-tools/ansible/inventories/scigap/production/group_vars/all/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/production/group_vars/all/vars.yml
@@ -61,7 +61,7 @@ rabbitmq_broker_url: "amqp://{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ rabb
 
 # Zoookeeper related variables
 zookeeper_client_port: 2181
-zookeeper_url: "{{ groups['zookeeper'][0] }}:{{ zookeeper_client_port }}"
+zookeeper_connection_url: "{{ groups['zookeeper'][0] }}:{{ zookeeper_client_port }}"
 
 # API Server related variables
 api_server_name: "apiserver-node0"
diff --git a/dev-tools/ansible/inventories/scigap/staging/group_vars/all/vars.yml b/dev-tools/ansible/inventories/scigap/staging/group_vars/all/vars.yml
index 9412531..ed0a5f0 100644
--- a/dev-tools/ansible/inventories/scigap/staging/group_vars/all/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/staging/group_vars/all/vars.yml
@@ -59,7 +59,7 @@ rabbitmq_broker_url: "amqp://{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ rabb
 
 # Zoookeeper related variables
 zookeeper_client_port: 2181
-zookeeper_url: "{{ groups['zookeeper'][0] }}:{{ zookeeper_client_port }}"
+zookeeper_connection_url: "{{ groups['zookeeper'][0] }}:{{ zookeeper_client_port }}"
 
 # API Server related variables
 api_server_name: "apiserver-node0"
@@ -138,3 +138,25 @@ keycloak_db_username: "keycloak"
 keycloak_db_password: "{{ vault_keycloak_db_password }}"
 keycloak_master_account_username: "AiravataAdmin"
 keycloak_master_account_password: "{{ vault_keycloak_master_account_password }}"
+
+# Helix
+helix_version: 0.7.1
+helix_url: http://www-eu.apache.org/dist//helix/{{helix_version}}/binaries/helix-core-{{helix_version}}-pkg.tar
+helix_dir: "{{ deployment_dir }}/airavata-helix"
+helix_cluster_name: "AiravataDemoCluster"
+snapshot_version: "0.17-SNAPSHOT"
+
+# Listening port for kafka installations
+kafka_listener_port: 9092
+kafka_rest_proxy_listener_port: 8082
+
+# Realtime Monitoring related variables
+realtime_monitor_broker_url: "{{ groups['kafka'][0] }}:{{ kafka_listener_port }}"
+realtime_monitor_broker_publisher: "RealtimeProducer"
+realtime_monitor_broker_consumer_group: "monitor"
+realtime_monitor_broker_topic: "helix-airavata-mq"
+
+# Variables related to the broker in which parsed job statuses are published
+job_monitor_broker_url: "{{ groups['kafka'][0] }}:{{ kafka_listener_port }}"
+job_monitor_broker_topic: "parsed-data"
+job_monitor_broker_consumer_group: "MonitoringConsumer"
\ No newline at end of file
diff --git a/dev-tools/ansible/inventories/scigap/staging/hosts b/dev-tools/ansible/inventories/scigap/staging/hosts
index 7c365cf..3508888 100644
--- a/dev-tools/ansible/inventories/scigap/staging/hosts
+++ b/dev-tools/ansible/inventories/scigap/staging/hosts
@@ -15,7 +15,10 @@ db.staging.scigap.org
 api.staging.scigap.org
 
 [helix]
-helix.staging.scigap.org
+helix.staging.scigap.org ansible_user=root
+
+[kafka]
+helix.staging.scigap.org ansible_user=root
 
 [pga]
 pga.staging.scigap.org
diff --git a/dev-tools/ansible/inventories/standalone/group_vars/all/vars.yml b/dev-tools/ansible/inventories/standalone/group_vars/all/vars.yml
index 26eab9f..0fdf791 100644
--- a/dev-tools/ansible/inventories/standalone/group_vars/all/vars.yml
+++ b/dev-tools/ansible/inventories/standalone/group_vars/all/vars.yml
@@ -66,7 +66,7 @@ rabbitmq_broker_url: "amqp://{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ rabb
 
 # Zoookeeper related variables
 zookeeper_client_port: 2181
-zookeeper_url: "{{ groups['zookeeper'][0] }}:{{ zookeeper_client_port }}"
+zookeeper_connection_url: "{{ groups['zookeeper'][0] }}:{{ zookeeper_client_port }}"
 
 # API Server related variables
 api_server_name: "apiserver-node0"
diff --git a/dev-tools/ansible/inventories/standalone/group_vars/helix/vars.yml b/dev-tools/ansible/inventories/standalone/group_vars/helix/vars.yml
index 9dae1ce..b68f85a 100644
--- a/dev-tools/ansible/inventories/standalone/group_vars/helix/vars.yml
+++ b/dev-tools/ansible/inventories/standalone/group_vars/helix/vars.yml
@@ -26,18 +26,14 @@ helix_cluster_name: "AiravataDemoCluster"
 
 snapshot_version: "0.17-SNAPSHOT"
 
-# Job Monitoring related variables
-job_monitor_broker_url: "192.168.99.103:9092"
-realtime_monitor_broker_url: "localhost:9092"
+# Realtime Monitoring related variables
+realtime_monitor_broker_url: "CHANGEME"
+realtime_monitor_broker_publisher: "RealtimeProducer"
+realtime_monitor_broker_consumer_group: "monitor"
+realtime_monitor_broker_topic: "helix-airavata-mq"
 
-# Kafka related variables
-kafka_port: "9092"
-kafka_broker_url: "192.168.99.103:{{ kafka_port }}"
-kafka_broker_topic: "parsed-data"
-kafka_broker_consumer_group: "MonitoringConsumer"
-
-running_on_aws: "false"
-kafka_broker_list_url: "{{ kafka_broker_url }}"
-kafka_topic_prefix: "local"
-enable_kafka_logging: "false"
+# Variables related to the broker in which parsed job statuses are published
+job_monitor_broker_url: "CHANGEME"
+job_monitor_broker_topic: "parsed-data"
+job_monitor_broker_consumer_group: "MonitoringConsumer"
 ...
diff --git a/dev-tools/ansible/inventories/template/group_vars/all/vars.yml b/dev-tools/ansible/inventories/template/group_vars/all/vars.yml
index 9847fdd..c9f697e 100644
--- a/dev-tools/ansible/inventories/template/group_vars/all/vars.yml
+++ b/dev-tools/ansible/inventories/template/group_vars/all/vars.yml
@@ -66,7 +66,7 @@ rabbitmq_broker_url: "amqp://{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ rabb
 
 # Zoookeeper related variables
 zookeeper_client_port: 2181
-zookeeper_url: "{{ groups['zookeeper'][0] }}:{{ zookeeper_client_port }}"
+zookeeper_connection_url: "{{ groups['zookeeper'][0] }}:{{ zookeeper_client_port }}"
 
 # API Server related variables
 api_server_name: "apiserver-node0"
diff --git a/dev-tools/ansible/roles/api-orch/templates/airavata-server.properties.j2 b/dev-tools/ansible/roles/api-orch/templates/airavata-server.properties.j2
index 0d5edca..75a9e24 100644
--- a/dev-tools/ansible/roles/api-orch/templates/airavata-server.properties.j2
+++ b/dev-tools/ansible/roles/api-orch/templates/airavata-server.properties.j2
@@ -155,6 +155,7 @@ threadpool.size=10
 start.submitter=true
 embedded.mode=true
 enable.validation=true
+host.scheduler=org.apache.airavata.gfac.impl.DefaultHostScheduler
 
 ###########################################################################
 #  Registry Server Configurations
@@ -269,7 +270,7 @@ experiment.launch..queue.name=experiment.launch.queue
 # Zookeeper Server Configuration
 ###########################################################################
 embedded.zk=false
-zookeeper.server.connection={{ zookeeper_url }}
+zookeeper.server.connection={{ zookeeper_connection_url }}
 zookeeper.timeout=30000
 
 ########################################################################
diff --git a/dev-tools/ansible/roles/gfac/templates/airavata-server.properties.j2 b/dev-tools/ansible/roles/gfac/templates/airavata-server.properties.j2
index c1d6fcf..5fe9bee 100644
--- a/dev-tools/ansible/roles/gfac/templates/airavata-server.properties.j2
+++ b/dev-tools/ansible/roles/gfac/templates/airavata-server.properties.j2
@@ -273,7 +273,7 @@ experiment.launch..queue.name=experiment.launch.queue
 # Zookeeper Server Configuration
 ###########################################################################
 embedded.zk=false
-zookeeper.server.connection={{ zookeeper_url }}
+zookeeper.server.connection={{ zookeeper_connection_url }}
 zookeeper.timeout=30000
 
 ########################################################################
diff --git a/dev-tools/ansible/roles/helix_setup/defaults/main.yml b/dev-tools/ansible/roles/helix_setup/defaults/main.yml
index 1441255..19222ce 100644
--- a/dev-tools/ansible/roles/helix_setup/defaults/main.yml
+++ b/dev-tools/ansible/roles/helix_setup/defaults/main.yml
@@ -39,8 +39,11 @@ helix_participant_log_dir: "{{ helix_dir }}/{{ helix_participant_version }}/logs
 helix_pre_wm_dist_log_dir: "{{ helix_dir }}/{{ helix_pre_wm_version }}/logs"
 helix_post_wm_dist_log_dir: "{{ helix_dir }}/{{ helix_post_wm_version }}/logs"
 
-job_status_publish_endpoint: "http://149.165.156.211:8082/topics/helix-airavata-mq"
+job_status_publish_endpoint: "http://{{ groups['kafka'][0] }}:{{ kafka_rest_proxy_listener_port }}/topics/{{ realtime_monitor_broker_topic }}"
 
 helix_log_max_history: 30
 helix_log_total_size_cap: "1GB"
+
+kafka_listener_port: 9092
+kafka_rest_proxy_listener_port: 8082
 ...
diff --git a/dev-tools/ansible/roles/helix_setup/tasks/main.yml b/dev-tools/ansible/roles/helix_setup/tasks/main.yml
index 1622298..6c72688 100644
--- a/dev-tools/ansible/roles/helix_setup/tasks/main.yml
+++ b/dev-tools/ansible/roles/helix_setup/tasks/main.yml
@@ -22,7 +22,7 @@
 
 # Create the directory for Helix deployment
 - name: Create helix deployment directory
-  file: path="{{ helix_dir }}" state=directory owner={{ user }} group={{ group }}
+  file: path="{{ helix_dir }}" state=directory owner={{ user }} group={{ group }} recurse=yes
 
 # Setup Helix
 - name: Download and unarchive Helix
@@ -37,8 +37,9 @@
 - name: Create Helix Cluster
   command: "{{ item }} chdir={{ helix_dir }}/helix-core-{{ helix_version }}/"
   with_items:
-  - ./bin/helix-admin.sh --zkSvr localhost:{{ zookeeper_client_port }} --dropCluster {{ helix_cluster_name }}
-  - ./bin/helix-admin.sh --zkSvr localhost:{{ zookeeper_client_port }} --addCluster {{ helix_cluster_name }}
+  - ./bin/helix-admin.sh --zkSvr {{ zookeeper_connection_url }} --dropCluster {{ helix_cluster_name }}
+  - ./bin/helix-admin.sh --zkSvr {{ zookeeper_connection_url }} --addCluster {{ helix_cluster_name }}
+  ignore_errors: yes
 
 # Copy required distributions to the deployment directory
 - name: Copy distributions to airavata-helix deployment directory
diff --git a/dev-tools/ansible/roles/helix_setup/templates/controller/airavata-server.properties.j2 b/dev-tools/ansible/roles/helix_setup/templates/controller/airavata-server.properties.j2
index b40fa57..cc58bd6 100644
--- a/dev-tools/ansible/roles/helix_setup/templates/controller/airavata-server.properties.j2
+++ b/dev-tools/ansible/roles/helix_setup/templates/controller/airavata-server.properties.j2
@@ -27,5 +27,5 @@ helix.controller.name={{ helix_controller_name }}
 # Zookeeper Server Configuration
 ###########################################################################
 embedded.zk=false
-zookeeper.server.connection={{ zookeeper_url }}
+zookeeper.server.connection={{ zookeeper_connection_url }}
 zookeeper.timeout=30000
\ No newline at end of file
diff --git a/dev-tools/ansible/roles/helix_setup/templates/participant/airavata-server.properties.j2 b/dev-tools/ansible/roles/helix_setup/templates/participant/airavata-server.properties.j2
index 53423e5..eddf85b 100644
--- a/dev-tools/ansible/roles/helix_setup/templates/participant/airavata-server.properties.j2
+++ b/dev-tools/ansible/roles/helix_setup/templates/participant/airavata-server.properties.j2
@@ -61,5 +61,5 @@ experiment.launch..queue.name=experiment.launch.queue
 ###########################################################################
 # Zookeeper Server Configuration
 ###########################################################################
-zookeeper.server.connection={{ zookeeper_url }}
+zookeeper.server.connection={{ zookeeper_connection_url }}
 zookeeper.timeout=30000
\ No newline at end of file
diff --git a/dev-tools/ansible/roles/helix_setup/templates/participant/logback.xml.j2 b/dev-tools/ansible/roles/helix_setup/templates/participant/logback.xml.j2
index fc9605d..c213a11 100644
--- a/dev-tools/ansible/roles/helix_setup/templates/participant/logback.xml.j2
+++ b/dev-tools/ansible/roles/helix_setup/templates/participant/logback.xml.j2
@@ -29,7 +29,7 @@
     </appender>
 
     <appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <File>.{{ helix_participant_log_dir }}/airavata.log</File>
+        <File>{{ helix_participant_log_dir }}/airavata.log</File>
         <Append>true</Append>
         <encoder>
             <pattern>%d [%t] %-5p %c{30} %X - %m%n</pattern>
diff --git a/dev-tools/ansible/roles/helix_setup/templates/post-wm/airavata-server.properties.j2 b/dev-tools/ansible/roles/helix_setup/templates/post-wm/airavata-server.properties.j2
index bd57f2c..0085310 100644
--- a/dev-tools/ansible/roles/helix_setup/templates/post-wm/airavata-server.properties.j2
+++ b/dev-tools/ansible/roles/helix_setup/templates/post-wm/airavata-server.properties.j2
@@ -25,9 +25,9 @@ regserver.server.port={{ registry_port }}
 ###########################################################################
 # Helix workflow manager configurations
 ###########################################################################
-kafka.broker.url={{ kafka_broker_url }}
-kafka.broker.topic={{ kafka_broker_topic }}
-kafka.broker.consumer.group={{ kafka_broker_consumer_group }}
+kafka.broker.url={{ job_monitor_broker_url }}
+kafka.broker.topic={{ job_monitor_broker_topic }}
+kafka.broker.consumer.group={{ job_monitor_broker_consumer_group }}
 helix.cluster.name={{ helix_cluster_name }}
 post.workflow.manager.name={{ helix_post_wm_name }}
 
@@ -50,5 +50,5 @@ experiment.launch..queue.name=experiment.launch.queue
 ###########################################################################
 # Zookeeper Server Configuration
 ###########################################################################
-zookeeper.server.connection={{ zookeeper_url }}
+zookeeper.server.connection={{ zookeeper_connection_url }}
 zookeeper.timeout=30000
\ No newline at end of file
diff --git a/dev-tools/ansible/roles/helix_setup/templates/pre-wm/airavata-server.properties.j2 b/dev-tools/ansible/roles/helix_setup/templates/pre-wm/airavata-server.properties.j2
index 5ca1d4e..220fba7 100644
--- a/dev-tools/ansible/roles/helix_setup/templates/pre-wm/airavata-server.properties.j2
+++ b/dev-tools/ansible/roles/helix_setup/templates/pre-wm/airavata-server.properties.j2
@@ -47,5 +47,5 @@ experiment.launch..queue.name=experiment.launch.queue
 ###########################################################################
 # Zookeeper Server Configuration
 ###########################################################################
-zookeeper.server.connection={{ zookeeper_url }}
+zookeeper.server.connection={{ zookeeper_connection_url }}
 zookeeper.timeout=30000
\ No newline at end of file
diff --git a/dev-tools/ansible/roles/job_monitor/defaults/main.yml b/dev-tools/ansible/roles/job_monitor/defaults/main.yml
index c523aaf..6556353 100644
--- a/dev-tools/ansible/roles/job_monitor/defaults/main.yml
+++ b/dev-tools/ansible/roles/job_monitor/defaults/main.yml
@@ -35,15 +35,15 @@ email_job_monitor_broker_publisher: "EmailBasedProducer"
 realtime_monitor_version: "realtime-monitor-{{ snapshot_version }}"
 realtime_monitor_dist_name: "{{ realtime_monitor_version }}-bin.tar.gz"
 realtime_monitor_log_dir: "{{ helix_dir }}/{{ realtime_monitor_version }}/logs"
-realtime_job_monitor_broker_publisher: "RealtimeProducer"
+realtime_monitor_broker_publisher: "RealtimeProducer"
 realtime_monitor_broker_consumer_group: "monitor"
 realtime_monitor_broker_topic: "helix-airavata-mq"
 
 job_monitor_broker_topic: "parsed-data"
 
 # kafka related variables
-kafka_broker_topic: "parsed-data"
-kafka_broker_consumer_group: "MonitoringConsumer"
+job_monitor_broker_topic: "parsed-data"
+job_monitor_broker_consumer_group: "MonitoringConsumer"
 
 helix_log_max_history: 30
 helix_log_total_size_cap: "1GB"
diff --git a/dev-tools/ansible/roles/job_monitor/templates/email-monitor/airavata-server.properties.j2 b/dev-tools/ansible/roles/job_monitor/templates/email-monitor/airavata-server.properties.j2
index c732364..6c606c3 100644
--- a/dev-tools/ansible/roles/job_monitor/templates/email-monitor/airavata-server.properties.j2
+++ b/dev-tools/ansible/roles/job_monitor/templates/email-monitor/airavata-server.properties.j2
@@ -16,168 +16,7 @@
 # under the License.
 #
 
-###########################################################################
-#
-#  This properties file provides configuration for all Airavata Services:
-#  API Server, Registry, Workflow Interpreter, GFac, Orchestrator
-#
-###########################################################################
-
-###########################################################################
-#  API Server Registry Configuration
-###########################################################################
-
-#for derby [AiravataJPARegistry]
-#registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-#registry.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
-# MariaDB database configuration
-registry.jdbc.driver=org.mariadb.jdbc.Driver
-registry.jdbc.url=jdbc:mariadb://{{ db_server }}:{{ db_server_port }}/{{ exp_catalog }}
-registry.jdbc.user={{ db_user }}
-registry.jdbc.password={{ db_password }}
-#FIXME: Probably the following property should be removed.
-start.derby.server.mode=false
-validationQuery=SELECT 1 from CONFIGURATION
-cache.enable=false
-jpa.cache.size=-1
-#jpa.connection.properties=MaxActive=10,MaxIdle=5,MinIdle=2,MaxWait=60000,testWhileIdle=true,testOnBorrow=true
-enable.sharing={{enable_sharing}}
-
-# Properties for default user mode
-default.registry.user={{ default_registry_user }}
-default.registry.password={{ default_registry_password }}
-default.registry.password.hash.method=SHA
-default.registry.gateway={{ default_gateway }}
-super.tenant.gatewayId={{ default_gateway }}
-
-###########################################################################
-#  Application Catalog DB Configuration
-###########################################################################
-#for derby [AiravataJPARegistry]
-#appcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-#appcatalog.jdbc.url=jdbc:derby://localhost:1527/app_catalog;create=true;user=airavata;password=airavata
-# MariaDB database configuration
-appcatalog.jdbc.driver=org.mariadb.jdbc.Driver
-appcatalog.jdbc.url=jdbc:mariadb://{{ db_server }}:{{ db_server_port }}/{{ app_catalog }}
-appcatalog.jdbc.user={{ db_user }}
-appcatalog.jdbc.password={{ db_password }}
-appcatalog.validationQuery=SELECT 1 from CONFIGURATION
-
-##########################################################################
-#  Replica Catalog DB Configuration
-###########################################################################
-#for derby [AiravataJPARegistry]
-#replicacatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-#replicacatalog.jdbc.url=jdbc:derby://localhost:1527/replica_catalog;create=true;user=airavata;password=airavata
-# MariaDB database configuration
-replicacatalog.jdbc.driver=org.mariadb.jdbc.Driver
-replicacatalog.jdbc.url=jdbc:mariadb://{{ db_server }}:{{ db_server_port }}/{{ replica_catalog }}
-replicacatalog.jdbc.user={{ db_user }}
-replicacatalog.jdbc.password={{ db_password }}
-replicacatalog.validationQuery=SELECT 1 from CONFIGURATION
-
-###########################################################################
-#  Sharing Catalog DB Configuration
-###########################################################################
-#for derby [AiravataJPARegistry]
-#sharingcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-#sharingcatalog.jdbc.url=jdbc:derby://localhost:1527/sharing_catalog;create=true;user=airavata;password=airavata
-# MariaDB database configuration
-sharingcatalog.jdbc.driver=org.mariadb.jdbc.Driver
-sharingcatalog.jdbc.url=jdbc:mariadb://{{ db_server }}:{{ db_server_port }}/{{ sharing_catalog }}
-sharingcatalog.jdbc.user={{ db_user }}
-sharingcatalog.jdbc.password={{ db_password }}
-sharingcatalog.validationQuery=SELECT 1 from CONFIGURATION
-
-###########################################################################
-#  Sharing Registry Server Configuration
-###########################################################################
-sharing_server=org.apache.airavata.sharing.registry.server.SharingRegistryServer
-sharing.registry.server.host={{ sharing_registry_host }}
-sharing.registry.server.port={{ sharing_registry_port }}
-
-###########################################################################
-#  API Server Configurations
-###########################################################################
-apiserver=org.apache.airavata.api.server.AiravataAPIServer
-apiserver.name={{ api_server_name }}
-apiserver.host={{ api_server_host }}
-apiserver.port={{ api_server_port }}
-apiserver.min.threads=50
-
-###########################################################################
-#  Registry Server Configurations
-###########################################################################
-regserver=org.apache.airavata.registry.api.service.RegistryAPIServer
-regserver.server.name={{registry_name}}
-regserver.server.host={{registry_host}}
-regserver.server.port={{registry_port}}
-regserver.server.min.threads=50
-
-
-###########################################################################
-#  Job Scheduler can send informative email messages to you about the status of your job.
-# Specify a string which consists of either the single character "n" (no mail), or one or more
-#  of the characters "a" (send mail when job is aborted), "b" (send mail when job begins),
-# and "e" (send mail when job terminates).  The default is "a" if not specified.
-###########################################################################
-
-job.notification.enable=true
-#Provide comma separated email ids as a string if more than one
-job.notification.emailids=
-job.notification.flags=abe
-
-###########################################################################
-# Credential Store module Configuration
-###########################################################################
-credential.store.keystore.url={{ keystores_location }}/{{ cred_keystore_src_path | basename }}
-credential.store.keystore.alias={{ cred_keystore_alias }}
-credential.store.keystore.password={{ cred_keystore_passwd }}
-credential.store.jdbc.url=jdbc:mariadb://{{ db_server }}:{{ db_server_port }}/{{ credential_store }}
-credential.store.jdbc.user={{ db_user }}
-credential.store.jdbc.password={{ db_password }}
-credential.store.jdbc.driver=org.mariadb.jdbc.Driver
-credential.store.server.host={{ cred_store_server_host }}
-credential.store.server.port={{ cred_store_port }}
-credentialstore=org.apache.airavata.credential.store.server.CredentialStoreServer
-credential.stroe.jdbc.validationQuery=SELECT 1 from CONFIGURATION
-
-# these properties used by credential store email notifications
-email.server=smtp.googlemail.com
-email.server.port=465
-email.user=airavata
-email.password=xxx
-email.ssl=true
-email.from=airavata@apache.org
-
-# SSH PKI key pair or ssh password can be used SSH based sshKeyAuthentication is used.
-# if user specify both password sshKeyAuthentication gets the higher preference
-
-################# ---------- For ssh key pair sshKeyAuthentication ------------------- ################
-#ssh.public.key=/path to public key for ssh
-#ssh.private.key=/path to private key file for ssh
-#ssh.keypass=passphrase for the private key
-#ssh.username=username for ssh connection
-## If you set "yes" for ssh.strict.hostKey.checking, then you must provide known hosts file path
-#ssh.strict.hostKey.checking=yes/no
-#ssh.known.hosts.file=/path to known hosts file
-### Incase of password sshKeyAuthentication.
-#ssh.password=Password for ssh connection
-
-################ ---------- BES Properties ------------------- ###############
-#bes.ca.cert.path=<location>/certificates/cacert.pem
-#bes.ca.key.path=<location>/certificates/cakey.pem
-#bes.ca.key.pass=passphrase
-
-###########################################################################
-# Monitoring module Configuration
-###########################################################################
-
-#This will be the primary monitoring tool which runs in airavata, in future there will be multiple monitoring
-#mechanisms and one would be able to start a monitor
-monitors=org.apache.airavata.gfac.monitor.impl.pull.qstat.QstatMonitor,org.apache.airavata.gfac.monitor.impl.LocalJobMonitor
-
-#These properties will used to enable email base monitoring
+#These properties will be used to enable email based monitoring
 email.based.monitor.host=imap.gmail.com
 email.based.monitor.address={{ monitor_email_address }}
 email.based.monitor.password={{ monitor_email_password }}
@@ -186,93 +25,8 @@ email.based.monitor.folder.name=INBOX
 email.based.monitor.store.protocol=imaps
 #These property will be used to query the email server periodically. value in milliseconds(ms).
 email.based.monitoring.period=10000
+
+#These properties will be used to published parsed email messages to job monitor queue
 job.monitor.broker.url={{ job_monitor_broker_url }}
 job.monitor.broker.topic={{ job_monitor_broker_topic }}
-job.monitor.broker.publisher.id={{ email_job_monitor_broker_publisher }}
-
-###########################################################################
-#Helix workflow manager configurations
-###########################################################################
-
-kafka.broker.url={{ kafka_broker_url }}
-kafka.broker.topic={{ kafka_broker_topic }}
-kafka.broker.consumer.group={{ kafka_broker_consumer_group }}
-helix.cluster.name={{ helix_cluster_name }}
-pre.workflow.manager.name={{ helix_pre_wm_name }}
-post.workflow.manager.name={{ helix_post_wm_name }}
-helix.controller.name={{ helix_controller_name }}
-helix.participant.name={{ helix_participant_name }}
-
-###########################################################################
-# AMQP Notification Configuration
-###########################################################################
-#for simple scenarios we can use the guest user
-#rabbitmq.broker.url=amqp://localhost:5672
-#for production scenarios, give url as amqp://userName:password@hostName:portNumber/virtualHost, create user, virtualhost
-# and give permissions, refer: http://blog.dtzq.com/2012/06/rabbitmq-users-and-virtual-hosts.html
-rabbitmq.broker.url={{ rabbitmq_broker_url }}
-rabbitmq.status.exchange.name=status_exchange
-rabbitmq.process.exchange.name=process_exchange
-rabbitmq.experiment.exchange.name=experiment_exchange
-durable.queue=false
-prefetch.count=200
-process.launch.queue.name=process.launch.queue
-experiment.launch..queue.name=experiment.launch.queue
-
-###########################################################################
-# Zookeeper Server Configuration
-###########################################################################
-embedded.zk=false
-zookeeper.server.connection={{ zookeeper_url }}
-zookeeper.timeout=30000
-
-########################################################################
-## API Security Configuration
-########################################################################
-api.secured={{ api_secured }}
-security.manager.class=org.apache.airavata.service.security.KeyCloakSecurityManager
-### TLS related configuration ####
-TLS.enabled={{ tls_enable }}
-TLS.api.server.port={{ api_server_tls_port }}
-TLS.client.timeout=10000
-#### keystore configuration ####
-keystore.path={{ keystores_location }}/{{ keystore_src_path | basename }}
-keystore.password={{ keystore_passwd }}
-#### trust store configuration ####
-trust.store={{ keystores_location }}/{{ client_truststore_src_path | basename }}
-trust.store.password={{ client_truststore_passwd }}
-#### authorization cache related configuration ####
-authz.cache.enabled=true
-authz.cache.manager.class=org.apache.airavata.service.security.authzcache.DefaultAuthzCacheManager
-in.memory.cache.size=1000
-
-# Kafka Logging related configuration
-isRunningOnAws={{ running_on_aws }}
-kafka.broker.list={{ kafka_broker_list_url }}
-kafka.topic.prefix={{ kafka_topic_prefix }}
-enable.kafka.logging={{ enable_kafka_logging }}
-
-###########################################################################
-# Profile Service Configuration
-###########################################################################
-profile.service.server.host={{ profile_service_host }}
-profile.service.server.port={{ profile_service_port }}
-profile_service=org.apache.airavata.service.profile.server.ProfileServiceServer
-# MariaDB properties
-profile.service.jdbc.url=jdbc:mariadb://{{ db_server }}:{{ db_server_port }}/{{ profile_service }}
-profile.service.jdbc.user={{ db_user }}
-profile.service.jdbc.password={{ db_password }}
-profile.service.jdbc.driver=org.mariadb.jdbc.Driver
-profile.service.validationQuery=SELECT 1
-
-###########################################################################
-# Iam Admin services Configuration
-###########################################################################
-iam.server.url={{ iam_server_url }}
-iam.server.super.admin.username={{ iam_server_super_admin_username }}
-iam.server.super.admin.password={{ iam_server_super_admin_password }}
-
-###########################################################################
-# DB Event Manager Runner
-###########################################################################
-db_event_manager=org.apache.airavata.db.event.manager.DBEventManagerRunner
\ No newline at end of file
+job.monitor.broker.publisher.id={{ email_job_monitor_broker_publisher }}
\ No newline at end of file
diff --git a/dev-tools/ansible/roles/job_monitor/templates/realtime-monitor/airavata-server.properties.j2 b/dev-tools/ansible/roles/job_monitor/templates/realtime-monitor/airavata-server.properties.j2
index 50da1a0..6250a3f 100644
--- a/dev-tools/ansible/roles/job_monitor/templates/realtime-monitor/airavata-server.properties.j2
+++ b/dev-tools/ansible/roles/job_monitor/templates/realtime-monitor/airavata-server.properties.j2
@@ -16,7 +16,7 @@
 # under the License.
 #
 
-zookeeper.server.connection={{ zookeeper_url }}
+zookeeper.server.connection={{ zookeeper_connection_url }}
 zookeeper.timeout=30000
 
 realtime.monitor.broker.url={{ realtime_monitor_broker_url }}
@@ -25,4 +25,4 @@ realtime.monitor.broker.topic={{ realtime_monitor_broker_topic }}
 
 job.monitor.broker.url={{ job_monitor_broker_url }}
 job.monitor.broker.topic={{ job_monitor_broker_topic }}
-job.monitor.broker.publisher.id={{ realtime_job_monitor_broker_publisher }}
\ No newline at end of file
+job.monitor.broker.publisher.id={{ realtime_monitor_broker_publisher }}
\ No newline at end of file
diff --git a/dev-tools/ansible/roles/kafka/defaults/main.yml b/dev-tools/ansible/roles/kafka/defaults/main.yml
index bb62ec2..c2ae8b9 100644
--- a/dev-tools/ansible/roles/kafka/defaults/main.yml
+++ b/dev-tools/ansible/roles/kafka/defaults/main.yml
@@ -21,12 +21,9 @@
 ---
 
 #Variables associated with this role
-
-scala_version: "2.11" #recommended scala version
-kafka_version: "1.1.0"
-kafka_package_name: "kafka_{{ scala_version }}-{{ kafka_version }}"
-kafka_tgz_url: "http://www-eu.apache.org/dist/kafka/{{ kafka_version }}/{{ kafka_package_name }}.tgz"
-kafka_dir: "{{ user_home }}/{{ kafka_package_name }}"
+kafka_package_name: "confluent-4.1.0"
+kafka_tgz_url: "http://packages.confluent.io/archive/4.1/confluent-oss-4.1.0-2.11.tar.gz"
+kafka_dir: "{{ deployment_dir }}/{{ kafka_package_name }}"
 
 # Kafka related variables
 broker_id: "0"
@@ -44,5 +41,7 @@ log_retention_hrs: "168"
 log_segment_bytes: "1073741824"
 log_retention_check_interval: "300000"
 grp_initial_rebalance_delay: "0"
+kafka_listener_port: 9092
+kafka_rest_proxy_listener_port: 8082
 
 ...
\ No newline at end of file
diff --git a/dev-tools/ansible/roles/kafka/handlers/main.yml b/dev-tools/ansible/roles/kafka/handlers/main.yml
index 7a1437a..223fd9b 100644
--- a/dev-tools/ansible/roles/kafka/handlers/main.yml
+++ b/dev-tools/ansible/roles/kafka/handlers/main.yml
@@ -28,3 +28,12 @@
 
 - name: restart kafka
   service: name=kafka state=restarted enabled=yes
+
+- name: start kafka-rest-proxy
+  service: name=kafka-rest-proxy state=started enabled=yes
+
+- name: stop kafka-rest-proxy
+  service: name=kafka-rest-proxy state=stopped enabled=yes
+
+- name: restart kafka-rest-proxy
+  service: name=kafka-rest-proxy state=restarted enabled=yes
diff --git a/dev-tools/ansible/roles/kafka/tasks/main.yml b/dev-tools/ansible/roles/kafka/tasks/main.yml
index 515862e..a0ee36a 100644
--- a/dev-tools/ansible/roles/kafka/tasks/main.yml
+++ b/dev-tools/ansible/roles/kafka/tasks/main.yml
@@ -20,19 +20,15 @@
 
 ---
 
-# Create the directory
-- name: Create directory
-  file: path="{{ user_home }}" state=directory owner={{ user }} group={{ group }}
-
 # Check for the availability of the Kafka package
 - name: Check kafka package availability
   stat: path={{ kafka_dir }}
   register: kafka_package
 
 # Download Kafka
-- name: Download and unarchive Kafka
+- name: Download and unarchive Kafka from {{ kafka_tgz_url }}
   unarchive: src="{{ kafka_tgz_url }}"
-      dest="{{ user_home }}"
+      dest="{{ deployment_dir }}"
       copy=no
       owner="{{ user }}"
       group="{{ group }}"
@@ -43,17 +39,35 @@
 - name: Create kafka logs directory
   file: path="{{ kafka_dir }}/logs" state=directory owner={{ user }} group={{ group }}
 
-# Config and start Kafka
+# Config kafka server and start
 - name: Copy kafka server properties file
   template: src=server.properties.j2
-            dest="{{ kafka_dir }}/config/server.properties"
+            dest="{{ kafka_dir }}/etc/kafka/server.properties"
             owner={{ user }}
             group={{ group }}
             mode="u=rw,g=r,o=r"
   notify: restart kafka
   become: yes
 
-- name: systemd start script
+# Config rest proxy and start
+- name: Copy kafka server properties file
+  template: src=kafka-rest.properties.j2
+            dest="{{ kafka_dir }}/etc/kafka-rest/kafka-rest.properties"
+            owner={{ user }}
+            group={{ group }}
+            mode="u=rw,g=r,o=r"
+  notify: restart kafka-rest-proxy
+  become: yes
+
+# Open kafka port to be accessible from outside
+- name: Open firwall ports
+  firewalld: port={{ item }} zone=public permanent=true state=enabled immediate=yes
+  with_items:
+    - "{{ kafka_listener_port }}/tcp"
+    - "{{ kafka_rest_proxy_listener_port }}/tcp"
+  become_user: root
+
+- name: systemd install kafka service script
   template: src=kafka.service.j2
             dest=/usr/lib/systemd/system/kafka.service
             owner={{ user }}
@@ -62,6 +76,15 @@
   notify: start kafka
   become: yes
 
+- name: systemd install kafka rest proxy service script
+  template: src=kafka-rest-proxy.service.j2
+            dest=/usr/lib/systemd/system/kafka-rest-proxy.service
+            owner={{ user }}
+            group={{ group }}
+            mode="u=rw,g=r,o=r"
+  notify: start kafka-rest-proxy
+  become: yes
+
 - name: Reload systemd daemons
   command: systemctl daemon-reload
   notify: restart kafka
diff --git a/dev-tools/ansible/roles/kafka/templates/kafka-rest-proxy.service.j2 b/dev-tools/ansible/roles/kafka/templates/kafka-rest-proxy.service.j2
new file mode 100644
index 0000000..338de9f
--- /dev/null
+++ b/dev-tools/ansible/roles/kafka/templates/kafka-rest-proxy.service.j2
@@ -0,0 +1,14 @@
+# {{ansible_managed}}
+
+[Unit]
+Description=Kafka-Rest-Proxy
+Before=
+After=network.target
+
+[Service]
+LOG_DIR={{ kafka_dir }}/logs
+ExecStart={{ kafka_dir }}/bin/kafka-rest-start {{ kafka_dir }}/etc/kafka-rest/kafka-rest.properties
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
diff --git a/dev-tools/ansible/roles/kafka/templates/kafka-rest.properties.j2 b/dev-tools/ansible/roles/kafka/templates/kafka-rest.properties.j2
new file mode 100644
index 0000000..d30c991
--- /dev/null
+++ b/dev-tools/ansible/roles/kafka/templates/kafka-rest.properties.j2
@@ -0,0 +1,26 @@
+##
+# Copyright 2015 Confluent Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+#id=kafka-rest-test-server
+#schema.registry.url=http://localhost:8081
+#zookeeper.connect=localhost:2181
+bootstrap.servers=PLAINTEXT://{{ groups['kafka'][0] }}:{{ kafka_listener_port }}
+listeners=http://{{ ansible_default_ipv4.address }}:{{ kafka_rest_proxy_listener_port }}
+#
+# Configure interceptor classes for sending consumer and producer metrics to Confluent Control Center
+# Make sure that monitoring-interceptors-<version>.jar is on the Java class path
+#consumer.interceptor.classes=io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor
+#producer.interceptor.classes=io.confluent.monitoring.clients.interceptor.MonitoringProducerInterceptor
diff --git a/dev-tools/ansible/roles/kafka/templates/kafka.service.j2 b/dev-tools/ansible/roles/kafka/templates/kafka.service.j2
index b93ef51..afc0118 100644
--- a/dev-tools/ansible/roles/kafka/templates/kafka.service.j2
+++ b/dev-tools/ansible/roles/kafka/templates/kafka.service.j2
@@ -7,7 +7,7 @@ After=network.target
 
 [Service]
 LOG_DIR={{ kafka_dir }}/logs
-ExecStart={{ kafka_dir }}/bin/kafka-server-start.sh {{ kafka_dir }}/config/server.properties
+ExecStart={{ kafka_dir }}/bin/kafka-server-start {{ kafka_dir }}/etc/kafka/server.properties
 Restart=on-abort
 
 [Install]
diff --git a/dev-tools/ansible/roles/kafka/templates/server.properties.j2 b/dev-tools/ansible/roles/kafka/templates/server.properties.j2
index cd0f917..729630a 100644
--- a/dev-tools/ansible/roles/kafka/templates/server.properties.j2
+++ b/dev-tools/ansible/roles/kafka/templates/server.properties.j2
@@ -31,7 +31,7 @@ broker.id={{ broker_id }}
 #     listeners = listener_name://host_name:port
 #   EXAMPLE:
 #     listeners = PLAINTEXT://your.host.name:9092
-#listeners=PLAINTEXT://your.host.name:9092
+listeners=PLAINTEXT://{{ ansible_default_ipv4.address }}:{{ kafka_listener_port }}
 
 # Hostname and port the broker will advertise to producers and consumers. If not set,
 # it uses the value for "listeners" if configured.  Otherwise, it will use the value
@@ -123,7 +123,7 @@ log.retention.check.interval.ms={{ log_retention_check_interval }}
 # server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002".
 # You can also append an optional chroot string to the urls to specify the
 # root directory for all kafka znodes.
-zookeeper.connect={{ zookeeper_url }}
+zookeeper.connect={{ zookeeper_connection_url }}
 
 # Timeout in ms for connecting to zookeeper
 zookeeper.connection.timeout.ms=6000
diff --git a/dev-tools/ansible/roles/registry/templates/airavata-server.properties.j2 b/dev-tools/ansible/roles/registry/templates/airavata-server.properties.j2
index b011540..3ad2aa0 100644
--- a/dev-tools/ansible/roles/registry/templates/airavata-server.properties.j2
+++ b/dev-tools/ansible/roles/registry/templates/airavata-server.properties.j2
@@ -273,7 +273,7 @@ experiment.launch..queue.name=experiment.launch.queue
 # Zookeeper Server Configuration
 ###########################################################################
 embedded.zk=false
-zookeeper.server.connection={{ zookeeper_url }}
+zookeeper.server.connection={{ zookeeper_connection_url }}
 zookeeper.timeout=30000
 
 ########################################################################

-- 
To stop receiving notification emails like this one, please contact
dimuthuupe@apache.org.