airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dimuthu...@apache.org
Subject [airavata] branch develop updated: Updating ansibles to deploy helix components in development environment
Date Mon, 24 Sep 2018 18:47:32 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
     new 65933ef  Updating ansibles to deploy helix components in development environment
65933ef is described below

commit 65933efe757cbf7d83e589ce5ceff0c0a05b4a04
Author: Dimuthu Wannipurage <dimuthu.wannipurage@datasprouts.com>
AuthorDate: Mon Sep 24 14:47:24 2018 -0400

    Updating ansibles to deploy helix components in development environment
---
 .../scigap/develop/group_vars/all/vars.yml         | 22 +++++++++++
 dev-tools/ansible/inventories/scigap/develop/hosts |  8 +++-
 dev-tools/ansible/roles/helix_setup/tasks/main.yml | 44 +++++++++++-----------
 dev-tools/ansible/roles/kafka/handlers/main.yml    |  6 +++
 dev-tools/ansible/roles/kafka/tasks/main.yml       |  4 +-
 5 files changed, 60 insertions(+), 24 deletions(-)

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 1300cf5..2e16e12 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
@@ -140,3 +140,25 @@ keycloak_db_username: "keycloak"
 keycloak_db_password: "{{ vault_keycloak_db_password }}"
 keycloak_master_account_username: "admin"
 keycloak_master_account_password: "{{ vault_keycloak_master_account_password }}"
+
+# Helix
+helix_version: 0.7.1
+helix_url: http://www-us.apache.org/dist//helix/{{helix_version}}/binaries/helix-core-{{helix_version}}-pkg.tar
+helix_dir: "{{ deployment_dir }}/airavata-helix"
+helix_cluster_name: "AiravataDevCluster"
+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/develop/hosts b/dev-tools/ansible/inventories/scigap/develop/hosts
index 025a06f..51c7672 100644
--- a/dev-tools/ansible/inventories/scigap/develop/hosts
+++ b/dev-tools/ansible/inventories/scigap/develop/hosts
@@ -24,4 +24,10 @@
 
 [django]
 seagrid ansible_host=pgadev.scigap.org
-simvascular ansible_host=pgadev.scigap.org
\ No newline at end of file
+simvascular ansible_host=pgadev.scigap.org
+
+[helix]
+149.165.157.37
+
+[kafka]
+149.165.157.37
diff --git a/dev-tools/ansible/roles/helix_setup/tasks/main.yml b/dev-tools/ansible/roles/helix_setup/tasks/main.yml
index e4aa85b..e8bdbc7 100644
--- a/dev-tools/ansible/roles/helix_setup/tasks/main.yml
+++ b/dev-tools/ansible/roles/helix_setup/tasks/main.yml
@@ -102,27 +102,27 @@
   - { command: ./bin/pre-wm-daemon.sh start, dir: "{{ helix_pre_wm_version }}" }
   - { command: ./bin/post-wm-daemon.sh start, dir: "{{ helix_post_wm_version }}" }
 
-- name: systemd install helix setup service scripts
-  template: src={{ item.template }}
-            dest=/usr/lib/systemd/system/{{ item.service }}
-            owner={{ user }}
-            group={{ group }}
-            mode="u=rw,g=r,o=r"
-  notify: start {{ item.name }}
-  with_items:
-  - { template : controller/helixcontroller.service.j2, service: helixcontroller.service,
name: helixcontroller }
-  - { template : participant/helixparticipant.service.j2, service: helixparticipant.service,
name: helixparticipant }
-  - { template : pre-wm/prewm.service.j2, service: prewm.service, name: prewm }
-  - { template : post-wm/postwm.service.j2, service: postwm.service, name: postwm }
-  become: sudo
+#- name: systemd install helix setup service scripts
+#  template: src={{ item.template }}
+#            dest=/usr/lib/systemd/system/{{ item.service }}
+#            owner={{ user }}
+#            group={{ group }}
+#            mode="u=rw,g=r,o=r"
+#  notify: start {{ item.name }}
+#  with_items:
+#  - { template : controller/helixcontroller.service.j2, service: helixcontroller.service,
name: helixcontroller }
+#  - { template : participant/helixparticipant.service.j2, service: helixparticipant.service,
name: helixparticipant }
+#  - { template : pre-wm/prewm.service.j2, service: prewm.service, name: prewm }
+#  - { template : post-wm/postwm.service.j2, service: postwm.service, name: postwm }
+#  become: yes
 
-- name: Reload systemd daemons
-  command: systemctl daemon-reload
-  notify: restart {{ item }}
-  with_items:
-  - helixcontroller
-  - helixparticipant
-  - prewm
-  - postwm
-  become: sudo
+#- name: Reload systemd daemons
+#  command: systemctl daemon-reload
+#  notify: restart {{ item }}
+#  with_items:
+#  - helixcontroller
+#  - helixparticipant
+#  - prewm
+#  - postwm
+#  become: yes
 ...
diff --git a/dev-tools/ansible/roles/kafka/handlers/main.yml b/dev-tools/ansible/roles/kafka/handlers/main.yml
index 223fd9b..9856989 100644
--- a/dev-tools/ansible/roles/kafka/handlers/main.yml
+++ b/dev-tools/ansible/roles/kafka/handlers/main.yml
@@ -22,18 +22,24 @@
 # Kafka related handlers
 - name: start kafka
   service: name=kafka state=started enabled=yes
+  become: yes
 
 - name: stop kafka
   service: name=kafka state=stopped enabled=yes
+  become: yes
 
 - name: restart kafka
   service: name=kafka state=restarted enabled=yes
+  become: yes
 
 - name: start kafka-rest-proxy
   service: name=kafka-rest-proxy state=started enabled=yes
+  become: yes
 
 - name: stop kafka-rest-proxy
   service: name=kafka-rest-proxy state=stopped enabled=yes
+  become: yes
 
 - name: restart kafka-rest-proxy
   service: name=kafka-rest-proxy state=restarted enabled=yes
+  become: yes
diff --git a/dev-tools/ansible/roles/kafka/tasks/main.yml b/dev-tools/ansible/roles/kafka/tasks/main.yml
index a0ee36a..f0eeb24 100644
--- a/dev-tools/ansible/roles/kafka/tasks/main.yml
+++ b/dev-tools/ansible/roles/kafka/tasks/main.yml
@@ -24,6 +24,7 @@
 - name: Check kafka package availability
   stat: path={{ kafka_dir }}
   register: kafka_package
+  become: yes
 
 # Download Kafka
 - name: Download and unarchive Kafka from {{ kafka_tgz_url }}
@@ -38,6 +39,7 @@
 # Create kafka logs directory
 - name: Create kafka logs directory
   file: path="{{ kafka_dir }}/logs" state=directory owner={{ user }} group={{ group }}
+  become: yes
 
 # Config kafka server and start
 - name: Copy kafka server properties file
@@ -65,7 +67,7 @@
   with_items:
     - "{{ kafka_listener_port }}/tcp"
     - "{{ kafka_rest_proxy_listener_port }}/tcp"
-  become_user: root
+  become: yes
 
 - name: systemd install kafka service script
   template: src=kafka.service.j2


Mime
View raw message