airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject [32/50] [abbrv] airavata git commit: Change hostnames in runtime to avoid address bind issue
Date Thu, 29 Sep 2016 12:45:09 GMT
Change hostnames in runtime to avoid address bind issue


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/2ab5a723
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/2ab5a723
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/2ab5a723

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 2ab5a7236b771ef045b29ffd9131fca37260cfb5
Parents: 475f687
Author: Shameera Rathnayaka <shameerainfo@gmail.com>
Authored: Wed Sep 14 13:10:43 2016 -0400
Committer: Shameera Rathnayaka <shameerainfo@gmail.com>
Committed: Wed Sep 14 13:10:43 2016 -0400

----------------------------------------------------------------------
 group_vars/all.yml                      | 10 ++++----
 roles/api-orch/tasks/main.yml           | 11 +++++++--
 roles/common/tasks/main.yml             |  4 ++--
 roles/database/tasks/main.yml           | 15 ++++++------
 roles/database/tasks/secure_install.yml |  1 +
 roles/gfac/tasks/main.yml               | 10 +++++---
 roles/registry/tasks/main.yml           |  8 +++++--
 site.yml                                | 35 +++++++++++++++++++++-------
 8 files changed, 63 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/2ab5a723/group_vars/all.yml
----------------------------------------------------------------------
diff --git a/group_vars/all.yml b/group_vars/all.yml
index b1efac4..7dfd8d4 100644
--- a/group_vars/all.yml
+++ b/group_vars/all.yml
@@ -1,9 +1,9 @@
 ---
 ansible_connection: ssh
-ansible_ssh_user: centos
-# ansible_ssh_user: root
-# ansible_ssh_private_key_file: /Users/syodage/Projects/scigap/JetCloud/jetcloud.key
-ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-aws.pem.txt
+# ansible_ssh_user: centos
+ansible_ssh_user: root
+ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-jetstream.pem
+# ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-aws.pem.txt
 
 user: centos
 group: centos
@@ -71,7 +71,7 @@ client_truststore_passwd: "airavata"
 cred_keystore: "airavata_sym.jks"
 cred_keystore_passwd: "airavata"
 cred_keystore_alias: "airavata"
-cred_store_server_host: "{{ groups['database'][0] }}"
+cred_store_server_host: "{{ ansible_fqdn }}"
 cred_store_port: "8960"
 keystores_location: "{{ deployment_dir }}/keystores"
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/2ab5a723/roles/api-orch/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/api-orch/tasks/main.yml b/roles/api-orch/tasks/main.yml
index 369bb2b..c9c5227 100644
--- a/roles/api-orch/tasks/main.yml
+++ b/roles/api-orch/tasks/main.yml
@@ -19,10 +19,17 @@
   file: path="{{ api_orch_dir }}/{{ airavata_dist }}" state=absent
 
 - name: Copy distribution to api-orcheatrator deployment directory
-  unarchive: src="{{ airavata_source_dir }}/distribution/target/{{ airavata_dist_name }}"
+  unarchive: src="{{ airavata_source_dir }}/modules/distribution/target/{{ airavata_dist_name
}}"
              dest="{{ api_orch_dir }}/"
              copy=no
 
+- name: set api-orch private ip
+  set_fact:
+    api_server_host: "{{ ansible_eth0.ipv4.address }}"
+    orchestrator_host: "{{ ansible_eth0.ipv4.address }}"
+    cred_store_server_host: "{{ ansible_eth0.ipv4.address }}"
+
+
 - name: Copy Airavata server properties file
   template: src=airavata-server.properties.j2
             dest="{{ api_orch_dir }}/{{ airavata_dist }}/bin/airavata-server.properties"
@@ -49,7 +56,7 @@
     - "{{ api_server_port }}/tcp"
     - "{{ orchestrator_port }}/tcp"
     - "{{ cred_store_port }}/tcp"
-  become: yes
+  become_user: root
 
 - name: stop api-orch
   command: ./bin/airavata-server-stop.sh -f

http://git-wip-us.apache.org/repos/asf/airavata/blob/2ab5a723/roles/common/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml
index 4289515..eac1a60 100644
--- a/roles/common/tasks/main.yml
+++ b/roles/common/tasks/main.yml
@@ -4,7 +4,7 @@
   with_items:
     - git
     - maven
-  become: yes
+  become_user: root
 
 # Setup airavata source
 - name: Create deployment directory {{ deployment_dir }}
@@ -27,7 +27,7 @@
 - name: Run maven build
   command: mvn clean install -Dmaven.test.skip=true chdir="{{ airavata_source_dir }}/"
   environment:
-      MAVEN_OPTS: "-Xmx1024m"
+      MAVEN_OPTS: "-Xmx2048m"
   register: build
   tags: update
   # when: (checkout|success) and (checkout.changed == true)

http://git-wip-us.apache.org/repos/asf/airavata/blob/2ab5a723/roles/database/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/database/tasks/main.yml b/roles/database/tasks/main.yml
index 8a02227..17e5b0d 100644
--- a/roles/database/tasks/main.yml
+++ b/roles/database/tasks/main.yml
@@ -5,15 +5,15 @@
 # Install Mysql
 - name: install epel release
   yum: name=epel-release state=present
-  become: yes
+  become_user: root
 
 - name: install pip
   yum: name=python-pip state=latest update_cache=yes
-  become: yes
+  become_user: root
 
 - name: install pexpect
   pip: name=pexpect
-  become: yes
+  become_user: root
 
 # - name: Adds Python MySQL support on Debian/Ubuntu
 #   apt: pkg="python-mysqldb" state=present
@@ -21,17 +21,17 @@
 
 - name: Adds Python MySQL support on RedHat/CentOS
   yum: name=MySQL-python state=present
-  become: yes
+  become_user: root
   # when: ansible_os_family == 'RedHat'
 
 - name: install mariadb
   yum: name="{{ item }}" state=latest update_cache=yes
   with_items: "{{ mysql_packages }}"
-  become: yes
+  become_user: root
 
 - name: start mariadb
   service: name=mariadb state=started enabled=yes
-  become: yes
+  become_user: root
 
 - include: secure_install.yml
 
@@ -57,5 +57,4 @@
 - name: open firewall port {{ db_server_port }}
   firewalld: port="{{ db_server_port }}/tcp"
              zone=public permanent=true state=enabled immediate=yes
-  become: yes
-...
+  become_user: root

http://git-wip-us.apache.org/repos/asf/airavata/blob/2ab5a723/roles/database/tasks/secure_install.yml
----------------------------------------------------------------------
diff --git a/roles/database/tasks/secure_install.yml b/roles/database/tasks/secure_install.yml
index 39ced65..a747419 100644
--- a/roles/database/tasks/secure_install.yml
+++ b/roles/database/tasks/secure_install.yml
@@ -5,6 +5,7 @@
               password="{{ mysql_root_password }}"
               host=localhost
               login_user=root
+              # login_password="{{ mysql_root_password }}"
 
 - name: Copy .my.cnf file
   template: src=my.cnf.j2 dest="{{ user_home }}/.my.cnf"

http://git-wip-us.apache.org/repos/asf/airavata/blob/2ab5a723/roles/gfac/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/gfac/tasks/main.yml b/roles/gfac/tasks/main.yml
index 06d6dda..30874e6 100644
--- a/roles/gfac/tasks/main.yml
+++ b/roles/gfac/tasks/main.yml
@@ -20,10 +20,14 @@
   file: path="{{ gfac_dir }}/{{ airavata_dist }}" state=absent
 
 - name: Copy distribution to gfac deployment directory
-  unarchive: src="{{ airavata_source_dir }}/distribution/target/{{ airavata_dist_name }}"
+  unarchive: src="{{ airavata_source_dir }}/modules/distribution/target/{{ airavata_dist_name
}}"
              dest="{{ gfac_dir }}/"
              copy=no
 
+- name: set gfac private ip
+  set_fact:
+    gfac_host: "{{ ansible_eth0.ipv4.address }}"
+
 - name: Copy Airavata server properties file
   template: src=airavata-server.properties.j2
             dest="{{ gfac_dir }}/{{ airavata_dist }}/bin/airavata-server.properties"
@@ -47,14 +51,14 @@
 
 - name: Open firwall ports
   firewalld: port="{{ gfac_port }}/tcp" zone=public permanent=true state=enabled immediate=yes
-  become: yes
+  become_user: root
 
 - name: stop gfac
   command: ./bin/airavata-server-stop.sh -f
            chdir="{{ gfac_dir }}/{{ airavata_dist }}/"
            removes="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
 
-- name: start gfac 
+- name: start gfac
   command: ./bin/airavata-server-start.sh gfac -d
            chdir="{{ gfac_dir }}/{{ airavata_dist }}/"
            creates="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"

http://git-wip-us.apache.org/repos/asf/airavata/blob/2ab5a723/roles/registry/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/registry/tasks/main.yml b/roles/registry/tasks/main.yml
index 1c4ba85..9bd2784 100644
--- a/roles/registry/tasks/main.yml
+++ b/roles/registry/tasks/main.yml
@@ -19,10 +19,14 @@
   file: path="{{ registry_dir }}/{{ airavata_dist }}" state=absent
 
 - name: Copy distribution to registry deployment directory
-  unarchive: src="{{ airavata_source_dir }}/distribution/target/{{ airavata_dist_name }}"
+  unarchive: src="{{ airavata_source_dir }}/modules/distribution/target/{{ airavata_dist_name
}}"
              dest="{{ registry_dir }}/"
              copy=no
 
+- name: set gfac private ip
+  set_fact:
+    registry_host: "{{ ansible_eth0.ipv4.address }}"
+
 - name: Copy Airavata server properties file
   template: src=airavata-server.properties.j2
             dest="{{ registry_dir }}/{{ airavata_dist }}/bin/airavata-server.properties"
@@ -39,7 +43,7 @@
 
 - name: Open firwall ports
   firewalld: port="{{ registry_port }}/tcp" zone=public permanent=true state=enabled immediate=yes
-  become: yes
+  become_user: root
 
 - name: stop registry
   command: ./bin/airavata-server-stop.sh -f

http://git-wip-us.apache.org/repos/asf/airavata/blob/2ab5a723/site.yml
----------------------------------------------------------------------
diff --git a/site.yml b/site.yml
index 036229c..69ff15b 100644
--- a/site.yml
+++ b/site.yml
@@ -14,41 +14,58 @@
     - rabbitmq
 
 - hosts: database
-  tags: mysql
+  tags: mysql , airavata
   roles:
     - env_setup
-    - database
+    - role: database
+      become: yes
+      become_user: "{{user}}"
 
 - hosts: wso2is
   tags: wso2is
   roles:
     - env_setup
     - java
-    - wso2_is
+    - role: wso2_is
+      become: yes
+      become_user: "{{user}}"
+
 
 - hosts: gfac
   tags: gfac, airavata
   roles:
     - env_setup
     - java
-    - common
-    - gfac
+    - role: common
+      become: yes
+      become_user: "{{user}}"
+    - role: gfac
+      become: yes
+      become_user: "{{user}}"
 
 - hosts: api-orch
   tags: api-orch, airavata
   roles:
     - env_setup
     - java
-    - common
-    - api-orch
+    - role: common
+      become: yes
+      become_user: "{{user}}"
+    - role: api-orch
+      become: yes
+      become_user: "{{user}}"
 
 - hosts: registry
   tags: registry, airavata
   roles:
     - env_setup
     - java
-    - common
-    - registry
+    - role: common
+      become: yes
+      become_user: "{{user}}"
+    - role: registry
+      become: yes
+      become_user: "{{user}}"
 
 - hosts: pga
   tags: pga


Mime
View raw message