You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2016/09/29 12:44:38 UTC

[01/50] [abbrv] airavata git commit: Airavata ansible scripts [Forced Update!]

Repository: airavata
Updated Branches:
  refs/heads/lahiru/AIRAVATA-2065 b19b0edb7 -> fcfa39234 (forced update)


Airavata ansible scripts


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 83e98ae383c01f72d1b0ca097f75bcf52cf15f1b
Parents: f28a47e
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Thu Jul 28 12:12:54 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Thu Jul 28 12:12:54 2016 -0400

----------------------------------------------------------------------
 group_vars/all                                  |  51 ++++
 hosts                                           |  18 ++
 .../files/mysql-connector-java-5.1.37-bin.jar   | Bin 0 -> 985603 bytes
 roles/api-orch/handlers/main.yml                |  10 +
 roles/api-orch/tasks/main.yml                   |  54 ++++
 .../templates/airavata-server.properties.j2     | 278 +++++++++++++++++++
 roles/api-orch/templates/gfac-config.yaml.j2    | 111 ++++++++
 roles/api-orch/vars/main.yml                    |   3 +
 roles/common/files/airavata.jks                 | Bin 0 -> 1410 bytes
 roles/common/files/client_truststore.jks        | Bin 0 -> 3558 bytes
 roles/common/handlers/main.yml                  |  45 +++
 roles/common/tasks/main.yml                     |  40 +++
 roles/common/vars/main.yml                      |   5 +
 .../files/mysql-connector-java-5.1.37-bin.jar   | Bin 0 -> 985603 bytes
 roles/gfac/handlers/main.yml                    |   8 +
 roles/gfac/tasks/main.yml                       |  53 ++++
 .../templates/airavata-server.properties.j2     | 278 +++++++++++++++++++
 roles/gfac/templates/gfac-config.yaml.j2        | 111 ++++++++
 roles/gfac/vars/main.yml                        |   3 +
 roles/rabbitmq/handlers/main.yml                |  10 +
 roles/rabbitmq/tasks/main.yml                   |  44 +++
 roles/setup/tasks/main.yml                      |  44 +++
 roles/setup/tasks/redhat.yml                    |  12 +
 roles/setup/vars/main.yml                       |  15 +
 roles/zookeeper/handlers/main.yml               |  19 ++
 roles/zookeeper/tasks/main.yml                  |  15 +
 roles/zookeeper/templates/zoo.cfg.j2            |  28 ++
 roles/zookeeper/vars/main.yml                   |  17 ++
 site.yml                                        |  25 ++
 29 files changed, 1297 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/group_vars/all
----------------------------------------------------------------------
diff --git a/group_vars/all b/group_vars/all
new file mode 100644
index 0000000..2c2cb95
--- /dev/null
+++ b/group_vars/all
@@ -0,0 +1,51 @@
+---
+ansible_connection: ssh
+ansible_ssh_user: root
+ansible_ssh_private_key_file: /Users/syodage/Projects/scigap/JetCloud/jetcloud.key
+
+user: airavata
+group: airavata
+user_home: "/home/{{ user }}"
+deployment_dir: "{{ user_home }}/master-deployment"
+
+airavata_dist: "apache-airavata-server-0.17-SNAPSHOT"
+airavata_dist_name: "{{ airavata_dist }}-bin.tar.gz"
+
+db_server: "gw62.iu.xsede.org"
+db_user: "SciGaP15Deploy"
+db_password: "xxxxxxxxxxx"
+app_catalog: "app_catalog"
+exp_catalog: "exp_catalog"
+replica_catalog: "replica_catalog"
+workflow_catalog: "wf_catalog"
+credential_store: "credential_store"
+
+rabbitmq_server: "localhost"
+rabbitmq_vhost: "master"
+rabbitmq_user: "airavata"
+rabbitmq_password: "airavata"
+rabbitmq_broker_url: "amqp://{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ rabbitmq_server}}:5672/{{ rabbitmq_vhost }}"
+
+key_store: "airavata.jks"
+cred_key_store: "client_truststore.jks"
+cred_store_server_host: "gw77.iu.xsede.org"
+key_stores_location: "{{ deployment_dir }}/keystores"
+
+mysql_connector_jar: "mysql-connector-java-5.1.37-bin.jar"
+
+api_server_name: "apiserver-node0"
+api_server_host: "{{ host_address }}"
+api_server_port: "8930"
+
+orchestrator_name: "orchestrator-node0"
+orchestrator_host: "{{ host_address }}"
+orchestrator_port: "8940"
+
+gfac_name: "gfac-node0"
+gfac_host: "{{ host_address }}"
+gfac_port: "8950"
+
+monitor_email_address: "jobs@scigap.org"
+monitor_email_password: "xxxxx"
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/hosts
----------------------------------------------------------------------
diff --git a/hosts b/hosts
new file mode 100644
index 0000000..11a03c7
--- /dev/null
+++ b/hosts
@@ -0,0 +1,18 @@
+# inventory file : production
+
+[api-orch]
+149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
+#149.165.171.11 host_name=js-171-11 host_address=149.165.171.11
+
+[gfac]
+149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
+#149.165.171.11 host_name=js-171-11 host_address=149.165.171.11
+
+[pga]
+149.165.156.196
+
+[zookeeper]
+149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
+
+[rabbitmq]
+149.165.156.196 host_name=js-156-196 host_address=149.165.156.196

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/api-orch/files/mysql-connector-java-5.1.37-bin.jar
----------------------------------------------------------------------
diff --git a/roles/api-orch/files/mysql-connector-java-5.1.37-bin.jar b/roles/api-orch/files/mysql-connector-java-5.1.37-bin.jar
new file mode 100644
index 0000000..465af67
Binary files /dev/null and b/roles/api-orch/files/mysql-connector-java-5.1.37-bin.jar differ

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/api-orch/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/api-orch/handlers/main.yml b/roles/api-orch/handlers/main.yml
new file mode 100644
index 0000000..c1a828d
--- /dev/null
+++ b/roles/api-orch/handlers/main.yml
@@ -0,0 +1,10 @@
+---
+
+# Api server, Orchestrator related handlers
+- name: start api-orch
+  command: ./bin/airavata-server-start.sh api-orch -d chdir="{{ api_orch_dir }}/{{ airavata_dist }}/" creates="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
+
+- name: stop api-orch
+  command: ./bin/airavata-server-stop.sh -f chdir="{{ api_orch_dir }}/{{ airavata_dist }}/" removes="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/api-orch/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/api-orch/tasks/main.yml b/roles/api-orch/tasks/main.yml
new file mode 100644
index 0000000..827f520
--- /dev/null
+++ b/roles/api-orch/tasks/main.yml
@@ -0,0 +1,54 @@
+---
+################################################################################
+# api-orch deployment
+- name: Create api-orchestrator deployment directory
+  file: path="{{ api_orch_dir }}" state=directory owner="{{ user }}" group="{{ group }}"
+  when: build|success
+  tags: deploy, update_api_orch, update
+
+- name: Check previous deployments
+  stat: path="{{ api_orch_dir }}/{{ airavata_dist }}" get_md5=no get_checksum=no
+  register: pp
+  tags: deploy, update_api_orch, update
+
+- block:
+    - name: stop api-orch
+      command: ./bin/airavata-server-stop.sh -f chdir="{{ api_orch_dir }}/{{ airavata_dist }}/" removes="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
+
+    - name: Delete previous deployments
+      file: path="{{ gfac_dir }}/{{ airavata_dist }}" state=absent
+
+  when: pp.stat.exists == True
+  tags: deploy, update_api_orch, update
+#
+# - block:
+#     - name: Remove pervious backup directory
+#       file: path="{{ api_orch_dir }}/backup" state=absent
+#       notify:
+#         - stop api-orch
+#
+#     - name: Backup previous deployment directory
+#       copy: src="{{ api_orch_dir }}/{{ airavata_dist }}" dest="{{ api_orch_dir }}/backup" copy=no
+#
+#   when: p.stat.exist == True
+#   tags: deploy update_api_orch update
+
+- name: Copy distribution to api-orcheatrator deployment directory
+  unarchive: src="{{ airavata_source_dir }}/distribution/target/{{ airavata_dist_name }}" dest="{{ api_orch_dir }}/" copy=no
+  become: yes
+  become_user: "{{ user }}"
+  tags: deploy, update_api_orch, update
+
+- name: Copy Airavata server properties file
+  template: src=airavata-server.properties.j2 dest="{{ api_orch_dir }}/{{ airavata_dist }}/bin/airavata-server.properties" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r"
+  tags: deploy, update_api_orch, update
+
+- name: Copy Gfac configuration file
+  template: src=gfac-config.yaml.j2 dest="{{ api_orch_dir }}/{{ airavata_dist }}/bin/gfac-config.yaml" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r"
+  tags: deploy, update_api_orch, update
+
+- name: Copy Mysql jar to lib
+  copy: src="{{ mysql_connector_jar }}" dest="{{ api_orch_dir }}/{{ airavata_dist }}/lib/{{ mysql_connector_jar }}" owner="{{ user }}" group="{{ group }}"
+  tags: deploy, update_api_orch, update
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/api-orch/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/api-orch/templates/airavata-server.properties.j2 b/roles/api-orch/templates/airavata-server.properties.j2
new file mode 100644
index 0000000..449a7fd
--- /dev/null
+++ b/roles/api-orch/templates/airavata-server.properties.j2
@@ -0,0 +1,278 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+#
+
+###########################################################################
+#
+#  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
+# MySql database configuration
+registry.jdbc.driver=com.mysql.jdbc.Driver
+registry.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ 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
+
+# Properties for default user mode
+default.registry.user=admin
+default.registry.password=admin
+default.registry.password.hash.method=SHA
+default.registry.gateway=default
+
+###########################################################################
+#  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
+# MySql database configuration
+appcatalog.jdbc.driver=com.mysql.jdbc.Driver
+appcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ 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
+# MySql database configuration
+replicacatalog.jdbc.driver=com.mysql.jdbc.Driver
+replicacatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
+replicacatalog.jdbc.user={{ db_user }}
+replicacatalog.jdbc.password={{ db_password }}
+replicacatalog.validationQuery=SELECT 1 from CONFIGURATION
+
+###########################################################################
+#  Workflow Catalog DB Configuration
+###########################################################################
+#for derby [AiravataJPARegistry]
+#workflowcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+#workflowcatalog.jdbc.url=jdbc:derby://localhost:1527/workflow_catalog;create=true;user=airavata;password=airavata
+# MySql database configuration
+workflowcatalog.jdbc.driver=com.mysql.jdbc.Driver
+workflowcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
+workflowcatalog.jdbc.user={{ db_user }}
+workflowcatalog.jdbc.password={{ db_password }}
+workflowcatalog.validationQuery=SELECT 1 from CONFIGURATION
+
+###########################################################################
+#  User Profile MongoDB Configuration
+###########################################################################
+userprofile.mongodb.host=localhost
+userprofile.mongodb.port=27017
+
+
+###########################################################################
+#  Server module Configuration
+###########################################################################
+#credential store server should be started before API server
+#This is obsolete property with new script files.
+#servers=credentialstore,apiserver,orchestrator
+
+
+###########################################################################
+#  API Server Configurations
+###########################################################################
+apiserver.name={{ api_server_name }}
+apiserver.host={{ api_server_host }}
+apiserver.port={{ api_server_port }}
+apiserver.min.threads=50
+
+###########################################################################
+#  API Server SSL Configurations
+###########################################################################
+apiserver.tls.enabled=true
+apiserver.keystore={{ key_stores_location }}/{{ key_store }}
+apiserver.keystore.password=airavata
+
+###########################################################################
+#  Orchestrator Server Configurations
+###########################################################################
+orchestrator.server.name={{ orchestrator_name }}
+orchestrator.server.host={{ orchestrator_host }}
+orchestrator.server.port={{ orchestrator_port }}
+orchestrator.server.min.threads=50
+job.validators=org.apache.airavata.orchestrator.core.validator.impl.BatchQueueValidator,org.apache.airavata.orchestrator.core.validator.impl.ExperimentStatusValidator
+submitter.interval=10000
+threadpool.size=10
+start.submitter=true
+embedded.mode=true
+enable.validation=true
+
+
+###########################################################################
+#  GFac Server Configurations
+###########################################################################
+gfac.server.name={{ gfac_name }}
+gfac.server.host={{ gfac_host }}
+gfac.server.port={{ gfac_port }}
+gfac.thread.pool.size=50
+host.scheduler=org.apache.airavata.gfac.impl.DefaultHostScheduler
+
+
+
+###########################################################################
+# Airavata Workflow Interpreter Configurations
+###########################################################################
+workflowserver=org.apache.airavata.api.server.WorkflowServer
+enactment.thread.pool.size=10
+
+#to define custom workflow parser user following property
+#workflow.parser=org.apache.airavata.workflow.core.parser.AiravataWorkflowBuilder
+
+
+
+###########################################################################
+#  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=/home/airavata/airavata_sym.jks
+credential.store.keystore.alias=airavata
+credential.store.keystore.password=airavata
+credential.store.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ credential_store }}
+credential.store.jdbc.user={{ db_user }}
+credential.store.jdbc.password={{ db_password }}
+credential.store.jdbc.driver=com.mysql.jdbc.Driver
+credential.store.server.host={{ cred_store_server_host }}
+credential.store.server.port=8960
+credentialstore=org.apache.airavata.credential.store.server.CredentialStoreServer
+
+# 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
+email.based.monitor.host=imap.gmail.com
+email.based.monitor.address={{ monitor_email_address }}
+email.based.monitor.password={{ monitor_email_password }}
+email.based.monitor.folder.name=INBOX
+# either imaps or pop3
+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
+
+###########################################################################
+# 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 }}
+status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
+task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQProcessLaunchPublisher
+rabbitmq.status.exchange.name=airavata_rabbitmq_exchange
+rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
+durable.queue=false
+prefetch.count=200
+launch.queue.name=launch.queue
+cancel.queue.name=cancel.queue
+activity.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
+rabbitmq.exchange.name=airavata_rabbitmq_exchange
+
+###########################################################################
+# Zookeeper Server Configuration
+###########################################################################
+embedded.zk=false
+zookeeper.server.connection=localhost:2181
+zookeeper.timeout=30000
+
+########################################################################
+## API Security Configuration
+########################################################################
+api.secured=true
+security.manager.class=org.apache.airavata.api.server.security.DefaultAiravataSecurityManager
+### TLS related configuration ####
+TLS.enabled=true
+TLS.api.server.port=9930
+TLS.client.timeout=10000
+#### keystore configuration ####
+keystore.path={{ key_stores_location }}/{{ key_store }}
+keystore.password=airavata
+#### trust store configuration ####
+trust.store={{ key_stores_location }}/{{ cred_key_store }}
+trust.store.password=airavata
+#### remote authorization server url ####
+remote.oauth.authorization.server=https://idp.scigap.org:9443/services/
+#### xacml based authorization policy ####
+authorization.policy=airavata-default-xacml-policy
+#### authorization cache related configuration ####
+authz.cache.enabled=true
+authz.cache.manager.class=org.apache.airavata.api.server.security.authzcache.DefaultAuthzCacheManager
+in.memory.cache.size=1000

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/api-orch/templates/gfac-config.yaml.j2
----------------------------------------------------------------------
diff --git a/roles/api-orch/templates/gfac-config.yaml.j2 b/roles/api-orch/templates/gfac-config.yaml.j2
new file mode 100644
index 0000000..3df5832
--- /dev/null
+++ b/roles/api-orch/templates/gfac-config.yaml.j2
@@ -0,0 +1,111 @@
+##################################################################
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+#
+################################################################
+
+jobSubmitters:
+  - submissionProtocol: SSH
+    taskClass: org.apache.airavata.gfac.impl.task.DefaultJobSubmissionTask
+#   properties:
+#     - userName: airavata
+#       passPhrase: airavata
+#       privateKey: /path/to/the/privatekey
+#       publicKey: /path/to/the/publickey
+#       hostName: remote.client.hostName
+
+  - submissionProtocol: SSH_FORK
+    taskClass: org.apache.airavata.gfac.impl.task.ForkJobSubmissionTask
+
+  - submissionProtocol: LOCAL
+    taskClass: org.apache.airavata.gfac.impl.task.DefaultJobSubmissionTask
+
+# Following job subbmitters are not yet implemented.
+
+ # - submissionProtocol: GSISSH
+ #   taskClass: org.apache.airavata.task.adapters.GSISSHJobSubmissionTask
+commonTasks:
+   - type: SETUP
+     taskClass: org.apache.airavata.task.common.SetupTask
+
+   - type: CLEANUP
+     taskClass: org.apache.airavata.task.common.CleanupTask
+
+fileTransferTasks:
+#  - transferProtocol: SCP
+#    taskClass: org.apache.airavata.gfac.impl.task.DataStageTask
+
+# If your client doen't run the same instance where airavata server is running then you need to comment above
+# DataStageTask and uncomment SCPDataStageTask. To work with SCPDataStageTask, you either need to
+# provide ssh keys or password.
+
+  - transferProtocol: SCP
+    taskClass: org.apache.airavata.gfac.impl.task.SCPDataStageTask
+    properties:
+     - userName: root
+       passPhrase: ultrascan 
+       privateKeyPath: /home/airavata/.ssh/id_rsa
+       publicKeyPath: /home/airavata/.ssh/id_rsa.pub
+       hostName: gw75.iu.xsede.org 
+       inputPath: /var/www/portal/experimentData/
+#      password: password
+
+# Following transfer tasks are not yet implemented.
+  #- transferProtocol: SFTP
+  #  taskClass: org.apache.airavata.task.adapters.SFTPFileTransferTask
+
+  #- transferProtocol: GRIDFTP
+  #  taskClass: org.apache.airavata.task.adapters.GRIDFTPFileTransferTask
+
+  #- transferProtocol: LOCAL
+  #  taskClass: org.apache.airavata.task.adapters.LocalFileTransferTask
+
+resources:
+  - jobManagerType: PBS
+    commandOutputParser: org.apache.airavata.gfac.impl.job.PBSOutputParser
+    emailParser: org.apache.airavata.gfac.monitor.email.parser.PBSEmailParser
+    resourceEmailAddresses:
+      - pbsconsult@sdsc.edu  # gordon
+      - adm@trident.bigred2.uits.iu.edu # Bigred2
+      - root <ad...@trident.bigred2.uits.iu.edu> # Bigred2
+      - root <ad...@scyld.localdomain> # alamo
+      - root <ad...@m2.karst.uits.iu.edu> #karst
+
+  - jobManagerType: SLURM
+    commandOutputParser: org.apache.airavata.gfac.impl.job.SlurmOutputParser
+    emailParser: org.apache.airavata.gfac.monitor.email.parser.SLURMEmailParser
+    resourceEmailAddresses:
+      - SDSC Admin <sl...@comet-fe3.sdsc.edu> # comet
+      - slurm@batch1.stampede.tacc.utexas.edu # stampede
+      - SDSC Admin <sl...@comet-fe4.sdsc.edu> # comet new
+      - Slurm <sl...@psc.edu> # bridges 
+      - Slurm Daemon <sl...@odin.oscer.ou.edu> # OU Schooner
+
+  - jobManagerType: UGE
+    commandOutputParser: org.apache.airavata.gfac.impl.job.UGEOutputParser
+    emailParser: org.apache.airavata.gfac.monitor.email.parser.UGEEmailParser
+    resourceEmailAddresses:
+      - ls4.tacc.utexas.edu # contain Lonestar
+
+  - jobManagerType: LSF
+    commandOutputParser: org.apache.airavata.gfac.impl.job.LSFOutputParser
+    emailParser: org.apache.airavata.gfac.monitor.email.parser.LSFEmailParser
+    resourceEmailAddresses:
+      - iu.xsede.edu # test resource mail address
+
+  - jobManagerType: FORK
+    commandOutputParser: org.apache.airavata.gfac.impl.job.ForkOutputParser

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/api-orch/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/api-orch/vars/main.yml b/roles/api-orch/vars/main.yml
new file mode 100644
index 0000000..16b85b0
--- /dev/null
+++ b/roles/api-orch/vars/main.yml
@@ -0,0 +1,3 @@
+---
+# API Server and Orchestrator related variables
+api_orch_dir: "{{ deployment_dir }}/api-orchestrator"

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/common/files/airavata.jks
----------------------------------------------------------------------
diff --git a/roles/common/files/airavata.jks b/roles/common/files/airavata.jks
new file mode 100644
index 0000000..e0e46e2
Binary files /dev/null and b/roles/common/files/airavata.jks differ

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/common/files/client_truststore.jks
----------------------------------------------------------------------
diff --git a/roles/common/files/client_truststore.jks b/roles/common/files/client_truststore.jks
new file mode 100644
index 0000000..4d39906
Binary files /dev/null and b/roles/common/files/client_truststore.jks differ

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/common/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/common/handlers/main.yml b/roles/common/handlers/main.yml
new file mode 100644
index 0000000..d5c99e94
--- /dev/null
+++ b/roles/common/handlers/main.yml
@@ -0,0 +1,45 @@
+---
+# Handler file
+# Can have multiple handlers
+
+# Zookeeper related handlers
+- name: start zookeeper
+  command: ./bin/zkServer.sh start chdir={{zookeeper_dir}}/ creates={{zookeeper_data_dir}}/zookeeper_server.pid
+  become: true
+  become_user: "{{ user }}"
+
+- name: stop zookeeper
+  command: ./bin/zkServer.sh stop chdir={{zookeeper_dir}}/ removes={{zookeeper_data_dir}}/zookeeper_server.pid
+  become: true
+  become_user: "{{ user }}"
+
+- name: restart zookeeper
+  command: ./bin/zkServer.sh restart chdir={{zookeeper_dir}}/ removes={{zookeeper_data_dir}}/zookeeper_server.pid
+  become: true
+  become_user: "{{ user }}"
+
+# Rabbitmq related handlers
+- name: start rabbitmq
+  service: name=rabbitmq-server state=started
+
+- name: stop rabbitmq
+  service: name=rabbitmq-server state=stopped
+
+- name: restart rabbitmq
+  service: name=rabbitmq-server state=restarted
+
+# Gfac related handlers
+- name: start gfac
+  command: ./bin/airavata-server-start.sh gfac -d chdir="{{ gfac_dir }}/{{ airavata_dist }}/" creates="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
+
+- name: stop gfac
+  command: ./bin/airavata-server-stop.sh -f chdir="{{ gfac_dir }}/{{ airavata_dist }}/" removes="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
+
+# Gfac related handlers
+- name: start api-orch
+  command: ./bin/airavata-server-start.sh api-orch -d chdir="{{ api_orch_dir }}/{{ airavata_dist }}/" creates="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
+
+- name: stop api-orch
+  command: ./bin/airavata-server-stop.sh -f chdir="{{ api_orch_dir }}/{{ airavata_dist }}/" removes="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/common/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml
new file mode 100644
index 0000000..18d628d
--- /dev/null
+++ b/roles/common/tasks/main.yml
@@ -0,0 +1,40 @@
+---
+# Setup airavata source
+- name: Create deployment directory {{ deployment_dir }}
+  file: path={{ deployment_dir }} state=directory mode=0755
+  become: true
+  become_user: "{{ user }}"
+  tags: deploy
+
+- name: Create source directory
+  file: path={{airavata_source_dir}} state=directory mode=0755 owner={{ user }} group={{ group }}
+  tags: deploy
+
+- name: git checkout from airavata github
+  git: repo=https://git-wip-us.apache.org/repos/asf/airavata.git  dest="{{ airavata_source_dir }}" version=master
+  register: checkout
+  become: true
+  become_user: "{{ user }}"
+  tags: deploy, update_gfac, update_api_orch, update
+
+- name: Run maven build
+  command: mvn clean install -Dmaven.test.skip=true chdir="{{ airavata_source_dir }}/"
+  when: (checkout|success) or (checkout|skipped)
+  register: build
+  become: true
+  become_user: "{{ user }}"
+  tags: deploy, update_gfac, update_api_orch, update
+
+################################################################################
+# copy key store and trust store files
+- name: Create KeyStores directory
+  file: path="{{ key_stores_location }}" state=directory owner="{{ user }}" group="{{ group }}"
+  tags: deploy
+
+- name: Transfer airavata.jks KeyStore file
+  copy: src="{{ key_store }}" dest="{{ key_stores_location }}/{{ key_store }}" owner="{{ user }}" group="{{ group }}"
+  tags: deploy
+
+- name: Transfer client trust store KeyStore file
+  copy: src="{{ cred_key_store }}" dest="{{ key_stores_location }}/{{ cred_key_store }}" owner="{{ user }}" group="{{ group }}"
+  tags: deploy

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/common/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/common/vars/main.yml b/roles/common/vars/main.yml
new file mode 100644
index 0000000..0071b42
--- /dev/null
+++ b/roles/common/vars/main.yml
@@ -0,0 +1,5 @@
+---
+# Common variables
+airavata_source_dir: "{{ user_home }}/source"
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/gfac/files/mysql-connector-java-5.1.37-bin.jar
----------------------------------------------------------------------
diff --git a/roles/gfac/files/mysql-connector-java-5.1.37-bin.jar b/roles/gfac/files/mysql-connector-java-5.1.37-bin.jar
new file mode 100644
index 0000000..465af67
Binary files /dev/null and b/roles/gfac/files/mysql-connector-java-5.1.37-bin.jar differ

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/gfac/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/gfac/handlers/main.yml b/roles/gfac/handlers/main.yml
new file mode 100644
index 0000000..b3d85a9
--- /dev/null
+++ b/roles/gfac/handlers/main.yml
@@ -0,0 +1,8 @@
+---
+
+# Gfac related handlers
+- name: start gfac
+  command: ./bin/airavata-server-start.sh gfac -d chdir="{{ gfac_dir }}/{{ airavata_dist }}/" creates="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
+
+- name: stop gfac
+  command: ./bin/airavata-server-stop.sh -f chdir="{{ gfac_dir }}/{{ airavata_dist }}/" removes="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/gfac/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/gfac/tasks/main.yml b/roles/gfac/tasks/main.yml
new file mode 100644
index 0000000..bae85cf
--- /dev/null
+++ b/roles/gfac/tasks/main.yml
@@ -0,0 +1,53 @@
+---
+
+################################################################################
+# gfac deployments
+- name: Create Gfac deployment directory
+  file: path="{{ gfac_dir }}" state=directory owner="{{ user }}" group="{{ group }}"
+  when: build|success
+  tags: deploy, update_gfac, update
+
+- name: Check previous deployments
+  stat: path="{{ gfac_dir }}/{{ airavata_dist }}" get_md5=no get_checksum=no
+  register: p
+  tags: deploy, update_gfac, update
+
+- block:
+    - name: stop gfac
+      command: ./bin/airavata-server-stop.sh -f chdir="{{ gfac_dir }}/{{ airavata_dist }}/" removes="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
+
+    - name: Delete previous deployments
+      file: path="{{ gfac_dir }}/{{ airavata_dist }}" state=absent
+
+  when: p.stat.exists == True
+  tags: deploy, update_gfac, update
+
+# - block:
+#     - name: Remove pervious backup directory
+#       file: path="{{ gfac_dir }}/backup" state=absent
+#       notify:
+#         - stop gfac
+#
+#     - name: Backup previous deployment directory
+#       copy: src="{{ gfac_dir }}/{{ airavata_dist }}" dest="{{ gfac_dir }}/backup" copy=no
+#
+#   when: p.stat.exists == True
+#   tags: deploy, update_gfac, update
+
+- name: Copy distribution to gfac deployment directory
+  unarchive: src="{{ airavata_source_dir }}/distribution/target/{{ airavata_dist_name }}" dest="{{ gfac_dir }}/" copy=no
+  become: yes
+  become_user: "{{ user }}"
+  tags: deploy, update_gfac, update
+
+- name: Copy Airavata server properties file
+  template: src=airavata-server.properties.j2 dest="{{ gfac_dir }}/{{ airavata_dist }}/bin/airavata-server.properties" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r"
+  tags: deploy, update_gfac, update
+
+- name: Copy Gfac configuration file
+  template: src=gfac-config.yaml.j2 dest="{{ gfac_dir }}/{{ airavata_dist }}/bin/gfac-config.yaml" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r"
+  tags: deploy, update_gfac, update
+
+- name: Copy Mysql jar to lib
+  copy: src="{{ mysql_connector_jar }}" dest="{{ gfac_dir }}/{{ airavata_dist }}/lib/{{ mysql_connector_jar }}" owner="{{ user }}" group="{{ group }}"
+  tags: deploy, update_gfac, update

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/gfac/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/gfac/templates/airavata-server.properties.j2 b/roles/gfac/templates/airavata-server.properties.j2
new file mode 100644
index 0000000..449a7fd
--- /dev/null
+++ b/roles/gfac/templates/airavata-server.properties.j2
@@ -0,0 +1,278 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+#
+
+###########################################################################
+#
+#  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
+# MySql database configuration
+registry.jdbc.driver=com.mysql.jdbc.Driver
+registry.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ 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
+
+# Properties for default user mode
+default.registry.user=admin
+default.registry.password=admin
+default.registry.password.hash.method=SHA
+default.registry.gateway=default
+
+###########################################################################
+#  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
+# MySql database configuration
+appcatalog.jdbc.driver=com.mysql.jdbc.Driver
+appcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ 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
+# MySql database configuration
+replicacatalog.jdbc.driver=com.mysql.jdbc.Driver
+replicacatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
+replicacatalog.jdbc.user={{ db_user }}
+replicacatalog.jdbc.password={{ db_password }}
+replicacatalog.validationQuery=SELECT 1 from CONFIGURATION
+
+###########################################################################
+#  Workflow Catalog DB Configuration
+###########################################################################
+#for derby [AiravataJPARegistry]
+#workflowcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+#workflowcatalog.jdbc.url=jdbc:derby://localhost:1527/workflow_catalog;create=true;user=airavata;password=airavata
+# MySql database configuration
+workflowcatalog.jdbc.driver=com.mysql.jdbc.Driver
+workflowcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
+workflowcatalog.jdbc.user={{ db_user }}
+workflowcatalog.jdbc.password={{ db_password }}
+workflowcatalog.validationQuery=SELECT 1 from CONFIGURATION
+
+###########################################################################
+#  User Profile MongoDB Configuration
+###########################################################################
+userprofile.mongodb.host=localhost
+userprofile.mongodb.port=27017
+
+
+###########################################################################
+#  Server module Configuration
+###########################################################################
+#credential store server should be started before API server
+#This is obsolete property with new script files.
+#servers=credentialstore,apiserver,orchestrator
+
+
+###########################################################################
+#  API Server Configurations
+###########################################################################
+apiserver.name={{ api_server_name }}
+apiserver.host={{ api_server_host }}
+apiserver.port={{ api_server_port }}
+apiserver.min.threads=50
+
+###########################################################################
+#  API Server SSL Configurations
+###########################################################################
+apiserver.tls.enabled=true
+apiserver.keystore={{ key_stores_location }}/{{ key_store }}
+apiserver.keystore.password=airavata
+
+###########################################################################
+#  Orchestrator Server Configurations
+###########################################################################
+orchestrator.server.name={{ orchestrator_name }}
+orchestrator.server.host={{ orchestrator_host }}
+orchestrator.server.port={{ orchestrator_port }}
+orchestrator.server.min.threads=50
+job.validators=org.apache.airavata.orchestrator.core.validator.impl.BatchQueueValidator,org.apache.airavata.orchestrator.core.validator.impl.ExperimentStatusValidator
+submitter.interval=10000
+threadpool.size=10
+start.submitter=true
+embedded.mode=true
+enable.validation=true
+
+
+###########################################################################
+#  GFac Server Configurations
+###########################################################################
+gfac.server.name={{ gfac_name }}
+gfac.server.host={{ gfac_host }}
+gfac.server.port={{ gfac_port }}
+gfac.thread.pool.size=50
+host.scheduler=org.apache.airavata.gfac.impl.DefaultHostScheduler
+
+
+
+###########################################################################
+# Airavata Workflow Interpreter Configurations
+###########################################################################
+workflowserver=org.apache.airavata.api.server.WorkflowServer
+enactment.thread.pool.size=10
+
+#to define custom workflow parser user following property
+#workflow.parser=org.apache.airavata.workflow.core.parser.AiravataWorkflowBuilder
+
+
+
+###########################################################################
+#  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=/home/airavata/airavata_sym.jks
+credential.store.keystore.alias=airavata
+credential.store.keystore.password=airavata
+credential.store.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ credential_store }}
+credential.store.jdbc.user={{ db_user }}
+credential.store.jdbc.password={{ db_password }}
+credential.store.jdbc.driver=com.mysql.jdbc.Driver
+credential.store.server.host={{ cred_store_server_host }}
+credential.store.server.port=8960
+credentialstore=org.apache.airavata.credential.store.server.CredentialStoreServer
+
+# 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
+email.based.monitor.host=imap.gmail.com
+email.based.monitor.address={{ monitor_email_address }}
+email.based.monitor.password={{ monitor_email_password }}
+email.based.monitor.folder.name=INBOX
+# either imaps or pop3
+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
+
+###########################################################################
+# 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 }}
+status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
+task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQProcessLaunchPublisher
+rabbitmq.status.exchange.name=airavata_rabbitmq_exchange
+rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
+durable.queue=false
+prefetch.count=200
+launch.queue.name=launch.queue
+cancel.queue.name=cancel.queue
+activity.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
+rabbitmq.exchange.name=airavata_rabbitmq_exchange
+
+###########################################################################
+# Zookeeper Server Configuration
+###########################################################################
+embedded.zk=false
+zookeeper.server.connection=localhost:2181
+zookeeper.timeout=30000
+
+########################################################################
+## API Security Configuration
+########################################################################
+api.secured=true
+security.manager.class=org.apache.airavata.api.server.security.DefaultAiravataSecurityManager
+### TLS related configuration ####
+TLS.enabled=true
+TLS.api.server.port=9930
+TLS.client.timeout=10000
+#### keystore configuration ####
+keystore.path={{ key_stores_location }}/{{ key_store }}
+keystore.password=airavata
+#### trust store configuration ####
+trust.store={{ key_stores_location }}/{{ cred_key_store }}
+trust.store.password=airavata
+#### remote authorization server url ####
+remote.oauth.authorization.server=https://idp.scigap.org:9443/services/
+#### xacml based authorization policy ####
+authorization.policy=airavata-default-xacml-policy
+#### authorization cache related configuration ####
+authz.cache.enabled=true
+authz.cache.manager.class=org.apache.airavata.api.server.security.authzcache.DefaultAuthzCacheManager
+in.memory.cache.size=1000

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/gfac/templates/gfac-config.yaml.j2
----------------------------------------------------------------------
diff --git a/roles/gfac/templates/gfac-config.yaml.j2 b/roles/gfac/templates/gfac-config.yaml.j2
new file mode 100644
index 0000000..3df5832
--- /dev/null
+++ b/roles/gfac/templates/gfac-config.yaml.j2
@@ -0,0 +1,111 @@
+##################################################################
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+#
+################################################################
+
+jobSubmitters:
+  - submissionProtocol: SSH
+    taskClass: org.apache.airavata.gfac.impl.task.DefaultJobSubmissionTask
+#   properties:
+#     - userName: airavata
+#       passPhrase: airavata
+#       privateKey: /path/to/the/privatekey
+#       publicKey: /path/to/the/publickey
+#       hostName: remote.client.hostName
+
+  - submissionProtocol: SSH_FORK
+    taskClass: org.apache.airavata.gfac.impl.task.ForkJobSubmissionTask
+
+  - submissionProtocol: LOCAL
+    taskClass: org.apache.airavata.gfac.impl.task.DefaultJobSubmissionTask
+
+# Following job subbmitters are not yet implemented.
+
+ # - submissionProtocol: GSISSH
+ #   taskClass: org.apache.airavata.task.adapters.GSISSHJobSubmissionTask
+commonTasks:
+   - type: SETUP
+     taskClass: org.apache.airavata.task.common.SetupTask
+
+   - type: CLEANUP
+     taskClass: org.apache.airavata.task.common.CleanupTask
+
+fileTransferTasks:
+#  - transferProtocol: SCP
+#    taskClass: org.apache.airavata.gfac.impl.task.DataStageTask
+
+# If your client doen't run the same instance where airavata server is running then you need to comment above
+# DataStageTask and uncomment SCPDataStageTask. To work with SCPDataStageTask, you either need to
+# provide ssh keys or password.
+
+  - transferProtocol: SCP
+    taskClass: org.apache.airavata.gfac.impl.task.SCPDataStageTask
+    properties:
+     - userName: root
+       passPhrase: ultrascan 
+       privateKeyPath: /home/airavata/.ssh/id_rsa
+       publicKeyPath: /home/airavata/.ssh/id_rsa.pub
+       hostName: gw75.iu.xsede.org 
+       inputPath: /var/www/portal/experimentData/
+#      password: password
+
+# Following transfer tasks are not yet implemented.
+  #- transferProtocol: SFTP
+  #  taskClass: org.apache.airavata.task.adapters.SFTPFileTransferTask
+
+  #- transferProtocol: GRIDFTP
+  #  taskClass: org.apache.airavata.task.adapters.GRIDFTPFileTransferTask
+
+  #- transferProtocol: LOCAL
+  #  taskClass: org.apache.airavata.task.adapters.LocalFileTransferTask
+
+resources:
+  - jobManagerType: PBS
+    commandOutputParser: org.apache.airavata.gfac.impl.job.PBSOutputParser
+    emailParser: org.apache.airavata.gfac.monitor.email.parser.PBSEmailParser
+    resourceEmailAddresses:
+      - pbsconsult@sdsc.edu  # gordon
+      - adm@trident.bigred2.uits.iu.edu # Bigred2
+      - root <ad...@trident.bigred2.uits.iu.edu> # Bigred2
+      - root <ad...@scyld.localdomain> # alamo
+      - root <ad...@m2.karst.uits.iu.edu> #karst
+
+  - jobManagerType: SLURM
+    commandOutputParser: org.apache.airavata.gfac.impl.job.SlurmOutputParser
+    emailParser: org.apache.airavata.gfac.monitor.email.parser.SLURMEmailParser
+    resourceEmailAddresses:
+      - SDSC Admin <sl...@comet-fe3.sdsc.edu> # comet
+      - slurm@batch1.stampede.tacc.utexas.edu # stampede
+      - SDSC Admin <sl...@comet-fe4.sdsc.edu> # comet new
+      - Slurm <sl...@psc.edu> # bridges 
+      - Slurm Daemon <sl...@odin.oscer.ou.edu> # OU Schooner
+
+  - jobManagerType: UGE
+    commandOutputParser: org.apache.airavata.gfac.impl.job.UGEOutputParser
+    emailParser: org.apache.airavata.gfac.monitor.email.parser.UGEEmailParser
+    resourceEmailAddresses:
+      - ls4.tacc.utexas.edu # contain Lonestar
+
+  - jobManagerType: LSF
+    commandOutputParser: org.apache.airavata.gfac.impl.job.LSFOutputParser
+    emailParser: org.apache.airavata.gfac.monitor.email.parser.LSFEmailParser
+    resourceEmailAddresses:
+      - iu.xsede.edu # test resource mail address
+
+  - jobManagerType: FORK
+    commandOutputParser: org.apache.airavata.gfac.impl.job.ForkOutputParser

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/gfac/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/gfac/vars/main.yml b/roles/gfac/vars/main.yml
new file mode 100644
index 0000000..f5451c3
--- /dev/null
+++ b/roles/gfac/vars/main.yml
@@ -0,0 +1,3 @@
+---
+# Gfac related variables
+gfac_dir: "{{ deployment_dir }}/gfac-instance"

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/rabbitmq/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/rabbitmq/handlers/main.yml b/roles/rabbitmq/handlers/main.yml
new file mode 100644
index 0000000..4515589
--- /dev/null
+++ b/roles/rabbitmq/handlers/main.yml
@@ -0,0 +1,10 @@
+---
+# Rabbitmq related handlers
+- name: start rabbitmq
+  service: name=rabbitmq-server state=started
+
+- name: stop rabbitmq
+  service: name=rabbitmq-server state=stopped
+
+- name: restart rabbitmq
+  service: name=rabbitmq-server state=restarted

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/rabbitmq/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/rabbitmq/tasks/main.yml b/roles/rabbitmq/tasks/main.yml
new file mode 100644
index 0000000..1d0647b
--- /dev/null
+++ b/roles/rabbitmq/tasks/main.yml
@@ -0,0 +1,44 @@
+---
+
+
+################################################################################
+# Setup and run rabbitmq
+- name: Install erlang latest version
+  yum: name=https://www.rabbitmq.com/releases/erlang/erlang-18.3-1.el7.centos.x86_64.rpm state=present
+  tags: rabbitmq, dependency
+
+
+- name: Install Rabbitmq rpm
+  yum: name=https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.3/rabbitmq-server-3.6.3-1.noarch.rpm state=present
+  tags: rabbimq, dependency
+
+  # add hostname to /etc/hosts file
+- name: Edit /etc/hosts file
+  lineinfile: dest=/etc/hosts line="{{ host_address }} {{host_name}}"
+  notify:
+    - restart rabbitmq
+  tags: rabbitmq, dependency
+
+- name: Start Rabbitmq server
+  service: name=rabbitmq-server state=started
+  tags: rabbitmq, dependency
+
+- name: Enable rabbitmq management plugin
+  rabbitmq_plugin: names=rabbitmq_management state=enabled
+  tags: rabbitmq, dependency
+
+- name: Create rabbitmq vhost {{ rabbitmq_vhost }}
+  rabbitmq_vhost: name="{{ rabbitmq_vhost }}" state=present
+  tags: rabbitmq, dependency
+
+- name: Add user {{ rabbitmq_user }} to vhost {{ rabbitmq_vhost }}  and give permission
+  rabbitmq_user: user="{{ rabbitmq_user }}"
+                 password="{{ rabbitmq_password }}"
+                 vhost="{{ rabbitmq_vhost }}"
+                 configure_priv=.*
+                 read_priv=.*
+                 write_priv=.*
+                 state=present
+  tags: rabbitmq, dependency
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/setup/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/setup/tasks/main.yml b/roles/setup/tasks/main.yml
new file mode 100644
index 0000000..a20b018
--- /dev/null
+++ b/roles/setup/tasks/main.yml
@@ -0,0 +1,44 @@
+---
+#Tasks file can include smaller files if wanted
+#All commons tasks goes here
+- name: Create a new user group "{{ group }}"
+  group: name={{ group }}
+  tags: user
+
+- name: Create a new user "{{ user }}"
+  user: name={{ user }} group={{ group }}
+  tags: user
+
+################################################################################
+- name: Install git latest version
+  yum: name=git state=latest update_cache=yes
+  tags: env
+
+- name: Install maven latest version
+  yum: name=maven state=latest update_cache=yes
+  tags: env
+
+################################################################################
+# Install Orcal Java
+- name: download oracle java 8 rpm
+  get_url: url="{{ java_rpm_url }}" dest="{{ java_dir_source }}" headers='Cookie:oraclelicense=accept-securebackup-cookie'
+  tags: env
+
+- name: Install oracle java 8
+  yum: name="{{ java_dir_source }}/{{ java_rpm_filename }}" state=present
+  tags: env
+
+- name: set Java version as default
+  alternatives:
+    name="{{ item.exe }}"
+    link="/usr/bin/{{ item.exe }}"
+    path="{{ item.path }}/{{ item.exe }}"
+  with_items:
+    - { path: "{{ java_home }}/jre/bin", exe: 'java' }
+    - { path: "{{ java_home }}/jre/bin", exe: 'keytool' }
+    - { path: "{{ java_home }}/bin", exe: 'javac' }
+    - { path: "{{ java_home }}/bin", exe: 'javadoc' }
+  tags: env
+
+# End
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/setup/tasks/redhat.yml
----------------------------------------------------------------------
diff --git a/roles/setup/tasks/redhat.yml b/roles/setup/tasks/redhat.yml
new file mode 100644
index 0000000..a0e56c7
--- /dev/null
+++ b/roles/setup/tasks/redhat.yml
@@ -0,0 +1,12 @@
+---
+- name: Install git latest version
+  yum: name=git state=latest update_cache=yes
+#  become: true
+#  become_user: airavata
+  tags: env_setup
+
+- name: Install maven latest version
+  yum: name=maven state=latest update_cache=yes
+  tags: env_setup
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/setup/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/setup/vars/main.yml b/roles/setup/vars/main.yml
new file mode 100644
index 0000000..a995684
--- /dev/null
+++ b/roles/setup/vars/main.yml
@@ -0,0 +1,15 @@
+---
+#Variables associated with this role
+# Oracle Java 8
+java_dir_source: "/usr/local/src"
+
+java_version: 8
+java_version_update: 91
+java_version_build: '14'
+java_version_string: "1.{{ java_version }}.0_{{ java_version_update }}"
+java_home: "/usr/java/jdk1.{{ java_version }}.0_{{ java_version_update }}"
+
+java_rpm_filename: "jdk-{{ java_version }}u{{ java_version_update }}-linux-x64.rpm"
+java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/{{ java_version }}u{{ java_version_update }}-b{{ java_version_build }}/{{ java_rpm_filename }}"
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/zookeeper/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/handlers/main.yml b/roles/zookeeper/handlers/main.yml
new file mode 100644
index 0000000..c6d7c34
--- /dev/null
+++ b/roles/zookeeper/handlers/main.yml
@@ -0,0 +1,19 @@
+---
+
+# Zookeeper related handlers
+- name: start zookeeper
+  command: ./bin/zkServer.sh start chdir={{zookeeper_dir}}/ creates={{zookeeper_data_dir}}/zookeeper_server.pid
+  become: true
+  become_user: "{{ user }}"
+
+- name: stop zookeeper
+  command: ./bin/zkServer.sh stop chdir={{zookeeper_dir}}/ removes={{zookeeper_data_dir}}/zookeeper_server.pid
+  become: true
+  become_user: "{{ user }}"
+
+- name: restart zookeeper
+  command: ./bin/zkServer.sh restart chdir={{zookeeper_dir}}/ removes={{zookeeper_data_dir}}/zookeeper_server.pid
+  become: true
+  become_user: "{{ user }}"
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/zookeeper/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/tasks/main.yml b/roles/zookeeper/tasks/main.yml
new file mode 100644
index 0000000..c1fd86b
--- /dev/null
+++ b/roles/zookeeper/tasks/main.yml
@@ -0,0 +1,15 @@
+---
+################################################################################
+# Setup and run Zookeeper
+- name: Download and unarchive zookeeper
+  unarchive: src="{{ zookeeper_url }}" dest="{{ user_home }}" copy=no owner="{{ user }}" group="{{ group }}"
+  tags: zookeeper, dependency
+
+- name: Copy zoo.cfg file
+  template: src=zoo.cfg.j2 dest="{{ zookeeper_dir }}/conf/zoo.cfg" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r"
+  notify:
+    - start zookeeper
+    - restart zookeeper
+  tags: zookeeper, dependency
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/zookeeper/templates/zoo.cfg.j2
----------------------------------------------------------------------
diff --git a/roles/zookeeper/templates/zoo.cfg.j2 b/roles/zookeeper/templates/zoo.cfg.j2
new file mode 100644
index 0000000..8426b98
--- /dev/null
+++ b/roles/zookeeper/templates/zoo.cfg.j2
@@ -0,0 +1,28 @@
+# The number of milliseconds of each tick
+tickTime={{tick_time}}
+# The number of ticks that the initial
+# synchronization phase can take
+initLimit={{init_limit}}
+# The number of ticks that can pass between
+# sending a request and getting an acknowledgement
+syncLimit={{sync_limit}}
+# the directory where the snapshot is stored.
+# do not use /tmp for storage, /tmp here is just
+# example sakes.
+dataDir={{zookeeper_data_dir}}
+# the port at which the clients will connect
+clientPort={{ client_port }}
+# the maximum number of client connections.
+# increase this if you need to handle more clients
+#maxClientCnxns=60
+#
+# Be sure to read the maintenance section of the
+# administrator guide before turning on autopurge.
+#
+# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
+#
+# The number of snapshots to retain in dataDir
+#autopurge.snapRetainCount=3
+# Purge task interval in hours
+# Set to "0" to disable auto purge feature
+#autopurge.purgeInterval=1

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/roles/zookeeper/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/vars/main.yml b/roles/zookeeper/vars/main.yml
new file mode 100644
index 0000000..dd40e56
--- /dev/null
+++ b/roles/zookeeper/vars/main.yml
@@ -0,0 +1,17 @@
+---
+#Variables associated with this role
+# zookeeper related variable
+zookeeper_version: 3.4.8
+zookeeper_url: http://www.us.apache.org/dist/zookeeper/zookeeper-{{zookeeper_version}}/zookeeper-{{zookeeper_version}}.tar.gz
+
+apt_cache_timeout: 3600
+client_port: 2183
+init_limit: 5
+sync_limit: 2
+tick_time: 2000
+data_dir: /var/lib/zookeeper
+log_dir: /var/log/zookeeper
+zookeeper_dir: "{{ user_home }}/zookeeper-{{zookeeper_version}}"
+zookeeper_data_dir: "{{ zookeeper_dir }}/data"
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/83e98ae3/site.yml
----------------------------------------------------------------------
diff --git a/site.yml b/site.yml
new file mode 100644
index 0000000..cf71290
--- /dev/null
+++ b/site.yml
@@ -0,0 +1,25 @@
+---
+#Master playbook
+- hosts: zookeeper
+  roles:
+    - setup
+    - zookeeper
+
+- hosts: rabbitmq
+  roles:
+    - setup
+    - rabbitmq
+
+- hosts: gfac
+  roles:
+    - setup
+    - common
+    - gfac
+
+- hosts: api-orch
+  roles:
+    - setup
+    - common
+    - api-orch
+
+...


[28/50] [abbrv] airavata git commit: Updated readme to avoid known_host adding prompt

Posted by la...@apache.org.
Updated readme to avoid known_host adding prompt


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 21545bea2b338dcc8491cb15aee85787fdb38e92
Parents: d5a9c8a
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Mon Sep 12 12:29:29 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Mon Sep 12 12:29:29 2016 -0400

----------------------------------------------------------------------
 README.md | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/21545bea/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 794099a..9ce4e47 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
 # mesos-deployment
 This project setup Apache Mesos master and slave clusters on Cloud Infrastructures using Anisble
 
+If you are working with new set of hosts which you haven't ssh login to those host from the machine you are suppose to run your Ansible play. It will prompt you to get permission to add to known_hosts list, if you wan't remove this prompt and you know the consequences of disabling this feature and you want tor remove this prompt behavior run this on your terminal  `export ANSIBLE_HOST_KEY_CHECKING=False`
 
 ## Configurations
 


[44/50] [abbrv] airavata git commit: Imported mesos ansible scripts to airavata repo

Posted by la...@apache.org.
Imported mesos ansible scripts to airavata repo


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 7071ef173edaa0d4cbddcf8e2246a4d5f0c620cf
Parents: 43b3757 21545be
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Fri Sep 23 21:45:32 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Fri Sep 23 21:49:08 2016 -0400

----------------------------------------------------------------------
 modules/cloud/ansible-playbooks/README.md       |  82 +++++++++++++
 .../cloud/ansible-playbooks/group_vars/all.yml  |  19 +++
 modules/cloud/ansible-playbooks/hosts           |  13 +++
 .../ansible-playbooks/roles/ec2/tasks/main.yml  |  30 +++++
 .../roles/ec2/vars/aws-credential.yml           |   3 +
 .../ansible-playbooks/roles/ec2/vars/main.yml   |   8 ++
 .../ansible-playbooks/roles/java/tasks/main.yml |  21 ++++
 .../ansible-playbooks/roles/java/vars/main.yml  |  15 +++
 .../roles/mesos-master/tasks/backup_main.yml    | 117 +++++++++++++++++++
 .../roles/mesos-master/tasks/main.yml           |  86 ++++++++++++++
 .../roles/mesos-master/templates/quorum.j2      |   1 +
 .../roles/mesos-master/templates/zk.j2          |   1 +
 .../roles/mesos-slave/tasks/main.yml            |  66 +++++++++++
 .../roles/mesos-slave/templates/zk.j2           |   1 +
 .../ansible-playbooks/roles/test/tasks/main.yml |   3 +
 .../roles/zookeeper/handlers/main.yml           |  15 +++
 .../roles/zookeeper/tasks/main.yml              |  98 ++++++++++++++++
 .../roles/zookeeper/templates/myid.j2           |   1 +
 .../roles/zookeeper/templates/zoo.cfg.j2        |  32 +++++
 .../roles/zookeeper/vars/main.yml               |  15 +++
 modules/cloud/ansible-playbooks/site.yml        |  19 +++
 21 files changed, 646 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/README.md
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/README.md
index 0000000,0000000..9ce4e47
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/README.md
@@@ -1,0 -1,0 +1,82 @@@
++# mesos-deployment
++This project setup Apache Mesos master and slave clusters on Cloud Infrastructures using Anisble
++
++If you are working with new set of hosts which you haven't ssh login to those host from the machine you are suppose to run your Ansible play. It will prompt you to get permission to add to known_hosts list, if you wan't remove this prompt and you know the consequences of disabling this feature and you want tor remove this prompt behavior run this on your terminal  `export ANSIBLE_HOST_KEY_CHECKING=False`
++
++## Configurations
++
++To run this ansible script you must have at least 4 instances. 3 instances to setup Mesos master , marathon and zookeeper clusters. Along with Mesos master we install marathon and zookeeper. Another one or more instance/s to setup mesos agent/s. You can use ec2 ansible role provided with this playbook to spin up aws instances. To do that you need to set valid aws credentials.
++
++1. set valid aws credentials in `roles/ec2/vars/aws-credential.yml` if it doesn't work add folowing to ec2 task in `roles/ec2/tasks/main.yml`
++
++  `aws_access_key: <your_valid_access_key>`
++
++  `aws_secret_key: <your_valid_secret_key?`
++
++2. Set ec2 instance names under ec2 task `with_items:` configurations
++
++  After you set valid aws credentials and instance names run following ansible playbook command to spin up require aws ec2 instances.
++
++  `ansible-palybook -i hosts site.yml -t "ec2"`
++
++3.  You need to know public ips of all the nodes and private ips of all mesos-master nodes.  List all mesos master public ips under `[mesos-master]` section in `hosts` file. List all mesos-slave *(mesos-agent)* public ips under `[mesos-slave]` section.  You need to set `my_id` hosts variable along with mesos-master ip addresses. This will use to set zookeeper id.
++
++ > [mesos-master]
++
++ > *1.2.3.4 my_id=1*
++
++ > *11.22.33.44 my_id=2*
++
++ > ...
++
++ > [mesos-slave]
++
++ > *123.123.123.123*
++
++ > ...
++
++4. Use mesos-master private ip addresses to set zookeeper servers properties in `roles/zookeeper/vars/main.yml`
++
++  > zookeeper_servers:
++
++  >  \- {id: "1", ip: "172.31.24.149"}
++
++  >  \- {id: "2", ip: "172.31.19.49"}
++
++  >  \- {id: "3", ip: "172.31.25.80"}
++
++5. Set Mesos-master zookeeper quorum value in `group_vars/all.yml` file
++
++  > zk_quorum: 2
++
++6. Now we are set to deploy Apache Mesos cluster (Mesos-master, marthon, zookeeper, mesos-slave). Following ansible playbook command respectively setup mesos-master cluster , Mesos-slaves, and both mesos-master cluster and mesos-slave
++
++  `ansible-playbook -i hosts site.yml  -t "mesos-master"`
++
++  `ansible-playbook -i hosts site.yml  -t "mesos-slave"`
++
++  `ansible-playbook -i hosts site.yml  -t "mesos"`
++
++  If everything works without any error, now you have running mesos cluster on aws instances.
++
++## verifying installation
++
++1.  If your plays works without any error. Now you can access Mesos master console using `http://<master-ip>:5050` run following in one of Mesos master node to find which instance is the leader of cluster.
++
++  ``mesos-resolve `cat /etc/mesos/zk` `` this will return master-ip. Then use it to access console
++
++2. To access marathon console use `http://<master-ip>:8080`
++
++3. If you want run simple task on mesos. run following command on one of master node.
++
++  ``MASTER=$(mesos-resolve `cat /etc/mesos/zk`)``
++
++  `mesos-execute --master=$MASTER --name="cluster-test" --command="sleep 5"`
++
++
++
++## Ansible roles
++- java - install oracle java 8
++- zookeeper - install zookeeper
++- mesos-master - install mesos mastera and marathon
++- mesos-slave  - install mesos slave

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/group_vars/all.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/group_vars/all.yml
index 0000000,0000000..62c83dc
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/group_vars/all.yml
@@@ -1,0 -1,0 +1,19 @@@
++---
++ansible_connection: ssh
++ansible_ssh_user: centos
++ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-aws.pem.txt
++
++user: centos
++group: centos
++
++#Zookeeper related properties
++zookeeper_client_port: 2181
++# zookeeper_servers:
++#   - { index: 1, ip: "", ports: "2888:3888"}
++#   - { index: 2, ip: "", ports: "2888:3888"}
++#   - { index: 3, ip: "", ports: "2888:3888"}
++zk_1: "{{ groups['mesos-master'][0] }}"
++zk_2: "{{ groups['mesos-master'][1] }}"
++zk_3: "{{ groups['mesos-master'][2] }}"
++
++zk_quorum: 2

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/hosts
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/hosts
index 0000000,0000000..cc90239
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/hosts
@@@ -1,0 -1,0 +1,13 @@@
++---
++# inventory fie: production
++#[localhost]
++127.0.0.1
++
++[mesos-master]
++52.87.208.230 my_id=1
++54.172.21.138 my_id=2
++54.196.170.54 my_id=3
++
++
++[mesos-slave]
++54.175.143.203

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/ec2/tasks/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/ec2/tasks/main.yml
index 0000000,0000000..7a6eb3d
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/ec2/tasks/main.yml
@@@ -1,0 -1,0 +1,30 @@@
++---
++- name: include credentials
++  include_vars: vars/aws-credential.yml
++
++- name: create a aws instace/s
++  ec2:
++    key_name: "{{ key_name }}"
++    region: us-east-1
++    instance_type: t2.small
++    image: "{{centos_ami_7_2}}"
++    group: "{{ security_group }}"
++    instance_tags:
++      Name: "{{ item }}"
++    assign_public_ip: yes
++    state: present
++    count: 1
++    vpc_subnet_id: subnet-54f8f70c
++    volumes:
++      - device_name: /dev/sda1
++        volume_type: io1
++        iops: 200
++        volume_size: 50
++        delete_on_termination: true
++    wait: yes
++  with_items:
++    - Mesos-master-1
++    - Mesos-master-2
++    - Mesos-master-3
++    - Mesos-slave-1
++  register: ec2

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/ec2/vars/aws-credential.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/ec2/vars/aws-credential.yml
index 0000000,0000000..2e4c703
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/ec2/vars/aws-credential.yml
@@@ -1,0 -1,0 +1,3 @@@
++---
++aws_access_key: xxxxxxxxx 
++aws_secret_key: xxxxxxxxx

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/ec2/vars/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/ec2/vars/main.yml
index 0000000,0000000..1f7d77a
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/ec2/vars/main.yml
@@@ -1,0 -1,0 +1,8 @@@
++---
++
++key_name: shameera
++ec2_name: Mesos28
++centos_ami_7_2: ami-6d1c2007
++ubutntu_ami_16_04: ami-29f96d3e
++
++security_group: Mesos-sec

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/java/tasks/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/java/tasks/main.yml
index 0000000,0000000..92f2039
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/java/tasks/main.yml
@@@ -1,0 -1,0 +1,21 @@@
++---
++# Install Orcal Java
++- name: download oracle java 8 rpm
++  get_url: url="{{ java_rpm_url }}" dest="{{ java_dir_source }}" headers='Cookie:oraclelicense=accept-securebackup-cookie'
++  become: yes
++
++- name: Install oracle java 8
++  yum: name="{{ java_dir_source }}/{{ java_rpm_filename }}" state=present
++  become: yes
++
++- name: set Oracle Java {{ java_version_string }} as default
++  alternatives:
++    name="{{ item.exe }}"
++    link="/usr/bin/{{ item.exe }}"
++    path="{{ item.path }}/{{ item.exe }}"
++  with_items:
++    - { path: "{{ java_home }}/jre/bin", exe: 'java' }
++    - { path: "{{ java_home }}/jre/bin", exe: 'keytool' }
++    - { path: "{{ java_home }}/bin", exe: 'javac' }
++    - { path: "{{ java_home }}/bin", exe: 'javadoc' }
++  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/java/vars/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/java/vars/main.yml
index 0000000,0000000..a995684
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/java/vars/main.yml
@@@ -1,0 -1,0 +1,15 @@@
++---
++#Variables associated with this role
++# Oracle Java 8
++java_dir_source: "/usr/local/src"
++
++java_version: 8
++java_version_update: 91
++java_version_build: '14'
++java_version_string: "1.{{ java_version }}.0_{{ java_version_update }}"
++java_home: "/usr/java/jdk1.{{ java_version }}.0_{{ java_version_update }}"
++
++java_rpm_filename: "jdk-{{ java_version }}u{{ java_version_update }}-linux-x64.rpm"
++java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/{{ java_version }}u{{ java_version_update }}-b{{ java_version_build }}/{{ java_rpm_filename }}"
++
++...

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/mesos-master/tasks/backup_main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/mesos-master/tasks/backup_main.yml
index 0000000,0000000..1d0abd1
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/mesos-master/tasks/backup_main.yml
@@@ -1,0 -1,0 +1,117 @@@
++---
++
++- name: wait untill instance is up and running
++  local_action: wait_for port=22
++                host="{{ ansible_ssh_host | default(inventory_hostname) }}"
++                search_regex=OpenSSH delay=10
++- name: create group
++  group: name="{{group}}"
++  become: yes
++
++- name: create user
++  user: name="{{user}}"
++  become: yes
++
++# RedHat related things
++- name: install required packages
++  yum: name="{{item}}" state=latest
++  with_items:
++    - wget
++    - tar
++    - git
++    - epel-release
++    - firewalld
++  become: yes
++
++- name: updage systemd
++  yum: name=systemd state=latest
++  become: yes
++
++- name: get apache maven
++  get_url:
++    url: http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo
++    dest: /etc/yum.repos.d/epel-apache-maven.repo
++  become: yes
++
++- name: copy svn repo file
++  copy:
++    src: wandisco-svn.repo
++    dest: /etc/yum.repos.d/wandisco-svn.repo
++  become: yes
++
++- name: install development tools
++  yum: name="@Development tools" state=present
++  become: yes
++
++#Install other Mesos dependencies.
++- name: install mesos dependencies
++  yum: name="{{item}}" state=latest
++  with_items:
++    - apache-maven
++    - python-devel
++    - java-1.8.0-openjdk-devel
++    - zlib-devel
++    - libcurl-devel
++    - openssl-devel
++    - cyrus-sasl-devel
++    - cyrus-sasl-md5
++    - apr-devel
++    - apr-util-devel
++    - subversion-devel
++  become: yes
++
++- name: start firewall service
++  service: name=firewalld state=started enabled=yes
++  become: yes
++
++- name: download and unarchive mesos latest
++  unarchive:
++      src="{{mesos_url}}"
++      dest="{{user_home}}"
++      remote_src=yes
++      copy=no
++      creates="{{mesos_deploy_dir}}/configure"
++      owner="{{user}}"
++      group="{{group}}"
++
++  # Bootstrap (Only required if building from git repository).
++  # $ ./bootstrap
++
++- name: make build dir
++  file: path="{{mesos_build_dir}}" state=directory owner={{user}} group={{group}}
++
++# - name: create simlink to configure script
++#   file: src="{{mesos_deploy_dir}}/configure"
++#         dest="{{mesos_build_dir}}/configure"
++#         state=link
++#         owner={{user}}
++#         group={{group}}
++#   tags: test
++
++- name: configure and build mesos
++  command: ../configure  chdir="{{mesos_build_dir}}"
++  register: build
++
++- name: run make
++  command: make chdir="{{mesos_build_dir}}"
++  when: build|success
++  register: make
++
++# - name: run make tests
++#   command: make check chdir="{{mesos_build_dir}}"
++#   when: make|success
++
++- name: open firewall port
++  firewalld: port=5050/tcp zone=public permanent=true state=enabled immediate=yes
++  become: yes
++
++- name: create working dir
++  file: path="{{mesos_work_dir}}" state=directory user={{user}} group={{group}}
++
++- name: start mesos master
++  command: ./bin/mesos-master.sh --ip={{inventory_hostname}} --work_dir={{mesos_work_dir}} &
++      chdir={{mesos_build_dir}}
++
++- name: start mesos agent
++  command: /bin/mesos-agent.sh --master={{inventory_hostname}}:5050 --work_dir={{mesos_work_dir}} &
++      chdir={{mesos_build_dir}}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/mesos-master/tasks/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/mesos-master/tasks/main.yml
index 0000000,0000000..effb35a
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/mesos-master/tasks/main.yml
@@@ -1,0 -1,0 +1,86 @@@
++---
++# reference: https://open.mesosphere.com/getting-started/install/
++- name: install firewalld
++  yum:
++    name: firewalld
++    state: latest
++  become: yes
++
++- name: start firewalld
++  service:
++    name: firewalld
++    state: started
++    enabled: yes
++  become: yes
++
++- name: open ports
++  firewalld:
++    port: "{{ item }}"
++    zone: public
++    permanent: true
++    state: enabled
++    immediate: yes
++  with_items:
++    - "5050/tcp"
++    - "8080/tcp"
++  become: yes
++
++- name: install utility - TODO delete this
++  yum:
++    name: "{{ item }}"
++    state: latest
++  with_items:
++    - vim
++  become: yes
++
++# Setup repository
++- name: add mesosphere rpm
++  yum:
++    name: http://repos.mesosphere.com/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm
++    state: present
++  become: yes
++
++- name: install mesos and marathon
++  yum:
++    name: "{{ item }}"
++    state: latest
++  with_items:
++    - mesos
++    - marathon
++    # - mesosphere-zookeeper
++  become: yes
++
++# configurations
++
++- name: set zk file for mesos master and marathon
++  template:
++    src: zk.j2
++    dest: /etc/mesos/zk
++    force: yes
++  become: yes
++
++- name: set zookeeper quorum
++  template:
++    src: quorum.j2
++    dest: /etc/mesos-master/quorum
++    force: yes
++  become: yes
++
++- name: stop and disable mesos slave
++  service:
++    name: mesos-slave
++    enabled: no
++    state: stopped
++  become: yes
++
++- name: restart mesos master
++  service:
++    name: mesos-master
++    state: restarted
++  become: yes
++
++- name: restart marathon
++  service:
++    name: marathon
++    state: restarted
++  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/mesos-master/templates/quorum.j2
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/mesos-master/templates/quorum.j2
index 0000000,0000000..c1d54ef
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/mesos-master/templates/quorum.j2
@@@ -1,0 -1,0 +1,1 @@@
++{{zk_quorum}}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/mesos-master/templates/zk.j2
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/mesos-master/templates/zk.j2
index 0000000,0000000..e82fe65
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/mesos-master/templates/zk.j2
@@@ -1,0 -1,0 +1,1 @@@
++zk://{{zk_1}}:{{zookeeper_client_port}},{{zk_2}}:{{zookeeper_client_port}},{{zk_3}}:{{zookeeper_client_port}}/mesos

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/mesos-slave/tasks/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/mesos-slave/tasks/main.yml
index 0000000,0000000..f6890fe
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/mesos-slave/tasks/main.yml
@@@ -1,0 -1,0 +1,66 @@@
++---
++- name: install firewalld
++  yum:
++    name: firewalld
++    state: latest
++    update_cache: yes
++  become: yes
++
++- name: start firewalld
++  service:
++    name: firewalld
++    state: started
++    enabled: yes
++  become: yes
++
++- name: open ports
++  firewalld:
++    port: "{{ item }}"
++    zone: public
++    permanent: true
++    state: enabled
++    immediate: yes
++  with_items:
++    - "5051/tcp"
++  become: yes
++
++# setup mesos slave
++- name: add mesosphere rpm
++  yum:
++    name: http://repos.mesosphere.com/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm
++    state: present
++  become: yes
++
++- name: install mesos
++  yum:
++    name: mesos
++    state: latest
++  become: yes
++
++# zookeeper will be pulled in and isntall as a depencency automatically
++# - name: disable zookeeper
++#   service:
++#     name: mesosphere-zookeeper
++#     state: stopped
++#     enabled: no
++#   become: yes
++
++- name: set zk file for mesos master and marathon
++  template:
++    src: zk.j2
++    dest: /etc/mesos/zk
++    force: yes
++  become: yes
++
++- name: disable mesos-master
++  service:
++    name: mesos-master
++    state: stopped
++    enabled: no
++  become: yes
++
++- name: restart mesos slave
++  service:
++    name: mesos-slave
++    state: restarted
++  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/mesos-slave/templates/zk.j2
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/mesos-slave/templates/zk.j2
index 0000000,0000000..e82fe65
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/mesos-slave/templates/zk.j2
@@@ -1,0 -1,0 +1,1 @@@
++zk://{{zk_1}}:{{zookeeper_client_port}},{{zk_2}}:{{zookeeper_client_port}},{{zk_3}}:{{zookeeper_client_port}}/mesos

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/test/tasks/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/test/tasks/main.yml
index 0000000,0000000..f0548b1
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/test/tasks/main.yml
@@@ -1,0 -1,0 +1,3 @@@
++- debug: msg="ding {{ inventory_hostname }}"
++
++- debug: msg="{{ inventory }}"

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/zookeeper/handlers/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/zookeeper/handlers/main.yml
index 0000000,0000000..f1ea4be
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/zookeeper/handlers/main.yml
@@@ -1,0 -1,0 +1,15 @@@
++---
++- name: start zookeeper
++  command: bin/zkServer.sh start
++  args:
++    chdir: "{{zookeeper_dir}}"
++
++- name: restart zookeeper
++  command: bin/zkServer.sh restart
++  args:
++    chdir: "{{zookeeper_dir}}"
++
++- name: stop zookeeper
++  command: bin/zkServer.sh stop
++  args:
++    chdir: "{{zookeeper_dir}}"

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/zookeeper/tasks/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/zookeeper/tasks/main.yml
index 0000000,0000000..02c246f
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/zookeeper/tasks/main.yml
@@@ -1,0 -1,0 +1,98 @@@
++---
++- name: install pre-requities
++  yum:
++    name: "{{item}}"
++    state: latest
++  with_items:
++    - firewalld
++    - vim
++  become: yes
++
++- name: start firewalld
++  service:
++    name: firewalld
++    state: started
++  become: yes
++
++- name: open zookeeper port
++  firewalld:
++    port: "{{item}}"
++    zone: public
++    permanent: true
++    state: enabled
++    immediate: yes
++  with_items:
++    - "{{zookeeper_client_port}}/tcp"
++    - 2888/tcp
++    - 3888/tcp
++  become: yes
++
++# - name: get ip4 address
++#   command: hostname -i
++#   register: _ip4
++#   tags: ttt
++
++# - debug:
++#     msg: "{{_ip4.stdout}}"
++#   tags: ttt
++
++######################
++- name: Download and unarchive zookeeper
++  unarchive:
++    src: "{{ zookeeper_url }}"
++    dest: /opt
++    copy: no
++    creates: /opt/zookeeper-{{ zookeeper_version }}
++    owner: "{{ user }}"
++    group: "{{ group }}"
++  become: yes
++
++- name: Link to Zookeeper Directory
++  file:
++    src: "/opt/zookeeper-{{ zookeeper_version }}"
++    dest: "{{zookeeper_dir}}"
++    state: link
++    force: yes
++  become: yes
++
++- name: Create Zookeeper Log Dir
++  file:
++    path: "{{zookeeper_log_dir}}"
++    owner: "{{ user }}"
++    group: "{{ group }}"
++    recurse: yes
++    state: directory
++    mode: 0644
++  become: yes
++
++- name: Create Zookeeper DataStore Dir
++  file:
++    path: "{{zookeeper_datastore_dir}}"
++    owner: "{{ user }}"
++    group: "{{ group }}"
++    recurse: yes
++    state: directory
++    mode: 0755
++  become: yes
++
++- name: Copy zoo.cfg file
++  template:
++    src: zoo.cfg.j2
++    # dest: "{{zookeeper_conf_dir}}/zoo.cfg"
++    dest: "{{zookeeper_dir}}/conf/zoo.cfg"
++    owner: "{{ user }}"
++    group: "{{ group }}"
++    mode: "u=rw,g=r,o=r"
++  notify:
++    - restart zookeeper
++
++
++- name: Copy myid file
++  template:
++    src: myid.j2
++    dest: "{{zookeeper_datastore_dir}}/myid"
++    owner: "{{ user }}"
++    group: "{{ group }}"
++    mode: "u=rw,g=r,o=r"
++  notify:
++    - restart zookeeper

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/zookeeper/templates/myid.j2
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/zookeeper/templates/myid.j2
index 0000000,0000000..78a0bd7
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/zookeeper/templates/myid.j2
@@@ -1,0 -1,0 +1,1 @@@
++{{ my_id }}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/zookeeper/templates/zoo.cfg.j2
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/zookeeper/templates/zoo.cfg.j2
index 0000000,0000000..4845a71
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/zookeeper/templates/zoo.cfg.j2
@@@ -1,0 -1,0 +1,32 @@@
++# Licensed to the Apache Software Foundation (ASF) under one or more
++# contributor license agreements.  See the NOTICE file distributed with
++# this work for additional information regarding copyright ownership.
++# The ASF licenses this file to You 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.
++
++maxClientCnxns=50
++# The number of milliseconds of each tick
++tickTime=2000
++# The number of ticks that the initial
++# synchronization phase can take
++initLimit=10
++# The number of ticks that can pass between
++# sending a request and getting an acknowledgement
++syncLimit=5
++# the directory where the snapshot is stored.
++dataDir={{zookeeper_datastore_dir}}
++# the port at which the clients will connect
++clientPort={{zookeeper_client_port}}
++
++{% for server in zookeeper_servers %}
++server.{{ server.id }}={{ server.ip }}:2888:3888
++{% endfor %}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/zookeeper/vars/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/zookeeper/vars/main.yml
index 0000000,0000000..07f9ca1
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/zookeeper/vars/main.yml
@@@ -1,0 -1,0 +1,15 @@@
++---
++zookeeper_version: 3.4.8
++#zookeeper_conf_dir: /etc/zookeeper/conf
++zookeeper_log_dir: /var/log/zookeeper
++zookeeper_datastore_dir: /var/lib/zookeeper
++zookeeper_url: http://www.us.apache.org/dist/zookeeper/zookeeper-{{zookeeper_version}}/zookeeper-{{zookeeper_version}}.tar.gz
++zookeeper_dir: /opt/zookeeper
++#zookeeper_client_port: 2181
++
++zookeeper_servers:
++  - {id: "1", ip: "172.31.24.149"}
++  - {id: "2", ip: "172.31.19.49"}
++  - {id: "3", ip: "172.31.25.80"}
++#exhibitor_version: 1.5.5
++#exhibitor_install_dir: /opt/exhibitor

http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/site.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/site.yml
index 0000000,0000000..17258bd
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/site.yml
@@@ -1,0 -1,0 +1,19 @@@
++---
++- hosts: localhost
++  tags: ec2
++  roles:
++    - ec2
++
++- hosts: mesos-master
++  tags: mesos, mesos-master
++  roles:
++    - java
++    - zookeeper
++    - mesos-master
++
++- hosts: mesos-slave
++  tags: mesos, mesos-slave
++  roles:
++    - mesos-slave
++
++...


[48/50] [abbrv] airavata git commit: changing document root

Posted by la...@apache.org.
changing document root


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 59142dd7d878f2cced3647ba89b24879f578f005
Parents: b7a7920
Author: scnakandala <su...@gmail.com>
Authored: Tue Sep 27 15:08:14 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Tue Sep 27 15:08:14 2016 -0400

----------------------------------------------------------------------
 dev-tools/ansible/roles/pga/templates/httpd.conf.j2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/59142dd7/dev-tools/ansible/roles/pga/templates/httpd.conf.j2
----------------------------------------------------------------------
diff --git a/dev-tools/ansible/roles/pga/templates/httpd.conf.j2 b/dev-tools/ansible/roles/pga/templates/httpd.conf.j2
index 37c05e2..febb204 100644
--- a/dev-tools/ansible/roles/pga/templates/httpd.conf.j2
+++ b/dev-tools/ansible/roles/pga/templates/httpd.conf.j2
@@ -116,7 +116,7 @@ ServerAdmin root@localhost
 # documents. By default, all requests are taken from this directory, but
 # symbolic links and aliases may be used to point to other locations.
 #
-DocumentRoot "/var/www/html"
+DocumentRoot "/var/www/html/php-gateway/public"
 
 #
 # Relax access to content within /var/www.


[41/50] [abbrv] airavata git commit: fixing gateway intialization issue

Posted by la...@apache.org.
fixing gateway intialization issue


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 83a0bf8795730d712449653af1f484d9cf152d3f
Parents: 264f616
Author: scnakandala <su...@gmail.com>
Authored: Thu Sep 22 12:54:39 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Sep 22 12:54:39 2016 -0400

----------------------------------------------------------------------
 .../core/experiment/catalog/resources/GatewayResource.java       | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/83a0bf87/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
index 646594e..c745f4e 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
@@ -20,6 +20,7 @@
 */
 package org.apache.airavata.registry.core.experiment.catalog.resources;
 
+import org.apache.airavata.model.workspace.GatewayApprovalStatus;
 import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
 import org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource;
 import org.apache.airavata.registry.core.experiment.catalog.ResourceType;
@@ -461,6 +462,9 @@ public class GatewayResource extends AbstractExpCatResource {
             Gateway existingGateway = em.find(Gateway.class, gatewayId);
             em.close();
 
+            if(gatewayApprovalStatus == null || gatewayApprovalStatus.isEmpty())
+                gatewayApprovalStatus = GatewayApprovalStatus.APPROVED.toString();
+
             em = ExpCatResourceUtils.getEntityManager();
             em.getTransaction().begin();
             Gateway gateway = new Gateway();


[36/50] [abbrv] airavata git commit: fixing credential store not initializing issue

Posted by la...@apache.org.
fixing credential store not initializing issue


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: a5156a9207f65c21d069b21fe7147eabc4f2dea1
Parents: 4d908fb
Author: scnakandala <su...@gmail.com>
Authored: Fri Sep 16 10:45:06 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Fri Sep 16 10:45:06 2016 -0400

----------------------------------------------------------------------
 .../credential-store-service/pom.xml            |  10 +-
 .../store/server/CredentialStoreServer.java     |   4 -
 .../server/CredentialStoreServerHandler.java    |   8 +-
 .../store/store/impl/util/ConnectionPool.java   | 382 +++++++++++++++++++
 .../impl/util/CredentialStoreInitUtil.java      | 155 ++++++++
 .../store/store/impl/util/DatabaseCreator.java  | 353 +++++++++++++++++
 .../store/store/impl/util/JdbcStorage.java      | 175 +++++++++
 .../credential/catalog/model/CommunityUser.java |  72 ----
 .../catalog/model/CommunityUser_Pk.java         |  63 ---
 .../credential/catalog/model/Configuration.java |  54 ---
 .../catalog/model/Configuration_PK.java         |  60 ---
 .../credential/catalog/model/Credential.java    |  83 ----
 .../credential/catalog/model/Credential_PK.java |  55 ---
 .../catalog/util/CredentialCatalogJPAUtils.java |  82 ----
 .../src/main/resources/META-INF/persistence.xml |   7 -
 .../src/main/resources/credstore-derby.sql      |  60 +--
 .../src/main/resources/credstore-mysql.sql      |  60 +--
 17 files changed, 1113 insertions(+), 570 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/a5156a92/modules/credential-store/credential-store-service/pom.xml
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/pom.xml b/modules/credential-store/credential-store-service/pom.xml
index 7c03c4f..8b736af 100644
--- a/modules/credential-store/credential-store-service/pom.xml
+++ b/modules/credential-store/credential-store-service/pom.xml
@@ -79,11 +79,6 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
             <groupId>org.apache.derby</groupId>
             <artifactId>derby</artifactId>
             <version>${derby.version}</version>
@@ -144,6 +139,11 @@
             <artifactId>commons-io</artifactId>
             <version>1.3.2</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derbynet</artifactId>
+            <version>10.11.1.1</version>
+        </dependency>
     </dependencies>
     <build>
         <plugins>

http://git-wip-us.apache.org/repos/asf/airavata/blob/a5156a92/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java
index 0829fda..5ccec02 100644
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java
@@ -24,7 +24,6 @@ package org.apache.airavata.credential.store.server;
 import org.apache.airavata.common.utils.IServer;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.credential.store.cpi.CredentialStoreService;
-import org.apache.airavata.registry.core.credential.catalog.util.CredentialCatalogJPAUtils;
 import org.apache.thrift.server.TServer;
 import org.apache.thrift.server.TThreadPoolServer;
 import org.apache.thrift.transport.TServerSocket;
@@ -108,9 +107,6 @@ public class CredentialStoreServer  implements IServer {
 
     public static void main(String[] args) {
         try {
-            //Initializing the database;
-            CredentialCatalogJPAUtils.getEntityManager();
-
             new CredentialStoreServer().start();
         } catch (Exception e) {
             logger.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/a5156a92/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
index 095958d..0f1ac93 100644
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
@@ -34,6 +34,7 @@ import org.apache.airavata.credential.store.store.CredentialStoreException;
 import org.apache.airavata.credential.store.store.impl.CertificateCredentialWriter;
 import org.apache.airavata.credential.store.store.impl.CredentialReaderImpl;
 import org.apache.airavata.credential.store.store.impl.SSHCredentialWriter;
+import org.apache.airavata.credential.store.store.impl.util.CredentialStoreInitUtil;
 import org.apache.airavata.credential.store.util.TokenGenerator;
 import org.apache.airavata.credential.store.util.Utility;
 import org.apache.commons.codec.binary.Base64;
@@ -43,8 +44,10 @@ import org.slf4j.LoggerFactory;
 import sun.security.provider.X509Factory;
 
 import java.io.ByteArrayInputStream;
+import java.io.IOException;
 import java.security.cert.CertificateFactory;
 import java.security.cert.X509Certificate;
+import java.sql.SQLException;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -57,13 +60,16 @@ public class CredentialStoreServerHandler implements CredentialStoreService.Ifac
     private CertificateCredentialWriter certificateCredentialWriter;
     private CredentialReaderImpl credentialReader;
 
-    public CredentialStoreServerHandler() throws ApplicationSettingsException, IllegalAccessException, ClassNotFoundException, InstantiationException {
+    public CredentialStoreServerHandler() throws ApplicationSettingsException, IllegalAccessException,
+            ClassNotFoundException, InstantiationException, SQLException, IOException {
         String jdbcUrl = ServerSettings.getCredentialStoreDBURL();
         String userName = ServerSettings.getCredentialStoreDBUser();
         String password = ServerSettings.getCredentialStoreDBPassword();
         String driverName = ServerSettings.getCredentialStoreDBDriver();
 
         log.debug("Starting credential store, connecting to database - " + jdbcUrl + " DB user - " + userName + " driver name - " + driverName);
+        CredentialStoreInitUtil.initializeDB();
+
         dbUtil = new DBUtil(jdbcUrl, userName, password, driverName);
         sshCredentialWriter = new SSHCredentialWriter(dbUtil);
         certificateCredentialWriter = new CertificateCredentialWriter(dbUtil);

http://git-wip-us.apache.org/repos/asf/airavata/blob/a5156a92/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/util/ConnectionPool.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/util/ConnectionPool.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/util/ConnectionPool.java
new file mode 100644
index 0000000..b832604
--- /dev/null
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/util/ConnectionPool.java
@@ -0,0 +1,382 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+*/
+package org.apache.airavata.credential.store.store.impl.util;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.sql.DataSource;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Stack;
+import java.util.concurrent.Semaphore;
+
+
+/**
+ * A class for preallocating, recycling, and managing JDBC connections.
+ */
+public class ConnectionPool {
+    private static final Logger logger = LoggerFactory.getLogger(ConnectionPool.class);
+
+    private long MAX_IDLE_TIME = 5 * 60 * 1000; // 5 minutes
+
+    private String driver;
+    private String url;
+    private String username;
+    private String password;
+    private String jdbcUrl;
+
+    private int maxConnections;
+
+    private boolean autoCommit = true;
+    private boolean waitIfBusy;
+
+    private Semaphore needConnection = new Semaphore(0);
+    private boolean stop;
+
+    private Stack<Connection> availableConnections;
+    private Stack<Connection> busyConnections;
+
+    private HashMap<Connection, Long> lastAccessTimeRecord = new HashMap<Connection, Long>();
+
+    private String urlType = "";
+
+    private DataSource datasource;
+
+    private int transactionIsolation = Connection.TRANSACTION_NONE;
+
+    private Thread clenupThread;
+    private Thread producerThread;
+
+    public ConnectionPool(String driver, String url, String username, String password, int initialConnections,
+                          int maxConnections, boolean waitIfBusy) throws SQLException {
+        this.driver = driver;
+        this.url = url;
+        this.username = username;
+        this.password = password;
+        this.urlType = "speratedURL";
+        initialize(initialConnections, maxConnections, waitIfBusy);
+    }
+
+    public ConnectionPool(String driver, String jdbcUrl, int initialConnections, int maxConnections,
+                          boolean waitIfBusy, boolean autoCommit, int transactionIsolation) throws SQLException {
+        this.driver = driver;
+        this.jdbcUrl = jdbcUrl;
+        this.urlType = "simpleURL";
+        this.autoCommit = autoCommit;
+        this.transactionIsolation = transactionIsolation;
+        initialize(initialConnections, maxConnections, waitIfBusy);
+    }
+
+    public ConnectionPool(String driver, String jdbcUrl, int initialConnections, int maxConnections, boolean waitIfBusy)
+            throws SQLException {
+        this.driver = driver;
+        this.jdbcUrl = jdbcUrl;
+        this.urlType = "simpleURL";
+        initialize(initialConnections, maxConnections, waitIfBusy);
+    }
+
+    public ConnectionPool(DataSource dataSource, int initialConnections, int maxConnections, boolean waitIfBusy)
+            throws SQLException {
+        this.urlType = "dataSource";
+        this.datasource = dataSource;
+        initialize(initialConnections, maxConnections, waitIfBusy);
+    }
+
+    /**
+     * Check if this connection pool is auto commit or not
+     *
+     * @return
+     */
+    public boolean isAutoCommit() {
+        return this.autoCommit;
+    }
+
+    private void initialize(int initialConnections, int maxConnections, boolean waitIfBusy) throws SQLException {
+        this.maxConnections = maxConnections;
+        this.waitIfBusy = waitIfBusy;
+
+        int sizeOfConnections = (initialConnections > maxConnections) ? maxConnections : initialConnections;
+
+        availableConnections = new Stack<Connection>();
+        busyConnections = new Stack<Connection>();
+
+        for (int i = 0; i < sizeOfConnections; i++) {
+            Connection con = makeNewConnection();
+            setTimeStamp(con);
+            availableConnections.push(con);
+
+        }
+
+        producerThread = new Thread(new FillUpThread());
+        producerThread.start();
+
+        clenupThread = new Thread(new CleanUpThread());
+        clenupThread.start();
+    }
+
+    public synchronized Connection getConnection() throws SQLException {
+        if (!availableConnections.isEmpty()) {
+            Connection existingConnection = availableConnections.pop();
+
+            // If connection on available list is closed (e.g.,
+            // it timed out), then remove it from available list
+            // and race for a connection again.
+            if (existingConnection.isClosed()) {
+                lastAccessTimeRecord.remove(existingConnection);
+                // notifyAll for fairness
+                notifyAll();
+            } else {
+                busyConnections.push(existingConnection);
+                setTimeStamp(existingConnection);
+                return existingConnection;
+            }
+        } else if (!waitIfBusy && busyConnections.size() >= maxConnections) {
+            // You reached maxConnections limit and waitIfBusy flag is false.
+            // Throw SQLException in such a case.
+            throw new SQLException("Connection limit reached");
+        } else {
+
+            if (busyConnections.size() < maxConnections) {
+                // available connection is empty, but total number of connection
+                // doesn't reach maxConnection. Request for more connection
+                needConnection.release();
+            }
+
+            try {
+                // wait for free connection
+                wait();
+            } catch (InterruptedException ie) {
+            }
+        }
+        // always race for connection forever
+        return getConnection();
+    }
+
+    // This explicitly makes a new connection. Called in
+    // the foreground when initializing the ConnectionPool,
+    // and called in the background when running.
+    private Connection makeNewConnection() throws SQLException {
+        try {
+            // Load database driver if not already loaded
+            Class.forName(driver);
+            Connection connection;
+            // Establish network connection to database
+            if (urlType.equals("speratedURL")) {
+                connection = DriverManager.getConnection(url, username, password);
+            } else if (urlType.equals("simpleURL")) {
+                connection = DriverManager.getConnection(jdbcUrl);
+            } else { // if(urlType.equals("dataSource")){
+                connection = datasource.getConnection();
+            }
+            connection.setTransactionIsolation(this.transactionIsolation);
+            connection.setAutoCommit(this.autoCommit);
+            return connection;
+        } catch (ClassNotFoundException cnfe) {
+            // Simplify try/catch blocks of people using this by
+            // throwing only one exception type.
+            throw new SQLException("Can't find class for driver: " + driver);
+        }
+    }
+
+    private synchronized void fillUpConnection(Connection conn) {
+        setTimeStamp(conn);
+        availableConnections.push(conn);
+
+        // notify all since new connection is created
+        notifyAll();
+    }
+
+    private void setTimeStamp(Connection connection) {
+        lastAccessTimeRecord.put(connection, System.currentTimeMillis());
+    }
+
+    // The database connection cannot be left idle for too long, otherwise TCP
+    // connection will be broken.
+    /**
+     * From http://forums.mysql.com/read.php?39,28450,57460#msg-57460 Okay, then it looks like wait_timeout on the
+     * server is killing your connection (it is set to 8 hours of idle time by default). Either set that value higher on
+     * your server, or configure your connection pool to not hold connections idle that long (I prefer the latter). Most
+     * folks I know that run MySQL with a connection pool in high-load production environments only let connections sit
+     * idle for a matter of minutes, since it only takes a few milliseconds to open a connection, and the longer one
+     * sits idle the more chance it will go "bad" because of a network hiccup or the MySQL server being restarted.
+     *
+     * @throws java.sql.SQLException
+     */
+    private boolean isConnectionStale(Connection connection) {
+        long currentTime = System.currentTimeMillis();
+        long lastAccess = lastAccessTimeRecord.get(connection);
+        if (currentTime - lastAccess > MAX_IDLE_TIME) {
+            return true;
+        } else
+            return false;
+    }
+
+    private synchronized void closeStaleConnections() {
+        // close idle connections
+        Iterator<Connection> iter = availableConnections.iterator();
+        while (iter.hasNext()) {
+            Connection existingConnection = iter.next();
+            if (isConnectionStale(existingConnection)) {
+                try {
+                    existingConnection.close();
+                    iter.remove();
+                } catch (SQLException sql) {
+                    logger.error(sql.getMessage(), sql);
+                }
+            }
+        }
+        // close busy connections that have been checked out for too long.
+        // This should not happen since this means program has bug for not
+        // releasing connections .
+        iter = busyConnections.iterator();
+        while (iter.hasNext()) {
+            Connection busyConnection = iter.next();
+            if (isConnectionStale(busyConnection)) {
+                try {
+                    busyConnection.close();
+                    iter.remove();
+                    logger.warn("****Connection has checked out too long. Forced release. Check the program for calling release connection [free(Connection) method]");
+                } catch (SQLException sql) {
+                    logger.error(sql.getMessage(), sql);
+                }
+            }
+        }
+    }
+
+    public synchronized void free(Connection connection) {
+        busyConnections.removeElement(connection);
+        availableConnections.addElement(connection);
+        // Wake up threads that are waiting for a connection
+        notifyAll();
+    }
+
+    /**
+     * Close all the connections. Use with caution: be sure no connections are in use before calling. Note that you are
+     * not <I>required</I> to call this when done with a ConnectionPool, since connections are guaranteed to be closed
+     * when garbage collected. But this method gives more control regarding when the connections are closed.
+     */
+    public synchronized void dispose() {
+        logger.info("Connection Pool Shutting down");
+
+        // stop clean up thread
+        this.stop = true;
+        this.clenupThread.interrupt();
+
+        // stop producer up thread
+        this.producerThread.interrupt();
+
+        // close all connection
+        closeConnections(availableConnections);
+        availableConnections = new Stack<Connection>();
+        closeConnections(busyConnections);
+        busyConnections = new Stack<Connection>();
+        lastAccessTimeRecord.clear();
+
+        logger.info("All connection is closed");
+
+        try {
+            this.clenupThread.join();
+            this.producerThread.join();
+        } catch (Exception e) {
+            logger.error("Cannot shutdown cleanup thread", e);
+        }
+
+        logger.info("Connection Pool Shutdown");
+    }
+
+    private void closeConnections(Stack<Connection> connections) {
+        while (!connections.isEmpty()) {
+            Connection connection = connections.pop();
+            try {
+                if (!connection.isClosed()) {
+                    connection.close();
+                }
+            } catch (SQLException sqle) {
+                // Ignore errors; garbage collect anyhow
+                logger.warn(sqle.getMessage());
+            }
+        }
+    }
+
+    public synchronized String toString() {
+        String info = "ConnectionPool(" + url + "," + username + ")" + ", available=" + availableConnections.size()
+                + ", busy=" + busyConnections.size() + ", max=" + maxConnections;
+        return (info);
+    }
+
+    class CleanUpThread implements Runnable {
+        public void run() {
+            while (!stop) {
+                try {
+                    Thread.sleep(MAX_IDLE_TIME);
+                    closeStaleConnections();
+                } catch (InterruptedException e) {
+                    logger.info("Clean up thread is interrupted to close");
+                }
+            }
+        }
+    }
+
+    class FillUpThread implements Runnable {
+        public void run() {
+            while (!stop) {
+                try {
+                    // block until get
+                    needConnection.acquire();
+
+                    Connection conn = makeNewConnection();
+                    fillUpConnection(conn);
+                } catch (SQLException e) {
+                    // cannot create connection (increase semaphore value back)
+                    needConnection.release();
+                    logger.error(e.getMessage(), e);
+                } catch (InterruptedException e) {
+                    logger.info("Fill up thread is interrupted to close");
+                    break;
+                }
+            }
+        }
+    }
+
+    public void shutdown() throws SQLException{
+        for (Connection c : availableConnections) {
+            try {
+                c.close();
+            } catch (SQLException e) {
+                logger.error("Error while closing the connection", e);
+                throw new SQLException("Error while closing the connection", e);
+            }
+        }
+
+        for (Connection c : busyConnections) {
+            try {
+                c.close();
+            } catch (SQLException e) {
+                logger.error("Error while closing the connection", e);
+                throw new SQLException("Error while closing the connection", e);
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a5156a92/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/util/CredentialStoreInitUtil.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/util/CredentialStoreInitUtil.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/util/CredentialStoreInitUtil.java
new file mode 100644
index 0000000..8320c69
--- /dev/null
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/util/CredentialStoreInitUtil.java
@@ -0,0 +1,155 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+*/
+package org.apache.airavata.credential.store.store.impl.util;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.derby.drda.NetworkServerControl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.URI;
+import java.sql.Connection;
+import java.sql.SQLException;
+
+public class CredentialStoreInitUtil {
+    private static final Logger logger = LoggerFactory.getLogger(CredentialStoreInitUtil.class);
+    public static final String CREDENTIALS = "CREDENTIALS";
+    public static final String START_DERBY_ENABLE = "start.derby.server.mode";
+    public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
+    private static NetworkServerControl server;
+    private static JdbcStorage db;
+    private static String jdbcURl;
+    private static String jdbcDriver;
+    private static String jdbcUser;
+    private static String jdbcPassword;
+
+
+    public static void initializeDB() {
+//        System.setProperty("appcatalog.initialize.state", "0");
+        try{
+            jdbcDriver = ServerSettings.getCredentialStoreDBDriver();
+            jdbcURl = ServerSettings.getCredentialStoreDBURL();
+            jdbcUser = ServerSettings.getCredentialStoreDBUser();
+            jdbcPassword = ServerSettings.getCredentialStoreDBPassword();
+            jdbcURl = jdbcURl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
+        } catch (ApplicationSettingsException e) {
+            logger.error("Unable to read airavata server properties", e.getMessage());
+        }
+
+        if (getDBType(jdbcURl).equals("derby") && isDerbyStartEnabled()) {
+            startDerbyInServerMode();
+        }
+        db = new JdbcStorage(10, 50, jdbcURl, jdbcDriver, true);
+
+        Connection conn = null;
+        try {
+            conn = db.connect();
+            if (!DatabaseCreator.isDatabaseStructureCreated(CREDENTIALS, conn)) {
+                DatabaseCreator.createRegistryDatabase("database_scripts/credstore", conn);
+                logger.info("New Database created for Credential Store !!! ");
+            } else {
+                logger.info("Database already created for Credential Store !!!");
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RuntimeException("Database failure", e);
+        } finally {
+            db.closeConnection(conn);
+            try {
+                if(conn != null){
+                    if (!conn.getAutoCommit()) {
+                        conn.commit();
+                    }
+                    conn.close();
+                }
+            } catch (SQLException e) {
+                logger.error("Error while closing database connection...", e.getMessage(), e);
+            }
+        }
+//        System.setProperty("appcatalog.initialize.state", "1");
+    }
+
+    public static String getDBType(String jdbcUrl){
+        try{
+            String cleanURI = jdbcUrl.substring(5);
+            URI uri = URI.create(cleanURI);
+            return uri.getScheme();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            return null;
+        }
+    }
+
+    public static boolean isDerbyStartEnabled(){
+        try {
+            String s = ServerSettings.getSetting(START_DERBY_ENABLE);
+            if("true".equals(s)){
+                return true;
+            }
+        }  catch (ApplicationSettingsException e) {
+            logger.error("Unable to read airavata server properties", e.getMessage(), e);
+            return false;
+        }
+        return false;
+    }
+
+    public static void startDerbyInServerMode() {
+        try {
+            System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
+            server = new NetworkServerControl(InetAddress.getByName("0.0.0.0"),
+                    getPort(jdbcURl),
+                    jdbcUser, jdbcPassword);
+            java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
+            server.start(consoleWriter);
+        } catch (IOException e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        } catch (Exception e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        }
+    }
+
+    public static void stopDerbyInServerMode() {
+        System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "false");
+        if (server!=null){
+            try {
+                server.shutdown();
+            } catch (Exception e) {
+                logger.error("Error when stopping the derby server : "+e.getLocalizedMessage());
+            }
+        }
+    }
+
+    public static int getPort(String jdbcURL){
+        try{
+            String cleanURI = jdbcURL.substring(5);
+            URI uri = URI.create(cleanURI);
+            return uri.getPort();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            return -1;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a5156a92/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/util/DatabaseCreator.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/util/DatabaseCreator.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/util/DatabaseCreator.java
new file mode 100644
index 0000000..627be0e
--- /dev/null
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/util/DatabaseCreator.java
@@ -0,0 +1,353 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+*/
+package org.apache.airavata.credential.store.store.impl.util;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.sql.*;
+import java.util.StringTokenizer;
+
+/**
+ * This class creates the database tables required for airavata with default configuration this
+ * class creates derby database in server mode. User can specify required database in appropriate
+ * properties files.
+ */
+public class DatabaseCreator {
+    private final static Logger logger = LoggerFactory.getLogger(DatabaseCreator.class);
+
+    public enum DatabaseType {
+        derby("(?i).*derby.*"), mysql("(?i).*mysql.*"), other("");
+
+        private String pattern;
+
+        private DatabaseType(String matchingPattern) {
+            this.pattern = matchingPattern;
+        }
+
+        public String getMatchingPattern() {
+            return this.pattern;
+        }
+    }
+
+    private static DatabaseType[] supportedDatabase = new DatabaseType[] { DatabaseType.derby, DatabaseType.mysql };
+
+    private static Logger log = LoggerFactory.getLogger(DatabaseCreator.class);
+    private static final String delimiter = ";";
+
+    /**
+     * Creates database
+     *
+     * @throws Exception
+     */
+    public static void createRegistryDatabase(String prefix, Connection conn) throws Exception {
+        createDatabase(prefix, conn);
+    }
+
+
+
+    /**
+     * Checks whether database tables are created by using select * on given table name
+     *
+     * @param tableName
+     *            Table which should be existed
+     * @return <code>true</core> if checkSQL is success, else <code>false</code> .
+     */
+    public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
+        try {
+
+            log.debug("Running a query to test the database tables existence.");
+
+            // check whether the tables are already created with a query
+            Statement statement = null;
+            try {
+                statement = conn.createStatement();
+                ResultSet rs = statement.executeQuery("select * from " + tableName);
+                if (rs != null) {
+                    rs.close();
+                }
+            } finally {
+                try {
+                    if (statement != null) {
+                        statement.close();
+                    }
+                } catch (SQLException e) {
+                    return false;
+                }
+            }
+        } catch (SQLException e) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * executes given sql
+     *
+     * @param sql
+     * @throws Exception
+     */
+    private static void executeSQL(String sql, Connection conn) throws Exception {
+        // Check and ignore empty statements
+        if ("".equals(sql.trim())) {
+            return;
+        }
+
+        Statement statement = null;
+        try {
+            log.debug("SQL : " + sql);
+
+            boolean ret;
+            int updateCount = 0, updateCountTotal = 0;
+            statement = conn.createStatement();
+            ret = statement.execute(sql);
+            updateCount = statement.getUpdateCount();
+            do {
+                if (!ret) {
+                    if (updateCount != -1) {
+                        updateCountTotal += updateCount;
+                    }
+                }
+                ret = statement.getMoreResults();
+                if (ret) {
+                    updateCount = statement.getUpdateCount();
+                }
+            } while (ret);
+
+            log.debug(sql + " : " + updateCountTotal + " rows affected");
+
+            SQLWarning warning = conn.getWarnings();
+            while (warning != null) {
+                log.info(warning + " sql warning");
+                warning = warning.getNextWarning();
+            }
+            conn.clearWarnings();
+        } catch (SQLException e) {
+            if (e.getSQLState().equals("X0Y32")) {
+                // eliminating the table already exception for the derby
+                // database
+                log.info("Table Already Exists", e);
+            } else {
+                throw new Exception("Error occurred while executing : " + sql, e);
+            }
+        } finally {
+            if (statement != null) {
+                try {
+                    statement.close();
+                } catch (SQLException e) {
+                    log.error("Error occurred while closing result set.", e);
+                }
+            }
+        }
+    }
+
+    /**
+     * computes relatational database type using database name
+     *
+     * @return DatabaseType
+     * @throws Exception
+     *
+     */
+    public static DatabaseType getDatabaseType(Connection conn) throws Exception {
+        try {
+            if (conn != null && (!conn.isClosed())) {
+                DatabaseMetaData metaData = conn.getMetaData();
+                String databaseProductName = metaData.getDatabaseProductName();
+                return checkType(databaseProductName);
+            }
+        } catch (SQLException e) {
+            String msg = "Failed to create Airavata database." + e.getMessage();
+            log.error(msg, e);
+            throw new Exception(msg, e);
+        }
+        return DatabaseType.other;
+    }
+
+    /**
+     * Overloaded method with String input
+     *
+     * @return DatabaseType
+     * @throws Exception
+     *
+     */
+    public static DatabaseType getDatabaseType(String dbUrl) throws Exception {
+        return checkType(dbUrl);
+    }
+
+    private static DatabaseType checkType(String text) throws Exception {
+        try {
+            if (text != null) {
+                for (DatabaseType type : supportedDatabase) {
+                    if (text.matches(type.getMatchingPattern()))
+                        return type;
+                }
+            }
+            String msg = "Unsupported database: " + text
+                    + ". Database will not be created automatically by the Airavata. "
+                    + "Please create the database using appropriate database scripts for " + "the database.";
+            throw new Exception(msg);
+
+        } catch (SQLException e) {
+            String msg = "Failed to create Airavatadatabase." + e.getMessage();
+            log.error(msg, e);
+            throw new Exception(msg, e);
+        }
+    }
+
+    /**
+     * Get scripts location which is prefix + "-" + databaseType + ".sql"
+     *
+     * @param prefix
+     * @param databaseType
+     * @return script location
+     */
+    private static String getScriptLocation(String prefix, DatabaseType databaseType) {
+        String scriptName = prefix + "-" + databaseType + ".sql";
+        log.debug("Loading database script from :" + scriptName);
+        return  scriptName;
+    }
+
+    private static void createDatabase(String prefix, Connection conn) throws Exception {
+        Statement statement = null;
+        try {
+            conn.setAutoCommit(false);
+            statement = conn.createStatement();
+            executeSQLScript(getScriptLocation(prefix, DatabaseCreator.getDatabaseType(conn)), conn);
+            conn.commit();
+            log.debug("Tables are created successfully.");
+        } catch (SQLException e) {
+            String msg = "Failed to create database tables for Airavata resource store. " + e.getMessage();
+            log.error(msg, e);
+            conn.rollback();
+            throw new Exception(msg, e);
+        } finally {
+            conn.setAutoCommit(true);
+            try {
+                if (statement != null) {
+                    statement.close();
+                }
+            } catch (SQLException e) {
+                log.error("Failed to close statement.", e);
+            }
+        }
+    }
+
+    private static void executeSQLScript(String dbscriptName, Connection conn) throws Exception {
+        StringBuffer sql = new StringBuffer();
+        BufferedReader reader = null;
+
+        try {
+            InputStream is = DatabaseCreator.class.getClassLoader().getResourceAsStream(dbscriptName);
+            if(is == null) {
+                logger.info("Script file not found at " + dbscriptName + ". Uses default database script file");
+                DatabaseType databaseType = DatabaseCreator.getDatabaseType(conn);
+                if(databaseType.equals(DatabaseType.derby)){
+                    is = DatabaseCreator.class.getClassLoader().getResourceAsStream("experiment-derby.sql");
+                }else if(databaseType.equals(DatabaseType.mysql)){
+                    is = DatabaseCreator.class.getClassLoader().getResourceAsStream("experiment-mysql.sql");
+                }
+            }
+            reader = new BufferedReader(new InputStreamReader(is));
+            String line;
+            while ((line = reader.readLine()) != null) {
+                line = line.trim();
+                if (line.startsWith("//")) {
+                    continue;
+                }
+                if (line.startsWith("--")) {
+                    continue;
+                }
+                StringTokenizer st = new StringTokenizer(line);
+                if (st.hasMoreTokens()) {
+                    String token = st.nextToken();
+                    if ("REM".equalsIgnoreCase(token)) {
+                        continue;
+                    }
+                }
+                sql.append(" ").append(line);
+
+                // SQL defines "--" as a comment to EOL
+                // and in Oracle it may contain a hint
+                // so we cannot just remove it, instead we must end it
+                if (line.indexOf("--") >= 0) {
+                    sql.append("\n");
+                }
+                if ((checkStringBufferEndsWith(sql, delimiter))) {
+                    executeSQL(sql.substring(0, sql.length() - delimiter.length()), conn);
+                    sql.replace(0, sql.length(), "");
+                }
+            }
+            // Catch any statements not followed by ;
+            if (sql.length() > 0) {
+                executeSQL(sql.toString(), conn);
+            }
+        } catch (IOException e) {
+            log.error("Error occurred while executing SQL script for creating Airavata database", e);
+            throw new Exception("Error occurred while executing SQL script for creating Airavata database", e);
+
+        } finally {
+            if (reader != null) {
+                reader.close();
+            }
+        }
+    }
+
+    /**
+     * Checks that a string buffer ends up with a given string. It may sound trivial with the existing JDK API but the
+     * various implementation among JDKs can make those methods extremely resource intensive and perform poorly due to
+     * massive memory allocation and copying. See
+     *
+     * @param buffer
+     *            the buffer to perform the check on
+     * @param suffix
+     *            the suffix
+     * @return <code>true</code> if the character sequence represented by the argument is a suffix of the character
+     *         sequence represented by the StringBuffer object; <code>false</code> otherwise. Note that the result will
+     *         be <code>true</code> if the argument is the empty string.
+     */
+    public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
+        if (suffix.length() > buffer.length()) {
+            return false;
+        }
+        // this loop is done on purpose to avoid memory allocation performance
+        // problems on various JDKs
+        // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
+        // implementation is ok though does allocation/copying
+        // StringBuffer.toString().endsWith() does massive memory
+        // allocation/copying on JDK 1.5
+        // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
+        int endIndex = suffix.length() - 1;
+        int bufferIndex = buffer.length() - 1;
+        while (endIndex >= 0) {
+            if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
+                return false;
+            }
+            bufferIndex--;
+            endIndex--;
+        }
+        return true;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a5156a92/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/util/JdbcStorage.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/util/JdbcStorage.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/util/JdbcStorage.java
new file mode 100644
index 0000000..18b16cb
--- /dev/null
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/util/JdbcStorage.java
@@ -0,0 +1,175 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+*/
+package org.apache.airavata.credential.store.store.impl.util;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.sql.*;
+
+public class JdbcStorage {
+    private static Logger log = LoggerFactory.getLogger(JdbcStorage.class);
+
+    private ConnectionPool connectionPool;
+
+    public JdbcStorage(String jdbcUrl, String jdbcDriver) {
+        // default init connection and max connection
+        this(3, 50, jdbcUrl, jdbcDriver, true);
+    }
+
+    public JdbcStorage(int initCon, int maxCon, String url, String driver, boolean enableTransactions) {
+        try {
+            if (enableTransactions) {
+                connectionPool = new ConnectionPool(driver, url, initCon, maxCon, true, false,
+                        Connection.TRANSACTION_SERIALIZABLE);
+            } else {
+                connectionPool = new ConnectionPool(driver, url, initCon, maxCon, true);
+            }
+        } catch (Exception e) {
+            throw new RuntimeException("Failed to create database connection pool.", e);
+        }
+    }
+
+    /**
+     * Check if this connection pool is auto commit or not
+     *
+     * @return
+     */
+    public boolean isAutoCommit() {
+        return connectionPool.isAutoCommit();
+    }
+
+    public void commit(Connection conn) {
+        try {
+            if (conn != null && !conn.getAutoCommit()) {
+                conn.commit();
+            }
+        } catch (SQLException sqle) {
+            log.error("Cannot commit data", sqle);
+        }
+    }
+
+    public void commitAndFree(Connection conn) {
+        commit(conn);
+        closeConnection(conn);
+    }
+
+    public void rollback(Connection conn) {
+        try {
+            if (conn != null && !conn.getAutoCommit()) {
+                conn.rollback();
+            }
+        } catch (SQLException sqle) {
+            log.error("Cannot Rollback data", sqle);
+        }
+    }
+
+    public void rollbackAndFree(Connection conn) {
+        rollback(conn);
+        closeConnection(conn);
+    }
+
+    public Connection connect() {
+
+        Connection conn = null;
+        try {
+            conn = connectionPool.getConnection();
+        } catch (SQLException e) {
+            log.error(e.getMessage(), e);
+        }
+        return conn;
+    }
+
+    /**
+     * This method is provided so that you can have better control over the statement. For example: You can use
+     * stmt.setString to convert quotation mark automatically in an UPDATE statement
+     *
+     * NOTE: Statement is closed after execution
+     */
+    public int executeUpdateAndClose(PreparedStatement stmt) throws SQLException {
+        int rows = 0;
+        try {
+            rows = stmt.executeUpdate();
+            if (rows == 0) {
+                log.info("Problem: 0 rows affected by insert/update/delete statement.");
+            }
+        } finally {
+            stmt.close();
+        }
+        return rows;
+    }
+
+    public int countRow(String tableName, String columnName) throws SQLException {
+        String query = new String("SELECT COUNT(" + columnName + ") FROM " + tableName);
+        int count = -1;
+        Connection conn = null;
+        PreparedStatement stmt = null;
+        try {
+            conn = connectionPool.getConnection();
+            stmt = conn.prepareStatement(query);
+            ResultSet rs = stmt.executeQuery();
+            rs.next();
+            count = rs.getInt(1);
+            commit(conn);
+        } catch (SQLException sql) {
+            rollback(conn);
+            throw sql;
+        } finally {
+            try {
+                if (stmt != null && !stmt.isClosed()) {
+                    stmt.close();
+                }
+            } finally {
+                closeConnection(conn);
+            }
+        }
+        return count;
+    }
+
+    public void quietlyClose(Connection conn, Statement... stmts) {
+        if (stmts != null) {
+            for (Statement stmt : stmts) {
+                try {
+                    if (stmt != null && !stmt.isClosed()) {
+                        stmt.close();
+                    }
+                } catch (SQLException sql) {
+                    log.error(sql.getMessage(), sql);
+                }
+            }
+        }
+        closeConnection(conn);
+    }
+
+    public void closeConnection(Connection conn) {
+        if (conn != null) {
+            connectionPool.free(conn);
+        }
+    }
+
+    public void closeAllConnections() {
+        if (connectionPool != null)
+            connectionPool.dispose();
+    }
+
+    public void shutdown() throws SQLException {
+        connectionPool.shutdown();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a5156a92/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser.java
deleted file mode 100644
index f0cac9d..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- *
-*/
-package org.apache.airavata.registry.core.credential.catalog.model;
-
-import javax.persistence.*;
-
-@Entity
-@Table(name ="COMMUNITY_USER")
-@IdClass(CommunityUser_Pk.class)
-public class CommunityUser {
-    private String gatewayId;
-    private String communityUserName;
-    private String tokenId;
-    private String communityUserEmail;
-
-    @Id
-    @Column(name = "GATEWAY_ID")
-    public String getGatewayId() {
-        return gatewayId;
-    }
-
-    public void setGatewayId(String gatewayId) {
-        this.gatewayId = gatewayId;
-    }
-
-    @Id
-    @Column(name = "COMMUNITY_USER_NAME")
-    public String getCommunityUserName() {
-        return communityUserName;
-    }
-
-    public void setCommunityUserName(String communityUserName) {
-        this.communityUserName = communityUserName;
-    }
-
-    @Id
-    @Column(name = "TOKEN_ID")
-    public String getTokenId() {
-        return tokenId;
-    }
-
-    public void setTokenId(String tokenId) {
-        this.tokenId = tokenId;
-    }
-
-    @Column(name = "COMMUNITY_USER_EMAIL")
-    public String getCommunityUserEmail() {
-        return communityUserEmail;
-    }
-
-    public void setCommunityUserEmail(String communityUserEmail) {
-        this.communityUserEmail = communityUserEmail;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a5156a92/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser_Pk.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser_Pk.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser_Pk.java
deleted file mode 100644
index 8b10999..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser_Pk.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- *
-*/
-package org.apache.airavata.registry.core.credential.catalog.model;
-
-import java.io.Serializable;
-
-public class CommunityUser_Pk implements Serializable{
-    private String gatewayId;
-    private String communityUserName;
-    private String tokenId;
-
-    @Override
-    public boolean equals(Object o) {
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return 1;
-    }
-
-    public String getGatewayId() {
-        return gatewayId;
-    }
-
-    public void setGatewayId(String gatewayId) {
-        this.gatewayId = gatewayId;
-    }
-
-    public String getCommunityUserName() {
-        return communityUserName;
-    }
-
-    public void setCommunityUserName(String communityUserName) {
-        this.communityUserName = communityUserName;
-    }
-
-    public String getTokenId() {
-        return tokenId;
-    }
-
-    public void setTokenId(String tokenId) {
-        this.tokenId = tokenId;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a5156a92/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Configuration.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Configuration.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Configuration.java
deleted file mode 100644
index 281a3a1..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Configuration.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you 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.
-*
-*/
-package org.apache.airavata.registry.core.credential.catalog.model;
-
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@Entity
-@Table(name ="CONFIGURATION")
-@IdClass(Configuration_PK.class)
-public class Configuration implements Serializable {
-    @Id
-    @Column(name = "CONFIG_KEY")
-    private String config_key;
-
-    @Id
-    @Column(name = "CONFIG_VAL")
-    private String config_val;
-
-    public String getConfig_key() {
-        return config_key;
-    }
-
-    public String getConfig_val() {
-        return config_val;
-    }
-
-    public void setConfig_key(String config_key) {
-        this.config_key = config_key;
-    }
-
-    public void setConfig_val(String config_val) {
-        this.config_val = config_val;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a5156a92/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Configuration_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Configuration_PK.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Configuration_PK.java
deleted file mode 100644
index 1a18aea..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Configuration_PK.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- *
- */
-
-package org.apache.airavata.registry.core.credential.catalog.model;
-
-import java.io.Serializable;
-
-public class Configuration_PK implements Serializable {
-    private String config_key;
-    private String config_val;
-
-    public Configuration_PK() {
-        ;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return 1;
-    }
-
-    public String getConfig_key() {
-        return config_key;
-    }
-
-    public void setConfig_key(String config_key) {
-        this.config_key = config_key;
-    }
-
-    public void setConfig_val(String config_val) {
-        this.config_val = config_val;
-    }
-
-    public String getConfig_val() {
-        return config_val;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a5156a92/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Credential.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Credential.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Credential.java
deleted file mode 100644
index ed146f7..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Credential.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- *
-*/
-package org.apache.airavata.registry.core.credential.catalog.model;
-
-import javax.persistence.*;
-import java.sql.Timestamp;
-
-@Entity
-@Table(name ="CREDENTIAL")
-@IdClass(Credential_PK.class)
-public class Credential {
-    private String gatewayId;
-    private String tokenId;
-    private Byte[] credential;
-    private String portalUserId;
-    private Timestamp timePersisted;
-
-    @Id
-    @Column(name = "GATEWAY_ID")
-    public String getGatewayId() {
-        return gatewayId;
-    }
-
-    public void setGatewayId(String gatewayId) {
-        this.gatewayId = gatewayId;
-    }
-
-    @Id
-    @Column(name = "TOKEN_ID")
-    public String getTokenId() {
-        return tokenId;
-    }
-
-    public void setTokenId(String tokenId) {
-        this.tokenId = tokenId;
-    }
-
-    @Lob
-    @Column(name = "CREDENTIAL")
-    public Byte[] getCredential() {
-        return credential;
-    }
-
-    public void setCredential(Byte[] credential) {
-        this.credential = credential;
-    }
-
-    @Column(name = "PORTAL_USER_ID")
-    public String getPortalUserId() {
-        return portalUserId;
-    }
-
-    public void setPortalUserId(String portalUserId) {
-        this.portalUserId = portalUserId;
-    }
-
-    @Column(name = "TIME_PERSISTED")
-    public Timestamp getTimePersisted() {
-        return timePersisted;
-    }
-
-    public void setTimePersisted(Timestamp timePersisted) {
-        this.timePersisted = timePersisted;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a5156a92/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Credential_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Credential_PK.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Credential_PK.java
deleted file mode 100644
index a9db85f..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Credential_PK.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- *
-*/
-package org.apache.airavata.registry.core.credential.catalog.model;
-
-import java.io.Serializable;
-
-public class Credential_PK implements Serializable{
-    private String gatewayId;
-    private String tokenId;
-
-
-    @Override
-    public boolean equals(Object o) {
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return 1;
-    }
-
-    public String getGatewayId() {
-        return gatewayId;
-    }
-
-    public void setGatewayId(String gatewayId) {
-        this.gatewayId = gatewayId;
-    }
-
-    public String getTokenId() {
-        return tokenId;
-    }
-
-    public void setTokenId(String tokenId) {
-        this.tokenId = tokenId;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a5156a92/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/util/CredentialCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/util/CredentialCatalogJPAUtils.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/util/CredentialCatalogJPAUtils.java
deleted file mode 100644
index 5a509c7..0000000
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/util/CredentialCatalogJPAUtils.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- *
- */
-
-package org.apache.airavata.registry.core.credential.catalog.util;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-import java.util.HashMap;
-import java.util.Map;
-
-public class CredentialCatalogJPAUtils {
-    private final static Logger logger = LoggerFactory.getLogger(CredentialCatalogJPAUtils.class);
-
-    private static final String PERSISTENCE_UNIT_NAME = "credentialcatalog_data";
-    private static final String CREDCATALOG_JDBC_DRIVER = "credential.store.jdbc.driver";
-    private static final String CREDCATALOG_JDBC_URL = "credential.store.jdbc.url";
-    private static final String CREDCATALOG_JDBC_USER = "credential.store.jdbc.user";
-    private static final String CREDCACATALOG_JDBC_PWD = "credential.store.jdbc.password";
-    private static final String CREDCACATALOG_VALIDATION_QUERY = "credential.store.jdbc.validationQuery";
-
-    @PersistenceUnit(unitName="credentialcatalog_data")
-    protected static EntityManagerFactory factory;
-
-    @PersistenceContext(unitName="credentialcatalog_data")
-    private static EntityManager credCatEntityManager;
-
-    public static EntityManager getEntityManager() throws ApplicationSettingsException {
-        if (factory == null) {
-            String connectionProperties = "DriverClassName=" + readServerProperties(CREDCATALOG_JDBC_DRIVER) + "," +
-                    "Url=" + readServerProperties(CREDCATALOG_JDBC_URL) + "?autoReconnect=true," +
-                    "Username=" + readServerProperties(CREDCATALOG_JDBC_USER) + "," +
-                    "Password=" + readServerProperties(CREDCACATALOG_JDBC_PWD) +
-                    ",validationQuery=" + readServerProperties(CREDCACATALOG_VALIDATION_QUERY);
-            System.out.println(connectionProperties);
-            Map<String, String> properties = new HashMap<String, String>();
-            properties.put("openjpa.ConnectionDriverName", "org.apache.commons.dbcp.BasicDataSource");
-            properties.put("openjpa.ConnectionProperties", connectionProperties);
-            properties.put("openjpa.DynamicEnhancementAgent", "true");
-            properties.put("openjpa.RuntimeUnenhancedClasses", "unsupported");
-            properties.put("openjpa.RemoteCommitProvider","sjvm");
-            properties.put("openjpa.Log","DefaultLevel=INFO, Runtime=INFO, Tool=INFO, SQL=INFO");
-            properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
-            properties.put("openjpa.jdbc.QuerySQLCache", "false");
-            properties.put("openjpa.ConnectionFactoryProperties", "PrettyPrint=true, PrettyPrintLineLength=72," +
-                    " PrintParameters=true, MaxActive=10, MaxIdle=5, MinIdle=2, MaxWait=31536000,  autoReconnect=true");
-            factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);
-        }
-        credCatEntityManager = factory.createEntityManager();
-        return credCatEntityManager;
-    }
-
-    private static String readServerProperties (String propertyName) throws ApplicationSettingsException {
-        try {
-            return ServerSettings.getSetting(propertyName);
-        } catch (ApplicationSettingsException e) {
-            logger.error("Unable to read airavata-server.properties...", e);
-            throw new ApplicationSettingsException("Unable to read airavata-server.properties...");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a5156a92/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml b/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
index af23674..4833874 100644
--- a/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
+++ b/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
@@ -115,11 +115,4 @@
         <class>org.apache.airavata.registry.core.workflow.catalog.model.WorkflowStatus</class>
         <exclude-unlisted-classes>true</exclude-unlisted-classes>
     </persistence-unit>
-    <persistence-unit name="credentialcatalog_data">
-        <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
-        <class>org.apache.airavata.registry.core.credential.catalog.model.CommunityUser</class>
-        <class>org.apache.airavata.registry.core.credential.catalog.model.Configuration</class>
-        <class>org.apache.airavata.registry.core.credential.catalog.model.Credential</class>
-        <exclude-unlisted-classes>true</exclude-unlisted-classes>
-    </persistence-unit>
 </persistence>

http://git-wip-us.apache.org/repos/asf/airavata/blob/a5156a92/modules/registry/registry-core/src/main/resources/credstore-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/credstore-derby.sql b/modules/registry/registry-core/src/main/resources/credstore-derby.sql
index bdae2bd..f600f24 100644
--- a/modules/registry/registry-core/src/main/resources/credstore-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/credstore-derby.sql
@@ -1,49 +1,25 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- *
- */
-
- CREATE TABLE COMMUNITY_USER
-(
-        GATEWAY_ID VARCHAR(256) NOT NULL,
-        COMMUNITY_USER_NAME VARCHAR(256) NOT NULL,
-        TOKEN_ID VARCHAR(256) NOT NULL,
-        COMMUNITY_USER_EMAIL VARCHAR(256) NOT NULL,
-        PRIMARY KEY (GATEWAY_ID, COMMUNITY_USER_NAME, TOKEN_ID)
+CREATE TABLE COMMUNITY_USER (
+  GATEWAY_ID           VARCHAR(256) NOT NULL,
+  COMMUNITY_USER_NAME  VARCHAR(256) NOT NULL,
+  TOKEN_ID             VARCHAR(256) NOT NULL,
+  COMMUNITY_USER_EMAIL VARCHAR(256) NOT NULL,
+  PRIMARY KEY (GATEWAY_ID, COMMUNITY_USER_NAME, TOKEN_ID)
 );
 
-CREATE TABLE CREDENTIALS
-(
-        GATEWAY_ID VARCHAR(256) NOT NULL,
-        TOKEN_ID VARCHAR(256) NOT NULL,
-        CREDENTIAL BLOB NOT NULL,
-        PORTAL_USER_ID VARCHAR(256) NOT NULL,
-        TIME_PERSISTED TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-        PRIMARY KEY (GATEWAY_ID, TOKEN_ID)
+CREATE TABLE CREDENTIALS (
+  GATEWAY_ID     VARCHAR(256) NOT NULL,
+  TOKEN_ID       VARCHAR(256) NOT NULL,
+  CREDENTIAL     BLOB         NOT NULL,
+  PORTAL_USER_ID VARCHAR(256) NOT NULL,
+  TIME_PERSISTED TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (GATEWAY_ID, TOKEN_ID)
 );
 
-CREATE TABLE CONFIGURATION
-(
-          CONFIG_KEY VARCHAR(255),
-          CONFIG_VAL VARCHAR(255),
-          PRIMARY KEY(CONFIG_KEY, CONFIG_VAL)
+CREATE TABLE CONFIGURATION (
+  CONFIG_KEY VARCHAR(255),
+  CONFIG_VAL VARCHAR(255),
+  PRIMARY KEY (CONFIG_KEY, CONFIG_VAL)
 );
 
-INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL) VALUES('app_catalog_version', '0.16');
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL) VALUES ('credential_store_version', '0.16');
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/a5156a92/modules/registry/registry-core/src/main/resources/credstore-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/credstore-mysql.sql b/modules/registry/registry-core/src/main/resources/credstore-mysql.sql
index 3d924ce..f600f24 100644
--- a/modules/registry/registry-core/src/main/resources/credstore-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/credstore-mysql.sql
@@ -1,49 +1,25 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- *
- */
-
- CREATE TABLE COMMUNITY_USER
-(
-        GATEWAY_ID VARCHAR(256) NOT NULL,
-        COMMUNITY_USER_NAME VARCHAR(256) NOT NULL,
-        TOKEN_ID VARCHAR(256) NOT NULL,
-        COMMUNITY_USER_EMAIL VARCHAR(256) NOT NULL,
-        PRIMARY KEY (GATEWAY_ID, COMMUNITY_USER_NAME, TOKEN_ID)
+CREATE TABLE COMMUNITY_USER (
+  GATEWAY_ID           VARCHAR(256) NOT NULL,
+  COMMUNITY_USER_NAME  VARCHAR(256) NOT NULL,
+  TOKEN_ID             VARCHAR(256) NOT NULL,
+  COMMUNITY_USER_EMAIL VARCHAR(256) NOT NULL,
+  PRIMARY KEY (GATEWAY_ID, COMMUNITY_USER_NAME, TOKEN_ID)
 );
 
-CREATE TABLE CREDENTIALS
-(
-        GATEWAY_ID VARCHAR(256) NOT NULL,
-        TOKEN_ID VARCHAR(256) NOT NULL,
-        CREDENTIAL BLOB NOT NULL,
-        PORTAL_USER_ID VARCHAR(256) NOT NULL,
-        TIME_PERSISTED TIMESTAMP DEFAULT NOW() ON UPDATE NOW(),
-        PRIMARY KEY (GATEWAY_ID, TOKEN_ID)
+CREATE TABLE CREDENTIALS (
+  GATEWAY_ID     VARCHAR(256) NOT NULL,
+  TOKEN_ID       VARCHAR(256) NOT NULL,
+  CREDENTIAL     BLOB         NOT NULL,
+  PORTAL_USER_ID VARCHAR(256) NOT NULL,
+  TIME_PERSISTED TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (GATEWAY_ID, TOKEN_ID)
 );
 
-CREATE TABLE CONFIGURATION
-(
-          CONFIG_KEY VARCHAR(255),
-          CONFIG_VAL VARCHAR(255),
-          PRIMARY KEY(CONFIG_KEY, CONFIG_VAL)
+CREATE TABLE CONFIGURATION (
+  CONFIG_KEY VARCHAR(255),
+  CONFIG_VAL VARCHAR(255),
+  PRIMARY KEY (CONFIG_KEY, CONFIG_VAL)
 );
 
-INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL) VALUES('app_catalog_version', '0.16');
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL) VALUES ('credential_store_version', '0.16');
 


[30/50] [abbrv] airavata git commit: Update airavata properties file to use new rabbitmq properties

Posted by la...@apache.org.
Update airavata properties file to use new rabbitmq properties


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: fec0b3795604d451b2815bcd2c41fa601fd813c3
Parents: 9e6f2b1
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Mon Sep 12 13:24:37 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Mon Sep 12 13:24:37 2016 -0400

----------------------------------------------------------------------
 roles/api-orch/templates/airavata-server.properties.j2 | 13 +++++--------
 roles/gfac/templates/airavata-server.properties.j2     | 13 +++++--------
 roles/registry/templates/airavata-server.properties.j2 | 13 +++++--------
 3 files changed, 15 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/fec0b379/roles/api-orch/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/api-orch/templates/airavata-server.properties.j2 b/roles/api-orch/templates/airavata-server.properties.j2
index 435842f..5a01525 100644
--- a/roles/api-orch/templates/airavata-server.properties.j2
+++ b/roles/api-orch/templates/airavata-server.properties.j2
@@ -239,16 +239,13 @@ email.based.monitoring.period=10000
 #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 }}
-status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
-task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQProcessLaunchPublisher
-rabbitmq.status.exchange.name=airavata_rabbitmq_exchange
-rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
+rabbitmq.status.exchange.name=status_exchange
+rabbitmq.process.exchange.name=process_exchange
+rabbitmq.experiment.exchange.name=experiment_exchange
 durable.queue=false
 prefetch.count=200
-launch.queue.name=launch.queue
-cancel.queue.name=cancel.queue
-activity.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
-rabbitmq.exchange.name=airavata_rabbitmq_exchange
+process.launch.queue.name=process.launch.queue
+experiment.launch..queue.name=experiment.launch.queue
 
 ###########################################################################
 # Zookeeper Server Configuration

http://git-wip-us.apache.org/repos/asf/airavata/blob/fec0b379/roles/gfac/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/gfac/templates/airavata-server.properties.j2 b/roles/gfac/templates/airavata-server.properties.j2
index 435842f..5a01525 100644
--- a/roles/gfac/templates/airavata-server.properties.j2
+++ b/roles/gfac/templates/airavata-server.properties.j2
@@ -239,16 +239,13 @@ email.based.monitoring.period=10000
 #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 }}
-status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
-task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQProcessLaunchPublisher
-rabbitmq.status.exchange.name=airavata_rabbitmq_exchange
-rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
+rabbitmq.status.exchange.name=status_exchange
+rabbitmq.process.exchange.name=process_exchange
+rabbitmq.experiment.exchange.name=experiment_exchange
 durable.queue=false
 prefetch.count=200
-launch.queue.name=launch.queue
-cancel.queue.name=cancel.queue
-activity.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
-rabbitmq.exchange.name=airavata_rabbitmq_exchange
+process.launch.queue.name=process.launch.queue
+experiment.launch..queue.name=experiment.launch.queue
 
 ###########################################################################
 # Zookeeper Server Configuration

http://git-wip-us.apache.org/repos/asf/airavata/blob/fec0b379/roles/registry/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/registry/templates/airavata-server.properties.j2 b/roles/registry/templates/airavata-server.properties.j2
index 435842f..5a01525 100644
--- a/roles/registry/templates/airavata-server.properties.j2
+++ b/roles/registry/templates/airavata-server.properties.j2
@@ -239,16 +239,13 @@ email.based.monitoring.period=10000
 #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 }}
-status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
-task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQProcessLaunchPublisher
-rabbitmq.status.exchange.name=airavata_rabbitmq_exchange
-rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
+rabbitmq.status.exchange.name=status_exchange
+rabbitmq.process.exchange.name=process_exchange
+rabbitmq.experiment.exchange.name=experiment_exchange
 durable.queue=false
 prefetch.count=200
-launch.queue.name=launch.queue
-cancel.queue.name=cancel.queue
-activity.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
-rabbitmq.exchange.name=airavata_rabbitmq_exchange
+process.launch.queue.name=process.launch.queue
+experiment.launch..queue.name=experiment.launch.queue
 
 ###########################################################################
 # Zookeeper Server Configuration


[17/50] [abbrv] airavata git commit: start mysql on aws ami

Posted by la...@apache.org.
start mysql on aws ami


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 6e0715b48039e16b1864c1eb7ad69fd3e4867a20
Parents: 86a3919
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Thu Aug 18 01:13:26 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Thu Aug 18 01:13:26 2016 -0400

----------------------------------------------------------------------
 group_vars/all                          |  3 ++-
 roles/database/handlers/main.yml        |  2 ++
 roles/database/tasks/main.yml           | 14 +++++++++++++-
 roles/database/tasks/secure_install.yml | 10 +++++++---
 roles/database/templates/my.cnf         |  4 ----
 roles/database/templates/my.cnf.j2      |  4 ++++
 site.yml                                |  1 +
 7 files changed, 29 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/6e0715b4/group_vars/all
----------------------------------------------------------------------
diff --git a/group_vars/all b/group_vars/all
index e1b8187..da3b24e 100644
--- a/group_vars/all
+++ b/group_vars/all
@@ -5,7 +5,7 @@ ansible_ssh_user: centos
 ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-aws.pem.txt
 
 user: centos
-group: centos 
+group: centos
 user_home: "/home/{{ user }}"
 deployment_dir: "{{ user_home }}/master-deployment"
 
@@ -13,6 +13,7 @@ airavata_dist: "apache-airavata-server-0.17-SNAPSHOT"
 airavata_dist_name: "{{ airavata_dist }}-bin.tar.gz"
 
 db_server: "gw62.iu.xsede.org"
+db_server_port: "3306"
 db_user: "airavata"
 db_password: "airavata"
 app_catalog: "app_catalog"

http://git-wip-us.apache.org/repos/asf/airavata/blob/6e0715b4/roles/database/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/database/handlers/main.yml b/roles/database/handlers/main.yml
index 85269b8..5400e8b 100644
--- a/roles/database/handlers/main.yml
+++ b/roles/database/handlers/main.yml
@@ -1,8 +1,10 @@
 ---
 - name: start mariadb
   service: name=mariadb state=started enabled=yes
+  become: yes
 
 - name: stop mariadb
   service: name=mariadb state=stopped
+  become: yes
 
 ...

http://git-wip-us.apache.org/repos/asf/airavata/blob/6e0715b4/roles/database/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/database/tasks/main.yml b/roles/database/tasks/main.yml
index 0babc12..5fb75e4 100644
--- a/roles/database/tasks/main.yml
+++ b/roles/database/tasks/main.yml
@@ -3,11 +3,17 @@
 #   yum: name=* state=latest
 
 # Install Mysql
+- name: install epel release
+  yum: name=epel-release state=present
+  become: yes
+
 - name: install pip
-  yum: name=python-pip state=latest
+  yum: name=python-pip state=latest update_cache=yes
+  become: yes
 
 - name: install pexpect
   pip: name=pexpect
+  become: yes
 
 # - name: Adds Python MySQL support on Debian/Ubuntu
 #   apt: pkg="python-mysqldb" state=present
@@ -15,14 +21,17 @@
 
 - name: Adds Python MySQL support on RedHat/CentOS
   yum: name=MySQL-python state=present
+  become: yes
   # when: ansible_os_family == 'RedHat'
 
 - name: install mariadb
   yum: name="{{ item }}" state=latest update_cache=yes
   with_items: "{{ mysql_packages }}"
+  become: yes
 
 - name: start mariadb
   service: name=mariadb state=started enabled=yes
+  become: yes
 
 - include: secure_install.yml
 
@@ -38,4 +47,7 @@
 - name: create new user {{ db_user }} with all privilege
   mysql_user: name="{{ db_user }}" password="{{ db_password }}" priv=*.*:ALL state=present
 
+- name: open database port
+  firewalld: port="{{ db_server_port }}/tcp" zone=public permanent=true state=enabled immediate=yes
+  become: yes
 ...

http://git-wip-us.apache.org/repos/asf/airavata/blob/6e0715b4/roles/database/tasks/secure_install.yml
----------------------------------------------------------------------
diff --git a/roles/database/tasks/secure_install.yml b/roles/database/tasks/secure_install.yml
index cfb790b..39ced65 100644
--- a/roles/database/tasks/secure_install.yml
+++ b/roles/database/tasks/secure_install.yml
@@ -1,16 +1,20 @@
 ---
 # This is ansible equivalent for mysql_secure_installation
 - name: Sets the root password
-  mysql_user: user=root password="{{ mysql_root_password }}" host=localhost
+  mysql_user: user=root
+              password="{{ mysql_root_password }}"
+              host=localhost
+              login_user=root
 
 - name: Copy .my.cnf file
-  template: src=my.cnf dest=/root/.my.cnf
+  template: src=my.cnf.j2 dest="{{ user_home }}/.my.cnf"
+  # become: yes
 
 - name: Removes all anonymous user accounts
   mysql_user: name='' host_all=yes state=absent
 
 - name: Secures the MySQL root user for all hosts
-  mysql_user: user="root" password="{{ mysql_root_password }}" host_all=yes
+  mysql_user: user=root password="{{ mysql_root_password }}" host_all=yes
 
 - name: Removes the MySQL test database
   mysql_db: db=test state=absent

http://git-wip-us.apache.org/repos/asf/airavata/blob/6e0715b4/roles/database/templates/my.cnf
----------------------------------------------------------------------
diff --git a/roles/database/templates/my.cnf b/roles/database/templates/my.cnf
deleted file mode 100644
index ebe5b5b..0000000
--- a/roles/database/templates/my.cnf
+++ /dev/null
@@ -1,4 +0,0 @@
-# Example .my.cnf file for setting the root password
-[client]
-user=root
-password="{{ mysql_root_password }}"

http://git-wip-us.apache.org/repos/asf/airavata/blob/6e0715b4/roles/database/templates/my.cnf.j2
----------------------------------------------------------------------
diff --git a/roles/database/templates/my.cnf.j2 b/roles/database/templates/my.cnf.j2
new file mode 100644
index 0000000..ebe5b5b
--- /dev/null
+++ b/roles/database/templates/my.cnf.j2
@@ -0,0 +1,4 @@
+# Example .my.cnf file for setting the root password
+[client]
+user=root
+password="{{ mysql_root_password }}"

http://git-wip-us.apache.org/repos/asf/airavata/blob/6e0715b4/site.yml
----------------------------------------------------------------------
diff --git a/site.yml b/site.yml
index 6a7a634..6dd294e 100644
--- a/site.yml
+++ b/site.yml
@@ -35,6 +35,7 @@
 - hosts: database
   tags: mysql
   roles:
+    - env_setup
     - database
 
 - hosts: wso2is


[15/50] [abbrv] airavata git commit: Added java role and make rabbitmq works with aws

Posted by la...@apache.org.
Added java role and make rabbitmq works with aws


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: c18b06cb47333205f393e911b151560b74312922
Parents: ab13cf6
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Wed Aug 17 17:36:38 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Wed Aug 17 17:36:38 2016 -0400

----------------------------------------------------------------------
 hosts                            |  3 ++-
 roles/common/tasks/main.yml      |  6 +++++
 roles/env_setup/tasks/main.yml   | 33 ++++--------------------
 roles/env_setup/vars/main.yml    | 15 -----------
 roles/java/tasks/main.yml        | 21 +++++++++++++++
 roles/java/vars/main.yml         | 15 +++++++++++
 roles/rabbitmq/handlers/main.yml |  3 +++
 roles/rabbitmq/tasks/main.yml    | 13 +++++++++-
 roles/wso2_is/tasks/main.yml     | 48 ++++++++---------------------------
 site.yml                         |  2 ++
 10 files changed, 76 insertions(+), 83 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/c18b06cb/hosts
----------------------------------------------------------------------
diff --git a/hosts b/hosts
index 819e1ab..b14e7fd 100644
--- a/hosts
+++ b/hosts
@@ -20,10 +20,11 @@
 [rabbitmq]
 #js-156.196.jetstream-cloud.org
 #js-171-11.jetstream-cloud.org rabbit_hostName="jetcloud-1-centos-7"
+54.236.73.114
 
 [database]
 #js-156.196.jetstream-cloud.org
 #js-171-11.jetstream-cloud.org
 
 [wso2is]
-107.23.143.252
+52.91.87.213

http://git-wip-us.apache.org/repos/asf/airavata/blob/c18b06cb/roles/common/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml
index 18d628d..31bfaae 100644
--- a/roles/common/tasks/main.yml
+++ b/roles/common/tasks/main.yml
@@ -1,4 +1,10 @@
 ---
+- name: Install Airavata pre-requireties
+  yum: name={{ item }} state=latest update_cache=yes
+  with_items:
+    - git
+    - maven
+
 # Setup airavata source
 - name: Create deployment directory {{ deployment_dir }}
   file: path={{ deployment_dir }} state=directory mode=0755

http://git-wip-us.apache.org/repos/asf/airavata/blob/c18b06cb/roles/env_setup/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/env_setup/tasks/main.yml b/roles/env_setup/tasks/main.yml
index 395d0a8..a3ecb8c 100644
--- a/roles/env_setup/tasks/main.yml
+++ b/roles/env_setup/tasks/main.yml
@@ -3,38 +3,15 @@
 #All commons tasks goes here
 - name: Create a new user group "{{ group }}"
   group: name={{ group }}
+  become: yes
 
 - name: Create a new user "{{ user }}"
   user: name={{ user }} group={{ group }}
+  become: yes
 
-################################################################################
-- name: Install pre-requireties
-  yum: name={{ item }} state=latest update_cache=yes
-  with_items:
-    - git
-    - maven
-    - firewalld
-    - unzip  #need for wso2
-
-
-################################################################################
-# Install Orcal Java
-- name: download oracle java 8 rpm
-  get_url: url="{{ java_rpm_url }}" dest="{{ java_dir_source }}" headers='Cookie:oraclelicense=accept-securebackup-cookie'
-
-- name: Install oracle java 8
-  yum: name="{{ java_dir_source }}/{{ java_rpm_filename }}" state=present
-
-- name: set Oracle Java {{ java_version_string }} as default
-  alternatives:
-    name="{{ item.exe }}"
-    link="/usr/bin/{{ item.exe }}"
-    path="{{ item.path }}/{{ item.exe }}"
-  with_items:
-    - { path: "{{ java_home }}/jre/bin", exe: 'java' }
-    - { path: "{{ java_home }}/jre/bin", exe: 'keytool' }
-    - { path: "{{ java_home }}/bin", exe: 'javac' }
-    - { path: "{{ java_home }}/bin", exe: 'javadoc' }
+- name: Install Firewalld
+  yum: name=firewalld state=latest update_cache=yes
+  become: yes
 
   # TODO: stop iptables service, can't have both iptables and firewalld on same host
   # if we try to stop non existing service ansible fails.

http://git-wip-us.apache.org/repos/asf/airavata/blob/c18b06cb/roles/env_setup/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/env_setup/vars/main.yml b/roles/env_setup/vars/main.yml
deleted file mode 100644
index a995684..0000000
--- a/roles/env_setup/vars/main.yml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-#Variables associated with this role
-# Oracle Java 8
-java_dir_source: "/usr/local/src"
-
-java_version: 8
-java_version_update: 91
-java_version_build: '14'
-java_version_string: "1.{{ java_version }}.0_{{ java_version_update }}"
-java_home: "/usr/java/jdk1.{{ java_version }}.0_{{ java_version_update }}"
-
-java_rpm_filename: "jdk-{{ java_version }}u{{ java_version_update }}-linux-x64.rpm"
-java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/{{ java_version }}u{{ java_version_update }}-b{{ java_version_build }}/{{ java_rpm_filename }}"
-
-...

http://git-wip-us.apache.org/repos/asf/airavata/blob/c18b06cb/roles/java/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/java/tasks/main.yml b/roles/java/tasks/main.yml
new file mode 100644
index 0000000..92f2039
--- /dev/null
+++ b/roles/java/tasks/main.yml
@@ -0,0 +1,21 @@
+---
+# Install Orcal Java
+- name: download oracle java 8 rpm
+  get_url: url="{{ java_rpm_url }}" dest="{{ java_dir_source }}" headers='Cookie:oraclelicense=accept-securebackup-cookie'
+  become: yes
+
+- name: Install oracle java 8
+  yum: name="{{ java_dir_source }}/{{ java_rpm_filename }}" state=present
+  become: yes
+
+- name: set Oracle Java {{ java_version_string }} as default
+  alternatives:
+    name="{{ item.exe }}"
+    link="/usr/bin/{{ item.exe }}"
+    path="{{ item.path }}/{{ item.exe }}"
+  with_items:
+    - { path: "{{ java_home }}/jre/bin", exe: 'java' }
+    - { path: "{{ java_home }}/jre/bin", exe: 'keytool' }
+    - { path: "{{ java_home }}/bin", exe: 'javac' }
+    - { path: "{{ java_home }}/bin", exe: 'javadoc' }
+  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/c18b06cb/roles/java/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/java/vars/main.yml b/roles/java/vars/main.yml
new file mode 100644
index 0000000..a995684
--- /dev/null
+++ b/roles/java/vars/main.yml
@@ -0,0 +1,15 @@
+---
+#Variables associated with this role
+# Oracle Java 8
+java_dir_source: "/usr/local/src"
+
+java_version: 8
+java_version_update: 91
+java_version_build: '14'
+java_version_string: "1.{{ java_version }}.0_{{ java_version_update }}"
+java_home: "/usr/java/jdk1.{{ java_version }}.0_{{ java_version_update }}"
+
+java_rpm_filename: "jdk-{{ java_version }}u{{ java_version_update }}-linux-x64.rpm"
+java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/{{ java_version }}u{{ java_version_update }}-b{{ java_version_build }}/{{ java_rpm_filename }}"
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/c18b06cb/roles/rabbitmq/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/rabbitmq/handlers/main.yml b/roles/rabbitmq/handlers/main.yml
index 4515589..5ce5a59 100644
--- a/roles/rabbitmq/handlers/main.yml
+++ b/roles/rabbitmq/handlers/main.yml
@@ -2,9 +2,12 @@
 # Rabbitmq related handlers
 - name: start rabbitmq
   service: name=rabbitmq-server state=started
+  become: yes
 
 - name: stop rabbitmq
   service: name=rabbitmq-server state=stopped
+  become: yes
 
 - name: restart rabbitmq
   service: name=rabbitmq-server state=restarted
+  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/c18b06cb/roles/rabbitmq/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/rabbitmq/tasks/main.yml b/roles/rabbitmq/tasks/main.yml
index d1e7ce5..b487737 100644
--- a/roles/rabbitmq/tasks/main.yml
+++ b/roles/rabbitmq/tasks/main.yml
@@ -23,27 +23,38 @@
   become: yes
 
 - name: Edit /etc/hosts file
-  lineinfile: dest=/etc/hosts line="{{ _ip4.stdout }} {{ rabbit_hostName }}"
+  lineinfile: dest=/etc/hosts line="{{ _ip4.stdout }} {{ ansible_fqdn }}"
   notify:
     - restart rabbitmq
   become: yes
 
 - name: Start Rabbitmq server
   service: name=rabbitmq-server state=started
+  become: yes
 
 - name: Enable rabbitmq management plugin
   rabbitmq_plugin: names=rabbitmq_management state=enabled
+  notify:
+    - restart rabbitmq
+  become: yes
 
 - name: Create rabbitmq vhost {{ rabbitmq_vhost }}
   rabbitmq_vhost: name="{{ rabbitmq_vhost }}" state=present
+  become: yes
 
 - name: Add user {{ rabbitmq_user }} to vhost {{ rabbitmq_vhost }}  and give permission
   rabbitmq_user: user="{{ rabbitmq_user }}"
                  password="{{ rabbitmq_password }}"
                  vhost="{{ rabbitmq_vhost }}"
+                 tags="administrator"
                  configure_priv=.*
                  read_priv=.*
                  write_priv=.*
                  state=present
+  become: yes
+
+- name: restart rabbitmq
+  service: name=rabbitmq-server state=restarted
+  become: yes
 
 ...

http://git-wip-us.apache.org/repos/asf/airavata/blob/c18b06cb/roles/wso2_is/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/wso2_is/tasks/main.yml b/roles/wso2_is/tasks/main.yml
index 6cd03b0..1e506c2 100644
--- a/roles/wso2_is/tasks/main.yml
+++ b/roles/wso2_is/tasks/main.yml
@@ -1,42 +1,15 @@
 ---
-# TODO- replace java install with env_setup role
-# Install Orcal Java
-- name: download oracle java 8 rpm
-  get_url: url="{{ java_rpm_url }}" dest="{{ java_dir_source }}" headers='Cookie:oraclelicense=accept-securebackup-cookie'
-  become: yes
-  become_user: root
-
-- name: Install oracle java 8
-  yum: name="{{ java_dir_source }}/{{ java_rpm_filename }}" state=present
-  become: yes
-  become_user: root
-
-- name: set Oracle Java {{ java_version_string }} as default
-  alternatives:
-    name="{{ item.exe }}"
-    link="/usr/bin/{{ item.exe }}"
-    path="{{ item.path }}/{{ item.exe }}"
-  with_items:
-    - { path: "{{ java_home }}/jre/bin", exe: 'java' }
-    - { path: "{{ java_home }}/jre/bin", exe: 'keytool' }
-    - { path: "{{ java_home }}/bin", exe: 'javac' }
-    - { path: "{{ java_home }}/bin", exe: 'javadoc' }
-  become: yes
-  become_user: root
-
-- name: Install pre-requireties
+- name: install role pre-requireties
   yum: name=unzip state=latest update_cache=yes
   become: yes
 
-- name: Install pre-requireties
-  yum: name=firewalld state=latest update_cache=yes
-  become: yes
 # downlaod wso2 is
 # extract it
 # - name: Download and unarchive wso2 is
 #   unarchive: src="{{ zookeeper_url }}" dest="{{ user_home }}" copy=no owner="{{ user }}" group="{{ group }}"
 # for now wso2is from localhost
-- name: Copy WSO2 IS
+
+- name: copy WSO2 IS
   unarchive: >
     src="{{ wso2_is_dist }}"
     dest="{{ user_home }}/"
@@ -44,13 +17,13 @@
     group="{{ group }}"
     creates="{{ user_home }}/{{ wso2_is_dir }}/bin/wso2server.sh"
 
-- name: Copy carbon.xml
-  template: src=carbon.xml.j2 dest="{{ user_home }}/{{ wso2_is_dir }}/repository/conf/carbon.xml" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r"
-
-
-- name: Start firewalld service
-  service: name=firewalld state=started
-  become: yes
+- name: copy carbon.xml
+  template: >
+    src=carbon.xml.j2
+    dest="{{ user_home }}/{{ wso2_is_dir }}/repository/conf/carbon.xml"
+    owner="{{ user }}"
+    group="{{ group }}"
+    mode="u=rw,g=r,o=r"
 
 - name: open carabon management console port
   firewalld: port=9443/tcp zone=public permanent=true state=enabled immediate=yes
@@ -65,5 +38,4 @@
 # - name: stop wso2 is
   # command: ./bin/airavata-server-stop.sh -f chdir="{{ gfac_dir }}/{{ airavata_dist }}/" removes="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
 
-
 ...

http://git-wip-us.apache.org/repos/asf/airavata/blob/c18b06cb/site.yml
----------------------------------------------------------------------
diff --git a/site.yml b/site.yml
index 0de15ef..bae8573 100644
--- a/site.yml
+++ b/site.yml
@@ -39,5 +39,7 @@
 - hosts: wso2is
   tags: wso2is
   roles:
+    - env_setup
+    - java
     - wso2_is
 ...


[35/50] [abbrv] airavata git commit: fixing typo

Posted by la...@apache.org.
fixing typo


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 4d908fbe9bb67d50d05443a1d3c02524bd39253f
Parents: 2d9827c
Author: scnakandala <su...@gmail.com>
Authored: Thu Sep 15 14:53:47 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Sep 15 14:53:47 2016 -0400

----------------------------------------------------------------------
 .../registry/core/credential/catalog/model/CommunityUser.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/4d908fbe/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser.java
index 24a9669..f0cac9d 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser.java
@@ -24,7 +24,7 @@ import javax.persistence.*;
 
 @Entity
 @Table(name ="COMMUNITY_USER")
-@IdClass(CommunityUser_PK.class)
+@IdClass(CommunityUser_Pk.class)
 public class CommunityUser {
     private String gatewayId;
     private String communityUserName;


[31/50] [abbrv] airavata git commit: Adding develop branch variables

Posted by la...@apache.org.
Adding develop branch variables


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 475f687529e5547ef9ae3c13850536edea863012
Parents: fec0b37
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Tue Sep 13 13:36:03 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Tue Sep 13 13:36:03 2016 -0400

----------------------------------------------------------------------
 group_vars/all.yml            | 9 +++++----
 roles/database/tasks/main.yml | 3 +--
 site.yml                      | 8 ++++++++
 3 files changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/475f6875/group_vars/all.yml
----------------------------------------------------------------------
diff --git a/group_vars/all.yml b/group_vars/all.yml
index 615085a..b1efac4 100644
--- a/group_vars/all.yml
+++ b/group_vars/all.yml
@@ -1,7 +1,8 @@
 ---
 ansible_connection: ssh
 ansible_ssh_user: centos
-#ansible_ssh_private_key_file: /Users/syodage/Projects/scigap/JetCloud/jetcloud.key
+# 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
 
 user: centos
@@ -9,11 +10,11 @@ group: centos
 user_home: "/home/{{ user }}"
 
 # deployment related variables
-deployment_dir: "{{ user_home }}/master-deployment"
+deployment_dir: "{{ user_home }}/dev-deployment"
 airavata_source_dir: "{{ user_home }}/source"
 airavata_dist: "apache-airavata-server-0.17-SNAPSHOT"
 airavata_dist_name: "{{ airavata_dist }}-bin.tar.gz"
-git_branch: master
+git_branch: develop
 
 # Database related variables
 db_server: "{{ groups['database'][0] }}"
@@ -30,7 +31,7 @@ mysql_connector_jar: "mysql-connector-java-5.1.37-bin.jar"
 
 # Rabbitmq related vareables
 rabbitmq_server: "{{ groups['rabbitmq'][0] }}"
-rabbitmq_vhost: "master"
+rabbitmq_vhost: "develop"
 rabbitmq_user: "airavata"
 rabbitmq_password: "airavata"
 rabbitmq_port: "5672"

http://git-wip-us.apache.org/repos/asf/airavata/blob/475f6875/roles/database/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/database/tasks/main.yml b/roles/database/tasks/main.yml
index 4a75abb..8a02227 100644
--- a/roles/database/tasks/main.yml
+++ b/roles/database/tasks/main.yml
@@ -45,7 +45,7 @@
   with_items:
     - "{{ groups['api-orch'] }}"
     - "{{ groups['gfac'] }}"
-  tags: testdb
+    - "{{ groups['registry'] }}"
 
 - name: create new user {{ db_user }} with all privilege
   mysql_user: name="{{ db_user }}"
@@ -53,7 +53,6 @@
               append_privs=yes
               host_all=yes
               priv=*.*:ALL,GRANT state=present
-  tags: testdb
 
 - name: open firewall port {{ db_server_port }}
   firewalld: port="{{ db_server_port }}/tcp"

http://git-wip-us.apache.org/repos/asf/airavata/blob/475f6875/site.yml
----------------------------------------------------------------------
diff --git a/site.yml b/site.yml
index a9472dd..036229c 100644
--- a/site.yml
+++ b/site.yml
@@ -42,6 +42,14 @@
     - common
     - api-orch
 
+- hosts: registry
+  tags: registry, airavata
+  roles:
+    - env_setup
+    - java
+    - common
+    - registry
+
 - hosts: pga
   tags: pga
   roles:


[08/50] [abbrv] airavata git commit: Modify readme and added .gitignore file

Posted by la...@apache.org.
Modify readme and added .gitignore file


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: cf8be0d640cba67469cdcffab4b53d19025243cc
Parents: c5b37ac
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Fri Jul 29 01:20:05 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Fri Jul 29 01:20:05 2016 -0400

----------------------------------------------------------------------
 .gitignore | 1 +
 README.md  | 4 ++++
 2 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/cf8be0d6/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d939922
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+site.retry

http://git-wip-us.apache.org/repos/asf/airavata/blob/cf8be0d6/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 2f8a22c..072a50f 100644
--- a/README.md
+++ b/README.md
@@ -22,6 +22,10 @@ Ansible script to deploy Apache Airavata
 - `ansible-playbook -i hosts site.yml -t "tags"`
 - `ansible-playbook -i hosts site.yml --start-at-task="name of the ansible task"`
 
+To deploy pga run following. see site.yml (playbook) file for other available tags.
+
+- `ansible-playbook -i hosts site.yml -t "pga"`
+
 ## Configurations
 
 - Set correct private key file to `ansible_ssh_private_key_file` property in group_vars/all


[22/50] [abbrv] airavata git commit: added .gitignore file

Posted by la...@apache.org.
added .gitignore file


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 8868abc4f17b6085c7f183f8919a38e20c83bffb
Parents: 7429aa6
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Tue Aug 30 15:31:41 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Tue Aug 30 15:31:41 2016 -0400

----------------------------------------------------------------------
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8868abc4/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c996e50
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.key


[04/50] [abbrv] airavata git commit: Refactor readme

Posted by la...@apache.org.
Refactor readme


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: fdafdcb5e603abb2e71a24d094483c0ab9ca723a
Parents: bbe01a7
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Thu Jul 28 12:43:43 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Thu Jul 28 12:43:43 2016 -0400

----------------------------------------------------------------------
 README.md | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/fdafdcb5/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 14839a7..a3e13b3 100644
--- a/README.md
+++ b/README.md
@@ -1,19 +1,23 @@
 # airavata-ansible
+
 Ansible script to deploy Apache Airavata
 
 ## Support OS
-  * Centos 7
+
+- Centos 7
 
 ## Roles
-**setup** :- Create user and group, install oracle java 8   
-**zookeeper** :- Download and install zookeeper.  
-**rabbitmq** :- Download and install rabbitmq as service.  
-**common** :- Checkout Airavata source from git and run maven build. Move keystore files.  
-**gfac** :- Setup Gfac deployment and Change configurations.  
-**api-orch** :- Setup Api-Orch deployment and Change configurations.  
-**pga** :- Deploy Airavata PHP Gateway.  
+
+- **setup** :- Create user and group, install oracle java 8
+- **zookeeper** :- Download and install zookeeper.
+- **rabbitmq** :- Download and install rabbitmq as service.
+- **common** :- Checkout Airavata source from git and run maven build. Move keystore files.
+- **gfac** :- Setup Gfac deployment and Change configurations.
+- **api-orch** :- Setup Api-Orch deployment and Change configurations.
+- **pga** :- Deploy Airavata PHP Gateway._(Under development)_
 
 ## Useful commands
-  * `ansible-playbook -i hosts site.yml`  
-  * `ansible-playbook -i hosts site.yml -t "tags"`  
-  * `ansible-playbook -i hosts site.yml --start-at-task="name of the ansible task"`
+
+- `ansible-playbook -i hosts site.yml`
+- `ansible-playbook -i hosts site.yml -t "tags"`
+- `ansible-playbook -i hosts site.yml --start-at-task="name of the ansible task"`


[43/50] [abbrv] airavata git commit: Update configuratios

Posted by la...@apache.org.
Update configuratios


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: f513f5693582a0cddb062264c1d91e8a7bdc48b9
Parents: 72f35c1
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Fri Sep 23 12:07:42 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Fri Sep 23 12:07:42 2016 -0400

----------------------------------------------------------------------
 group_vars/all.yml                                     |  3 ++-
 roles/api-orch/templates/airavata-server.properties.j2 |  2 +-
 roles/gfac/templates/airavata-server.properties.j2     |  2 +-
 roles/pga/tasks/main.yml                               | 12 +++++++++---
 roles/pga/vars/main.yml                                |  4 ++--
 roles/registry/templates/airavata-server.properties.j2 |  2 +-
 6 files changed, 16 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/f513f569/group_vars/all.yml
----------------------------------------------------------------------
diff --git a/group_vars/all.yml b/group_vars/all.yml
index d49f583..5a159c3 100644
--- a/group_vars/all.yml
+++ b/group_vars/all.yml
@@ -47,7 +47,7 @@ api_server_port: "8930"
 api_secured: "false"
 tls_enable: "false"
 api_server_tls_port: "9930"
-enable_sharing: false
+enable_sharing: "false"
 
 # Orchestrator  related variables
 orchestrator_name: "orchestrator-node0"
@@ -60,6 +60,7 @@ registry_name: regserver-node0
 registry_host: "{{groups['registry'][0]}}"
 registry_port: 8970
 registry_dir: "{{ deployment_dir }}/registry"
+default_gateway: "php_reference_gateway"
 
 # Credential and keystore related variables
 #authorization_server: "https://{{ groups['wso2is'][0]}}:9443/services/"

http://git-wip-us.apache.org/repos/asf/airavata/blob/f513f569/roles/api-orch/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/api-orch/templates/airavata-server.properties.j2 b/roles/api-orch/templates/airavata-server.properties.j2
index e36b029..b8d093e 100644
--- a/roles/api-orch/templates/airavata-server.properties.j2
+++ b/roles/api-orch/templates/airavata-server.properties.j2
@@ -49,7 +49,7 @@ enable.sharing={{enable_sharing}}
 default.registry.user=admin
 default.registry.password=admin
 default.registry.password.hash.method=SHA
-default.registry.gateway=default
+default.registry.gateway={{ default_gateway }}
 
 ###########################################################################
 #  Application Catalog DB Configuration

http://git-wip-us.apache.org/repos/asf/airavata/blob/f513f569/roles/gfac/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/gfac/templates/airavata-server.properties.j2 b/roles/gfac/templates/airavata-server.properties.j2
index e36b029..b8d093e 100644
--- a/roles/gfac/templates/airavata-server.properties.j2
+++ b/roles/gfac/templates/airavata-server.properties.j2
@@ -49,7 +49,7 @@ enable.sharing={{enable_sharing}}
 default.registry.user=admin
 default.registry.password=admin
 default.registry.password.hash.method=SHA
-default.registry.gateway=default
+default.registry.gateway={{ default_gateway }}
 
 ###########################################################################
 #  Application Catalog DB Configuration

http://git-wip-us.apache.org/repos/asf/airavata/blob/f513f569/roles/pga/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/pga/tasks/main.yml b/roles/pga/tasks/main.yml
index 6fe1df5..b267119 100644
--- a/roles/pga/tasks/main.yml
+++ b/roles/pga/tasks/main.yml
@@ -39,19 +39,21 @@
 - name: delete previous deployments
   file: path="{{ doc_root_dir }}" state=absent
 
+
 - name: Git clone php gateway
   git: repo=https://github.com/apache/airavata-php-gateway.git
-       dest="{{ doc_root_dir }}" version=master
+       dest="{{ doc_root_dir }}" version="{{ git_branch }}"
   become: yes
 
 - name: Create user data dir {{ user_data_dir }}
-  file: path="{{ user_data_dir }}" state=directory
+  file: path="{{ user_data_dir }}" state=directory owner="{{user}}" group="{{group}}" mode=0777 recurse=yes
   become: yes
 
   #Make sure selinux is dissabled in remote machine
 - name: Disable selinux
   selinux: state=disabled
   become: yes
+  register: selinux_disable
 
 # need to restart after disable selinux
 - name: restart machine
@@ -60,9 +62,13 @@
   poll: 0
   become: yes
   ignore_errors: true
+  when: (selinux_disable|success) and (selinux_disable.changed == true)
+  register: restart
 
 - name: waiting for server to come back
   local_action: wait_for host={{ inventory_hostname }} state=started delay=30 timeout=60
+  when: (restart|success) and (restart.changed == true)
+
 
 - name: Run composer update
   composer: command=update working_dir="{{ doc_root_dir }}"
@@ -79,7 +85,7 @@
   become: yes
 
 - name: give write permissions to storage dir
-  file: path="{{ doc_root_dir }}/app/storage" state=directory mode=0777 recurse=yes
+  file: path="{{ doc_root_dir }}/app/storage" state=directory mode=0777 owner="{{user}}" group="{{group}}" recurse=yes
   become: yes
 
 - name: Eanble https and http service on public zone

http://git-wip-us.apache.org/repos/asf/airavata/blob/f513f569/roles/pga/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/pga/vars/main.yml b/roles/pga/vars/main.yml
index 35c5122..298e897 100644
--- a/roles/pga/vars/main.yml
+++ b/roles/pga/vars/main.yml
@@ -17,10 +17,10 @@ oauth_client_secret: "vD9yi2ANkChzgWiih3RahrIcfsoa"
 #airavata_server: "tls://gw77.iu.xsede.org"
 airavata_server: "{{ groups['api-orch'][0] }}"
 airavata_port: "8930"
-gateway_id: "default"
+gateway_id: "{{ default_gateway }}"
 # relative to document root dir
 experiment_data_dir: "{{ user_data_dir }}"
-gateway_data_store_resource_id: "gw75.iu.xsede.org_3e40e62b-be11-4590-bf24-b1b6796c3572"
+gateway_data_store_resource_id: "js-170-103.jetstream-cloud.org_6497a464-3121-4b64-a7cb-d195b0a26c19"
 
 ## Portal related variables
 super_admin_portal: "true"

http://git-wip-us.apache.org/repos/asf/airavata/blob/f513f569/roles/registry/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/registry/templates/airavata-server.properties.j2 b/roles/registry/templates/airavata-server.properties.j2
index e36b029..b8d093e 100644
--- a/roles/registry/templates/airavata-server.properties.j2
+++ b/roles/registry/templates/airavata-server.properties.j2
@@ -49,7 +49,7 @@ enable.sharing={{enable_sharing}}
 default.registry.user=admin
 default.registry.password=admin
 default.registry.password.hash.method=SHA
-default.registry.gateway=default
+default.registry.gateway={{ default_gateway }}
 
 ###########################################################################
 #  Application Catalog DB Configuration


[25/50] [abbrv] airavata git commit: Fixed security issue

Posted by la...@apache.org.
Fixed security issue


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 223ea3a8d18511b6dbe7cbdf5fc3957f7d9b9df2
Parents: 03db1df
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Sat Sep 10 19:58:37 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Sat Sep 10 19:58:37 2016 -0400

----------------------------------------------------------------------
 roles/ec2/vars/aws-credential.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/223ea3a8/roles/ec2/vars/aws-credential.yml
----------------------------------------------------------------------
diff --git a/roles/ec2/vars/aws-credential.yml b/roles/ec2/vars/aws-credential.yml
index 687cfbb..2e4c703 100644
--- a/roles/ec2/vars/aws-credential.yml
+++ b/roles/ec2/vars/aws-credential.yml
@@ -1,3 +1,3 @@
 ---
-aws_access_key: AKIAIKBSNQUKEZN2VLYA
-aws_secret_key: 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
+aws_access_key: xxxxxxxxx 
+aws_secret_key: xxxxxxxxx


[33/50] [abbrv] airavata git commit: intitializing credenital store db using JPA models

Posted by la...@apache.org.
intitializing credenital store db using JPA models


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 06ef33f94328c2c7d59f52bc01756a688ea25744
Parents: 875fc27
Author: scnakandala <su...@gmail.com>
Authored: Thu Sep 15 14:40:23 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Sep 15 14:40:42 2016 -0400

----------------------------------------------------------------------
 .../main/resources/airavata-server.properties   |  1 +
 .../credential-store-service/pom.xml            | 19 +++--
 .../store/server/CredentialStoreServer.java     |  4 +
 modules/registry/registry-core/pom.xml          |  5 --
 .../credential/catalog/model/CommunityUser.java | 72 +++++++++++++++++
 .../catalog/model/CommunityUser_Pk.java         | 63 +++++++++++++++
 .../credential/catalog/model/Configuration.java | 54 +++++++++++++
 .../catalog/model/Configuration_PK.java         | 60 ++++++++++++++
 .../credential/catalog/model/Credential.java    | 83 ++++++++++++++++++++
 .../credential/catalog/model/Credential_PK.java | 55 +++++++++++++
 .../catalog/util/CredentialCatalogJPAUtils.java | 82 +++++++++++++++++++
 .../replica/catalog/model/Configuration.java    |  1 -
 .../replica/catalog/model/Configuration_PK.java | 65 +++++++++++++++
 .../src/main/resources/META-INF/persistence.xml |  8 ++
 .../src/main/resources/credstore-derby.sql      | 12 ++-
 .../src/main/resources/credstore-mysql.sql      | 12 ++-
 16 files changed, 581 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/06ef33f9/modules/configuration/server/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/airavata-server.properties b/modules/configuration/server/src/main/resources/airavata-server.properties
index 2ce3701..30a6338 100644
--- a/modules/configuration/server/src/main/resources/airavata-server.properties
+++ b/modules/configuration/server/src/main/resources/airavata-server.properties
@@ -190,6 +190,7 @@ credential.store.jdbc.url=jdbc:derby://localhost:1527/credential-store;create=tr
 credential.store.jdbc.user=airavata
 credential.store.jdbc.password=airavata
 credential.store.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+credential.store.jdbc.validationQuery=SELECT 1 from CONFIGURATION
 credential.store.server.host=localhost
 credential.store.server.port=8960
 credentialstore=org.apache.airavata.credential.store.server.CredentialStoreServer

http://git-wip-us.apache.org/repos/asf/airavata/blob/06ef33f9/modules/credential-store/credential-store-service/pom.xml
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/pom.xml b/modules/credential-store/credential-store-service/pom.xml
index 57d5155..7c03c4f 100644
--- a/modules/credential-store/credential-store-service/pom.xml
+++ b/modules/credential-store/credential-store-service/pom.xml
@@ -11,7 +11,8 @@
 	OF ANY ~ KIND, either express or implied. See the License for the specific 
 	language governing permissions and limitations under the License. -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <groupId>org.apache.airavata</groupId>
         <artifactId>airavata</artifactId>
@@ -62,11 +63,11 @@
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
         </dependency>
-        <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-            <version>5.1.34</version>
-        </dependency>
+        <!--<dependency>-->
+        <!--<groupId>mysql</groupId>-->
+        <!--<artifactId>mysql-connector-java</artifactId>-->
+        <!--<version>5.1.34</version>-->
+        <!--</dependency>-->
         <dependency>
             <groupId>log4j</groupId>
             <artifactId>log4j</artifactId>
@@ -78,6 +79,11 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-registry-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
             <groupId>org.apache.derby</groupId>
             <artifactId>derby</artifactId>
             <version>${derby.version}</version>
@@ -157,7 +163,6 @@
                     <testSourceDirectory>${basedir}\src\test\java\</testSourceDirectory>
                 </configuration>
             </plugin>
-
         </plugins>
         <testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
         <testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory>

http://git-wip-us.apache.org/repos/asf/airavata/blob/06ef33f9/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java
index 5ccec02..0829fda 100644
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java
@@ -24,6 +24,7 @@ package org.apache.airavata.credential.store.server;
 import org.apache.airavata.common.utils.IServer;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.credential.store.cpi.CredentialStoreService;
+import org.apache.airavata.registry.core.credential.catalog.util.CredentialCatalogJPAUtils;
 import org.apache.thrift.server.TServer;
 import org.apache.thrift.server.TThreadPoolServer;
 import org.apache.thrift.transport.TServerSocket;
@@ -107,6 +108,9 @@ public class CredentialStoreServer  implements IServer {
 
     public static void main(String[] args) {
         try {
+            //Initializing the database;
+            CredentialCatalogJPAUtils.getEntityManager();
+
             new CredentialStoreServer().start();
         } catch (Exception e) {
             logger.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/06ef33f9/modules/registry/registry-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/pom.xml b/modules/registry/registry-core/pom.xml
index aa9a61b..1bea32f 100644
--- a/modules/registry/registry-core/pom.xml
+++ b/modules/registry/registry-core/pom.xml
@@ -56,11 +56,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-credential-store</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-data-models</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/06ef33f9/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser.java
new file mode 100644
index 0000000..24a9669
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser.java
@@ -0,0 +1,72 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+*/
+package org.apache.airavata.registry.core.credential.catalog.model;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name ="COMMUNITY_USER")
+@IdClass(CommunityUser_PK.class)
+public class CommunityUser {
+    private String gatewayId;
+    private String communityUserName;
+    private String tokenId;
+    private String communityUserEmail;
+
+    @Id
+    @Column(name = "GATEWAY_ID")
+    public String getGatewayId() {
+        return gatewayId;
+    }
+
+    public void setGatewayId(String gatewayId) {
+        this.gatewayId = gatewayId;
+    }
+
+    @Id
+    @Column(name = "COMMUNITY_USER_NAME")
+    public String getCommunityUserName() {
+        return communityUserName;
+    }
+
+    public void setCommunityUserName(String communityUserName) {
+        this.communityUserName = communityUserName;
+    }
+
+    @Id
+    @Column(name = "TOKEN_ID")
+    public String getTokenId() {
+        return tokenId;
+    }
+
+    public void setTokenId(String tokenId) {
+        this.tokenId = tokenId;
+    }
+
+    @Column(name = "COMMUNITY_USER_EMAIL")
+    public String getCommunityUserEmail() {
+        return communityUserEmail;
+    }
+
+    public void setCommunityUserEmail(String communityUserEmail) {
+        this.communityUserEmail = communityUserEmail;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/06ef33f9/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser_Pk.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser_Pk.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser_Pk.java
new file mode 100644
index 0000000..47988c2
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser_Pk.java
@@ -0,0 +1,63 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+*/
+package org.apache.airavata.registry.core.credential.catalog.model;
+
+import java.io.Serializable;
+
+public class CommunityUser_PK implements Serializable{
+    private String gatewayId;
+    private String communityUserName;
+    private String tokenId;
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+    public String getGatewayId() {
+        return gatewayId;
+    }
+
+    public void setGatewayId(String gatewayId) {
+        this.gatewayId = gatewayId;
+    }
+
+    public String getCommunityUserName() {
+        return communityUserName;
+    }
+
+    public void setCommunityUserName(String communityUserName) {
+        this.communityUserName = communityUserName;
+    }
+
+    public String getTokenId() {
+        return tokenId;
+    }
+
+    public void setTokenId(String tokenId) {
+        this.tokenId = tokenId;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/06ef33f9/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Configuration.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Configuration.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Configuration.java
new file mode 100644
index 0000000..281a3a1
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Configuration.java
@@ -0,0 +1,54 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you 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.
+*
+*/
+package org.apache.airavata.registry.core.credential.catalog.model;
+
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@Entity
+@Table(name ="CONFIGURATION")
+@IdClass(Configuration_PK.class)
+public class Configuration implements Serializable {
+    @Id
+    @Column(name = "CONFIG_KEY")
+    private String config_key;
+
+    @Id
+    @Column(name = "CONFIG_VAL")
+    private String config_val;
+
+    public String getConfig_key() {
+        return config_key;
+    }
+
+    public String getConfig_val() {
+        return config_val;
+    }
+
+    public void setConfig_key(String config_key) {
+        this.config_key = config_key;
+    }
+
+    public void setConfig_val(String config_val) {
+        this.config_val = config_val;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/06ef33f9/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Configuration_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Configuration_PK.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Configuration_PK.java
new file mode 100644
index 0000000..1a18aea
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Configuration_PK.java
@@ -0,0 +1,60 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.airavata.registry.core.credential.catalog.model;
+
+import java.io.Serializable;
+
+public class Configuration_PK implements Serializable {
+    private String config_key;
+    private String config_val;
+
+    public Configuration_PK() {
+        ;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+    public String getConfig_key() {
+        return config_key;
+    }
+
+    public void setConfig_key(String config_key) {
+        this.config_key = config_key;
+    }
+
+    public void setConfig_val(String config_val) {
+        this.config_val = config_val;
+    }
+
+    public String getConfig_val() {
+        return config_val;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/06ef33f9/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Credential.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Credential.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Credential.java
new file mode 100644
index 0000000..ed146f7
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Credential.java
@@ -0,0 +1,83 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+*/
+package org.apache.airavata.registry.core.credential.catalog.model;
+
+import javax.persistence.*;
+import java.sql.Timestamp;
+
+@Entity
+@Table(name ="CREDENTIAL")
+@IdClass(Credential_PK.class)
+public class Credential {
+    private String gatewayId;
+    private String tokenId;
+    private Byte[] credential;
+    private String portalUserId;
+    private Timestamp timePersisted;
+
+    @Id
+    @Column(name = "GATEWAY_ID")
+    public String getGatewayId() {
+        return gatewayId;
+    }
+
+    public void setGatewayId(String gatewayId) {
+        this.gatewayId = gatewayId;
+    }
+
+    @Id
+    @Column(name = "TOKEN_ID")
+    public String getTokenId() {
+        return tokenId;
+    }
+
+    public void setTokenId(String tokenId) {
+        this.tokenId = tokenId;
+    }
+
+    @Lob
+    @Column(name = "CREDENTIAL")
+    public Byte[] getCredential() {
+        return credential;
+    }
+
+    public void setCredential(Byte[] credential) {
+        this.credential = credential;
+    }
+
+    @Column(name = "PORTAL_USER_ID")
+    public String getPortalUserId() {
+        return portalUserId;
+    }
+
+    public void setPortalUserId(String portalUserId) {
+        this.portalUserId = portalUserId;
+    }
+
+    @Column(name = "TIME_PERSISTED")
+    public Timestamp getTimePersisted() {
+        return timePersisted;
+    }
+
+    public void setTimePersisted(Timestamp timePersisted) {
+        this.timePersisted = timePersisted;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/06ef33f9/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Credential_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Credential_PK.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Credential_PK.java
new file mode 100644
index 0000000..a9db85f
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/Credential_PK.java
@@ -0,0 +1,55 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+*/
+package org.apache.airavata.registry.core.credential.catalog.model;
+
+import java.io.Serializable;
+
+public class Credential_PK implements Serializable{
+    private String gatewayId;
+    private String tokenId;
+
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+    public String getGatewayId() {
+        return gatewayId;
+    }
+
+    public void setGatewayId(String gatewayId) {
+        this.gatewayId = gatewayId;
+    }
+
+    public String getTokenId() {
+        return tokenId;
+    }
+
+    public void setTokenId(String tokenId) {
+        this.tokenId = tokenId;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/06ef33f9/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/util/CredentialCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/util/CredentialCatalogJPAUtils.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/util/CredentialCatalogJPAUtils.java
new file mode 100644
index 0000000..5a509c7
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/util/CredentialCatalogJPAUtils.java
@@ -0,0 +1,82 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.airavata.registry.core.credential.catalog.util;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+import java.util.HashMap;
+import java.util.Map;
+
+public class CredentialCatalogJPAUtils {
+    private final static Logger logger = LoggerFactory.getLogger(CredentialCatalogJPAUtils.class);
+
+    private static final String PERSISTENCE_UNIT_NAME = "credentialcatalog_data";
+    private static final String CREDCATALOG_JDBC_DRIVER = "credential.store.jdbc.driver";
+    private static final String CREDCATALOG_JDBC_URL = "credential.store.jdbc.url";
+    private static final String CREDCATALOG_JDBC_USER = "credential.store.jdbc.user";
+    private static final String CREDCACATALOG_JDBC_PWD = "credential.store.jdbc.password";
+    private static final String CREDCACATALOG_VALIDATION_QUERY = "credential.store.jdbc.validationQuery";
+
+    @PersistenceUnit(unitName="credentialcatalog_data")
+    protected static EntityManagerFactory factory;
+
+    @PersistenceContext(unitName="credentialcatalog_data")
+    private static EntityManager credCatEntityManager;
+
+    public static EntityManager getEntityManager() throws ApplicationSettingsException {
+        if (factory == null) {
+            String connectionProperties = "DriverClassName=" + readServerProperties(CREDCATALOG_JDBC_DRIVER) + "," +
+                    "Url=" + readServerProperties(CREDCATALOG_JDBC_URL) + "?autoReconnect=true," +
+                    "Username=" + readServerProperties(CREDCATALOG_JDBC_USER) + "," +
+                    "Password=" + readServerProperties(CREDCACATALOG_JDBC_PWD) +
+                    ",validationQuery=" + readServerProperties(CREDCACATALOG_VALIDATION_QUERY);
+            System.out.println(connectionProperties);
+            Map<String, String> properties = new HashMap<String, String>();
+            properties.put("openjpa.ConnectionDriverName", "org.apache.commons.dbcp.BasicDataSource");
+            properties.put("openjpa.ConnectionProperties", connectionProperties);
+            properties.put("openjpa.DynamicEnhancementAgent", "true");
+            properties.put("openjpa.RuntimeUnenhancedClasses", "unsupported");
+            properties.put("openjpa.RemoteCommitProvider","sjvm");
+            properties.put("openjpa.Log","DefaultLevel=INFO, Runtime=INFO, Tool=INFO, SQL=INFO");
+            properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
+            properties.put("openjpa.jdbc.QuerySQLCache", "false");
+            properties.put("openjpa.ConnectionFactoryProperties", "PrettyPrint=true, PrettyPrintLineLength=72," +
+                    " PrintParameters=true, MaxActive=10, MaxIdle=5, MinIdle=2, MaxWait=31536000,  autoReconnect=true");
+            factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);
+        }
+        credCatEntityManager = factory.createEntityManager();
+        return credCatEntityManager;
+    }
+
+    private static String readServerProperties (String propertyName) throws ApplicationSettingsException {
+        try {
+            return ServerSettings.getSetting(propertyName);
+        } catch (ApplicationSettingsException e) {
+            logger.error("Unable to read airavata-server.properties...", e);
+            throw new ApplicationSettingsException("Unable to read airavata-server.properties...");
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/06ef33f9/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/Configuration.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/Configuration.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/Configuration.java
index 881d043..8564d24 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/Configuration.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/Configuration.java
@@ -20,7 +20,6 @@
 */
 package org.apache.airavata.registry.core.replica.catalog.model;
 
-import org.apache.airavata.registry.core.app.catalog.model.Configuration_PK;
 
 import javax.persistence.*;
 import java.io.Serializable;

http://git-wip-us.apache.org/repos/asf/airavata/blob/06ef33f9/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/Configuration_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/Configuration_PK.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/Configuration_PK.java
new file mode 100644
index 0000000..5769478
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/replica/catalog/model/Configuration_PK.java
@@ -0,0 +1,65 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.airavata.registry.core.replica.catalog.model;
+
+import java.io.Serializable;
+
+public class Configuration_PK implements Serializable {
+    private String config_key;
+    private String config_val;
+
+    public Configuration_PK(String config_key, String config_val) {
+        this.config_key = config_key;
+        this.config_val = config_val;
+    }
+
+    public Configuration_PK() {
+        ;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+    public String getConfig_key() {
+        return config_key;
+    }
+
+    public void setConfig_key(String config_key) {
+        this.config_key = config_key;
+    }
+
+    public void setConfig_val(String config_val) {
+        this.config_val = config_val;
+    }
+
+    public String getConfig_val() {
+        return config_val;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/06ef33f9/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml b/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
index e502ae2..af23674 100644
--- a/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
+++ b/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
@@ -95,6 +95,7 @@
     </persistence-unit>
     <persistence-unit name="replicacatalog_data">
         <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+        <class>org.apache.airavata.registry.core.replica.catalog.model.Configuration</class>
         <class>org.apache.airavata.registry.core.replica.catalog.model.DataProduct</class>
         <class>org.apache.airavata.registry.core.replica.catalog.model.DataReplicaLocation</class>
         <class>org.apache.airavata.registry.core.replica.catalog.model.DataProductMetaData</class>
@@ -114,4 +115,11 @@
         <class>org.apache.airavata.registry.core.workflow.catalog.model.WorkflowStatus</class>
         <exclude-unlisted-classes>true</exclude-unlisted-classes>
     </persistence-unit>
+    <persistence-unit name="credentialcatalog_data">
+        <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+        <class>org.apache.airavata.registry.core.credential.catalog.model.CommunityUser</class>
+        <class>org.apache.airavata.registry.core.credential.catalog.model.Configuration</class>
+        <class>org.apache.airavata.registry.core.credential.catalog.model.Credential</class>
+        <exclude-unlisted-classes>true</exclude-unlisted-classes>
+    </persistence-unit>
 </persistence>

http://git-wip-us.apache.org/repos/asf/airavata/blob/06ef33f9/modules/registry/registry-core/src/main/resources/credstore-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/credstore-derby.sql b/modules/registry/registry-core/src/main/resources/credstore-derby.sql
index 9403cfd..bdae2bd 100644
--- a/modules/registry/registry-core/src/main/resources/credstore-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/credstore-derby.sql
@@ -36,4 +36,14 @@ CREATE TABLE CREDENTIALS
         PORTAL_USER_ID VARCHAR(256) NOT NULL,
         TIME_PERSISTED TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
         PRIMARY KEY (GATEWAY_ID, TOKEN_ID)
-);
\ No newline at end of file
+);
+
+CREATE TABLE CONFIGURATION
+(
+          CONFIG_KEY VARCHAR(255),
+          CONFIG_VAL VARCHAR(255),
+          PRIMARY KEY(CONFIG_KEY, CONFIG_VAL)
+);
+
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL) VALUES('app_catalog_version', '0.16');
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/06ef33f9/modules/registry/registry-core/src/main/resources/credstore-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/credstore-mysql.sql b/modules/registry/registry-core/src/main/resources/credstore-mysql.sql
index df9e2bc..3d924ce 100644
--- a/modules/registry/registry-core/src/main/resources/credstore-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/credstore-mysql.sql
@@ -36,4 +36,14 @@ CREATE TABLE CREDENTIALS
         PORTAL_USER_ID VARCHAR(256) NOT NULL,
         TIME_PERSISTED TIMESTAMP DEFAULT NOW() ON UPDATE NOW(),
         PRIMARY KEY (GATEWAY_ID, TOKEN_ID)
-);
\ No newline at end of file
+);
+
+CREATE TABLE CONFIGURATION
+(
+          CONFIG_KEY VARCHAR(255),
+          CONFIG_VAL VARCHAR(255),
+          PRIMARY KEY(CONFIG_KEY, CONFIG_VAL)
+);
+
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL) VALUES('app_catalog_version', '0.16');
+


[23/50] [abbrv] airavata git commit: used pag configure in host file

Posted by la...@apache.org.
used pag configure in host file


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 5c9cec85947467bdab493134b76baa937b2c6edb
Parents: ff2e1ae
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Thu Sep 1 13:34:56 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Thu Sep 1 13:34:56 2016 -0400

----------------------------------------------------------------------
 roles/pga/vars/main.yml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/5c9cec85/roles/pga/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/pga/vars/main.yml b/roles/pga/vars/main.yml
index 4c1b822..b7ba81f 100644
--- a/roles/pga/vars/main.yml
+++ b/roles/pga/vars/main.yml
@@ -14,8 +14,9 @@ oauth_client_key: "5_GFR88Nzd4XvGthSMF1fnOJPuMa"
 oauth_client_secret: "KNTf_LPLuGBDbRVZwkrP_fF5z2Ea"
 
 ## Airavata Client related variables
-airavata_server: "tls://gw77.iu.xsede.org"
-airavata_port: "9930"
+#airavata_server: "tls://gw77.iu.xsede.org"
+airavata_server: "http://{{ groups['api-orch'][0] }}"
+airavata_port: "8930"
 gateway_id: "default"
 # relative to document root dir
 experiment_data_dir: "{{ user_data_dir }}"


[26/50] [abbrv] airavata git commit: successfully started mesos-master with zookeeper ring

Posted by la...@apache.org.
successfully started mesos-master with zookeeper ring


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 1ae8263079fc45fbff6be88706675ed239c973f3
Parents: 223ea3a
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Sun Sep 11 01:23:50 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Sun Sep 11 01:23:50 2016 -0400

----------------------------------------------------------------------
 group_vars/all.yml                      |  2 +-
 hosts                                   | 10 ++-
 roles/java/tasks/main.yml               | 21 ++++++
 roles/java/vars/main.yml                | 15 +++++
 roles/mesos-master/tasks/main.yml       | 38 ++++-------
 roles/mesos-master/templates/myid.j2    |  1 -
 roles/mesos-master/templates/zk.j2      |  2 +-
 roles/mesos-master/templates/zoo.cfg.j2 | 32 ---------
 roles/mesos-slave/templates/zk.j2       |  2 +-
 roles/zookeeper/handlers/main.yml       | 15 +++++
 roles/zookeeper/tasks/main.yml          | 98 ++++++++++++++++++++++++++++
 roles/zookeeper/templates/myid.j2       |  1 +
 roles/zookeeper/templates/zoo.cfg.j2    | 32 +++++++++
 roles/zookeeper/vars/main.yml           | 15 +++++
 site.yml                                | 16 +++--
 15 files changed, 229 insertions(+), 71 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/1ae82630/group_vars/all.yml
----------------------------------------------------------------------
diff --git a/group_vars/all.yml b/group_vars/all.yml
index b0a6cf2..f7d7ae5 100644
--- a/group_vars/all.yml
+++ b/group_vars/all.yml
@@ -19,7 +19,7 @@ user_home: "/home/{{user}}"
 
 
 #Zookeeper related properties
-zk_client_port: 2181
+zookeeper_client_port: 2181
 # zookeeper_servers:
 #   - { index: 1, ip: "", ports: "2888:3888"}
 #   - { index: 2, ip: "", ports: "2888:3888"}

http://git-wip-us.apache.org/repos/asf/airavata/blob/1ae82630/hosts
----------------------------------------------------------------------
diff --git a/hosts b/hosts
index 7ceb1f7..cc90239 100644
--- a/hosts
+++ b/hosts
@@ -1,9 +1,13 @@
 ---
 # inventory fie: production
 #[localhost]
-#127.0.0.1
+127.0.0.1
 
 [mesos-master]
-52.91.222.138
+52.87.208.230 my_id=1
+54.172.21.138 my_id=2
+54.196.170.54 my_id=3
 
-#[mesos-agent]
+
+[mesos-slave]
+54.175.143.203

http://git-wip-us.apache.org/repos/asf/airavata/blob/1ae82630/roles/java/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/java/tasks/main.yml b/roles/java/tasks/main.yml
new file mode 100644
index 0000000..92f2039
--- /dev/null
+++ b/roles/java/tasks/main.yml
@@ -0,0 +1,21 @@
+---
+# Install Orcal Java
+- name: download oracle java 8 rpm
+  get_url: url="{{ java_rpm_url }}" dest="{{ java_dir_source }}" headers='Cookie:oraclelicense=accept-securebackup-cookie'
+  become: yes
+
+- name: Install oracle java 8
+  yum: name="{{ java_dir_source }}/{{ java_rpm_filename }}" state=present
+  become: yes
+
+- name: set Oracle Java {{ java_version_string }} as default
+  alternatives:
+    name="{{ item.exe }}"
+    link="/usr/bin/{{ item.exe }}"
+    path="{{ item.path }}/{{ item.exe }}"
+  with_items:
+    - { path: "{{ java_home }}/jre/bin", exe: 'java' }
+    - { path: "{{ java_home }}/jre/bin", exe: 'keytool' }
+    - { path: "{{ java_home }}/bin", exe: 'javac' }
+    - { path: "{{ java_home }}/bin", exe: 'javadoc' }
+  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/1ae82630/roles/java/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/java/vars/main.yml b/roles/java/vars/main.yml
new file mode 100644
index 0000000..a995684
--- /dev/null
+++ b/roles/java/vars/main.yml
@@ -0,0 +1,15 @@
+---
+#Variables associated with this role
+# Oracle Java 8
+java_dir_source: "/usr/local/src"
+
+java_version: 8
+java_version_update: 91
+java_version_build: '14'
+java_version_string: "1.{{ java_version }}.0_{{ java_version_update }}"
+java_home: "/usr/java/jdk1.{{ java_version }}.0_{{ java_version_update }}"
+
+java_rpm_filename: "jdk-{{ java_version }}u{{ java_version_update }}-linux-x64.rpm"
+java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/{{ java_version }}u{{ java_version_update }}-b{{ java_version_build }}/{{ java_rpm_filename }}"
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/1ae82630/roles/mesos-master/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/mesos-master/tasks/main.yml b/roles/mesos-master/tasks/main.yml
index e132915..6afefe1 100644
--- a/roles/mesos-master/tasks/main.yml
+++ b/roles/mesos-master/tasks/main.yml
@@ -21,13 +21,21 @@
     state: enabled
     immediate: yes
   with_items:
-    - "{{ zk_client_port }}/tcp"
-    - "2888/tcp"
-    - "3888/tcp"
+    # - "{{ zk_client_port }}/tcp"
+    # - "2888/tcp"
+    # - "3888/tcp"
     - "5050/tcp"
     # - "marathon/tcp"
   become: yes
 
+- name: install utility - TODO delete this
+  yum:
+    name: "{{ item }}"
+    state: latest
+  with_items:
+    - vim
+  become: yes
+
 # Setup repository
 - name: add mesosphere rpm
   yum:
@@ -35,37 +43,17 @@
     state: present
   become: yes
 
-- name: install mesos , marathon and mesosphere-zookeeper
+- name: install mesos and marathon
   yum:
     name: "{{ item }}"
     state: latest
   with_items:
     - mesos
     - marathon
-    - mesosphere-zookeeper
+    # - mesosphere-zookeeper
   become: yes
 
 # configurations
-#setting ID
-- name: copy myid file
-  template:
-    src: myid.j2
-    dest: /var/lib/zookeeper/myid
-    force: yes
-  become: yes
-
-- name: append zookeeper ring ips
-  template:
-    src: zoo.cfg.j2
-    dest: /etc/zookeeper/conf/zoo.cfg
-    force: yes
-  become: yes
-
-- name: start Zookeeper
-  service:
-    name: zookeeper
-    state: started
-  become: yes
 
 - name: set zk file for mesos master and marathon
   template:

http://git-wip-us.apache.org/repos/asf/airavata/blob/1ae82630/roles/mesos-master/templates/myid.j2
----------------------------------------------------------------------
diff --git a/roles/mesos-master/templates/myid.j2 b/roles/mesos-master/templates/myid.j2
deleted file mode 100644
index 78a0bd7..0000000
--- a/roles/mesos-master/templates/myid.j2
+++ /dev/null
@@ -1 +0,0 @@
-{{ my_id }}

http://git-wip-us.apache.org/repos/asf/airavata/blob/1ae82630/roles/mesos-master/templates/zk.j2
----------------------------------------------------------------------
diff --git a/roles/mesos-master/templates/zk.j2 b/roles/mesos-master/templates/zk.j2
index 9c7747b..e82fe65 100644
--- a/roles/mesos-master/templates/zk.j2
+++ b/roles/mesos-master/templates/zk.j2
@@ -1 +1 @@
-zk://{{zk_1}}:{{zk_client_port}},{{zk_2}}:{{zk_client_port}},{{zk_3}}:{{zk_client_port}}/mesos
+zk://{{zk_1}}:{{zookeeper_client_port}},{{zk_2}}:{{zookeeper_client_port}},{{zk_3}}:{{zookeeper_client_port}}/mesos

http://git-wip-us.apache.org/repos/asf/airavata/blob/1ae82630/roles/mesos-master/templates/zoo.cfg.j2
----------------------------------------------------------------------
diff --git a/roles/mesos-master/templates/zoo.cfg.j2 b/roles/mesos-master/templates/zoo.cfg.j2
deleted file mode 100644
index 922d0b2..0000000
--- a/roles/mesos-master/templates/zoo.cfg.j2
+++ /dev/null
@@ -1,32 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-
-maxClientCnxns=50
-# The number of milliseconds of each tick
-tickTime=2000
-# The number of ticks that the initial
-# synchronization phase can take
-initLimit=10
-# The number of ticks that can pass between
-# sending a request and getting an acknowledgement
-syncLimit=5
-# the directory where the snapshot is stored.
-dataDir=/var/lib/zookeeper
-# the port at which the clients will connect
-clientPort={{ zk_client_port }}
-
-server.1={{zk_1}}:2888:3888
-server.2={{zk_2}}:2888:3888
-server.3={{zk_3}}:2888:3888

http://git-wip-us.apache.org/repos/asf/airavata/blob/1ae82630/roles/mesos-slave/templates/zk.j2
----------------------------------------------------------------------
diff --git a/roles/mesos-slave/templates/zk.j2 b/roles/mesos-slave/templates/zk.j2
index 9c7747b..e82fe65 100644
--- a/roles/mesos-slave/templates/zk.j2
+++ b/roles/mesos-slave/templates/zk.j2
@@ -1 +1 @@
-zk://{{zk_1}}:{{zk_client_port}},{{zk_2}}:{{zk_client_port}},{{zk_3}}:{{zk_client_port}}/mesos
+zk://{{zk_1}}:{{zookeeper_client_port}},{{zk_2}}:{{zookeeper_client_port}},{{zk_3}}:{{zookeeper_client_port}}/mesos

http://git-wip-us.apache.org/repos/asf/airavata/blob/1ae82630/roles/zookeeper/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/handlers/main.yml b/roles/zookeeper/handlers/main.yml
new file mode 100644
index 0000000..f1ea4be
--- /dev/null
+++ b/roles/zookeeper/handlers/main.yml
@@ -0,0 +1,15 @@
+---
+- name: start zookeeper
+  command: bin/zkServer.sh start
+  args:
+    chdir: "{{zookeeper_dir}}"
+
+- name: restart zookeeper
+  command: bin/zkServer.sh restart
+  args:
+    chdir: "{{zookeeper_dir}}"
+
+- name: stop zookeeper
+  command: bin/zkServer.sh stop
+  args:
+    chdir: "{{zookeeper_dir}}"

http://git-wip-us.apache.org/repos/asf/airavata/blob/1ae82630/roles/zookeeper/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/tasks/main.yml b/roles/zookeeper/tasks/main.yml
new file mode 100644
index 0000000..02c246f
--- /dev/null
+++ b/roles/zookeeper/tasks/main.yml
@@ -0,0 +1,98 @@
+---
+- name: install pre-requities
+  yum:
+    name: "{{item}}"
+    state: latest
+  with_items:
+    - firewalld
+    - vim
+  become: yes
+
+- name: start firewalld
+  service:
+    name: firewalld
+    state: started
+  become: yes
+
+- name: open zookeeper port
+  firewalld:
+    port: "{{item}}"
+    zone: public
+    permanent: true
+    state: enabled
+    immediate: yes
+  with_items:
+    - "{{zookeeper_client_port}}/tcp"
+    - 2888/tcp
+    - 3888/tcp
+  become: yes
+
+# - name: get ip4 address
+#   command: hostname -i
+#   register: _ip4
+#   tags: ttt
+
+# - debug:
+#     msg: "{{_ip4.stdout}}"
+#   tags: ttt
+
+######################
+- name: Download and unarchive zookeeper
+  unarchive:
+    src: "{{ zookeeper_url }}"
+    dest: /opt
+    copy: no
+    creates: /opt/zookeeper-{{ zookeeper_version }}
+    owner: "{{ user }}"
+    group: "{{ group }}"
+  become: yes
+
+- name: Link to Zookeeper Directory
+  file:
+    src: "/opt/zookeeper-{{ zookeeper_version }}"
+    dest: "{{zookeeper_dir}}"
+    state: link
+    force: yes
+  become: yes
+
+- name: Create Zookeeper Log Dir
+  file:
+    path: "{{zookeeper_log_dir}}"
+    owner: "{{ user }}"
+    group: "{{ group }}"
+    recurse: yes
+    state: directory
+    mode: 0644
+  become: yes
+
+- name: Create Zookeeper DataStore Dir
+  file:
+    path: "{{zookeeper_datastore_dir}}"
+    owner: "{{ user }}"
+    group: "{{ group }}"
+    recurse: yes
+    state: directory
+    mode: 0755
+  become: yes
+
+- name: Copy zoo.cfg file
+  template:
+    src: zoo.cfg.j2
+    # dest: "{{zookeeper_conf_dir}}/zoo.cfg"
+    dest: "{{zookeeper_dir}}/conf/zoo.cfg"
+    owner: "{{ user }}"
+    group: "{{ group }}"
+    mode: "u=rw,g=r,o=r"
+  notify:
+    - restart zookeeper
+
+
+- name: Copy myid file
+  template:
+    src: myid.j2
+    dest: "{{zookeeper_datastore_dir}}/myid"
+    owner: "{{ user }}"
+    group: "{{ group }}"
+    mode: "u=rw,g=r,o=r"
+  notify:
+    - restart zookeeper

http://git-wip-us.apache.org/repos/asf/airavata/blob/1ae82630/roles/zookeeper/templates/myid.j2
----------------------------------------------------------------------
diff --git a/roles/zookeeper/templates/myid.j2 b/roles/zookeeper/templates/myid.j2
new file mode 100644
index 0000000..78a0bd7
--- /dev/null
+++ b/roles/zookeeper/templates/myid.j2
@@ -0,0 +1 @@
+{{ my_id }}

http://git-wip-us.apache.org/repos/asf/airavata/blob/1ae82630/roles/zookeeper/templates/zoo.cfg.j2
----------------------------------------------------------------------
diff --git a/roles/zookeeper/templates/zoo.cfg.j2 b/roles/zookeeper/templates/zoo.cfg.j2
new file mode 100644
index 0000000..4845a71
--- /dev/null
+++ b/roles/zookeeper/templates/zoo.cfg.j2
@@ -0,0 +1,32 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+maxClientCnxns=50
+# The number of milliseconds of each tick
+tickTime=2000
+# The number of ticks that the initial
+# synchronization phase can take
+initLimit=10
+# The number of ticks that can pass between
+# sending a request and getting an acknowledgement
+syncLimit=5
+# the directory where the snapshot is stored.
+dataDir={{zookeeper_datastore_dir}}
+# the port at which the clients will connect
+clientPort={{zookeeper_client_port}}
+
+{% for server in zookeeper_servers %}
+server.{{ server.id }}={{ server.ip }}:2888:3888
+{% endfor %}

http://git-wip-us.apache.org/repos/asf/airavata/blob/1ae82630/roles/zookeeper/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/vars/main.yml b/roles/zookeeper/vars/main.yml
new file mode 100644
index 0000000..07f9ca1
--- /dev/null
+++ b/roles/zookeeper/vars/main.yml
@@ -0,0 +1,15 @@
+---
+zookeeper_version: 3.4.8
+#zookeeper_conf_dir: /etc/zookeeper/conf
+zookeeper_log_dir: /var/log/zookeeper
+zookeeper_datastore_dir: /var/lib/zookeeper
+zookeeper_url: http://www.us.apache.org/dist/zookeeper/zookeeper-{{zookeeper_version}}/zookeeper-{{zookeeper_version}}.tar.gz
+zookeeper_dir: /opt/zookeeper
+#zookeeper_client_port: 2181
+
+zookeeper_servers:
+  - {id: "1", ip: "172.31.24.149"}
+  - {id: "2", ip: "172.31.19.49"}
+  - {id: "3", ip: "172.31.25.80"}
+#exhibitor_version: 1.5.5
+#exhibitor_install_dir: /opt/exhibitor

http://git-wip-us.apache.org/repos/asf/airavata/blob/1ae82630/site.yml
----------------------------------------------------------------------
diff --git a/site.yml b/site.yml
index 4020f15..17258bd 100644
--- a/site.yml
+++ b/site.yml
@@ -1,17 +1,19 @@
 ---
 - hosts: localhost
-  tags: test
+  tags: ec2
   roles:
-    - test
+    - ec2
 
 - hosts: mesos-master
-  tags: mesos
+  tags: mesos, mesos-master
   roles:
-    - mesos
+    - java
+    - zookeeper
+    - mesos-master
 
-- hosts: mesos-master
-  tags: mesosyum
+- hosts: mesos-slave
+  tags: mesos, mesos-slave
   roles:
-    - mesos-yum
+    - mesos-slave
 
 ...


[34/50] [abbrv] airavata git commit: fixing typo

Posted by la...@apache.org.
fixing typo


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 2d9827c5e68097d758753ad38939e6f6e1451145
Parents: 06ef33f
Author: scnakandala <su...@gmail.com>
Authored: Thu Sep 15 14:50:29 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Sep 15 14:50:29 2016 -0400

----------------------------------------------------------------------
 .../registry/core/credential/catalog/model/CommunityUser_Pk.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/2d9827c5/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser_Pk.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser_Pk.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser_Pk.java
index 47988c2..8b10999 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser_Pk.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/credential/catalog/model/CommunityUser_Pk.java
@@ -22,7 +22,7 @@ package org.apache.airavata.registry.core.credential.catalog.model;
 
 import java.io.Serializable;
 
-public class CommunityUser_PK implements Serializable{
+public class CommunityUser_Pk implements Serializable{
     private String gatewayId;
     private String communityUserName;
     private String tokenId;


[46/50] [abbrv] airavata git commit: Imported ansible-airavata repo to airavata repo

Posted by la...@apache.org.
Imported ansible-airavata repo to airavata repo


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 514567c8baeb61846c198a7b111f988bab037284
Parents: 7071ef1 f513f56
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Fri Sep 23 21:55:35 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Fri Sep 23 21:58:00 2016 -0400

----------------------------------------------------------------------
 dev-tools/ansible/NOTE                          |   5 +
 dev-tools/ansible/README.md                     |  31 +
 dev-tools/ansible/group_vars/all.yml            |  88 +++
 dev-tools/ansible/hosts                         |  26 +
 .../files/mysql-connector-java-5.1.37-bin.jar   | Bin 0 -> 985603 bytes
 .../ansible/roles/api-orch/handlers/main.yml    |  14 +
 dev-tools/ansible/roles/api-orch/tasks/main.yml |  71 ++
 .../templates/airavata-server.properties.j2     | 281 ++++++++
 .../api-orch/templates/gfac-config.yaml.j2      | 111 +++
 .../ansible/roles/common/files/airavata.jks     | Bin 0 -> 2289 bytes
 .../ansible/roles/common/files/airavata_sym.jks | Bin 0 -> 501 bytes
 dev-tools/ansible/roles/common/tasks/main.yml   |  55 ++
 dev-tools/ansible/roles/common/vars/main.yml    |   4 +
 .../ansible/roles/database/handlers/main.yml    |  14 +
 dev-tools/ansible/roles/database/tasks/main.yml |  60 ++
 .../roles/database/tasks/secure_install.yml     |  23 +
 .../ansible/roles/database/templates/my.cnf.j2  |   4 +
 dev-tools/ansible/roles/database/vars/main.yml  |  21 +
 .../ansible/roles/env_setup/tasks/main.yml      |  28 +
 .../ansible/roles/env_setup/tasks/redhat.yml    |  12 +
 .../files/mysql-connector-java-5.1.37-bin.jar   | Bin 0 -> 985603 bytes
 dev-tools/ansible/roles/gfac/handlers/main.yml  |   8 +
 dev-tools/ansible/roles/gfac/tasks/main.yml     |  67 ++
 .../templates/airavata-server.properties.j2     | 281 ++++++++
 .../roles/gfac/templates/gfac-config.yaml.j2    | 111 +++
 dev-tools/ansible/roles/java/tasks/main.yml     |  21 +
 dev-tools/ansible/roles/java/vars/main.yml      |  15 +
 dev-tools/ansible/roles/pga/handlers/main.yml   |  13 +
 dev-tools/ansible/roles/pga/tasks/main.yml      | 112 +++
 .../ansible/roles/pga/templates/httpd.conf.j2   | 353 ++++++++++
 .../roles/pga/templates/pga_config.php.j2       | 248 +++++++
 dev-tools/ansible/roles/pga/vars/main.yml       |  30 +
 .../ansible/roles/rabbitmq/handlers/main.yml    |  13 +
 dev-tools/ansible/roles/rabbitmq/tasks/main.yml |  60 ++
 dev-tools/ansible/roles/rabbitmq/vars/main.yml  |   2 +
 .../files/mysql-connector-java-5.1.37-bin.jar   | Bin 0 -> 985603 bytes
 dev-tools/ansible/roles/registry/tasks/main.yml |  59 ++
 .../templates/airavata-server.properties.j2     | 281 ++++++++
 dev-tools/ansible/roles/wso2_is/tasks/main.yml  |  41 ++
 .../roles/wso2_is/templates/carbon.xml.j2       | 688 +++++++++++++++++++
 dev-tools/ansible/roles/wso2_is/vars/main.yml   |  18 +
 .../ansible/roles/zookeeper/handlers/main.yml   |  12 +
 .../ansible/roles/zookeeper/tasks/main.yml      |  34 +
 .../roles/zookeeper/templates/zoo.cfg.j2        |  28 +
 .../zookeeper/templates/zookeeper.service.j2    |  15 +
 dev-tools/ansible/roles/zookeeper/vars/main.yml |  17 +
 dev-tools/ansible/site.yml                      |  76 ++
 47 files changed, 3451 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/NOTE
----------------------------------------------------------------------
diff --cc dev-tools/ansible/NOTE
index 0000000,0000000..b4979b5
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/NOTE
@@@ -1,0 -1,0 +1,5 @@@
++#Bind to 'hostname -f' output to access from outside.
++
++#aws
++add new tcp rule under associate security group to open ports
++disable or add firewall rule to open ports

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/README.md
----------------------------------------------------------------------
diff --cc dev-tools/ansible/README.md
index 0000000,0000000..f497fb5
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/README.md
@@@ -1,0 -1,0 +1,31 @@@
++# airavata-ansible
++
++Ansible script to deploy Apache Airavata
++
++## Support OS
++
++- Centos 7
++
++## Roles
++
++- **env_setup** :- Create user and group, install oracle java 8
++- **zookeeper** :- Download and install zookeeper.
++- **rabbitmq** :- Download and install rabbitmq as service.
++- **common** :- Checkout Airavata source from git and run maven build. Move keystore files.
++- **gfac** :- Setup Gfac deployment and Change configurations.
++- **api-orch** :- Setup Api-Orch deployment and Change configurations.
++- **pga** :- Deploy Airavata PHP Gateway._(Under development)_
++
++## Useful commands
++
++- `ansible-playbook -i hosts site.yml`
++- `ansible-playbook -i hosts site.yml -t "tags"`
++- `ansible-playbook -i hosts site.yml --start-at-task="name of the ansible task"`
++
++To deploy pga run following. see site.yml (playbook) file for other available tags.
++
++- `ansible-playbook -i hosts site.yml -t "pga"`
++
++## Configurations
++
++- Set correct private key file to `ansible_ssh_private_key_file` property in group_vars/all

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/group_vars/all.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/group_vars/all.yml
index 0000000,0000000..5a159c3
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/group_vars/all.yml
@@@ -1,0 -1,0 +1,88 @@@
++---
++ansible_connection: ssh
++# ansible_ssh_user: centos
++ansible_ssh_user: root
++ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/dev-deployment-key.pem
++# ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-aws.pem.txt
++
++user: centos
++group: centos
++user_home: "/home/{{ user }}"
++
++# deployment related variables
++deployment_dir: "{{ user_home }}/dev-deployment"
++airavata_source_dir: "{{ user_home }}/source"
++airavata_dist: "apache-airavata-server-0.17-SNAPSHOT"
++airavata_dist_name: "{{ airavata_dist }}-bin.tar.gz"
++git_branch: develop
++
++# Database related variables
++db_server: "{{ groups['database'][0] }}"
++db_server_port: "3306"
++db_user: "airavata"
++db_password: "airavata"
++app_catalog: "app_catalog"
++exp_catalog: "exp_catalog"
++replica_catalog: "replica_catalog"
++workflow_catalog: "wf_catalog"
++credential_store: "credential_store"
++
++mysql_connector_jar: "mysql-connector-java-5.1.37-bin.jar"
++
++# Rabbitmq related vareables
++rabbitmq_server: "{{ groups['rabbitmq'][0] }}"
++rabbitmq_vhost: "develop"
++rabbitmq_user: "airavata"
++rabbitmq_password: "airavata"
++rabbitmq_port: "5672"
++rabbitmq_broker_url: "amqp://{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ rabbitmq_server}}:{{ rabbitmq_port }}/{{ rabbitmq_vhost }}"
++
++# Zoookeeper related variables
++zookeeper_client_port: 2181
++zookeeper_url: "{{ groups['zookeeper'][0] }}:{{ zookeeper_client_port }}"
++# API Server related variables
++api_server_name: "apiserver-node0"
++api_server_host: "{{ansible_fqdn}}"
++api_server_port: "8930"
++api_secured: "false"
++tls_enable: "false"
++api_server_tls_port: "9930"
++enable_sharing: "false"
++
++# Orchestrator  related variables
++orchestrator_name: "orchestrator-node0"
++orchestrator_host: "{{ansible_fqdn}}"
++orchestrator_port: "8940"
++api_orch_dir: "{{ deployment_dir }}/api-orchestrator"
++
++# registry related variables
++registry_name: regserver-node0
++registry_host: "{{groups['registry'][0]}}"
++registry_port: 8970
++registry_dir: "{{ deployment_dir }}/registry"
++default_gateway: "php_reference_gateway"
++
++# Credential and keystore related variables
++#authorization_server: "https://{{ groups['wso2is'][0]}}:9443/services/"
++authorization_server: "https://idp.scigap.org:9443/services/"
++keystore: "airavata.jks"
++keystore_passwd: "airavata"
++#client_truststore: "client_truststore.jks"
++client_truststore: "airavata.jks"
++client_truststore_passwd: "airavata"
++cred_keystore: "airavata_sym.jks"
++cred_keystore_passwd: "airavata"
++cred_keystore_alias: "airavata"
++cred_store_server_host: "{{ ansible_fqdn }}"
++cred_store_port: "8960"
++keystores_location: "{{ deployment_dir }}/keystores"
++
++# Gfac related variables
++gfac_name: "gfac-node0"
++gfac_host: "{{ ansible_fqdn }}"
++gfac_port: "8950"
++gfac_dir: "{{ deployment_dir }}/gfac-instance"
++
++# Monitoring variables
++monitor_email_address: "test.airavata@gmail.com"
++monitor_email_password: "airavata"

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/hosts
----------------------------------------------------------------------
diff --cc dev-tools/ansible/hosts
index 0000000,0000000..4fc8675
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/hosts
@@@ -1,0 -1,0 +1,26 @@@
++---
++# inventory file : production
++
++[zookeeper]
++54.221.13.4
++
++[rabbitmq]
++54.221.13.4
++
++[database]
++54.196.189.115
++
++[wso2is]
++#52.87.209.219
++
++[registry]
++54.89.119.195
++
++[api-orch]
++54.89.119.195
++
++[gfac]
++54.165.169.111
++
++[pga]
++#54.237.220.234

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/api-orch/files/mysql-connector-java-5.1.37-bin.jar
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/api-orch/files/mysql-connector-java-5.1.37-bin.jar
index 0000000,0000000..465af67
new file mode 100644
Binary files differ

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/api-orch/handlers/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/api-orch/handlers/main.yml
index 0000000,0000000..a2288d9
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/api-orch/handlers/main.yml
@@@ -1,0 -1,0 +1,14 @@@
++---
++
++# Api server, Orchestrator related handlers
++- name: start api-orch
++  command: ./bin/airavata-server-start.sh api-orch -d
++           chdir="{{ api_orch_dir }}/{{ airavata_dist }}/"
++           creates="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++- name: stop api-orch
++  command: ./bin/airavata-server-stop.sh -f
++           chdir="{{ api_orch_dir }}/{{ airavata_dist }}/"
++           removes="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++...

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/api-orch/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/api-orch/tasks/main.yml
index 0000000,0000000..c9c5227
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/api-orch/tasks/main.yml
@@@ -1,0 -1,0 +1,71 @@@
++---
++################################################################################
++# api-orch deployment
++- name: Create api-orchestrator deployment directory
++  file: path="{{ api_orch_dir }}" state=directory owner="{{ user }}" group="{{ group }}"
++  when: build|success
++
++- name: Check previous deployments
++  stat: path="{{ api_orch_dir }}/{{ airavata_dist }}" get_md5=no get_checksum=no
++  register: check
++
++- name: stop api-orch
++  command: ./bin/airavata-server-stop.sh -f
++            chdir="{{ api_orch_dir }}/{{ airavata_dist }}/"
++            removes="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
++  when: check.stat.exists == True
++
++- name: Delete previous deployments
++  file: path="{{ api_orch_dir }}/{{ airavata_dist }}" state=absent
++
++- name: Copy distribution to api-orcheatrator deployment directory
++  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"
++            owner={{ user }}
++            group={{ group }}
++            mode="u=rw,g=r,o=r"
++
++- name: Copy Gfac configuration file
++  template: src=gfac-config.yaml.j2
++            dest="{{ api_orch_dir }}/{{ airavata_dist }}/bin/gfac-config.yaml"
++            owner={{ user }}
++            group={{ group }}
++            mode="u=rw,g=r,o=r"
++
++- name: Copy Mysql jar to lib
++  copy: src={{ mysql_connector_jar }}
++        dest="{{ api_orch_dir }}/{{ airavata_dist }}/lib/{{ mysql_connector_jar }}"
++        owner={{ user }}
++        group={{ group }}
++
++- name: Open firwall ports
++  firewalld: port={{ item }} zone=public permanent=true state=enabled immediate=yes
++  with_items:
++    - "{{ api_server_port }}/tcp"
++    - "{{ orchestrator_port }}/tcp"
++    - "{{ cred_store_port }}/tcp"
++  become_user: root
++
++- name: stop api-orch
++  command: ./bin/airavata-server-stop.sh -f
++           chdir="{{ api_orch_dir }}/{{ airavata_dist }}/"
++           removes="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++- name: start api-orch
++  command: ./bin/airavata-server-start.sh api-orch -d
++           chdir="{{ api_orch_dir }}/{{ airavata_dist }}/"
++           creates="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++...

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/api-orch/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/api-orch/templates/airavata-server.properties.j2
index 0000000,0000000..b8d093e
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/api-orch/templates/airavata-server.properties.j2
@@@ -1,0 -1,0 +1,281 @@@
++#
++#
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements.  See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership.  The ASF licenses this file
++# to you 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.
++#
++
++###########################################################################
++#
++#  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
++# MySql database configuration
++registry.jdbc.driver=com.mysql.jdbc.Driver
++registry.jdbc.url=jdbc:mysql://{{ 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=admin
++default.registry.password=admin
++default.registry.password.hash.method=SHA
++default.registry.gateway={{ 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
++# MySql database configuration
++appcatalog.jdbc.driver=com.mysql.jdbc.Driver
++appcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ 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
++# MySql database configuration
++replicacatalog.jdbc.driver=com.mysql.jdbc.Driver
++replicacatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
++replicacatalog.jdbc.user={{ db_user }}
++replicacatalog.jdbc.password={{ db_password }}
++replicacatalog.validationQuery=SELECT 1 from CONFIGURATION
++
++###########################################################################
++#  Workflow Catalog DB Configuration
++###########################################################################
++#for derby [AiravataJPARegistry]
++#workflowcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
++#workflowcatalog.jdbc.url=jdbc:derby://localhost:1527/workflow_catalog;create=true;user=airavata;password=airavata
++# MySql database configuration
++workflowcatalog.jdbc.driver=com.mysql.jdbc.Driver
++workflowcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
++workflowcatalog.jdbc.user={{ db_user }}
++workflowcatalog.jdbc.password={{ db_password }}
++workflowcatalog.validationQuery=SELECT 1 from CONFIGURATION
++
++###########################################################################
++#  User Profile MongoDB Configuration
++###########################################################################
++userprofile.mongodb.host=localhost
++userprofile.mongodb.port=27017
++
++
++###########################################################################
++#  Server module Configuration
++###########################################################################
++#credential store server should be started before API server
++#This is obsolete property with new script files.
++#servers=credentialstore,apiserver,orchestrator
++
++
++###########################################################################
++#  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
++
++###########################################################################
++#  Orchestrator Server Configurations
++###########################################################################
++orchestrator=org.apache.airavata.orchestrator.server.OrchestratorServer
++orchestrator.server.name={{ orchestrator_name }}
++orchestrator.server.host={{ orchestrator_host }}
++orchestrator.server.port={{ orchestrator_port }}
++orchestrator.server.min.threads=50
++job.validators=org.apache.airavata.orchestrator.core.validator.impl.BatchQueueValidator,org.apache.airavata.orchestrator.core.validator.impl.ExperimentStatusValidator
++submitter.interval=10000
++threadpool.size=10
++start.submitter=true
++embedded.mode=true
++enable.validation=true
++
++###########################################################################
++#  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
++
++###########################################################################
++#  GFac Server Configurations
++###########################################################################
++gfac=org.apache.airavata.gfac.server.GfacServer
++gfac.server.name={{ gfac_name }}
++gfac.server.host={{ gfac_host }}
++gfac.server.port={{ gfac_port }}
++gfac.thread.pool.size=50
++host.scheduler=org.apache.airavata.gfac.impl.DefaultHostScheduler
++
++
++
++###########################################################################
++# Airavata Workflow Interpreter Configurations
++###########################################################################
++workflowserver=org.apache.airavata.api.server.WorkflowServer
++enactment.thread.pool.size=10
++
++#to define custom workflow parser user following property
++#workflow.parser=org.apache.airavata.workflow.core.parser.AiravataWorkflowBuilder
++
++
++
++###########################################################################
++#  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 }}
++credential.store.keystore.alias={{ cred_keystore_alias }}
++credential.store.keystore.password={{ cred_keystore_passwd }}
++credential.store.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ credential_store }}
++credential.store.jdbc.user={{ db_user }}
++credential.store.jdbc.password={{ db_password }}
++credential.store.jdbc.driver=com.mysql.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
++email.based.monitor.host=imap.gmail.com
++email.based.monitor.address={{ monitor_email_address }}
++email.based.monitor.password={{ monitor_email_password }}
++email.based.monitor.folder.name=INBOX
++# either imaps or pop3
++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
++
++###########################################################################
++# 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.api.server.security.DefaultAiravataSecurityManager
++### 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 }}
++keystore.password={{ keystore_passwd }}
++#### trust store configuration ####
++trust.store={{ keystores_location }}/{{ client_truststore }}
++trust.store.password=airavata
++#### remote authorization server url ####
++remote.oauth.authorization.server=https://idp.scigap.org:9443/services/
++#### xacml based authorization policy ####
++authorization.policy=airavata-default-xacml-policy
++#### authorization cache related configuration ####
++authz.cache.enabled=true
++authz.cache.manager.class=org.apache.airavata.api.server.security.authzcache.DefaultAuthzCacheManager
++in.memory.cache.size=1000

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/api-orch/templates/gfac-config.yaml.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/api-orch/templates/gfac-config.yaml.j2
index 0000000,0000000..3df5832
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/api-orch/templates/gfac-config.yaml.j2
@@@ -1,0 -1,0 +1,111 @@@
++##################################################################
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements.  See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership.  The ASF licenses this file
++# to you 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.
++#
++################################################################
++
++jobSubmitters:
++  - submissionProtocol: SSH
++    taskClass: org.apache.airavata.gfac.impl.task.DefaultJobSubmissionTask
++#   properties:
++#     - userName: airavata
++#       passPhrase: airavata
++#       privateKey: /path/to/the/privatekey
++#       publicKey: /path/to/the/publickey
++#       hostName: remote.client.hostName
++
++  - submissionProtocol: SSH_FORK
++    taskClass: org.apache.airavata.gfac.impl.task.ForkJobSubmissionTask
++
++  - submissionProtocol: LOCAL
++    taskClass: org.apache.airavata.gfac.impl.task.DefaultJobSubmissionTask
++
++# Following job subbmitters are not yet implemented.
++
++ # - submissionProtocol: GSISSH
++ #   taskClass: org.apache.airavata.task.adapters.GSISSHJobSubmissionTask
++commonTasks:
++   - type: SETUP
++     taskClass: org.apache.airavata.task.common.SetupTask
++
++   - type: CLEANUP
++     taskClass: org.apache.airavata.task.common.CleanupTask
++
++fileTransferTasks:
++#  - transferProtocol: SCP
++#    taskClass: org.apache.airavata.gfac.impl.task.DataStageTask
++
++# If your client doen't run the same instance where airavata server is running then you need to comment above
++# DataStageTask and uncomment SCPDataStageTask. To work with SCPDataStageTask, you either need to
++# provide ssh keys or password.
++
++  - transferProtocol: SCP
++    taskClass: org.apache.airavata.gfac.impl.task.SCPDataStageTask
++    properties:
++     - userName: root
++       passPhrase: ultrascan 
++       privateKeyPath: /home/airavata/.ssh/id_rsa
++       publicKeyPath: /home/airavata/.ssh/id_rsa.pub
++       hostName: gw75.iu.xsede.org 
++       inputPath: /var/www/portal/experimentData/
++#      password: password
++
++# Following transfer tasks are not yet implemented.
++  #- transferProtocol: SFTP
++  #  taskClass: org.apache.airavata.task.adapters.SFTPFileTransferTask
++
++  #- transferProtocol: GRIDFTP
++  #  taskClass: org.apache.airavata.task.adapters.GRIDFTPFileTransferTask
++
++  #- transferProtocol: LOCAL
++  #  taskClass: org.apache.airavata.task.adapters.LocalFileTransferTask
++
++resources:
++  - jobManagerType: PBS
++    commandOutputParser: org.apache.airavata.gfac.impl.job.PBSOutputParser
++    emailParser: org.apache.airavata.gfac.monitor.email.parser.PBSEmailParser
++    resourceEmailAddresses:
++      - pbsconsult@sdsc.edu  # gordon
++      - adm@trident.bigred2.uits.iu.edu # Bigred2
++      - root <ad...@trident.bigred2.uits.iu.edu> # Bigred2
++      - root <ad...@scyld.localdomain> # alamo
++      - root <ad...@m2.karst.uits.iu.edu> #karst
++
++  - jobManagerType: SLURM
++    commandOutputParser: org.apache.airavata.gfac.impl.job.SlurmOutputParser
++    emailParser: org.apache.airavata.gfac.monitor.email.parser.SLURMEmailParser
++    resourceEmailAddresses:
++      - SDSC Admin <sl...@comet-fe3.sdsc.edu> # comet
++      - slurm@batch1.stampede.tacc.utexas.edu # stampede
++      - SDSC Admin <sl...@comet-fe4.sdsc.edu> # comet new
++      - Slurm <sl...@psc.edu> # bridges 
++      - Slurm Daemon <sl...@odin.oscer.ou.edu> # OU Schooner
++
++  - jobManagerType: UGE
++    commandOutputParser: org.apache.airavata.gfac.impl.job.UGEOutputParser
++    emailParser: org.apache.airavata.gfac.monitor.email.parser.UGEEmailParser
++    resourceEmailAddresses:
++      - ls4.tacc.utexas.edu # contain Lonestar
++
++  - jobManagerType: LSF
++    commandOutputParser: org.apache.airavata.gfac.impl.job.LSFOutputParser
++    emailParser: org.apache.airavata.gfac.monitor.email.parser.LSFEmailParser
++    resourceEmailAddresses:
++      - iu.xsede.edu # test resource mail address
++
++  - jobManagerType: FORK
++    commandOutputParser: org.apache.airavata.gfac.impl.job.ForkOutputParser

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/common/files/airavata.jks
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/common/files/airavata.jks
index 0000000,0000000..685cc00
new file mode 100644
Binary files differ

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/common/files/airavata_sym.jks
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/common/files/airavata_sym.jks
index 0000000,0000000..3dd27d6
new file mode 100644
Binary files differ

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/common/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/common/tasks/main.yml
index 0000000,0000000..eac1a60
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/common/tasks/main.yml
@@@ -1,0 -1,0 +1,55 @@@
++---
++- name: Install Airavata pre-requireties
++  yum: name={{ item }} state=latest update_cache=yes
++  with_items:
++    - git
++    - maven
++  become_user: root
++
++# Setup airavata source
++- name: Create deployment directory {{ deployment_dir }}
++  file: path={{ deployment_dir }} state=directory mode=0755
++
++- name: Create source directory
++  file: path={{airavata_source_dir}}
++        state=directory
++        mode=0755
++        owner={{ user }}
++        group={{ group }}
++
++- name: git checkout from airavata github
++  git: repo=https://git-wip-us.apache.org/repos/asf/airavata.git
++       dest="{{ airavata_source_dir }}"
++       version="{{ git_branch }}"
++  register: checkout
++  tags: update
++
++- name: Run maven build
++  command: mvn clean install -Dmaven.test.skip=true chdir="{{ airavata_source_dir }}/"
++  environment:
++      MAVEN_OPTS: "-Xmx2048m"
++  register: build
++  tags: update
++  # when: (checkout|success) and (checkout.changed == true)
++
++################################################################################
++# copy key store and trust store files
++- name: Create KeyStores directory
++  file: path={{ keystores_location }}
++        state=directory
++        owner={{ user }} group={{ group }}
++
++- name: Transfer airavata.jks KeyStore file
++  copy: src={{ keystore }}
++        dest="{{ keystores_location }}/{{ keystore }}"
++        owner={{ user }} group={{ group }}
++
++- name: Transfer airavata_sym.jks KeyStore file
++  copy: src={{ cred_keystore }}
++        dest="{{ keystores_location }}/{{ cred_keystore }}"
++        owner={{ user }} group={{ group }}
++
++- name: Transfer client trust store KeyStore file
++  copy: src={{ client_truststore }}
++        dest="{{ keystores_location }}/{{ client_truststore }}"
++        owner={{ user }} group={{ group }}

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/common/vars/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/common/vars/main.yml
index 0000000,0000000..e2d93e7
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/common/vars/main.yml
@@@ -1,0 -1,0 +1,4 @@@
++---
++# Common variables
++
++...

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/database/handlers/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/database/handlers/main.yml
index 0000000,0000000..1906365
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/database/handlers/main.yml
@@@ -1,0 -1,0 +1,14 @@@
++---
++- name: start mariadb
++  service: name=mariadb state=started enabled=yes
++  become: yes
++
++- name: stop mariadb
++  service: name=mariadb state=stopped
++  become: yes
++
++- name: restart mariadb
++  service: name=mariadb state=restarted enabled=yes
++  become: yes
++
++...

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/database/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/database/tasks/main.yml
index 0000000,0000000..17e5b0d
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/database/tasks/main.yml
@@@ -1,0 -1,0 +1,60 @@@
++---
++# - name: yum update
++#   yum: name=* state=latest
++
++# Install Mysql
++- name: install epel release
++  yum: name=epel-release state=present
++  become_user: root
++
++- name: install pip
++  yum: name=python-pip state=latest update_cache=yes
++  become_user: root
++
++- name: install pexpect
++  pip: name=pexpect
++  become_user: root
++
++# - name: Adds Python MySQL support on Debian/Ubuntu
++#   apt: pkg="python-mysqldb" state=present
++#   when: ansible_os_family == 'Debian'
++
++- name: Adds Python MySQL support on RedHat/CentOS
++  yum: name=MySQL-python state=present
++  become_user: root
++  # when: ansible_os_family == 'RedHat'
++
++- name: install mariadb
++  yum: name="{{ item }}" state=latest update_cache=yes
++  with_items: "{{ mysql_packages }}"
++  become_user: root
++
++- name: start mariadb
++  service: name=mariadb state=started enabled=yes
++  become_user: root
++
++- include: secure_install.yml
++
++- name: create databases
++  mysql_db: name="{{ item }}" state=present
++  with_items:
++    - "{{ mysql_databases }}"
++
++- name: give access to {{ db_user }} from remote
++  mysql_user: name="{{ db_user }}" password="{{ db_password }}" host="{{ item }}"
++  with_items:
++    - "{{ groups['api-orch'] }}"
++    - "{{ groups['gfac'] }}"
++    - "{{ groups['registry'] }}"
++
++- name: create new user {{ db_user }} with all privilege
++  mysql_user: name="{{ db_user }}"
++              password="{{ db_password }}"
++              append_privs=yes
++              host_all=yes
++              priv=*.*:ALL,GRANT state=present
++
++- name: open firewall port {{ db_server_port }}
++  firewalld: port="{{ db_server_port }}/tcp"
++             zone=public permanent=true state=enabled immediate=yes
++  become_user: root

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/database/tasks/secure_install.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/database/tasks/secure_install.yml
index 0000000,0000000..a747419
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/database/tasks/secure_install.yml
@@@ -1,0 -1,0 +1,23 @@@
++---
++# This is ansible equivalent for mysql_secure_installation
++- name: Sets the root password
++  mysql_user: user=root
++              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"
++  # become: yes
++
++- name: Removes all anonymous user accounts
++  mysql_user: name='' host_all=yes state=absent
++
++- name: Secures the MySQL root user for all hosts
++  mysql_user: user=root password="{{ mysql_root_password }}" host_all=yes
++
++- name: Removes the MySQL test database
++  mysql_db: db=test state=absent
++
++...

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/database/templates/my.cnf.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/database/templates/my.cnf.j2
index 0000000,0000000..ebe5b5b
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/database/templates/my.cnf.j2
@@@ -1,0 -1,0 +1,4 @@@
++# Example .my.cnf file for setting the root password
++[client]
++user=root
++password="{{ mysql_root_password }}"

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/database/vars/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/database/vars/main.yml
index 0000000,0000000..1f37424
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/database/vars/main.yml
@@@ -1,0 -1,0 +1,21 @@@
++---
++mysql_packages:
++  - mariadb-server
++  - mariadb
++mysql_root_password: "admin"
++
++mysql_databases:
++    - "{{ app_catalog }}"
++    - "{{ exp_catalog }}"
++    - "{{ replica_catalog }}"
++    - "{{ workflow_catalog }}"
++    - "{{ credential_store }}"
++
++mysql_privs:
++    - "{{ app_catalog }}.*:ALL"
++    - "{{ exp_catalog }}.*:ALL"
++    - "{{ replica_catalog }}.*:ALL"
++    - "{{ workflow_catalog }}.*:ALL"
++    - "{{ credential_store }}.*:ALL"
++
++...

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/env_setup/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/env_setup/tasks/main.yml
index 0000000,0000000..a3ecb8c
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/env_setup/tasks/main.yml
@@@ -1,0 -1,0 +1,28 @@@
++---
++#Tasks file can include smaller files if wanted
++#All commons tasks goes here
++- name: Create a new user group "{{ group }}"
++  group: name={{ group }}
++  become: yes
++
++- name: Create a new user "{{ user }}"
++  user: name={{ user }} group={{ group }}
++  become: yes
++
++- name: Install Firewalld
++  yum: name=firewalld state=latest update_cache=yes
++  become: yes
++
++  # TODO: stop iptables service, can't have both iptables and firewalld on same host
++  # if we try to stop non existing service ansible fails.
++# - name: Stop iptables, ip6tables services
++#   service: name="{{ item }}" state=stopped
++#   with_items:
++#     - iptables
++#     - ip6tables
++
++- name: Start firewalld service
++  service: name=firewalld state=started
++  become: yes
++
++...

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/env_setup/tasks/redhat.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/env_setup/tasks/redhat.yml
index 0000000,0000000..a0e56c7
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/env_setup/tasks/redhat.yml
@@@ -1,0 -1,0 +1,12 @@@
++---
++- name: Install git latest version
++  yum: name=git state=latest update_cache=yes
++#  become: true
++#  become_user: airavata
++  tags: env_setup
++
++- name: Install maven latest version
++  yum: name=maven state=latest update_cache=yes
++  tags: env_setup
++
++...

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/gfac/files/mysql-connector-java-5.1.37-bin.jar
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/gfac/files/mysql-connector-java-5.1.37-bin.jar
index 0000000,0000000..465af67
new file mode 100644
Binary files differ

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/gfac/handlers/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/gfac/handlers/main.yml
index 0000000,0000000..b3d85a9
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/gfac/handlers/main.yml
@@@ -1,0 -1,0 +1,8 @@@
++---
++
++# Gfac related handlers
++- name: start gfac
++  command: ./bin/airavata-server-start.sh gfac -d chdir="{{ gfac_dir }}/{{ airavata_dist }}/" creates="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++- name: stop gfac
++  command: ./bin/airavata-server-stop.sh -f chdir="{{ gfac_dir }}/{{ airavata_dist }}/" removes="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/gfac/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/gfac/tasks/main.yml
index 0000000,0000000..30874e6
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/gfac/tasks/main.yml
@@@ -1,0 -1,0 +1,67 @@@
++---
++
++################################################################################
++# gfac deployments
++- name: Create Gfac deployment directory
++  file: path="{{ gfac_dir }}" state=directory owner={{ user }} group={{ group }}
++  when: build|success
++
++- name: Check previous deployments
++  stat: path="{{ gfac_dir }}/{{ airavata_dist }}" get_md5=no get_checksum=no
++  register: check
++
++- name: stop gfac
++  command: ./bin/airavata-server-stop.sh -f
++           chdir="{{ gfac_dir }}/{{ airavata_dist }}/"
++           removes="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
++  when: check.stat.exists == True
++
++- name: Delete previous deployments
++  file: path="{{ gfac_dir }}/{{ airavata_dist }}" state=absent
++
++- name: Copy distribution to gfac deployment directory
++  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"
++            owner={{ user }}
++            group={{ group }}
++            mode="u=rw,g=r,o=r"
++
++- name: Copy Gfac configuration file
++  template: src=gfac-config.yaml.j2
++            dest="{{ gfac_dir }}/{{ airavata_dist }}/bin/gfac-config.yaml"
++            owner={{ user }}
++            group={{ group }}
++            mode="u=rw,g=r,o=r"
++
++- name: Copy Mysql jar to lib
++  copy: src="{{ mysql_connector_jar }}"
++        dest="{{ gfac_dir }}/{{ airavata_dist }}/lib/{{ mysql_connector_jar }}"
++        owner={{ user }}
++        group={{ group }}
++
++
++- name: Open firwall ports
++  firewalld: port="{{ gfac_port }}/tcp" zone=public permanent=true state=enabled immediate=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
++  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/514567c8/dev-tools/ansible/roles/gfac/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/gfac/templates/airavata-server.properties.j2
index 0000000,0000000..b8d093e
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/gfac/templates/airavata-server.properties.j2
@@@ -1,0 -1,0 +1,281 @@@
++#
++#
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements.  See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership.  The ASF licenses this file
++# to you 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.
++#
++
++###########################################################################
++#
++#  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
++# MySql database configuration
++registry.jdbc.driver=com.mysql.jdbc.Driver
++registry.jdbc.url=jdbc:mysql://{{ 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=admin
++default.registry.password=admin
++default.registry.password.hash.method=SHA
++default.registry.gateway={{ 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
++# MySql database configuration
++appcatalog.jdbc.driver=com.mysql.jdbc.Driver
++appcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ 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
++# MySql database configuration
++replicacatalog.jdbc.driver=com.mysql.jdbc.Driver
++replicacatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
++replicacatalog.jdbc.user={{ db_user }}
++replicacatalog.jdbc.password={{ db_password }}
++replicacatalog.validationQuery=SELECT 1 from CONFIGURATION
++
++###########################################################################
++#  Workflow Catalog DB Configuration
++###########################################################################
++#for derby [AiravataJPARegistry]
++#workflowcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
++#workflowcatalog.jdbc.url=jdbc:derby://localhost:1527/workflow_catalog;create=true;user=airavata;password=airavata
++# MySql database configuration
++workflowcatalog.jdbc.driver=com.mysql.jdbc.Driver
++workflowcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
++workflowcatalog.jdbc.user={{ db_user }}
++workflowcatalog.jdbc.password={{ db_password }}
++workflowcatalog.validationQuery=SELECT 1 from CONFIGURATION
++
++###########################################################################
++#  User Profile MongoDB Configuration
++###########################################################################
++userprofile.mongodb.host=localhost
++userprofile.mongodb.port=27017
++
++
++###########################################################################
++#  Server module Configuration
++###########################################################################
++#credential store server should be started before API server
++#This is obsolete property with new script files.
++#servers=credentialstore,apiserver,orchestrator
++
++
++###########################################################################
++#  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
++
++###########################################################################
++#  Orchestrator Server Configurations
++###########################################################################
++orchestrator=org.apache.airavata.orchestrator.server.OrchestratorServer
++orchestrator.server.name={{ orchestrator_name }}
++orchestrator.server.host={{ orchestrator_host }}
++orchestrator.server.port={{ orchestrator_port }}
++orchestrator.server.min.threads=50
++job.validators=org.apache.airavata.orchestrator.core.validator.impl.BatchQueueValidator,org.apache.airavata.orchestrator.core.validator.impl.ExperimentStatusValidator
++submitter.interval=10000
++threadpool.size=10
++start.submitter=true
++embedded.mode=true
++enable.validation=true
++
++###########################################################################
++#  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
++
++###########################################################################
++#  GFac Server Configurations
++###########################################################################
++gfac=org.apache.airavata.gfac.server.GfacServer
++gfac.server.name={{ gfac_name }}
++gfac.server.host={{ gfac_host }}
++gfac.server.port={{ gfac_port }}
++gfac.thread.pool.size=50
++host.scheduler=org.apache.airavata.gfac.impl.DefaultHostScheduler
++
++
++
++###########################################################################
++# Airavata Workflow Interpreter Configurations
++###########################################################################
++workflowserver=org.apache.airavata.api.server.WorkflowServer
++enactment.thread.pool.size=10
++
++#to define custom workflow parser user following property
++#workflow.parser=org.apache.airavata.workflow.core.parser.AiravataWorkflowBuilder
++
++
++
++###########################################################################
++#  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 }}
++credential.store.keystore.alias={{ cred_keystore_alias }}
++credential.store.keystore.password={{ cred_keystore_passwd }}
++credential.store.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ credential_store }}
++credential.store.jdbc.user={{ db_user }}
++credential.store.jdbc.password={{ db_password }}
++credential.store.jdbc.driver=com.mysql.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
++email.based.monitor.host=imap.gmail.com
++email.based.monitor.address={{ monitor_email_address }}
++email.based.monitor.password={{ monitor_email_password }}
++email.based.monitor.folder.name=INBOX
++# either imaps or pop3
++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
++
++###########################################################################
++# 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.api.server.security.DefaultAiravataSecurityManager
++### 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 }}
++keystore.password={{ keystore_passwd }}
++#### trust store configuration ####
++trust.store={{ keystores_location }}/{{ client_truststore }}
++trust.store.password=airavata
++#### remote authorization server url ####
++remote.oauth.authorization.server=https://idp.scigap.org:9443/services/
++#### xacml based authorization policy ####
++authorization.policy=airavata-default-xacml-policy
++#### authorization cache related configuration ####
++authz.cache.enabled=true
++authz.cache.manager.class=org.apache.airavata.api.server.security.authzcache.DefaultAuthzCacheManager
++in.memory.cache.size=1000

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/gfac/templates/gfac-config.yaml.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/gfac/templates/gfac-config.yaml.j2
index 0000000,0000000..3df5832
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/gfac/templates/gfac-config.yaml.j2
@@@ -1,0 -1,0 +1,111 @@@
++##################################################################
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements.  See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership.  The ASF licenses this file
++# to you 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.
++#
++################################################################
++
++jobSubmitters:
++  - submissionProtocol: SSH
++    taskClass: org.apache.airavata.gfac.impl.task.DefaultJobSubmissionTask
++#   properties:
++#     - userName: airavata
++#       passPhrase: airavata
++#       privateKey: /path/to/the/privatekey
++#       publicKey: /path/to/the/publickey
++#       hostName: remote.client.hostName
++
++  - submissionProtocol: SSH_FORK
++    taskClass: org.apache.airavata.gfac.impl.task.ForkJobSubmissionTask
++
++  - submissionProtocol: LOCAL
++    taskClass: org.apache.airavata.gfac.impl.task.DefaultJobSubmissionTask
++
++# Following job subbmitters are not yet implemented.
++
++ # - submissionProtocol: GSISSH
++ #   taskClass: org.apache.airavata.task.adapters.GSISSHJobSubmissionTask
++commonTasks:
++   - type: SETUP
++     taskClass: org.apache.airavata.task.common.SetupTask
++
++   - type: CLEANUP
++     taskClass: org.apache.airavata.task.common.CleanupTask
++
++fileTransferTasks:
++#  - transferProtocol: SCP
++#    taskClass: org.apache.airavata.gfac.impl.task.DataStageTask
++
++# If your client doen't run the same instance where airavata server is running then you need to comment above
++# DataStageTask and uncomment SCPDataStageTask. To work with SCPDataStageTask, you either need to
++# provide ssh keys or password.
++
++  - transferProtocol: SCP
++    taskClass: org.apache.airavata.gfac.impl.task.SCPDataStageTask
++    properties:
++     - userName: root
++       passPhrase: ultrascan 
++       privateKeyPath: /home/airavata/.ssh/id_rsa
++       publicKeyPath: /home/airavata/.ssh/id_rsa.pub
++       hostName: gw75.iu.xsede.org 
++       inputPath: /var/www/portal/experimentData/
++#      password: password
++
++# Following transfer tasks are not yet implemented.
++  #- transferProtocol: SFTP
++  #  taskClass: org.apache.airavata.task.adapters.SFTPFileTransferTask
++
++  #- transferProtocol: GRIDFTP
++  #  taskClass: org.apache.airavata.task.adapters.GRIDFTPFileTransferTask
++
++  #- transferProtocol: LOCAL
++  #  taskClass: org.apache.airavata.task.adapters.LocalFileTransferTask
++
++resources:
++  - jobManagerType: PBS
++    commandOutputParser: org.apache.airavata.gfac.impl.job.PBSOutputParser
++    emailParser: org.apache.airavata.gfac.monitor.email.parser.PBSEmailParser
++    resourceEmailAddresses:
++      - pbsconsult@sdsc.edu  # gordon
++      - adm@trident.bigred2.uits.iu.edu # Bigred2
++      - root <ad...@trident.bigred2.uits.iu.edu> # Bigred2
++      - root <ad...@scyld.localdomain> # alamo
++      - root <ad...@m2.karst.uits.iu.edu> #karst
++
++  - jobManagerType: SLURM
++    commandOutputParser: org.apache.airavata.gfac.impl.job.SlurmOutputParser
++    emailParser: org.apache.airavata.gfac.monitor.email.parser.SLURMEmailParser
++    resourceEmailAddresses:
++      - SDSC Admin <sl...@comet-fe3.sdsc.edu> # comet
++      - slurm@batch1.stampede.tacc.utexas.edu # stampede
++      - SDSC Admin <sl...@comet-fe4.sdsc.edu> # comet new
++      - Slurm <sl...@psc.edu> # bridges 
++      - Slurm Daemon <sl...@odin.oscer.ou.edu> # OU Schooner
++
++  - jobManagerType: UGE
++    commandOutputParser: org.apache.airavata.gfac.impl.job.UGEOutputParser
++    emailParser: org.apache.airavata.gfac.monitor.email.parser.UGEEmailParser
++    resourceEmailAddresses:
++      - ls4.tacc.utexas.edu # contain Lonestar
++
++  - jobManagerType: LSF
++    commandOutputParser: org.apache.airavata.gfac.impl.job.LSFOutputParser
++    emailParser: org.apache.airavata.gfac.monitor.email.parser.LSFEmailParser
++    resourceEmailAddresses:
++      - iu.xsede.edu # test resource mail address
++
++  - jobManagerType: FORK
++    commandOutputParser: org.apache.airavata.gfac.impl.job.ForkOutputParser

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/java/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/java/tasks/main.yml
index 0000000,0000000..92f2039
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/java/tasks/main.yml
@@@ -1,0 -1,0 +1,21 @@@
++---
++# Install Orcal Java
++- name: download oracle java 8 rpm
++  get_url: url="{{ java_rpm_url }}" dest="{{ java_dir_source }}" headers='Cookie:oraclelicense=accept-securebackup-cookie'
++  become: yes
++
++- name: Install oracle java 8
++  yum: name="{{ java_dir_source }}/{{ java_rpm_filename }}" state=present
++  become: yes
++
++- name: set Oracle Java {{ java_version_string }} as default
++  alternatives:
++    name="{{ item.exe }}"
++    link="/usr/bin/{{ item.exe }}"
++    path="{{ item.path }}/{{ item.exe }}"
++  with_items:
++    - { path: "{{ java_home }}/jre/bin", exe: 'java' }
++    - { path: "{{ java_home }}/jre/bin", exe: 'keytool' }
++    - { path: "{{ java_home }}/bin", exe: 'javac' }
++    - { path: "{{ java_home }}/bin", exe: 'javadoc' }
++  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/java/vars/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/java/vars/main.yml
index 0000000,0000000..a995684
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/java/vars/main.yml
@@@ -1,0 -1,0 +1,15 @@@
++---
++#Variables associated with this role
++# Oracle Java 8
++java_dir_source: "/usr/local/src"
++
++java_version: 8
++java_version_update: 91
++java_version_build: '14'
++java_version_string: "1.{{ java_version }}.0_{{ java_version_update }}"
++java_home: "/usr/java/jdk1.{{ java_version }}.0_{{ java_version_update }}"
++
++java_rpm_filename: "jdk-{{ java_version }}u{{ java_version_update }}-linux-x64.rpm"
++java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/{{ java_version }}u{{ java_version_update }}-b{{ java_version_build }}/{{ java_rpm_filename }}"
++
++...

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/pga/handlers/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/pga/handlers/main.yml
index 0000000,0000000..9c6c12f
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/pga/handlers/main.yml
@@@ -1,0 -1,0 +1,13 @@@
++---
++
++- name: composer update
++  composer: command=update working_dir="{{ doc_root_dir }}"
++  become: yes
++
++- name: start httpd
++  service: name=httpd state=started
++  become: yes
++
++- name: restart httpd
++  service: name=httpd state=restarted
++  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/pga/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/pga/tasks/main.yml
index 0000000,0000000..b267119
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/pga/tasks/main.yml
@@@ -1,0 -1,0 +1,112 @@@
++---
++- name: Create root directory
++  file: path="{{ doc_root_dir }}" state=directory
++  become: yes
++
++- name: Install pre-requireties
++  yum: name="{{ item }}" state=latest update_cache=yes
++  with_items:
++    - git
++    - httpd
++    - php
++    - php-soap
++    - libselinux-python
++    - php-pdo
++  become: yes
++
++# - name: Allow selinux outbound connection from web server
++  # command: setsebool -P httpd_can_network_connect 1
++
++- name: install composer
++  shell: curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
++  args:
++    creates: /usr/local/bin/composer
++  become: yes
++
++- name: install epel release
++  yum: name=epel-release state=present
++  become: yes
++
++# depend on epel release
++- name: install mcrypt
++  yum: name=php-mcrypt state=latest update_cache=yes
++  become: yes
++
++# - name: Check previous deployments
++#   stat: path="{{ doc_root_dir }}" get_md5=no get_checksum=no
++#   register: check
++
++- name: delete previous deployments
++  file: path="{{ doc_root_dir }}" state=absent
++
++
++- name: Git clone php gateway
++  git: repo=https://github.com/apache/airavata-php-gateway.git
++       dest="{{ doc_root_dir }}" version="{{ git_branch }}"
++  become: yes
++
++- name: Create user data dir {{ user_data_dir }}
++  file: path="{{ user_data_dir }}" state=directory owner="{{user}}" group="{{group}}" mode=0777 recurse=yes
++  become: yes
++
++  #Make sure selinux is dissabled in remote machine
++- name: Disable selinux
++  selinux: state=disabled
++  become: yes
++  register: selinux_disable
++
++# need to restart after disable selinux
++- name: restart machine
++  shell: sleep 2 && shutdown -r now "Ansible updates triggered"
++  async: 1
++  poll: 0
++  become: yes
++  ignore_errors: true
++  when: (selinux_disable|success) and (selinux_disable.changed == true)
++  register: restart
++
++- name: waiting for server to come back
++  local_action: wait_for host={{ inventory_hostname }} state=started delay=30 timeout=60
++  when: (restart|success) and (restart.changed == true)
++
++
++- name: Run composer update
++  composer: command=update working_dir="{{ doc_root_dir }}"
++  become: yes
++
++# step 6: Change pga configurations
++- name: Copy pga config file
++  template: src=pga_config.php.j2 dest="{{ doc_root_dir }}/app/config/pga_config.php"
++  become: yes
++
++# give write permission to storage directory
++- name: give read permissions to doc root
++  file: path="{{ doc_root_dir }}" state=directory mode=0755 recurse=yes
++  become: yes
++
++- name: give write permissions to storage dir
++  file: path="{{ doc_root_dir }}/app/storage" state=directory mode=0777 owner="{{user}}" group="{{group}}" recurse=yes
++  become: yes
++
++- name: Eanble https and http service on public zone
++  firewalld: service="{{ item }}" permanent=true state=enabled zone=public immediate=True
++  with_items:
++    - http
++    - https
++  become: yes
++
++# - name: Edit file
++#   lineinfile: dest="{{ httpd_conf_file }}" regexp="#\n\s*AllowOverride None" line="#\nAllowOverride All"
++#   notify:
++#     - restart httpd
++#   become: yes
++
++- name: copy httpd.conf file
++  template: src=httpd.conf.j2 dest="{{ httpd_conf_file_location }}/httpd.conf"
++  become: yes
++  notify:
++    - restart httpd
++
++- name: start httpd service
++  service: name=httpd state=started
++  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/pga/templates/httpd.conf.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/pga/templates/httpd.conf.j2
index 0000000,0000000..37c05e2
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/pga/templates/httpd.conf.j2
@@@ -1,0 -1,0 +1,353 @@@
++#
++# This is the main Apache HTTP server configuration file.  It contains the
++# configuration directives that give the server its instructions.
++# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
++# In particular, see
++# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
++# for a discussion of each configuration directive.
++#
++# Do NOT simply read the instructions in here without understanding
++# what they do.  They're here only as hints or reminders.  If you are unsure
++# consult the online docs. You have been warned.
++#
++# Configuration and logfile names: If the filenames you specify for many
++# of the server's control files begin with "/" (or "drive:/" for Win32), the
++# server will use that explicit path.  If the filenames do *not* begin
++# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
++# with ServerRoot set to '/www' will be interpreted by the
++# server as '/www/log/access_log', where as '/log/access_log' will be
++# interpreted as '/log/access_log'.
++
++#
++# ServerRoot: The top of the directory tree under which the server's
++# configuration, error, and log files are kept.
++#
++# Do not add a slash at the end of the directory path.  If you point
++# ServerRoot at a non-local disk, be sure to specify a local disk on the
++# Mutex directive, if file-based mutexes are used.  If you wish to share the
++# same ServerRoot for multiple httpd daemons, you will need to change at
++# least PidFile.
++#
++ServerRoot "/etc/httpd"
++
++#
++# Listen: Allows you to bind Apache to specific IP addresses and/or
++# ports, instead of the default. See also the <VirtualHost>
++# directive.
++#
++# Change this to Listen on specific IP addresses as shown below to
++# prevent Apache from glomming onto all bound IP addresses.
++#
++#Listen 12.34.56.78:80
++Listen 80
++
++#
++# Dynamic Shared Object (DSO) Support
++#
++# To be able to use the functionality of a module which was built as a DSO you
++# have to place corresponding `LoadModule' lines at this location so the
++# directives contained in it are actually available _before_ they are used.
++# Statically compiled modules (those listed by `httpd -l') do not need
++# to be loaded here.
++#
++# Example:
++# LoadModule foo_module modules/mod_foo.so
++#
++Include conf.modules.d/*.conf
++
++#
++# If you wish httpd to run as a different user or group, you must run
++# httpd as root initially and it will switch.
++#
++# User/Group: The name (or #number) of the user/group to run httpd as.
++# It is usually good practice to create a dedicated user and group for
++# running httpd, as with most system services.
++#
++User apache
++Group apache
++
++# 'Main' server configuration
++#
++# The directives in this section set up the values used by the 'main'
++# server, which responds to any requests that aren't handled by a
++# <VirtualHost> definition.  These values also provide defaults for
++# any <VirtualHost> containers you may define later in the file.
++#
++# All of these directives may appear inside <VirtualHost> containers,
++# in which case these default settings will be overridden for the
++# virtual host being defined.
++#
++
++#
++# ServerAdmin: Your address, where problems with the server should be
++# e-mailed.  This address appears on some server-generated pages, such
++# as error documents.  e.g. admin@your-domain.com
++#
++ServerAdmin root@localhost
++
++#
++# ServerName gives the name and port that the server uses to identify itself.
++# This can often be determined automatically, but we recommend you specify
++# it explicitly to prevent problems during startup.
++#
++# If your host doesn't have a registered DNS name, enter its IP address here.
++#
++#ServerName www.example.com:80
++
++#
++# Deny access to the entirety of your server's filesystem. You must
++# explicitly permit access to web content directories in other
++# <Directory> blocks below.
++#
++<Directory />
++    AllowOverride none
++    Require all denied
++</Directory>
++
++#
++# Note that from this point forward you must specifically allow
++# particular features to be enabled - so if something's not working as
++# you might expect, make sure that you have specifically enabled it
++# below.
++#
++
++#
++# DocumentRoot: The directory out of which you will serve your
++# documents. By default, all requests are taken from this directory, but
++# symbolic links and aliases may be used to point to other locations.
++#
++DocumentRoot "/var/www/html"
++
++#
++# Relax access to content within /var/www.
++#
++<Directory "/var/www">
++    AllowOverride None
++    # Allow open access:
++    Require all granted
++</Directory>
++
++# Further relax access to the default document root:
++<Directory "/var/www/html">
++    #
++    # Possible values for the Options directive are "None", "All",
++    # or any combination of:
++    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
++    #
++    # Note that "MultiViews" must be named *explicitly* --- "Options All"
++    # doesn't give it to you.
++    #
++    # The Options directive is both complicated and important.  Please see
++    # http://httpd.apache.org/docs/2.4/mod/core.html#options
++    # for more information.
++    #
++    Options Indexes FollowSymLinks
++
++    #
++    # AllowOverride controls what directives may be placed in .htaccess files.
++    # It can be "All", "None", or any combination of the keywords:
++    #   Options FileInfo AuthConfig Limit
++    #
++    AllowOverride All
++
++    #
++    # Controls who can get stuff from this server.
++    #
++    Require all granted
++</Directory>
++
++#
++# DirectoryIndex: sets the file that Apache will serve if a directory
++# is requested.
++#
++<IfModule dir_module>
++    DirectoryIndex index.html
++</IfModule>
++
++#
++# The following lines prevent .htaccess and .htpasswd files from being
++# viewed by Web clients.
++#
++<Files ".ht*">
++    Require all denied
++</Files>
++
++#
++# ErrorLog: The location of the error log file.
++# If you do not specify an ErrorLog directive within a <VirtualHost>
++# container, error messages relating to that virtual host will be
++# logged here.  If you *do* define an error logfile for a <VirtualHost>
++# container, that host's errors will be logged there and not here.
++#
++ErrorLog "logs/error_log"
++
++#
++# LogLevel: Control the number of messages logged to the error_log.
++# Possible values include: debug, info, notice, warn, error, crit,
++# alert, emerg.
++#
++LogLevel warn
++
++<IfModule log_config_module>
++    #
++    # The following directives define some format nicknames for use with
++    # a CustomLog directive (see below).
++    #
++    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
++    LogFormat "%h %l %u %t \"%r\" %>s %b" common
++
++    <IfModule logio_module>
++      # You need to enable mod_logio.c to use %I and %O
++      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
++    </IfModule>
++
++    #
++    # The location and format of the access logfile (Common Logfile Format).
++    # If you do not define any access logfiles within a <VirtualHost>
++    # container, they will be logged here.  Contrariwise, if you *do*
++    # define per-<VirtualHost> access logfiles, transactions will be
++    # logged therein and *not* in this file.
++    #
++    #CustomLog "logs/access_log" common
++
++    #
++    # If you prefer a logfile with access, agent, and referer information
++    # (Combined Logfile Format) you can use the following directive.
++    #
++    CustomLog "logs/access_log" combined
++</IfModule>
++
++<IfModule alias_module>
++    #
++    # Redirect: Allows you to tell clients about documents that used to
++    # exist in your server's namespace, but do not anymore. The client
++    # will make a new request for the document at its new location.
++    # Example:
++    # Redirect permanent /foo http://www.example.com/bar
++
++    #
++    # Alias: Maps web paths into filesystem paths and is used to
++    # access content that does not live under the DocumentRoot.
++    # Example:
++    # Alias /webpath /full/filesystem/path
++    #
++    # If you include a trailing / on /webpath then the server will
++    # require it to be present in the URL.  You will also likely
++    # need to provide a <Directory> section to allow access to
++    # the filesystem path.
++
++    #
++    # ScriptAlias: This controls which directories contain server scripts.
++    # ScriptAliases are essentially the same as Aliases, except that
++    # documents in the target directory are treated as applications and
++    # run by the server when requested rather than as documents sent to the
++    # client.  The same rules about trailing "/" apply to ScriptAlias
++    # directives as to Alias.
++    #
++    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
++
++</IfModule>
++
++#
++# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
++# CGI directory exists, if you have that configured.
++#
++<Directory "/var/www/cgi-bin">
++    AllowOverride None
++    Options None
++    Require all granted
++</Directory>
++
++<IfModule mime_module>
++    #
++    # TypesConfig points to the file containing the list of mappings from
++    # filename extension to MIME-type.
++    #
++    TypesConfig /etc/mime.types
++
++    #
++    # AddType allows you to add to or override the MIME configuration
++    # file specified in TypesConfig for specific file types.
++    #
++    #AddType application/x-gzip .tgz
++    #
++    # AddEncoding allows you to have certain browsers uncompress
++    # information on the fly. Note: Not all browsers support this.
++    #
++    #AddEncoding x-compress .Z
++    #AddEncoding x-gzip .gz .tgz
++    #
++    # If the AddEncoding directives above are commented-out, then you
++    # probably should define those extensions to indicate media types:
++    #
++    AddType application/x-compress .Z
++    AddType application/x-gzip .gz .tgz
++
++    #
++    # AddHandler allows you to map certain file extensions to "handlers":
++    # actions unrelated to filetype. These can be either built into the server
++    # or added with the Action directive (see below)
++    #
++    # To use CGI scripts outside of ScriptAliased directories:
++    # (You will also need to add "ExecCGI" to the "Options" directive.)
++    #
++    #AddHandler cgi-script .cgi
++
++    # For type maps (negotiated resources):
++    #AddHandler type-map var
++
++    #
++    # Filters allow you to process content before it is sent to the client.
++    #
++    # To parse .shtml files for server-side includes (SSI):
++    # (You will also need to add "Includes" to the "Options" directive.)
++    #
++    AddType text/html .shtml
++    AddOutputFilter INCLUDES .shtml
++</IfModule>
++
++#
++# Specify a default charset for all content served; this enables
++# interpretation of all content as UTF-8 by default.  To use the
++# default browser choice (ISO-8859-1), or to allow the META tags
++# in HTML content to override this choice, comment out this
++# directive:
++#
++AddDefaultCharset UTF-8
++
++<IfModule mime_magic_module>
++    #
++    # The mod_mime_magic module allows the server to use various hints from the
++    # contents of the file itself to determine its type.  The MIMEMagicFile
++    # directive tells the module where the hint definitions are located.
++    #
++    MIMEMagicFile conf/magic
++</IfModule>
++
++#
++# Customizable error responses come in three flavors:
++# 1) plain text 2) local redirects 3) external redirects
++#
++# Some examples:
++#ErrorDocument 500 "The server made a boo boo."
++#ErrorDocument 404 /missing.html
++#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
++#ErrorDocument 402 http://www.example.com/subscription_info.html
++#
++
++#
++# EnableMMAP and EnableSendfile: On systems that support it,
++# memory-mapping or the sendfile syscall may be used to deliver
++# files.  This usually improves server performance, but must
++# be turned off when serving from networked-mounted
++# filesystems or if support for these functions is otherwise
++# broken on your system.
++# Defaults if commented: EnableMMAP On, EnableSendfile Off
++#
++#EnableMMAP off
++EnableSendfile on
++
++# Supplemental configuration
++#
++# Load config files in the "/etc/httpd/conf.d" directory, if any.
++IncludeOptional conf.d/*.conf


[42/50] [abbrv] airavata git commit: fixing gateway intialization issue

Posted by la...@apache.org.
fixing gateway intialization issue


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 43b3757d6c1b759a47603189e0ac0ad97339fd8b
Parents: 83a0bf8
Author: scnakandala <su...@gmail.com>
Authored: Thu Sep 22 13:20:55 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Sep 22 13:20:55 2016 -0400

----------------------------------------------------------------------
 .../core/experiment/catalog/impl/ExperimentCatalogImpl.java      | 3 ---
 .../core/experiment/catalog/resources/GatewayResource.java       | 4 ----
 .../registry/api/service/util/ExperimentCatalogInitUtil.java     | 2 ++
 3 files changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/43b3757d/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
index 53bd52b..5264158 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
@@ -38,7 +38,6 @@ import org.apache.airavata.model.status.ProcessStatus;
 import org.apache.airavata.model.status.TaskStatus;
 import org.apache.airavata.model.task.TaskModel;
 import org.apache.airavata.model.workspace.Gateway;
-import org.apache.airavata.model.workspace.GatewayApprovalStatus;
 import org.apache.airavata.model.workspace.Notification;
 import org.apache.airavata.model.workspace.Project;
 import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
@@ -66,7 +65,6 @@ public class ExperimentCatalogImpl implements ExperimentCatalog {
             if (!ExpCatResourceUtils.isGatewayExist(ServerSettings.getDefaultUserGateway())){
                 gatewayResource = (GatewayResource) ExpCatResourceUtils.createGateway(ServerSettings.getDefaultUserGateway());
                 gatewayResource.setGatewayName(ServerSettings.getDefaultUserGateway());
-                gatewayResource.setGatewayApprovalStatus(GatewayApprovalStatus.APPROVED.toString());
                 gatewayResource.save();
             }else {
                 gatewayResource = (GatewayResource) ExpCatResourceUtils.getGateway(ServerSettings.getDefaultUserGateway());
@@ -92,7 +90,6 @@ public class ExperimentCatalogImpl implements ExperimentCatalog {
         if (!ExpCatResourceUtils.isGatewayExist(gateway)){
             gatewayResource = (GatewayResource) ExpCatResourceUtils.createGateway(gateway);
             gatewayResource.setGatewayName(gateway);
-            gatewayResource.setGatewayApprovalStatus(GatewayApprovalStatus.APPROVED.toString());
             gatewayResource.save();
         }else {
             gatewayResource = (GatewayResource) ExpCatResourceUtils.getGateway(gateway);

http://git-wip-us.apache.org/repos/asf/airavata/blob/43b3757d/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
index c745f4e..646594e 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
@@ -20,7 +20,6 @@
 */
 package org.apache.airavata.registry.core.experiment.catalog.resources;
 
-import org.apache.airavata.model.workspace.GatewayApprovalStatus;
 import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
 import org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource;
 import org.apache.airavata.registry.core.experiment.catalog.ResourceType;
@@ -462,9 +461,6 @@ public class GatewayResource extends AbstractExpCatResource {
             Gateway existingGateway = em.find(Gateway.class, gatewayId);
             em.close();
 
-            if(gatewayApprovalStatus == null || gatewayApprovalStatus.isEmpty())
-                gatewayApprovalStatus = GatewayApprovalStatus.APPROVED.toString();
-
             em = ExpCatResourceUtils.getEntityManager();
             em.getTransaction().begin();
             Gateway gateway = new Gateway();

http://git-wip-us.apache.org/repos/asf/airavata/blob/43b3757d/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/ExperimentCatalogInitUtil.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/ExperimentCatalogInitUtil.java b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/ExperimentCatalogInitUtil.java
index 1ae5448..6f9fdb4 100644
--- a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/ExperimentCatalogInitUtil.java
+++ b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/ExperimentCatalogInitUtil.java
@@ -23,6 +23,7 @@ package org.apache.airavata.registry.api.service.util;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.model.workspace.GatewayApprovalStatus;
 import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
 import org.apache.airavata.registry.core.experiment.catalog.ResourceType;
 import org.apache.airavata.registry.core.experiment.catalog.resources.GatewayResource;
@@ -87,6 +88,7 @@ public class ExperimentCatalogInitUtil {
                 GatewayResource gateway;
                 if (!ExpCatResourceUtils.isGatewayExist(ServerSettings.getDefaultUserGateway())){
                     gateway = (GatewayResource)ExpCatResourceUtils.createGateway(ServerSettings.getDefaultUserGateway());
+                    gateway.setGatewayApprovalStatus(GatewayApprovalStatus.APPROVED.toString());
                     gateway.save();
                 }else {
                     gateway = (GatewayResource)ExpCatResourceUtils.getGateway(ServerSettings.getDefaultUserGateway());


[39/50] [abbrv] airavata git commit: fixing sharing issue

Posted by la...@apache.org.
fixing sharing issue


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: c084683579ee27290db8a9b67051ea11726e2335
Parents: f3b8e02
Author: scnakandala <su...@gmail.com>
Authored: Wed Sep 21 22:07:20 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Wed Sep 21 22:07:20 2016 -0400

----------------------------------------------------------------------
 .../airavata/api/server/handler/AiravataServerHandler.java   | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/c0846835/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index 74c4eb3..5ccf874 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -499,12 +499,16 @@ public class AiravataServerHandler implements Airavata.Iface {
 
         try {
             String projectId = getRegistryServiceClient().createProject(gatewayId, project);
-            GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
             Resource projResource = new Resource(projectId, org.apache.airavata.grouper.resource.ResourceType.PROJECT);
             projResource.setOwnerId(project.getOwner() + "@" + project.getGatewayId());
             projResource.setName(project.getName());
             projResource.setDescription(project.getDescription());
-            groupManager.createResource(projResource);
+
+            if(ServerSettings.isEnableSharing()){
+                GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
+                groupManager.createResource(projResource);
+            }
+
             logger.debug("Airavata created project with project Id : " + projectId + " for gateway Id : " + gatewayId);
             return projectId;
         } catch (Exception e) {


[19/50] [abbrv] airavata git commit: Make pga ansible script works with aws centos

Posted by la...@apache.org.
Make pga ansible script works with aws centos


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: ff2e1ae1311852798ad2706a4de85f490e774ec0
Parents: 2b6f220
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Mon Aug 22 18:53:36 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Mon Aug 22 18:53:36 2016 -0400

----------------------------------------------------------------------
 hosts                             |   2 +-
 roles/pga/handlers/main.yml       |  13 ++
 roles/pga/tasks/main.yml          |  77 ++++---
 roles/pga/templates/httpd.conf.j2 | 353 +++++++++++++++++++++++++++++++++
 roles/pga/vars/main.yml           |   3 +-
 5 files changed, 419 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/ff2e1ae1/hosts
----------------------------------------------------------------------
diff --git a/hosts b/hosts
index 4ff2de0..9fd1d8e 100644
--- a/hosts
+++ b/hosts
@@ -20,4 +20,4 @@
 54.85.248.150
 
 [pga]
-54.236.200.110
+54.88.152.194

http://git-wip-us.apache.org/repos/asf/airavata/blob/ff2e1ae1/roles/pga/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/pga/handlers/main.yml b/roles/pga/handlers/main.yml
new file mode 100644
index 0000000..9c6c12f
--- /dev/null
+++ b/roles/pga/handlers/main.yml
@@ -0,0 +1,13 @@
+---
+
+- name: composer update
+  composer: command=update working_dir="{{ doc_root_dir }}"
+  become: yes
+
+- name: start httpd
+  service: name=httpd state=started
+  become: yes
+
+- name: restart httpd
+  service: name=httpd state=restarted
+  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/ff2e1ae1/roles/pga/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/pga/tasks/main.yml b/roles/pga/tasks/main.yml
index 05bca80..80beac2 100644
--- a/roles/pga/tasks/main.yml
+++ b/roles/pga/tasks/main.yml
@@ -10,16 +10,26 @@
     - httpd
     - php
     - php-soap
-    - php-mcrypt
     - libselinux-python
-    - composer
+    - php-pdo
   become: yes
 
 # - name: Allow selinux outbound connection from web server
   # command: setsebool -P httpd_can_network_connect 1
 
 - name: install composer
-  yum: name=composer state=latest update_cache=yes
+  shell: curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
+  args:
+    creates: /usr/local/bin/composer
+  become: yes
+
+- name: install epel release
+  yum: name=epel-release state=present
+  become: yes
+
+# depend on epel release
+- name: install mcrypt
+  yum: name=php-mcrypt state=latest update_cache=yes
   become: yes
 
 - name: Git clone php gateway
@@ -27,42 +37,42 @@
        dest="{{ doc_root_dir }}" version=master
   become: yes
 
+- name: Create user data dir {{ user_data_dir }}
+  file: path="{{ user_data_dir }}" state=directory
+  become: yes
+
   #Make sure selinux is dissabled in remote machine
 - name: Disable selinux
   selinux: state=disabled
   become: yes
 
-- name: Run composer update
-  composer: command=update working_dir="{{ doc_root_dir }}"
+# need to restart after disable selinux
+- name: restart machine
+  shell: sleep 2 && shutdown -r now "Ansible updates triggered"
+  async: 1
+  poll: 0
   become: yes
+  ignore_errors: true
 
-# - name: Run composer update
-#   command: composer update chdir="{{ doc_root_dir }}"
-#   become: yes
+- name: waiting for server to come back
+  local_action: wait_for host={{ inventory_hostname }} state=started delay=30 timeout=60
 
-- name: Create user data dir {{ user_data_dir }}
-  file: path="{{ user_data_dir }}" state=directory
+- name: Run composer update
+  composer: command=update working_dir="{{ doc_root_dir }}"
+  become: yes
 
 # step 6: Change pga configurations
 - name: Copy pga config file
   template: src=pga_config.php.j2 dest="{{ doc_root_dir }}/app/config/pga_config.php"
+  become: yes
 
+# give write permission to storage directory
+- name: give read permissions to doc root
+  file: path="{{ doc_root_dir }}" state=directory mode=0755 recurse=yes
+  become: yes
 
-# do we need to change permissions for root user?
-# - name: Change storage permissions  to g+rwx
-#   acl: name="{{ doc_root_dir }}/app/storage" entity="{{ pga_group }}" etype=group permissions="rwx" state=present
-
-# Ignored step 8,9 in doc by assuming selinux is dissabled in remote machine
-
-# TODO: stop iptables service, can't have both iptables and firewalld on same host
-# - name: Stop iptables, ip6tables services
-#   service: name="{{ item }}" state=stopped
-#   with_items:
-#     - iptables
-#     - ip6tables
-
-- name: Start firewalld service
-  service: name=firewalld state=started
+- name: give write permissions to storage dir
+  file: path="{{ doc_root_dir }}/app/storage" state=directory mode=0777 recurse=yes
   become: yes
 
 - name: Eanble https and http service on public zone
@@ -72,5 +82,18 @@
     - https
   become: yes
 
-- name: Edit file
-  lineinfile: dest="{{ httpd_conf_file }}" regexp=^AllowOverride line="AllowOverride All"
+# - name: Edit file
+#   lineinfile: dest="{{ httpd_conf_file }}" regexp="#\n\s*AllowOverride None" line="#\nAllowOverride All"
+#   notify:
+#     - restart httpd
+#   become: yes
+
+- name: copy httpd.conf file
+  template: src=httpd.conf.j2 dest="{{ httpd_conf_file_location }}/httpd.conf"
+  become: yes
+  notify:
+    - restart httpd
+
+- name: start httpd service
+  service: name=httpd state=started
+  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/ff2e1ae1/roles/pga/templates/httpd.conf.j2
----------------------------------------------------------------------
diff --git a/roles/pga/templates/httpd.conf.j2 b/roles/pga/templates/httpd.conf.j2
new file mode 100644
index 0000000..37c05e2
--- /dev/null
+++ b/roles/pga/templates/httpd.conf.j2
@@ -0,0 +1,353 @@
+#
+# This is the main Apache HTTP server configuration file.  It contains the
+# configuration directives that give the server its instructions.
+# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
+# In particular, see
+# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
+# for a discussion of each configuration directive.
+#
+# Do NOT simply read the instructions in here without understanding
+# what they do.  They're here only as hints or reminders.  If you are unsure
+# consult the online docs. You have been warned.
+#
+# Configuration and logfile names: If the filenames you specify for many
+# of the server's control files begin with "/" (or "drive:/" for Win32), the
+# server will use that explicit path.  If the filenames do *not* begin
+# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
+# with ServerRoot set to '/www' will be interpreted by the
+# server as '/www/log/access_log', where as '/log/access_log' will be
+# interpreted as '/log/access_log'.
+
+#
+# ServerRoot: The top of the directory tree under which the server's
+# configuration, error, and log files are kept.
+#
+# Do not add a slash at the end of the directory path.  If you point
+# ServerRoot at a non-local disk, be sure to specify a local disk on the
+# Mutex directive, if file-based mutexes are used.  If you wish to share the
+# same ServerRoot for multiple httpd daemons, you will need to change at
+# least PidFile.
+#
+ServerRoot "/etc/httpd"
+
+#
+# Listen: Allows you to bind Apache to specific IP addresses and/or
+# ports, instead of the default. See also the <VirtualHost>
+# directive.
+#
+# Change this to Listen on specific IP addresses as shown below to
+# prevent Apache from glomming onto all bound IP addresses.
+#
+#Listen 12.34.56.78:80
+Listen 80
+
+#
+# Dynamic Shared Object (DSO) Support
+#
+# To be able to use the functionality of a module which was built as a DSO you
+# have to place corresponding `LoadModule' lines at this location so the
+# directives contained in it are actually available _before_ they are used.
+# Statically compiled modules (those listed by `httpd -l') do not need
+# to be loaded here.
+#
+# Example:
+# LoadModule foo_module modules/mod_foo.so
+#
+Include conf.modules.d/*.conf
+
+#
+# If you wish httpd to run as a different user or group, you must run
+# httpd as root initially and it will switch.
+#
+# User/Group: The name (or #number) of the user/group to run httpd as.
+# It is usually good practice to create a dedicated user and group for
+# running httpd, as with most system services.
+#
+User apache
+Group apache
+
+# 'Main' server configuration
+#
+# The directives in this section set up the values used by the 'main'
+# server, which responds to any requests that aren't handled by a
+# <VirtualHost> definition.  These values also provide defaults for
+# any <VirtualHost> containers you may define later in the file.
+#
+# All of these directives may appear inside <VirtualHost> containers,
+# in which case these default settings will be overridden for the
+# virtual host being defined.
+#
+
+#
+# ServerAdmin: Your address, where problems with the server should be
+# e-mailed.  This address appears on some server-generated pages, such
+# as error documents.  e.g. admin@your-domain.com
+#
+ServerAdmin root@localhost
+
+#
+# ServerName gives the name and port that the server uses to identify itself.
+# This can often be determined automatically, but we recommend you specify
+# it explicitly to prevent problems during startup.
+#
+# If your host doesn't have a registered DNS name, enter its IP address here.
+#
+#ServerName www.example.com:80
+
+#
+# Deny access to the entirety of your server's filesystem. You must
+# explicitly permit access to web content directories in other
+# <Directory> blocks below.
+#
+<Directory />
+    AllowOverride none
+    Require all denied
+</Directory>
+
+#
+# Note that from this point forward you must specifically allow
+# particular features to be enabled - so if something's not working as
+# you might expect, make sure that you have specifically enabled it
+# below.
+#
+
+#
+# DocumentRoot: The directory out of which you will serve your
+# documents. By default, all requests are taken from this directory, but
+# symbolic links and aliases may be used to point to other locations.
+#
+DocumentRoot "/var/www/html"
+
+#
+# Relax access to content within /var/www.
+#
+<Directory "/var/www">
+    AllowOverride None
+    # Allow open access:
+    Require all granted
+</Directory>
+
+# Further relax access to the default document root:
+<Directory "/var/www/html">
+    #
+    # Possible values for the Options directive are "None", "All",
+    # or any combination of:
+    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
+    #
+    # Note that "MultiViews" must be named *explicitly* --- "Options All"
+    # doesn't give it to you.
+    #
+    # The Options directive is both complicated and important.  Please see
+    # http://httpd.apache.org/docs/2.4/mod/core.html#options
+    # for more information.
+    #
+    Options Indexes FollowSymLinks
+
+    #
+    # AllowOverride controls what directives may be placed in .htaccess files.
+    # It can be "All", "None", or any combination of the keywords:
+    #   Options FileInfo AuthConfig Limit
+    #
+    AllowOverride All
+
+    #
+    # Controls who can get stuff from this server.
+    #
+    Require all granted
+</Directory>
+
+#
+# DirectoryIndex: sets the file that Apache will serve if a directory
+# is requested.
+#
+<IfModule dir_module>
+    DirectoryIndex index.html
+</IfModule>
+
+#
+# The following lines prevent .htaccess and .htpasswd files from being
+# viewed by Web clients.
+#
+<Files ".ht*">
+    Require all denied
+</Files>
+
+#
+# ErrorLog: The location of the error log file.
+# If you do not specify an ErrorLog directive within a <VirtualHost>
+# container, error messages relating to that virtual host will be
+# logged here.  If you *do* define an error logfile for a <VirtualHost>
+# container, that host's errors will be logged there and not here.
+#
+ErrorLog "logs/error_log"
+
+#
+# LogLevel: Control the number of messages logged to the error_log.
+# Possible values include: debug, info, notice, warn, error, crit,
+# alert, emerg.
+#
+LogLevel warn
+
+<IfModule log_config_module>
+    #
+    # The following directives define some format nicknames for use with
+    # a CustomLog directive (see below).
+    #
+    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
+    LogFormat "%h %l %u %t \"%r\" %>s %b" common
+
+    <IfModule logio_module>
+      # You need to enable mod_logio.c to use %I and %O
+      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
+    </IfModule>
+
+    #
+    # The location and format of the access logfile (Common Logfile Format).
+    # If you do not define any access logfiles within a <VirtualHost>
+    # container, they will be logged here.  Contrariwise, if you *do*
+    # define per-<VirtualHost> access logfiles, transactions will be
+    # logged therein and *not* in this file.
+    #
+    #CustomLog "logs/access_log" common
+
+    #
+    # If you prefer a logfile with access, agent, and referer information
+    # (Combined Logfile Format) you can use the following directive.
+    #
+    CustomLog "logs/access_log" combined
+</IfModule>
+
+<IfModule alias_module>
+    #
+    # Redirect: Allows you to tell clients about documents that used to
+    # exist in your server's namespace, but do not anymore. The client
+    # will make a new request for the document at its new location.
+    # Example:
+    # Redirect permanent /foo http://www.example.com/bar
+
+    #
+    # Alias: Maps web paths into filesystem paths and is used to
+    # access content that does not live under the DocumentRoot.
+    # Example:
+    # Alias /webpath /full/filesystem/path
+    #
+    # If you include a trailing / on /webpath then the server will
+    # require it to be present in the URL.  You will also likely
+    # need to provide a <Directory> section to allow access to
+    # the filesystem path.
+
+    #
+    # ScriptAlias: This controls which directories contain server scripts.
+    # ScriptAliases are essentially the same as Aliases, except that
+    # documents in the target directory are treated as applications and
+    # run by the server when requested rather than as documents sent to the
+    # client.  The same rules about trailing "/" apply to ScriptAlias
+    # directives as to Alias.
+    #
+    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
+
+</IfModule>
+
+#
+# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
+# CGI directory exists, if you have that configured.
+#
+<Directory "/var/www/cgi-bin">
+    AllowOverride None
+    Options None
+    Require all granted
+</Directory>
+
+<IfModule mime_module>
+    #
+    # TypesConfig points to the file containing the list of mappings from
+    # filename extension to MIME-type.
+    #
+    TypesConfig /etc/mime.types
+
+    #
+    # AddType allows you to add to or override the MIME configuration
+    # file specified in TypesConfig for specific file types.
+    #
+    #AddType application/x-gzip .tgz
+    #
+    # AddEncoding allows you to have certain browsers uncompress
+    # information on the fly. Note: Not all browsers support this.
+    #
+    #AddEncoding x-compress .Z
+    #AddEncoding x-gzip .gz .tgz
+    #
+    # If the AddEncoding directives above are commented-out, then you
+    # probably should define those extensions to indicate media types:
+    #
+    AddType application/x-compress .Z
+    AddType application/x-gzip .gz .tgz
+
+    #
+    # AddHandler allows you to map certain file extensions to "handlers":
+    # actions unrelated to filetype. These can be either built into the server
+    # or added with the Action directive (see below)
+    #
+    # To use CGI scripts outside of ScriptAliased directories:
+    # (You will also need to add "ExecCGI" to the "Options" directive.)
+    #
+    #AddHandler cgi-script .cgi
+
+    # For type maps (negotiated resources):
+    #AddHandler type-map var
+
+    #
+    # Filters allow you to process content before it is sent to the client.
+    #
+    # To parse .shtml files for server-side includes (SSI):
+    # (You will also need to add "Includes" to the "Options" directive.)
+    #
+    AddType text/html .shtml
+    AddOutputFilter INCLUDES .shtml
+</IfModule>
+
+#
+# Specify a default charset for all content served; this enables
+# interpretation of all content as UTF-8 by default.  To use the
+# default browser choice (ISO-8859-1), or to allow the META tags
+# in HTML content to override this choice, comment out this
+# directive:
+#
+AddDefaultCharset UTF-8
+
+<IfModule mime_magic_module>
+    #
+    # The mod_mime_magic module allows the server to use various hints from the
+    # contents of the file itself to determine its type.  The MIMEMagicFile
+    # directive tells the module where the hint definitions are located.
+    #
+    MIMEMagicFile conf/magic
+</IfModule>
+
+#
+# Customizable error responses come in three flavors:
+# 1) plain text 2) local redirects 3) external redirects
+#
+# Some examples:
+#ErrorDocument 500 "The server made a boo boo."
+#ErrorDocument 404 /missing.html
+#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
+#ErrorDocument 402 http://www.example.com/subscription_info.html
+#
+
+#
+# EnableMMAP and EnableSendfile: On systems that support it,
+# memory-mapping or the sendfile syscall may be used to deliver
+# files.  This usually improves server performance, but must
+# be turned off when serving from networked-mounted
+# filesystems or if support for these functions is otherwise
+# broken on your system.
+# Defaults if commented: EnableMMAP On, EnableSendfile Off
+#
+#EnableMMAP off
+EnableSendfile on
+
+# Supplemental configuration
+#
+# Load config files in the "/etc/httpd/conf.d" directory, if any.
+IncludeOptional conf.d/*.conf

http://git-wip-us.apache.org/repos/asf/airavata/blob/ff2e1ae1/roles/pga/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/pga/vars/main.yml b/roles/pga/vars/main.yml
index 1ece511..4c1b822 100644
--- a/roles/pga/vars/main.yml
+++ b/roles/pga/vars/main.yml
@@ -3,7 +3,8 @@ pga_user: "pga"
 pga_group: "pga"
 doc_root_dir: "/var/www/html/php-gateway"
 user_data_dir: "/var/www/user_data"
-httpd_conf_file: "/etc/httpd/conf/httpd.conf"
+#httpd_conf_file: "/etc/httpd/conf/httpd.conf"
+httpd_conf_file_location: "/etc/httpd/conf"
 
 ## WSO2 IS related variables
 tenant_domain: "master2.airavata"


[09/50] [abbrv] airavata git commit: Rename setup to evn_setup

Posted by la...@apache.org.
Rename setup to evn_setup


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 22a68ccb3456972e2137d4c2c94bc7b1e736533e
Parents: cf8be0d
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Mon Aug 1 14:32:07 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Mon Aug 1 14:32:07 2016 -0400

----------------------------------------------------------------------
 README.md                        |  2 +-
 roles/env_setup/tasks/main.yml   | 44 +++++++++++++++++++++++++++++++++++
 roles/env_setup/tasks/redhat.yml | 12 ++++++++++
 roles/env_setup/vars/main.yml    | 15 ++++++++++++
 roles/setup/tasks/main.yml       | 44 -----------------------------------
 roles/setup/tasks/redhat.yml     | 12 ----------
 roles/setup/vars/main.yml        | 15 ------------
 site.yml                         |  8 +++----
 8 files changed, 76 insertions(+), 76 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/22a68ccb/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 072a50f..f497fb5 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ Ansible script to deploy Apache Airavata
 
 ## Roles
 
-- **setup** :- Create user and group, install oracle java 8
+- **env_setup** :- Create user and group, install oracle java 8
 - **zookeeper** :- Download and install zookeeper.
 - **rabbitmq** :- Download and install rabbitmq as service.
 - **common** :- Checkout Airavata source from git and run maven build. Move keystore files.

http://git-wip-us.apache.org/repos/asf/airavata/blob/22a68ccb/roles/env_setup/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/env_setup/tasks/main.yml b/roles/env_setup/tasks/main.yml
new file mode 100644
index 0000000..a20b018
--- /dev/null
+++ b/roles/env_setup/tasks/main.yml
@@ -0,0 +1,44 @@
+---
+#Tasks file can include smaller files if wanted
+#All commons tasks goes here
+- name: Create a new user group "{{ group }}"
+  group: name={{ group }}
+  tags: user
+
+- name: Create a new user "{{ user }}"
+  user: name={{ user }} group={{ group }}
+  tags: user
+
+################################################################################
+- name: Install git latest version
+  yum: name=git state=latest update_cache=yes
+  tags: env
+
+- name: Install maven latest version
+  yum: name=maven state=latest update_cache=yes
+  tags: env
+
+################################################################################
+# Install Orcal Java
+- name: download oracle java 8 rpm
+  get_url: url="{{ java_rpm_url }}" dest="{{ java_dir_source }}" headers='Cookie:oraclelicense=accept-securebackup-cookie'
+  tags: env
+
+- name: Install oracle java 8
+  yum: name="{{ java_dir_source }}/{{ java_rpm_filename }}" state=present
+  tags: env
+
+- name: set Java version as default
+  alternatives:
+    name="{{ item.exe }}"
+    link="/usr/bin/{{ item.exe }}"
+    path="{{ item.path }}/{{ item.exe }}"
+  with_items:
+    - { path: "{{ java_home }}/jre/bin", exe: 'java' }
+    - { path: "{{ java_home }}/jre/bin", exe: 'keytool' }
+    - { path: "{{ java_home }}/bin", exe: 'javac' }
+    - { path: "{{ java_home }}/bin", exe: 'javadoc' }
+  tags: env
+
+# End
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/22a68ccb/roles/env_setup/tasks/redhat.yml
----------------------------------------------------------------------
diff --git a/roles/env_setup/tasks/redhat.yml b/roles/env_setup/tasks/redhat.yml
new file mode 100644
index 0000000..a0e56c7
--- /dev/null
+++ b/roles/env_setup/tasks/redhat.yml
@@ -0,0 +1,12 @@
+---
+- name: Install git latest version
+  yum: name=git state=latest update_cache=yes
+#  become: true
+#  become_user: airavata
+  tags: env_setup
+
+- name: Install maven latest version
+  yum: name=maven state=latest update_cache=yes
+  tags: env_setup
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/22a68ccb/roles/env_setup/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/env_setup/vars/main.yml b/roles/env_setup/vars/main.yml
new file mode 100644
index 0000000..a995684
--- /dev/null
+++ b/roles/env_setup/vars/main.yml
@@ -0,0 +1,15 @@
+---
+#Variables associated with this role
+# Oracle Java 8
+java_dir_source: "/usr/local/src"
+
+java_version: 8
+java_version_update: 91
+java_version_build: '14'
+java_version_string: "1.{{ java_version }}.0_{{ java_version_update }}"
+java_home: "/usr/java/jdk1.{{ java_version }}.0_{{ java_version_update }}"
+
+java_rpm_filename: "jdk-{{ java_version }}u{{ java_version_update }}-linux-x64.rpm"
+java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/{{ java_version }}u{{ java_version_update }}-b{{ java_version_build }}/{{ java_rpm_filename }}"
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/22a68ccb/roles/setup/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/setup/tasks/main.yml b/roles/setup/tasks/main.yml
deleted file mode 100644
index a20b018..0000000
--- a/roles/setup/tasks/main.yml
+++ /dev/null
@@ -1,44 +0,0 @@
----
-#Tasks file can include smaller files if wanted
-#All commons tasks goes here
-- name: Create a new user group "{{ group }}"
-  group: name={{ group }}
-  tags: user
-
-- name: Create a new user "{{ user }}"
-  user: name={{ user }} group={{ group }}
-  tags: user
-
-################################################################################
-- name: Install git latest version
-  yum: name=git state=latest update_cache=yes
-  tags: env
-
-- name: Install maven latest version
-  yum: name=maven state=latest update_cache=yes
-  tags: env
-
-################################################################################
-# Install Orcal Java
-- name: download oracle java 8 rpm
-  get_url: url="{{ java_rpm_url }}" dest="{{ java_dir_source }}" headers='Cookie:oraclelicense=accept-securebackup-cookie'
-  tags: env
-
-- name: Install oracle java 8
-  yum: name="{{ java_dir_source }}/{{ java_rpm_filename }}" state=present
-  tags: env
-
-- name: set Java version as default
-  alternatives:
-    name="{{ item.exe }}"
-    link="/usr/bin/{{ item.exe }}"
-    path="{{ item.path }}/{{ item.exe }}"
-  with_items:
-    - { path: "{{ java_home }}/jre/bin", exe: 'java' }
-    - { path: "{{ java_home }}/jre/bin", exe: 'keytool' }
-    - { path: "{{ java_home }}/bin", exe: 'javac' }
-    - { path: "{{ java_home }}/bin", exe: 'javadoc' }
-  tags: env
-
-# End
-...

http://git-wip-us.apache.org/repos/asf/airavata/blob/22a68ccb/roles/setup/tasks/redhat.yml
----------------------------------------------------------------------
diff --git a/roles/setup/tasks/redhat.yml b/roles/setup/tasks/redhat.yml
deleted file mode 100644
index a0e56c7..0000000
--- a/roles/setup/tasks/redhat.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-- name: Install git latest version
-  yum: name=git state=latest update_cache=yes
-#  become: true
-#  become_user: airavata
-  tags: env_setup
-
-- name: Install maven latest version
-  yum: name=maven state=latest update_cache=yes
-  tags: env_setup
-
-...

http://git-wip-us.apache.org/repos/asf/airavata/blob/22a68ccb/roles/setup/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/setup/vars/main.yml b/roles/setup/vars/main.yml
deleted file mode 100644
index a995684..0000000
--- a/roles/setup/vars/main.yml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-#Variables associated with this role
-# Oracle Java 8
-java_dir_source: "/usr/local/src"
-
-java_version: 8
-java_version_update: 91
-java_version_build: '14'
-java_version_string: "1.{{ java_version }}.0_{{ java_version_update }}"
-java_home: "/usr/java/jdk1.{{ java_version }}.0_{{ java_version_update }}"
-
-java_rpm_filename: "jdk-{{ java_version }}u{{ java_version_update }}-linux-x64.rpm"
-java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/{{ java_version }}u{{ java_version_update }}-b{{ java_version_build }}/{{ java_rpm_filename }}"
-
-...

http://git-wip-us.apache.org/repos/asf/airavata/blob/22a68ccb/site.yml
----------------------------------------------------------------------
diff --git a/site.yml b/site.yml
index 728d3f0..d86dac0 100644
--- a/site.yml
+++ b/site.yml
@@ -3,26 +3,26 @@
 - hosts: zookeeper
   tags: zookeeper
   roles:
-    - setup
+    - env_setup
     - zookeeper
 
 - hosts: rabbitmq
   tags: rabbitmq
   roles:
-    - setup
+    - env_setup
     - rabbitmq
 
 - hosts: gfac
   tags: gfac
   roles:
-    - setup
+    - env_setup
     - common
     - gfac
 
 - hosts: api-orch
   tags: api-orch
   roles:
-    - setup
+    - env_setup
     - common
     - api-orch
 


[24/50] [abbrv] airavata git commit: Added mesos master and slave yum install ansible

Posted by la...@apache.org.
Added mesos master and slave yum install ansible


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 03db1dfe3dfaf2aca18547b58cdaa82d3f3acf6c
Parents: 8868abc
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Sat Sep 10 19:15:35 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Sat Sep 10 19:15:35 2016 -0400

----------------------------------------------------------------------
 .gitignore                                     |   3 +-
 group_vars/all.yml                             |  31 ++++++
 hosts                                          |   9 +-
 roles/ec2/tasks/main.yml                       |  30 +++++
 roles/ec2/vars/aws-credential.yml              |   3 +
 roles/ec2/vars/main.yml                        |   8 ++
 roles/group_vars/all.yml                       |  13 ---
 roles/mesos-master/tasks/backup_main.yml       | 117 ++++++++++++++++++++
 roles/mesos-master/tasks/main.yml              | 101 +++++++++++++++++
 roles/mesos-master/templates/myid.j2           |   1 +
 roles/mesos-master/templates/quorum.j2         |   1 +
 roles/mesos-master/templates/zk.j2             |   1 +
 roles/mesos-master/templates/zoo.cfg.j2        |  32 ++++++
 roles/mesos-slave/tasks/main.yml               |  66 +++++++++++
 roles/mesos-slave/templates/zk.j2              |   1 +
 roles/mesos/tasks/RedHat.yml                   |  18 ---
 roles/mesos/tasks/main.yml                     |  84 --------------
 roles/test/tasks/main.yml                      |   2 +
 roles/zookeeper/handlers/main.yml              |  12 --
 roles/zookeeper/tasks/main.yml                 |  34 ------
 roles/zookeeper/templates/zoo.cfg.j2           |  28 -----
 roles/zookeeper/templates/zookeeper.service.j2 |  15 ---
 roles/zookeeper/vars/main.yml                  |  17 ---
 site.yml                                       |  10 +-
 24 files changed, 409 insertions(+), 228 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index c996e50..e1f821f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-*.key
+jetcloud.*
+shameera-*

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/group_vars/all.yml
----------------------------------------------------------------------
diff --git a/group_vars/all.yml b/group_vars/all.yml
new file mode 100644
index 0000000..b0a6cf2
--- /dev/null
+++ b/group_vars/all.yml
@@ -0,0 +1,31 @@
+---
+ansible_connection: ssh
+#ansible_ssh_user: root
+ansible_ssh_user: centos
+#ansible_ssh_private_key_file: /Users/syodage/Projects/mesos-deployment/jetcloud.key
+ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-aws.pem.txt
+
+user: centos
+group: centos
+user_home: "/home/{{user}}"
+
+# Mesos related properties
+#mesos_version: "1.0.1"
+# mesos_version: "0.28.2"
+# mesos_name: "mesos"
+# mesos_url: "http://www.apache.org/dist/mesos/{{mesos_version}}/{{mesos_name}}-{{mesos_version}}.tar.gz"
+# mesos_deploy_dir: "{{user_home}}/{{mesos_name}}-{{mesos_version}}"
+# mesos_build_dir: "{{mesos_deploy_dir}}/build"
+
+
+#Zookeeper related properties
+zk_client_port: 2181
+# zookeeper_servers:
+#   - { index: 1, ip: "", ports: "2888:3888"}
+#   - { index: 2, ip: "", ports: "2888:3888"}
+#   - { index: 3, ip: "", ports: "2888:3888"}
+zk_1: "{{ groups['mesos-master'][0] }}"
+zk_2: "{{ groups['mesos-master'][1] }}"
+zk_3: "{{ groups['mesos-master'][2] }}"
+
+zk_quorum: 2

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/hosts
----------------------------------------------------------------------
diff --git a/hosts b/hosts
index 949fb79..7ceb1f7 100644
--- a/hosts
+++ b/hosts
@@ -1,8 +1,9 @@
 ---
-[localhost]
-127.0.0.1
+# inventory fie: production
+#[localhost]
+#127.0.0.1
 
 [mesos-master]
+52.91.222.138
 
-
-[mesos-agent]
+#[mesos-agent]

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/ec2/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/ec2/tasks/main.yml b/roles/ec2/tasks/main.yml
new file mode 100644
index 0000000..7a6eb3d
--- /dev/null
+++ b/roles/ec2/tasks/main.yml
@@ -0,0 +1,30 @@
+---
+- name: include credentials
+  include_vars: vars/aws-credential.yml
+
+- name: create a aws instace/s
+  ec2:
+    key_name: "{{ key_name }}"
+    region: us-east-1
+    instance_type: t2.small
+    image: "{{centos_ami_7_2}}"
+    group: "{{ security_group }}"
+    instance_tags:
+      Name: "{{ item }}"
+    assign_public_ip: yes
+    state: present
+    count: 1
+    vpc_subnet_id: subnet-54f8f70c
+    volumes:
+      - device_name: /dev/sda1
+        volume_type: io1
+        iops: 200
+        volume_size: 50
+        delete_on_termination: true
+    wait: yes
+  with_items:
+    - Mesos-master-1
+    - Mesos-master-2
+    - Mesos-master-3
+    - Mesos-slave-1
+  register: ec2

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/ec2/vars/aws-credential.yml
----------------------------------------------------------------------
diff --git a/roles/ec2/vars/aws-credential.yml b/roles/ec2/vars/aws-credential.yml
new file mode 100644
index 0000000..687cfbb
--- /dev/null
+++ b/roles/ec2/vars/aws-credential.yml
@@ -0,0 +1,3 @@
+---
+aws_access_key: AKIAIKBSNQUKEZN2VLYA
+aws_secret_key: 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

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/ec2/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/ec2/vars/main.yml b/roles/ec2/vars/main.yml
new file mode 100644
index 0000000..1f7d77a
--- /dev/null
+++ b/roles/ec2/vars/main.yml
@@ -0,0 +1,8 @@
+---
+
+key_name: shameera
+ec2_name: Mesos28
+centos_ami_7_2: ami-6d1c2007
+ubutntu_ami_16_04: ami-29f96d3e
+
+security_group: Mesos-sec

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/group_vars/all.yml
----------------------------------------------------------------------
diff --git a/roles/group_vars/all.yml b/roles/group_vars/all.yml
deleted file mode 100644
index c041787..0000000
--- a/roles/group_vars/all.yml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-
-user: centos
-group: centos
-user_home: "home/{{user}}"
-
-# Mesos related properties
-mesos_dir: "{{user_home}}/mesos"
-mesos_build_dir: "{{mesos_dir}}/build"
-
-
-#Zookeeper related properties
-zookeeper_client_port: 2181

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/mesos-master/tasks/backup_main.yml
----------------------------------------------------------------------
diff --git a/roles/mesos-master/tasks/backup_main.yml b/roles/mesos-master/tasks/backup_main.yml
new file mode 100644
index 0000000..1d0abd1
--- /dev/null
+++ b/roles/mesos-master/tasks/backup_main.yml
@@ -0,0 +1,117 @@
+---
+
+- name: wait untill instance is up and running
+  local_action: wait_for port=22
+                host="{{ ansible_ssh_host | default(inventory_hostname) }}"
+                search_regex=OpenSSH delay=10
+- name: create group
+  group: name="{{group}}"
+  become: yes
+
+- name: create user
+  user: name="{{user}}"
+  become: yes
+
+# RedHat related things
+- name: install required packages
+  yum: name="{{item}}" state=latest
+  with_items:
+    - wget
+    - tar
+    - git
+    - epel-release
+    - firewalld
+  become: yes
+
+- name: updage systemd
+  yum: name=systemd state=latest
+  become: yes
+
+- name: get apache maven
+  get_url:
+    url: http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo
+    dest: /etc/yum.repos.d/epel-apache-maven.repo
+  become: yes
+
+- name: copy svn repo file
+  copy:
+    src: wandisco-svn.repo
+    dest: /etc/yum.repos.d/wandisco-svn.repo
+  become: yes
+
+- name: install development tools
+  yum: name="@Development tools" state=present
+  become: yes
+
+#Install other Mesos dependencies.
+- name: install mesos dependencies
+  yum: name="{{item}}" state=latest
+  with_items:
+    - apache-maven
+    - python-devel
+    - java-1.8.0-openjdk-devel
+    - zlib-devel
+    - libcurl-devel
+    - openssl-devel
+    - cyrus-sasl-devel
+    - cyrus-sasl-md5
+    - apr-devel
+    - apr-util-devel
+    - subversion-devel
+  become: yes
+
+- name: start firewall service
+  service: name=firewalld state=started enabled=yes
+  become: yes
+
+- name: download and unarchive mesos latest
+  unarchive:
+      src="{{mesos_url}}"
+      dest="{{user_home}}"
+      remote_src=yes
+      copy=no
+      creates="{{mesos_deploy_dir}}/configure"
+      owner="{{user}}"
+      group="{{group}}"
+
+  # Bootstrap (Only required if building from git repository).
+  # $ ./bootstrap
+
+- name: make build dir
+  file: path="{{mesos_build_dir}}" state=directory owner={{user}} group={{group}}
+
+# - name: create simlink to configure script
+#   file: src="{{mesos_deploy_dir}}/configure"
+#         dest="{{mesos_build_dir}}/configure"
+#         state=link
+#         owner={{user}}
+#         group={{group}}
+#   tags: test
+
+- name: configure and build mesos
+  command: ../configure  chdir="{{mesos_build_dir}}"
+  register: build
+
+- name: run make
+  command: make chdir="{{mesos_build_dir}}"
+  when: build|success
+  register: make
+
+# - name: run make tests
+#   command: make check chdir="{{mesos_build_dir}}"
+#   when: make|success
+
+- name: open firewall port
+  firewalld: port=5050/tcp zone=public permanent=true state=enabled immediate=yes
+  become: yes
+
+- name: create working dir
+  file: path="{{mesos_work_dir}}" state=directory user={{user}} group={{group}}
+
+- name: start mesos master
+  command: ./bin/mesos-master.sh --ip={{inventory_hostname}} --work_dir={{mesos_work_dir}} &
+      chdir={{mesos_build_dir}}
+
+- name: start mesos agent
+  command: /bin/mesos-agent.sh --master={{inventory_hostname}}:5050 --work_dir={{mesos_work_dir}} &
+      chdir={{mesos_build_dir}}

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/mesos-master/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/mesos-master/tasks/main.yml b/roles/mesos-master/tasks/main.yml
new file mode 100644
index 0000000..e132915
--- /dev/null
+++ b/roles/mesos-master/tasks/main.yml
@@ -0,0 +1,101 @@
+---
+# reference: https://open.mesosphere.com/getting-started/install/
+- name: install firewalld
+  yum:
+    name: firewalld
+    state: latest
+  become: yes
+
+- name: start firewalld
+  service:
+    name: firewalld
+    state: started
+    enabled: yes
+  become: yes
+
+- name: open ports
+  firewalld:
+    port: "{{ item }}"
+    zone: public
+    permanent: true
+    state: enabled
+    immediate: yes
+  with_items:
+    - "{{ zk_client_port }}/tcp"
+    - "2888/tcp"
+    - "3888/tcp"
+    - "5050/tcp"
+    # - "marathon/tcp"
+  become: yes
+
+# Setup repository
+- name: add mesosphere rpm
+  yum:
+    name: http://repos.mesosphere.com/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm
+    state: present
+  become: yes
+
+- name: install mesos , marathon and mesosphere-zookeeper
+  yum:
+    name: "{{ item }}"
+    state: latest
+  with_items:
+    - mesos
+    - marathon
+    - mesosphere-zookeeper
+  become: yes
+
+# configurations
+#setting ID
+- name: copy myid file
+  template:
+    src: myid.j2
+    dest: /var/lib/zookeeper/myid
+    force: yes
+  become: yes
+
+- name: append zookeeper ring ips
+  template:
+    src: zoo.cfg.j2
+    dest: /etc/zookeeper/conf/zoo.cfg
+    force: yes
+  become: yes
+
+- name: start Zookeeper
+  service:
+    name: zookeeper
+    state: started
+  become: yes
+
+- name: set zk file for mesos master and marathon
+  template:
+    src: zk.j2
+    dest: /etc/mesos/zk
+    force: yes
+  become: yes
+
+- name: set zookeeper quorum
+  template:
+    src: quorum.j2
+    dest: /etc/mesos-master/quorum
+    force: yes
+  become: yes
+
+- name: stop and disable mesos slave
+  service:
+    name: mesos-slave
+    enabled: no
+    state: stopped
+  become: yes
+
+- name: restart mesos master
+  service:
+    name: mesos-master
+    state: restarted
+  become: yes
+
+- name: restart marathon
+  service:
+    name: marathon
+    state: restarted
+  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/mesos-master/templates/myid.j2
----------------------------------------------------------------------
diff --git a/roles/mesos-master/templates/myid.j2 b/roles/mesos-master/templates/myid.j2
new file mode 100644
index 0000000..78a0bd7
--- /dev/null
+++ b/roles/mesos-master/templates/myid.j2
@@ -0,0 +1 @@
+{{ my_id }}

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/mesos-master/templates/quorum.j2
----------------------------------------------------------------------
diff --git a/roles/mesos-master/templates/quorum.j2 b/roles/mesos-master/templates/quorum.j2
new file mode 100644
index 0000000..c1d54ef
--- /dev/null
+++ b/roles/mesos-master/templates/quorum.j2
@@ -0,0 +1 @@
+{{zk_quorum}}

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/mesos-master/templates/zk.j2
----------------------------------------------------------------------
diff --git a/roles/mesos-master/templates/zk.j2 b/roles/mesos-master/templates/zk.j2
new file mode 100644
index 0000000..9c7747b
--- /dev/null
+++ b/roles/mesos-master/templates/zk.j2
@@ -0,0 +1 @@
+zk://{{zk_1}}:{{zk_client_port}},{{zk_2}}:{{zk_client_port}},{{zk_3}}:{{zk_client_port}}/mesos

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/mesos-master/templates/zoo.cfg.j2
----------------------------------------------------------------------
diff --git a/roles/mesos-master/templates/zoo.cfg.j2 b/roles/mesos-master/templates/zoo.cfg.j2
new file mode 100644
index 0000000..922d0b2
--- /dev/null
+++ b/roles/mesos-master/templates/zoo.cfg.j2
@@ -0,0 +1,32 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+maxClientCnxns=50
+# The number of milliseconds of each tick
+tickTime=2000
+# The number of ticks that the initial
+# synchronization phase can take
+initLimit=10
+# The number of ticks that can pass between
+# sending a request and getting an acknowledgement
+syncLimit=5
+# the directory where the snapshot is stored.
+dataDir=/var/lib/zookeeper
+# the port at which the clients will connect
+clientPort={{ zk_client_port }}
+
+server.1={{zk_1}}:2888:3888
+server.2={{zk_2}}:2888:3888
+server.3={{zk_3}}:2888:3888

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/mesos-slave/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/mesos-slave/tasks/main.yml b/roles/mesos-slave/tasks/main.yml
new file mode 100644
index 0000000..f6890fe
--- /dev/null
+++ b/roles/mesos-slave/tasks/main.yml
@@ -0,0 +1,66 @@
+---
+- name: install firewalld
+  yum:
+    name: firewalld
+    state: latest
+    update_cache: yes
+  become: yes
+
+- name: start firewalld
+  service:
+    name: firewalld
+    state: started
+    enabled: yes
+  become: yes
+
+- name: open ports
+  firewalld:
+    port: "{{ item }}"
+    zone: public
+    permanent: true
+    state: enabled
+    immediate: yes
+  with_items:
+    - "5051/tcp"
+  become: yes
+
+# setup mesos slave
+- name: add mesosphere rpm
+  yum:
+    name: http://repos.mesosphere.com/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm
+    state: present
+  become: yes
+
+- name: install mesos
+  yum:
+    name: mesos
+    state: latest
+  become: yes
+
+# zookeeper will be pulled in and isntall as a depencency automatically
+# - name: disable zookeeper
+#   service:
+#     name: mesosphere-zookeeper
+#     state: stopped
+#     enabled: no
+#   become: yes
+
+- name: set zk file for mesos master and marathon
+  template:
+    src: zk.j2
+    dest: /etc/mesos/zk
+    force: yes
+  become: yes
+
+- name: disable mesos-master
+  service:
+    name: mesos-master
+    state: stopped
+    enabled: no
+  become: yes
+
+- name: restart mesos slave
+  service:
+    name: mesos-slave
+    state: restarted
+  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/mesos-slave/templates/zk.j2
----------------------------------------------------------------------
diff --git a/roles/mesos-slave/templates/zk.j2 b/roles/mesos-slave/templates/zk.j2
new file mode 100644
index 0000000..9c7747b
--- /dev/null
+++ b/roles/mesos-slave/templates/zk.j2
@@ -0,0 +1 @@
+zk://{{zk_1}}:{{zk_client_port}},{{zk_2}}:{{zk_client_port}},{{zk_3}}:{{zk_client_port}}/mesos

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/mesos/tasks/RedHat.yml
----------------------------------------------------------------------
diff --git a/roles/mesos/tasks/RedHat.yml b/roles/mesos/tasks/RedHat.yml
deleted file mode 100644
index 4c7ace9..0000000
--- a/roles/mesos/tasks/RedHat.yml
+++ /dev/null
@@ -1,18 +0,0 @@
----
-- name: create group
-  group: name="{{group}}"
-  become: yes
-
-- name: create user
-  user: name="{{user}}"
-  become: yes
-
-- name: install required packages
-  yum: name="{{item}}" state=latest
-  with_item:
-    - wget
-    - tar
-    - git
-    - epel-release
-    - subversion
-    - firewalld

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/mesos/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/mesos/tasks/main.yml b/roles/mesos/tasks/main.yml
deleted file mode 100644
index f0fa90c..0000000
--- a/roles/mesos/tasks/main.yml
+++ /dev/null
@@ -1,84 +0,0 @@
----
-- name: create group
-  group: name="{{group}}"
-  become: yes
-
-- name: create user
-  user: name="{{user}}"
-  become: yes
-
-# RedHat related things
-- name: install required packages
-  yum: name="{{item}}" state=latest
-  with_items:
-    - wget
-    - tar
-    - git
-    - epel-release
-    - firewalld
-  become: yes
-
-- name: updage systemd
-  yum: name=systemd state=latest enabled=yes
-  become: yes
-
-- name: install development tools
-  yum: name="@Development tools" state=latest
-  become: yes
-
-  # Install other Mesos dependencies.
-- name: install mesos dependencies
-  yum: name="{{item}}" state=latest
-  with_items:
-    - apache-maven
-    - python-devel
-    - java-1.8.0-openjdk-devel
-    - zlib-devel
-    - libcurl-devel
-    - openssl-devel
-    - cyrus-sasl-devel
-    - cyrus-sasl-md5
-    - apr-devel
-    - apr-util-devel
-    - subversion-devel
-
-- name: start firewall service
-  service: name=firewalld state=started enabled=yes
-  become: yes
-
-- name: download and unarchive mesos latest
-  unarchive:
-      src=http://www.apache.org/dist/mesos/1.0.1/mesos-1.0.1.tar.gz
-      dest="{{mesos_dir}}"
-      owner="{{user}}"
-      group="{{group}}"
-
-  # Bootstrap (Only required if building from git repository).
-  # $ ./bootstrap
-
-- name: make build dir
-  file: path="{{mesos_dir}}/build" state=directory user={{user}} group={{group}}
-
-- name: configure and build mesos
-  command: ../configure  chdir="{{mesos_build_dir}}"
-  register: build
-
-- name: run make
-  command: make chdir="{{mesos_build_dir}}"
-  when: build|success
-  register: make
-
-- name: run make tests
-  command: make check chdir="{{mesos_build_dir}}"
-  when: make|success
-
-- name: create working dir
-  file: path="{{mesos_work_dir}}" state=directory user={{user}} group={{group}}
-
-- name: start mesos master
-  command: ./bin/mesos-master.sh --ip={{inventory_hostname}} --work_dir={{mesos_work_dir}} &
-      chdir={{mesos_build_dir}}
-
-- name: start mesos agent
-  command: /bin/mesos-agent.sh --master={{inventory_hostname}}:5050 --work_dir={{mesos_work_dir}} &
-      chdir={{mesos_build_dir}}

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/test/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/test/tasks/main.yml b/roles/test/tasks/main.yml
index b3cb5ca..f0548b1 100644
--- a/roles/test/tasks/main.yml
+++ b/roles/test/tasks/main.yml
@@ -1 +1,3 @@
 - debug: msg="ding {{ inventory_hostname }}"
+
+- debug: msg="{{ inventory }}"

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/zookeeper/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/handlers/main.yml b/roles/zookeeper/handlers/main.yml
deleted file mode 100644
index daefebe..0000000
--- a/roles/zookeeper/handlers/main.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-- name: start zookeeper
-  service: name=zookeeper state=started enabled=yes
-  become: yes
-
-- name: stop zookeeper
-  service: name=zookeeper state=stopped
-  become: yes
-
-- name: restart zookeeper
-  service: name=zookeeper state=restarted enabled=yes
-  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/zookeeper/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/tasks/main.yml b/roles/zookeeper/tasks/main.yml
deleted file mode 100644
index 78bcec2..0000000
--- a/roles/zookeeper/tasks/main.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-################################################################################
-# Setup and run Zookeeper
-- name: Download and unarchive zookeeper
-  unarchive: src="{{ zookeeper_url }}"
-      dest="{{ user_home }}"
-      copy=no
-      owner="{{ user }}"
-      group="{{ group }}"
-
-- name: open zookeeper port
-  firewalld: port=2181/tcp zone=public permanent=true state=enabled immediate=yes
-  become: yes
-
-- name: Copy zoo.cfg file
-  template: src=zoo.cfg.j2 dest="{{ zookeeper_dir }}/conf/zoo.cfg" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r"
-  notify:
-    - restart zookeeper
-
-- name: Check if systemd exists
-  stat: path=/usr/lib/systemd/system/
-  register: systemd_check
-
-- name: Systemd script.
-  template: src=zookeeper.service.j2 dest=/usr/lib/systemd/system/zookeeper.service
-  when: systemd_check.stat.exists == true
-  notify:
-    - restart zookeeper
-  become: yes
-
-- name: reload systemd daemons
-  command: systemctl daemon-reload
-  become: yes
-...

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/zookeeper/templates/zoo.cfg.j2
----------------------------------------------------------------------
diff --git a/roles/zookeeper/templates/zoo.cfg.j2 b/roles/zookeeper/templates/zoo.cfg.j2
deleted file mode 100644
index 8426b98..0000000
--- a/roles/zookeeper/templates/zoo.cfg.j2
+++ /dev/null
@@ -1,28 +0,0 @@
-# The number of milliseconds of each tick
-tickTime={{tick_time}}
-# The number of ticks that the initial
-# synchronization phase can take
-initLimit={{init_limit}}
-# The number of ticks that can pass between
-# sending a request and getting an acknowledgement
-syncLimit={{sync_limit}}
-# the directory where the snapshot is stored.
-# do not use /tmp for storage, /tmp here is just
-# example sakes.
-dataDir={{zookeeper_data_dir}}
-# the port at which the clients will connect
-clientPort={{ client_port }}
-# the maximum number of client connections.
-# increase this if you need to handle more clients
-#maxClientCnxns=60
-#
-# Be sure to read the maintenance section of the
-# administrator guide before turning on autopurge.
-#
-# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
-#
-# The number of snapshots to retain in dataDir
-#autopurge.snapRetainCount=3
-# Purge task interval in hours
-# Set to "0" to disable auto purge feature
-#autopurge.purgeInterval=1

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/zookeeper/templates/zookeeper.service.j2
----------------------------------------------------------------------
diff --git a/roles/zookeeper/templates/zookeeper.service.j2 b/roles/zookeeper/templates/zookeeper.service.j2
deleted file mode 100644
index 19c3718..0000000
--- a/roles/zookeeper/templates/zookeeper.service.j2
+++ /dev/null
@@ -1,15 +0,0 @@
-# {{ansible_managed}}
-
-[Unit]
-Description=ZooKeeper
-
-
-[Service]
-Type=forking
-ExecStart={{zookeeper_dir}}/bin/zkServer.sh start
-ExecStop={{ zookeeper_dir }}/bin/zkServer.sh stop
-Restart=always
-TimeoutSec=300
-
-[Install]
-WantedBy=multi-user.target

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/roles/zookeeper/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/vars/main.yml b/roles/zookeeper/vars/main.yml
deleted file mode 100644
index a3e10db..0000000
--- a/roles/zookeeper/vars/main.yml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-#Variables associated with this role
-# zookeeper related variable
-zookeeper_version: 3.4.8
-zookeeper_url: http://www.us.apache.org/dist/zookeeper/zookeeper-{{zookeeper_version}}/zookeeper-{{zookeeper_version}}.tar.gz
-
-apt_cache_timeout: 3600
-client_port: "{{ zookeeper_client_port }}" 
-init_limit: 5
-sync_limit: 2
-tick_time: 2000
-data_dir: /var/lib/zookeeper
-log_dir: /var/log/zookeeper
-zookeeper_dir: "{{ user_home }}/zookeeper-{{zookeeper_version}}"
-zookeeper_data_dir: "{{ zookeeper_dir }}/data"
-
-...

http://git-wip-us.apache.org/repos/asf/airavata/blob/03db1dfe/site.yml
----------------------------------------------------------------------
diff --git a/site.yml b/site.yml
index 2fc7293..4020f15 100644
--- a/site.yml
+++ b/site.yml
@@ -4,8 +4,14 @@
   roles:
     - test
 
-
 - hosts: mesos-master
-  tags: mesos-master
+  tags: mesos
   roles:
     - mesos
+
+- hosts: mesos-master
+  tags: mesosyum
+  roles:
+    - mesos-yum
+
+...


[11/50] [abbrv] airavata git commit: Added database role to install mariadb on centos 7 , fix #2

Posted by la...@apache.org.
Added database role to install mariadb on centos 7 , fix #2


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 414c0e9c7ff89d12550ca373e4b06a5eb2938f49
Parents: 1fb4369
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Mon Aug 1 20:35:21 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Mon Aug 1 20:35:21 2016 -0400

----------------------------------------------------------------------
 group_vars/all                          |  4 +--
 hosts                                   | 18 ++++++++----
 roles/database/handlers/main.yml        |  8 ++++++
 roles/database/tasks/main.yml           | 41 ++++++++++++++++++++++++++++
 roles/database/tasks/secure_install.yml | 18 ++++++++++++
 roles/database/templates/my.cnf         |  4 +++
 roles/database/vars/main.yml            |  7 +++++
 site.yml                                |  6 ++++
 8 files changed, 98 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/414c0e9c/group_vars/all
----------------------------------------------------------------------
diff --git a/group_vars/all b/group_vars/all
index 2c2cb95..6098bc1 100644
--- a/group_vars/all
+++ b/group_vars/all
@@ -12,8 +12,8 @@ airavata_dist: "apache-airavata-server-0.17-SNAPSHOT"
 airavata_dist_name: "{{ airavata_dist }}-bin.tar.gz"
 
 db_server: "gw62.iu.xsede.org"
-db_user: "SciGaP15Deploy"
-db_password: "xxxxxxxxxxx"
+db_user: "airavata"
+db_password: "airavata"
 app_catalog: "app_catalog"
 exp_catalog: "exp_catalog"
 replica_catalog: "replica_catalog"

http://git-wip-us.apache.org/repos/asf/airavata/blob/414c0e9c/hosts
----------------------------------------------------------------------
diff --git a/hosts b/hosts
index 66f650f..2865ff1 100644
--- a/hosts
+++ b/hosts
@@ -1,19 +1,25 @@
 # inventory file : production
 
 [api-orch]
-149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
-#149.165.171.11 host_name=js-171-11 host_address=149.165.171.11
+#149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
+149.165.171.11 host_name=js-171-11 host_address=149.165.171.11
 
 [gfac]
-149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
-#149.165.171.11 host_name=js-171-11 host_address=149.165.171.11
+#149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
+149.165.171.11 host_name=js-171-11 host_address=149.165.171.11
 
 [pga]
 #149.165.156.196
 149.165.171.11
 
 [zookeeper]
-149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
+#149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
+149.165.171.11 host_name=js-171-11 host_address=149.165.171.11
 
 [rabbitmq]
-149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
+#149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
+149.165.171.11 host_name=js-171-11 host_address=149.165.171.11
+
+[database]
+#149.165.156.196
+149.165.171.11

http://git-wip-us.apache.org/repos/asf/airavata/blob/414c0e9c/roles/database/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/database/handlers/main.yml b/roles/database/handlers/main.yml
new file mode 100644
index 0000000..85269b8
--- /dev/null
+++ b/roles/database/handlers/main.yml
@@ -0,0 +1,8 @@
+---
+- name: start mariadb
+  service: name=mariadb state=started enabled=yes
+
+- name: stop mariadb
+  service: name=mariadb state=stopped
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/414c0e9c/roles/database/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/database/tasks/main.yml b/roles/database/tasks/main.yml
new file mode 100644
index 0000000..0babc12
--- /dev/null
+++ b/roles/database/tasks/main.yml
@@ -0,0 +1,41 @@
+---
+# - name: yum update
+#   yum: name=* state=latest
+
+# Install Mysql
+- name: install pip
+  yum: name=python-pip state=latest
+
+- name: install pexpect
+  pip: name=pexpect
+
+# - name: Adds Python MySQL support on Debian/Ubuntu
+#   apt: pkg="python-mysqldb" state=present
+#   when: ansible_os_family == 'Debian'
+
+- name: Adds Python MySQL support on RedHat/CentOS
+  yum: name=MySQL-python state=present
+  # when: ansible_os_family == 'RedHat'
+
+- name: install mariadb
+  yum: name="{{ item }}" state=latest update_cache=yes
+  with_items: "{{ mysql_packages }}"
+
+- name: start mariadb
+  service: name=mariadb state=started enabled=yes
+
+- include: secure_install.yml
+
+- name: create databases
+  mysql_db: name="{{ item }}" state=present
+  with_items:
+    - "{{ app_catalog }}"
+    - "{{ exp_catalog }}"
+    - "{{ replica_catalog }}"
+    - "{{ workflow_catalog }}"
+    - "{{ credential_store }}"
+
+- name: create new user {{ db_user }} with all privilege
+  mysql_user: name="{{ db_user }}" password="{{ db_password }}" priv=*.*:ALL state=present
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/414c0e9c/roles/database/tasks/secure_install.yml
----------------------------------------------------------------------
diff --git a/roles/database/tasks/secure_install.yml b/roles/database/tasks/secure_install.yml
new file mode 100644
index 0000000..cfb790b
--- /dev/null
+++ b/roles/database/tasks/secure_install.yml
@@ -0,0 +1,18 @@
+---
+# This is ansible equivalent for mysql_secure_installation
+- name: Sets the root password
+  mysql_user: user=root password="{{ mysql_root_password }}" host=localhost
+
+- name: Copy .my.cnf file
+  template: src=my.cnf dest=/root/.my.cnf
+
+- name: Removes all anonymous user accounts
+  mysql_user: name='' host_all=yes state=absent
+
+- name: Secures the MySQL root user for all hosts
+  mysql_user: user="root" password="{{ mysql_root_password }}" host_all=yes
+
+- name: Removes the MySQL test database
+  mysql_db: db=test state=absent
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/414c0e9c/roles/database/templates/my.cnf
----------------------------------------------------------------------
diff --git a/roles/database/templates/my.cnf b/roles/database/templates/my.cnf
new file mode 100644
index 0000000..ebe5b5b
--- /dev/null
+++ b/roles/database/templates/my.cnf
@@ -0,0 +1,4 @@
+# Example .my.cnf file for setting the root password
+[client]
+user=root
+password="{{ mysql_root_password }}"

http://git-wip-us.apache.org/repos/asf/airavata/blob/414c0e9c/roles/database/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/database/vars/main.yml b/roles/database/vars/main.yml
new file mode 100644
index 0000000..3bbc070
--- /dev/null
+++ b/roles/database/vars/main.yml
@@ -0,0 +1,7 @@
+---
+mysql_packages:
+  - mariadb-server
+  - mariadb
+mysql_root_password: "admin"
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/414c0e9c/site.yml
----------------------------------------------------------------------
diff --git a/site.yml b/site.yml
index 7f775db..63c2fae 100644
--- a/site.yml
+++ b/site.yml
@@ -30,4 +30,10 @@
   tags: pga
   roles:
     - pga
+
+- hosts: database
+  tags: mysql
+  roles:
+    - database
+
 ...


[20/50] [abbrv] airavata git commit: Initial commit

Posted by la...@apache.org.
Initial commit

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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: dc6012eb10f1f7de1e56523dcfcee91d97f41a69
Parents: 
Author: Shameera <sh...@gmail.com>
Authored: Mon Aug 29 16:25:14 2016 -0400
Committer: Shameera <sh...@gmail.com>
Committed: Mon Aug 29 16:25:14 2016 -0400

----------------------------------------------------------------------
 LICENSE   | 201 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 README.md |   2 +
 2 files changed, 203 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/dc6012eb/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..8dada3e
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   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.

http://git-wip-us.apache.org/repos/asf/airavata/blob/dc6012eb/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..70fcd39
--- /dev/null
+++ b/README.md
@@ -0,0 +1,2 @@
+# mesos-deployment
+Setup Apache Mesos on Cloud Infrastructures using Anisble


[21/50] [abbrv] airavata git commit: Added zookeeper and mesos roles

Posted by la...@apache.org.
Added zookeeper and mesos roles


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 7429aa65b0eff708debde76aadd65a04c179c157
Parents: dc6012e
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Tue Aug 30 15:30:27 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Tue Aug 30 15:30:27 2016 -0400

----------------------------------------------------------------------
 hosts                                          |  8 ++
 roles/group_vars/all.yml                       | 13 ++++
 roles/mesos/tasks/RedHat.yml                   | 18 +++++
 roles/mesos/tasks/main.yml                     | 84 +++++++++++++++++++++
 roles/test/tasks/main.yml                      |  1 +
 roles/zookeeper/handlers/main.yml              | 12 +++
 roles/zookeeper/tasks/main.yml                 | 34 +++++++++
 roles/zookeeper/templates/zoo.cfg.j2           | 28 +++++++
 roles/zookeeper/templates/zookeeper.service.j2 | 15 ++++
 roles/zookeeper/vars/main.yml                  | 17 +++++
 site.yml                                       | 11 +++
 11 files changed, 241 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/7429aa65/hosts
----------------------------------------------------------------------
diff --git a/hosts b/hosts
new file mode 100644
index 0000000..949fb79
--- /dev/null
+++ b/hosts
@@ -0,0 +1,8 @@
+---
+[localhost]
+127.0.0.1
+
+[mesos-master]
+
+
+[mesos-agent]

http://git-wip-us.apache.org/repos/asf/airavata/blob/7429aa65/roles/group_vars/all.yml
----------------------------------------------------------------------
diff --git a/roles/group_vars/all.yml b/roles/group_vars/all.yml
new file mode 100644
index 0000000..c041787
--- /dev/null
+++ b/roles/group_vars/all.yml
@@ -0,0 +1,13 @@
+---
+
+user: centos
+group: centos
+user_home: "home/{{user}}"
+
+# Mesos related properties
+mesos_dir: "{{user_home}}/mesos"
+mesos_build_dir: "{{mesos_dir}}/build"
+
+
+#Zookeeper related properties
+zookeeper_client_port: 2181

http://git-wip-us.apache.org/repos/asf/airavata/blob/7429aa65/roles/mesos/tasks/RedHat.yml
----------------------------------------------------------------------
diff --git a/roles/mesos/tasks/RedHat.yml b/roles/mesos/tasks/RedHat.yml
new file mode 100644
index 0000000..4c7ace9
--- /dev/null
+++ b/roles/mesos/tasks/RedHat.yml
@@ -0,0 +1,18 @@
+---
+- name: create group
+  group: name="{{group}}"
+  become: yes
+
+- name: create user
+  user: name="{{user}}"
+  become: yes
+
+- name: install required packages
+  yum: name="{{item}}" state=latest
+  with_item:
+    - wget
+    - tar
+    - git
+    - epel-release
+    - subversion
+    - firewalld

http://git-wip-us.apache.org/repos/asf/airavata/blob/7429aa65/roles/mesos/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/mesos/tasks/main.yml b/roles/mesos/tasks/main.yml
new file mode 100644
index 0000000..f0fa90c
--- /dev/null
+++ b/roles/mesos/tasks/main.yml
@@ -0,0 +1,84 @@
+---
+- name: create group
+  group: name="{{group}}"
+  become: yes
+
+- name: create user
+  user: name="{{user}}"
+  become: yes
+
+# RedHat related things
+- name: install required packages
+  yum: name="{{item}}" state=latest
+  with_items:
+    - wget
+    - tar
+    - git
+    - epel-release
+    - firewalld
+  become: yes
+
+- name: updage systemd
+  yum: name=systemd state=latest enabled=yes
+  become: yes
+
+- name: install development tools
+  yum: name="@Development tools" state=latest
+  become: yes
+
+  # Install other Mesos dependencies.
+- name: install mesos dependencies
+  yum: name="{{item}}" state=latest
+  with_items:
+    - apache-maven
+    - python-devel
+    - java-1.8.0-openjdk-devel
+    - zlib-devel
+    - libcurl-devel
+    - openssl-devel
+    - cyrus-sasl-devel
+    - cyrus-sasl-md5
+    - apr-devel
+    - apr-util-devel
+    - subversion-devel
+
+- name: start firewall service
+  service: name=firewalld state=started enabled=yes
+  become: yes
+
+- name: download and unarchive mesos latest
+  unarchive:
+      src=http://www.apache.org/dist/mesos/1.0.1/mesos-1.0.1.tar.gz
+      dest="{{mesos_dir}}"
+      owner="{{user}}"
+      group="{{group}}"
+
+  # Bootstrap (Only required if building from git repository).
+  # $ ./bootstrap
+
+- name: make build dir
+  file: path="{{mesos_dir}}/build" state=directory user={{user}} group={{group}}
+
+- name: configure and build mesos
+  command: ../configure  chdir="{{mesos_build_dir}}"
+  register: build
+
+- name: run make
+  command: make chdir="{{mesos_build_dir}}"
+  when: build|success
+  register: make
+
+- name: run make tests
+  command: make check chdir="{{mesos_build_dir}}"
+  when: make|success
+
+- name: create working dir
+  file: path="{{mesos_work_dir}}" state=directory user={{user}} group={{group}}
+
+- name: start mesos master
+  command: ./bin/mesos-master.sh --ip={{inventory_hostname}} --work_dir={{mesos_work_dir}} &
+      chdir={{mesos_build_dir}}
+
+- name: start mesos agent
+  command: /bin/mesos-agent.sh --master={{inventory_hostname}}:5050 --work_dir={{mesos_work_dir}} &
+      chdir={{mesos_build_dir}}

http://git-wip-us.apache.org/repos/asf/airavata/blob/7429aa65/roles/test/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/test/tasks/main.yml b/roles/test/tasks/main.yml
new file mode 100644
index 0000000..b3cb5ca
--- /dev/null
+++ b/roles/test/tasks/main.yml
@@ -0,0 +1 @@
+- debug: msg="ding {{ inventory_hostname }}"

http://git-wip-us.apache.org/repos/asf/airavata/blob/7429aa65/roles/zookeeper/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/handlers/main.yml b/roles/zookeeper/handlers/main.yml
new file mode 100644
index 0000000..daefebe
--- /dev/null
+++ b/roles/zookeeper/handlers/main.yml
@@ -0,0 +1,12 @@
+---
+- name: start zookeeper
+  service: name=zookeeper state=started enabled=yes
+  become: yes
+
+- name: stop zookeeper
+  service: name=zookeeper state=stopped
+  become: yes
+
+- name: restart zookeeper
+  service: name=zookeeper state=restarted enabled=yes
+  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/7429aa65/roles/zookeeper/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/tasks/main.yml b/roles/zookeeper/tasks/main.yml
new file mode 100644
index 0000000..78bcec2
--- /dev/null
+++ b/roles/zookeeper/tasks/main.yml
@@ -0,0 +1,34 @@
+---
+################################################################################
+# Setup and run Zookeeper
+- name: Download and unarchive zookeeper
+  unarchive: src="{{ zookeeper_url }}"
+      dest="{{ user_home }}"
+      copy=no
+      owner="{{ user }}"
+      group="{{ group }}"
+
+- name: open zookeeper port
+  firewalld: port=2181/tcp zone=public permanent=true state=enabled immediate=yes
+  become: yes
+
+- name: Copy zoo.cfg file
+  template: src=zoo.cfg.j2 dest="{{ zookeeper_dir }}/conf/zoo.cfg" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r"
+  notify:
+    - restart zookeeper
+
+- name: Check if systemd exists
+  stat: path=/usr/lib/systemd/system/
+  register: systemd_check
+
+- name: Systemd script.
+  template: src=zookeeper.service.j2 dest=/usr/lib/systemd/system/zookeeper.service
+  when: systemd_check.stat.exists == true
+  notify:
+    - restart zookeeper
+  become: yes
+
+- name: reload systemd daemons
+  command: systemctl daemon-reload
+  become: yes
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/7429aa65/roles/zookeeper/templates/zoo.cfg.j2
----------------------------------------------------------------------
diff --git a/roles/zookeeper/templates/zoo.cfg.j2 b/roles/zookeeper/templates/zoo.cfg.j2
new file mode 100644
index 0000000..8426b98
--- /dev/null
+++ b/roles/zookeeper/templates/zoo.cfg.j2
@@ -0,0 +1,28 @@
+# The number of milliseconds of each tick
+tickTime={{tick_time}}
+# The number of ticks that the initial
+# synchronization phase can take
+initLimit={{init_limit}}
+# The number of ticks that can pass between
+# sending a request and getting an acknowledgement
+syncLimit={{sync_limit}}
+# the directory where the snapshot is stored.
+# do not use /tmp for storage, /tmp here is just
+# example sakes.
+dataDir={{zookeeper_data_dir}}
+# the port at which the clients will connect
+clientPort={{ client_port }}
+# the maximum number of client connections.
+# increase this if you need to handle more clients
+#maxClientCnxns=60
+#
+# Be sure to read the maintenance section of the
+# administrator guide before turning on autopurge.
+#
+# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
+#
+# The number of snapshots to retain in dataDir
+#autopurge.snapRetainCount=3
+# Purge task interval in hours
+# Set to "0" to disable auto purge feature
+#autopurge.purgeInterval=1

http://git-wip-us.apache.org/repos/asf/airavata/blob/7429aa65/roles/zookeeper/templates/zookeeper.service.j2
----------------------------------------------------------------------
diff --git a/roles/zookeeper/templates/zookeeper.service.j2 b/roles/zookeeper/templates/zookeeper.service.j2
new file mode 100644
index 0000000..19c3718
--- /dev/null
+++ b/roles/zookeeper/templates/zookeeper.service.j2
@@ -0,0 +1,15 @@
+# {{ansible_managed}}
+
+[Unit]
+Description=ZooKeeper
+
+
+[Service]
+Type=forking
+ExecStart={{zookeeper_dir}}/bin/zkServer.sh start
+ExecStop={{ zookeeper_dir }}/bin/zkServer.sh stop
+Restart=always
+TimeoutSec=300
+
+[Install]
+WantedBy=multi-user.target

http://git-wip-us.apache.org/repos/asf/airavata/blob/7429aa65/roles/zookeeper/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/vars/main.yml b/roles/zookeeper/vars/main.yml
new file mode 100644
index 0000000..a3e10db
--- /dev/null
+++ b/roles/zookeeper/vars/main.yml
@@ -0,0 +1,17 @@
+---
+#Variables associated with this role
+# zookeeper related variable
+zookeeper_version: 3.4.8
+zookeeper_url: http://www.us.apache.org/dist/zookeeper/zookeeper-{{zookeeper_version}}/zookeeper-{{zookeeper_version}}.tar.gz
+
+apt_cache_timeout: 3600
+client_port: "{{ zookeeper_client_port }}" 
+init_limit: 5
+sync_limit: 2
+tick_time: 2000
+data_dir: /var/lib/zookeeper
+log_dir: /var/log/zookeeper
+zookeeper_dir: "{{ user_home }}/zookeeper-{{zookeeper_version}}"
+zookeeper_data_dir: "{{ zookeeper_dir }}/data"
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/7429aa65/site.yml
----------------------------------------------------------------------
diff --git a/site.yml b/site.yml
new file mode 100644
index 0000000..2fc7293
--- /dev/null
+++ b/site.yml
@@ -0,0 +1,11 @@
+---
+- hosts: localhost
+  tags: test
+  roles:
+    - test
+
+
+- hosts: mesos-master
+  tags: mesos-master
+  roles:
+    - mesos


[03/50] [abbrv] airavata git commit: Fixed readme issue with roles

Posted by la...@apache.org.
Fixed readme issue with roles


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: bbe01a76f70268ef6b8988c3b9f56179940b4321
Parents: 76e613a
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Thu Jul 28 12:31:47 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Thu Jul 28 12:31:47 2016 -0400

----------------------------------------------------------------------
 README.md | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/bbe01a76/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 7e4a9cc..14839a7 100644
--- a/README.md
+++ b/README.md
@@ -6,12 +6,12 @@ Ansible script to deploy Apache Airavata
 
 ## Roles
 **setup** :- Create user and group, install oracle java 8   
-**zookeeper** :- Download and install zookeeper
-**rabbitmq** :- Download and install rabbitmq as service
-**common** :- Checkout Airavata source from git and run maven build. Move keystore files
-**gfac** :- Setup Gfac deployment and Change configurations.
-**api-orch** :- Setup Api-Orch deployment and Change configurations.
-**pga** :- Deploy Airavata PHP Gateway.
+**zookeeper** :- Download and install zookeeper.  
+**rabbitmq** :- Download and install rabbitmq as service.  
+**common** :- Checkout Airavata source from git and run maven build. Move keystore files.  
+**gfac** :- Setup Gfac deployment and Change configurations.  
+**api-orch** :- Setup Api-Orch deployment and Change configurations.  
+**pga** :- Deploy Airavata PHP Gateway.  
 
 ## Useful commands
   * `ansible-playbook -i hosts site.yml`  


[50/50] [abbrv] airavata git commit: [AIRAVATA-2107] Introduce metrics to Airavata

Posted by la...@apache.org.
[AIRAVATA-2107] Introduce metrics to Airavata

1. Add kamon.io as a metrics library to capture metrices.
2. Add sample metrices to Airavata
3. Push calculated metrices to datadog as a stats viewer.


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: fcfa39234f89a12af773774104a69dacac5570e3
Parents: 342400c
Author: Lahiru Ginnaliya Gamathige <la...@apache.org>
Authored: Mon Sep 19 23:06:20 2016 -0700
Committer: Lahiru Ginnaliya Gamathige <la...@apache.org>
Committed: Thu Sep 29 05:39:03 2016 -0700

----------------------------------------------------------------------
 modules/distribution/pom.xml                    | 10 ++++++++
 modules/gfac/gfac-core/pom.xml                  |  4 +++
 modules/gfac/gfac-impl/pom.xml                  |  4 +++
 .../airavata/gfac/impl/HPCRemoteCluster.java    | 13 ++++++++++
 .../org/apache/airavata/gfac/impl/SSHUtils.java | 15 +++++++++++
 .../gfac/monitor/email/EmailBasedMonitor.java   | 21 ++++++++++++---
 modules/orchestrator/orchestrator-core/pom.xml  |  4 +++
 modules/registry/registry-core/pom.xml          | 27 ++++++++++++++++++++
 modules/server/pom.xml                          |  4 +++
 .../org/apache/airavata/server/ServerMain.java  |  5 +++-
 pom.xml                                         | 11 ++++++++
 11 files changed, 114 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/fcfa3923/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml
index d096739..296c60c 100644
--- a/modules/distribution/pom.xml
+++ b/modules/distribution/pom.xml
@@ -567,6 +567,16 @@
             <artifactId>airavata-client-samples</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>io.kamon</groupId>
+            <artifactId>kamon-core_2.11</artifactId>
+            <version>${kamon.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.kamon</groupId>
+            <artifactId>kamon-datadog_2.11</artifactId>
+            <version>${kamon.version}</version>
+        </dependency>
     </dependencies>
 
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/fcfa3923/modules/gfac/gfac-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/pom.xml b/modules/gfac/gfac-core/pom.xml
index 8d358ff..8e1329d 100644
--- a/modules/gfac/gfac-core/pom.xml
+++ b/modules/gfac/gfac-core/pom.xml
@@ -128,6 +128,10 @@
             <artifactId>curator-framework</artifactId>
             <version>${curator.version}</version>
         </dependency>
+        <dependency>
+            <groupId>io.kamon</groupId>
+            <artifactId>kamon-core_2.11</artifactId>
+        </dependency>
     </dependencies>
 
     <build>

http://git-wip-us.apache.org/repos/asf/airavata/blob/fcfa3923/modules/gfac/gfac-impl/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/pom.xml b/modules/gfac/gfac-impl/pom.xml
index 2a0a949..ba512cd 100644
--- a/modules/gfac/gfac-impl/pom.xml
+++ b/modules/gfac/gfac-impl/pom.xml
@@ -122,5 +122,9 @@
             <artifactId>commons-httpclient</artifactId>
             <version>3.1</version>
         </dependency>
+        <dependency>
+            <groupId>io.kamon</groupId>
+            <artifactId>kamon-core_2.11</artifactId>
+        </dependency>
     </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/fcfa3923/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HPCRemoteCluster.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HPCRemoteCluster.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HPCRemoteCluster.java
index 725b6d0..b194692 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HPCRemoteCluster.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HPCRemoteCluster.java
@@ -25,6 +25,8 @@ import com.jcraft.jsch.JSch;
 import com.jcraft.jsch.JSchException;
 import com.jcraft.jsch.Session;
 import com.jcraft.jsch.UserInfo;
+import kamon.Kamon;
+import kamon.metric.instrument.Counter;
 import org.apache.airavata.common.exception.AiravataException;
 import org.apache.airavata.gfac.core.JobManagerConfiguration;
 import org.apache.airavata.gfac.core.SSHApiException;
@@ -51,6 +53,12 @@ public class HPCRemoteCluster extends AbstractRemoteCluster{
 	private final SSHKeyAuthentication authentication;
 	private final JSch jSch;
 	private Session session;
+	private Counter submittedJobCount = Kamon.metrics().counter(String.format("%s.submitted-jobs", getClass().getCanonicalName()));
+	private Counter nonZeroExitCodeJobCount = Kamon.metrics().counter(String.format("%s.nonzero-exit-jobs", getClass().getCanonicalName()));
+	private Counter emptyJobIdCount = Kamon.metrics().counter(String.format("%s.empty-jobid-jobs", getClass().getCanonicalName()));
+	private Counter copyToFailCount = Kamon.metrics().counter(String.format("%s.copyTo-fail", getClass().getCanonicalName()));
+	private Counter copyFromFailCount = Kamon.metrics().counter(String.format("%s.copyFrom-fail", getClass().getCanonicalName()));
+
 
 	public HPCRemoteCluster(ServerInfo serverInfo, JobManagerConfiguration jobManagerConfiguration, AuthenticationInfo
 			authenticationInfo) throws AiravataException {
@@ -90,6 +98,7 @@ public class HPCRemoteCluster extends AbstractRemoteCluster{
 		submitCommand.setRawCommand("cd " + workingDirectory + "; " + submitCommand.getRawCommand());
 		StandardOutReader reader = new StandardOutReader();
 		executeCommand(submitCommand, reader);
+		submittedJobCount.increment();
 //		throwExceptionOnError(reader, submitCommand);
 		jsoutput.setJobId(outputParser.parseJobSubmission(reader.getStdOutputString()));
 		if (jsoutput.getJobId() == null) {
@@ -97,6 +106,7 @@ public class HPCRemoteCluster extends AbstractRemoteCluster{
 				jsoutput.setJobSubmissionFailed(true);
 				jsoutput.setFailureReason("stdout : " + reader.getStdOutputString() +
 						"\n stderr : " + reader.getStdErrorString());
+				emptyJobIdCount.increment();
 			}
 		}
 		jsoutput.setExitCode(reader.getExitCode());
@@ -104,6 +114,7 @@ public class HPCRemoteCluster extends AbstractRemoteCluster{
 			jsoutput.setJobSubmissionFailed(true);
 			jsoutput.setFailureReason("stdout : " + reader.getStdOutputString() +
 					"\n stderr : " + reader.getStdErrorString());
+			nonZeroExitCodeJobCount.increment();
 		}
 		jsoutput.setStdOut(reader.getStdOutputString());
 		jsoutput.setStdErr(reader.getStdErrorString());
@@ -120,6 +131,7 @@ public class HPCRemoteCluster extends AbstractRemoteCluster{
 				SSHUtils.scpTo(localFile, remoteFile, session);
 				retry = 0;
 			} catch (Exception e) {
+				copyToFailCount.increment();
 				retry--;
 				try {
 					session = Factory.getSSHSession(authenticationInfo, serverInfo);
@@ -147,6 +159,7 @@ public class HPCRemoteCluster extends AbstractRemoteCluster{
 				SSHUtils.scpFrom(remoteFile, localFile, session);
 				retry=0;
 			} catch (Exception e) {
+				copyFromFailCount.increment();
 				retry--;
 				try {
 					session = Factory.getSSHSession(authenticationInfo, serverInfo);

http://git-wip-us.apache.org/repos/asf/airavata/blob/fcfa3923/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/SSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/SSHUtils.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/SSHUtils.java
index cd5651e..2f59828 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/SSHUtils.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/SSHUtils.java
@@ -24,6 +24,9 @@ import com.jcraft.jsch.Channel;
 import com.jcraft.jsch.ChannelExec;
 import com.jcraft.jsch.JSchException;
 import com.jcraft.jsch.Session;
+import kamon.Kamon;
+import kamon.metric.instrument.Counter;
+import kamon.metric.instrument.Histogram;
 import org.apache.airavata.gfac.core.SSHApiException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -42,7 +45,11 @@ import java.util.List;
  */
 public class SSHUtils {
 	private static final Logger log = LoggerFactory.getLogger(SSHUtils.class);
+	private static Histogram scpToBytes = Kamon.metrics().histogram(String.format("%s.scpTo-bytes", SSHUtils.class.getCanonicalName()));
+	private static Counter scpToFailedCount = Kamon.metrics().counter(String.format("%s.scpTo-fail", SSHUtils.class.getCanonicalName()));
 
+	private static Histogram scpFromBytes = Kamon.metrics().histogram(String.format("%s.scpFrom-bytes", SSHUtils.class.getCanonicalName()));
+	private static Counter scpFromFailedCount = Kamon.metrics().counter(String.format("%s.scpFrom-fail", SSHUtils.class.getCanonicalName()));
 
 	/**
 	 * This will copy a local file to a remote location
@@ -79,6 +86,7 @@ public class SSHUtils {
 		if (checkAck(in) != 0) {
 			String error = "Error Reading input Stream";
 			log.error(error);
+			scpToFailedCount.increment();
 			throw new SSHApiException(error);
 		}
 
@@ -94,6 +102,7 @@ public class SSHUtils {
 			if (checkAck(in) != 0) {
 				String error = "Error Reading input Stream";
 				log.error(error);
+				scpToFailedCount.increment();
 				throw new SSHApiException(error);
 			}
 		}
@@ -112,6 +121,7 @@ public class SSHUtils {
 		if (checkAck(in) != 0) {
 			String error = "Error Reading input Stream";
 			log.error(error);
+			scpToFailedCount.increment();
 			throw new SSHApiException(error);
 		}
 
@@ -122,6 +132,7 @@ public class SSHUtils {
 			int len = fis.read(buf, 0, buf.length);
 			if (len <= 0) break;
 			out.write(buf, 0, len); //out.flush();
+			scpToBytes.record(command.getBytes().length);
 		}
 		fis.close();
 		fis = null;
@@ -131,6 +142,7 @@ public class SSHUtils {
 		out.flush();
 		if (checkAck(in) != 0) {
 			String error = "Error Reading input Stream";
+			scpToFailedCount.increment();
 			log.error(error);
 			throw new SSHApiException(error);
 		}
@@ -140,6 +152,7 @@ public class SSHUtils {
 
 		channel.disconnect();
 		if (stdOutReader.getStdErrorString().contains("scp:")) {
+			scpToFailedCount.increment();
 			throw new SSHApiException(stdOutReader.getStdErrorString());
 		}
 		//since remote file is always a file  we just return the file
@@ -232,6 +245,7 @@ public class SSHUtils {
 					}
 					fos.write(buf, 0, foo);
 					filesize -= foo;
+					scpFromBytes.record(foo);
 					if (filesize == 0L) break;
 				}
 				fos.close();
@@ -254,6 +268,7 @@ public class SSHUtils {
 			}
 
 		} catch (Exception e) {
+			scpFromFailedCount.increment();
 			log.error(e.getMessage(), e);
 		} finally {
 			try {

http://git-wip-us.apache.org/repos/asf/airavata/blob/fcfa3923/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
index bf2bdbb..80ca1f7 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
@@ -20,6 +20,9 @@
 */
 package org.apache.airavata.gfac.monitor.email;
 
+import kamon.Kamon;
+import kamon.metric.instrument.Counter;
+import kamon.metric.instrument.Histogram;
 import org.apache.airavata.common.exception.AiravataException;
 import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.common.utils.ServerSettings;
@@ -71,12 +74,15 @@ public class EmailBasedMonitor implements JobMonitor, Runnable{
 	private Message[] flushUnseenMessages;
     private Map<String, Boolean> canceledJobs = new ConcurrentHashMap<>();
     private Timer timer;
-
+    private Histogram monitorQueueSize = Kamon.metrics().histogram(String.format("%s.monitor-queue-size", getClass().getCanonicalName()));
+    private Histogram cancelledJobs = Kamon.metrics().histogram(String.format("%s.cancelled-jobs", getClass().getCanonicalName()));
+    private Counter completedJobCount = Kamon.metrics().counter(String.format("%s.completed-jobs", getClass().getCanonicalName()));
+    private Counter failedJobCount = Kamon.metrics().counter(String.format("%s.failed-jobs", getClass().getCanonicalName()));
 
     public EmailBasedMonitor(Map<ResourceJobManagerType, ResourceConfig> resourceConfigs) throws AiravataException {
 		init();
 		populateAddressAndParserMap(resourceConfigs);
-	}
+    }
 
 	private void init() throws AiravataException {
         host = ServerSettings.getEmailBasedMonitorHost();
@@ -119,13 +125,15 @@ public class EmailBasedMonitor implements JobMonitor, Runnable{
 	public void monitor(String jobId, TaskContext taskContext) {
 		log.info(String.format("[EJM]: Added monitor Id : %s to email based monitor map", jobId));
 		jobMonitorMap.put(jobId, taskContext);
+        monitorQueueSize.record(jobMonitorMap.size());
         taskContext.getParentProcessContext().setPauseTaskExecution(true);
 	}
 
 	@Override
 	public void stopMonitor(String jobId, boolean runOutflow) {
 		TaskContext taskContext = jobMonitorMap.remove(jobId);
-		if (taskContext != null && runOutflow) {
+        monitorQueueSize.record(jobMonitorMap.size());
+        if (taskContext != null && runOutflow) {
 			try {
                 ProcessContext pc = taskContext.getParentProcessContext();
                 if (taskContext.isCancel()) {
@@ -157,6 +165,7 @@ public class EmailBasedMonitor implements JobMonitor, Runnable{
     @Override
     public void canceledJob(String jobId) {
         canceledJobs.put(jobId, Boolean.FALSE);
+        cancelledJobs.record(canceledJobs.size());
     }
 
     private JobStatusResult parse(Message message) throws MessagingException, AiravataException {
@@ -330,6 +339,7 @@ public class EmailBasedMonitor implements JobMonitor, Runnable{
 
     private void process(JobStatusResult jobStatusResult, TaskContext taskContext){
         canceledJobs.remove(jobStatusResult.getJobId());
+        cancelledJobs.record(canceledJobs.size());
         JobState resultState = jobStatusResult.getState();
         // TODO : update job state on process context
         boolean runOutflowTasks = false;
@@ -340,6 +350,8 @@ public class EmailBasedMonitor implements JobMonitor, Runnable{
         // TODO - Handle all other valid JobStates
         if (resultState == JobState.COMPLETE) {
             jobMonitorMap.remove(jobStatusResult.getJobId());
+            monitorQueueSize.record(jobMonitorMap.size());
+            completedJobCount.increment();
 	        jobStatus.setJobState(JobState.COMPLETE);
 	        jobStatus.setReason("Complete email received");
             jobStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
@@ -359,6 +371,8 @@ public class EmailBasedMonitor implements JobMonitor, Runnable{
             log.info("[EJM]: Job Active email received, " + jobDetails);
         }else if (resultState == JobState.FAILED) {
             jobMonitorMap.remove(jobStatusResult.getJobId());
+            monitorQueueSize.record(jobMonitorMap.size());
+            failedJobCount.increment();
             runOutflowTasks = true;
 	        jobStatus.setJobState(JobState.FAILED);
 	        jobStatus.setReason("Failed email received");
@@ -366,6 +380,7 @@ public class EmailBasedMonitor implements JobMonitor, Runnable{
             log.info("[EJM]: Job failed email received , removed job from job monitoring. " + jobDetails);
         }else if (resultState == JobState.CANCELED) {
             jobMonitorMap.remove(jobStatusResult.getJobId());
+            monitorQueueSize.record(jobMonitorMap.size());
             jobStatus.setJobState(JobState.CANCELED);
 	        jobStatus.setReason("Canceled email received");
             jobStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());

http://git-wip-us.apache.org/repos/asf/airavata/blob/fcfa3923/modules/orchestrator/orchestrator-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/pom.xml b/modules/orchestrator/orchestrator-core/pom.xml
index ee0d23a..8e21b6d 100644
--- a/modules/orchestrator/orchestrator-core/pom.xml
+++ b/modules/orchestrator/orchestrator-core/pom.xml
@@ -98,6 +98,10 @@ the License. -->
             <artifactId>airavata-server-configuration</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>io.kamon</groupId>
+            <artifactId>kamon-core_2.11</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/fcfa3923/modules/registry/registry-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/pom.xml b/modules/registry/registry-core/pom.xml
index c2b26b2..8aa80c1 100644
--- a/modules/registry/registry-core/pom.xml
+++ b/modules/registry/registry-core/pom.xml
@@ -102,6 +102,33 @@
 
     <build>
         <plugins>
+            <!--plugin>
+                <groupId>org.apache.openjpa</groupId>
+                <artifactId>openjpa-maven-plugin</artifactId>
+                <version>2.2.0</version>
+                <configuration>
+                    <includes>**/entities/*.class</includes>
+                    <excludes>**/entities/XML*.class</excludes>
+                    <addDefaultConstructor>true</addDefaultConstructor>
+                    <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>enhancer</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>enhance</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.openjpa</groupId>
+                        <artifactId>openjpa</artifactId>
+                        <version>2.2.0</version>
+                    </dependency>
+                </dependencies>
+            </plugin-->
             <!--<plugin>-->
                 <!--<groupId>org.apache.maven.plugins</groupId>-->
                 <!--<artifactId>maven-antrun-plugin</artifactId>-->

http://git-wip-us.apache.org/repos/asf/airavata/blob/fcfa3923/modules/server/pom.xml
----------------------------------------------------------------------
diff --git a/modules/server/pom.xml b/modules/server/pom.xml
index d306c83..8c4b060 100644
--- a/modules/server/pom.xml
+++ b/modules/server/pom.xml
@@ -60,5 +60,9 @@
             <artifactId>zookeeper</artifactId>
             <version>3.4.0</version>
         </dependency>
+        <dependency>
+            <groupId>io.kamon</groupId>
+            <artifactId>kamon-core_2.11</artifactId>
+        </dependency>
     </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/fcfa3923/modules/server/src/main/java/org/apache/airavata/server/ServerMain.java
----------------------------------------------------------------------
diff --git a/modules/server/src/main/java/org/apache/airavata/server/ServerMain.java b/modules/server/src/main/java/org/apache/airavata/server/ServerMain.java
index 1c0483d..8660974 100644
--- a/modules/server/src/main/java/org/apache/airavata/server/ServerMain.java
+++ b/modules/server/src/main/java/org/apache/airavata/server/ServerMain.java
@@ -23,6 +23,7 @@ package org.apache.airavata.server;
 import ch.qos.logback.classic.LoggerContext;
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.common.exception.AiravataException;
+import kamon.Kamon;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.logging.kafka.KafkaAppender;
 import org.apache.airavata.common.utils.*;
@@ -44,6 +45,7 @@ import java.util.Arrays;
 import java.util.List;
 
 public class ServerMain {
+
 	private static List<IServer> servers;
 	private static final String SERVERS_KEY="servers";
     private final static Logger logger = LoggerFactory.getLogger(ServerMain.class);
@@ -160,6 +162,7 @@ public class ServerMain {
 //	}
 	
 	public static void main(String args[]) throws ParseException, IOException, AiravataException {
+		Kamon.start();
 		ServerSettings.mergeSettingsCommandLineArgs(args);
 		ServerSettings.setServerRoles(ApplicationSettings.getSetting(SERVERS_KEY, "all").split(","));
 
@@ -423,4 +426,4 @@ public class ServerMain {
 			return -1;
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/fcfa3923/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a65df09..bf5f592 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,6 +103,7 @@
 		<maven.replacer.plugin.version>1.5.3</maven.replacer.plugin.version>
 		<kafka-clients.version>0.8.2.2</kafka-clients.version>
 		<logback.version>1.1.6</logback.version>
+		<kamon.version>0.6.0</kamon.version>
 	</properties>
 
 	<developers>
@@ -446,6 +447,16 @@
 				<artifactId>logback-classic</artifactId>
 				<version>${logback.version}</version>
 			</dependency>
+			<dependency>
+				<groupId>io.kamon</groupId>
+				<artifactId>kamon-core_2.11</artifactId>
+				<version>${kamon.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>io.kamon</groupId>
+				<artifactId>kamon-datadog_2.11</artifactId>
+                		<version>${kamon.version}</version>
+            		</dependency>
 		</dependencies>
 	</dependencyManagement>
 


[02/50] [abbrv] airavata git commit: Updated readme file

Posted by la...@apache.org.
Updated readme file


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 76e613a867c568036942cfa3dba633f803a7f095
Parents: 83e98ae
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Thu Jul 28 12:30:42 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Thu Jul 28 12:30:42 2016 -0400

----------------------------------------------------------------------
 README.md | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/76e613a8/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 34e2e16..7e4a9cc 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,19 @@
 # airavata-ansible
 Ansible script to deploy Apache Airavata
+
+## Support OS
+  * Centos 7
+
+## Roles
+**setup** :- Create user and group, install oracle java 8   
+**zookeeper** :- Download and install zookeeper
+**rabbitmq** :- Download and install rabbitmq as service
+**common** :- Checkout Airavata source from git and run maven build. Move keystore files
+**gfac** :- Setup Gfac deployment and Change configurations.
+**api-orch** :- Setup Api-Orch deployment and Change configurations.
+**pga** :- Deploy Airavata PHP Gateway.
+
+## Useful commands
+  * `ansible-playbook -i hosts site.yml`  
+  * `ansible-playbook -i hosts site.yml -t "tags"`  
+  * `ansible-playbook -i hosts site.yml --start-at-task="name of the ansible task"`


[27/50] [abbrv] airavata git commit: Updage README.md

Posted by la...@apache.org.
Updage README.md


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: d5a9c8aadd699dbf0679e933a08382c6c0e51daf
Parents: 1ae8263
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Sun Sep 11 02:30:36 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Sun Sep 11 02:30:36 2016 -0400

----------------------------------------------------------------------
 README.md                         | 81 +++++++++++++++++++++++++++++++++-
 group_vars/all.yml                | 12 -----
 roles/mesos-master/tasks/main.yml |  5 +--
 3 files changed, 81 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/d5a9c8aa/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 70fcd39..794099a 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,81 @@
 # mesos-deployment
-Setup Apache Mesos on Cloud Infrastructures using Anisble
+This project setup Apache Mesos master and slave clusters on Cloud Infrastructures using Anisble
+
+
+## Configurations
+
+To run this ansible script you must have at least 4 instances. 3 instances to setup Mesos master , marathon and zookeeper clusters. Along with Mesos master we install marathon and zookeeper. Another one or more instance/s to setup mesos agent/s. You can use ec2 ansible role provided with this playbook to spin up aws instances. To do that you need to set valid aws credentials.
+
+1. set valid aws credentials in `roles/ec2/vars/aws-credential.yml` if it doesn't work add folowing to ec2 task in `roles/ec2/tasks/main.yml`
+
+  `aws_access_key: <your_valid_access_key>`
+
+  `aws_secret_key: <your_valid_secret_key?`
+
+2. Set ec2 instance names under ec2 task `with_items:` configurations
+
+  After you set valid aws credentials and instance names run following ansible playbook command to spin up require aws ec2 instances.
+
+  `ansible-palybook -i hosts site.yml -t "ec2"`
+
+3.  You need to know public ips of all the nodes and private ips of all mesos-master nodes.  List all mesos master public ips under `[mesos-master]` section in `hosts` file. List all mesos-slave *(mesos-agent)* public ips under `[mesos-slave]` section.  You need to set `my_id` hosts variable along with mesos-master ip addresses. This will use to set zookeeper id.
+
+ > [mesos-master]
+
+ > *1.2.3.4 my_id=1*
+
+ > *11.22.33.44 my_id=2*
+
+ > ...
+
+ > [mesos-slave]
+
+ > *123.123.123.123*
+
+ > ...
+
+4. Use mesos-master private ip addresses to set zookeeper servers properties in `roles/zookeeper/vars/main.yml`
+
+  > zookeeper_servers:
+
+  >  \- {id: "1", ip: "172.31.24.149"}
+
+  >  \- {id: "2", ip: "172.31.19.49"}
+
+  >  \- {id: "3", ip: "172.31.25.80"}
+
+5. Set Mesos-master zookeeper quorum value in `group_vars/all.yml` file
+
+  > zk_quorum: 2
+
+6. Now we are set to deploy Apache Mesos cluster (Mesos-master, marthon, zookeeper, mesos-slave). Following ansible playbook command respectively setup mesos-master cluster , Mesos-slaves, and both mesos-master cluster and mesos-slave
+
+  `ansible-playbook -i hosts site.yml  -t "mesos-master"`
+
+  `ansible-playbook -i hosts site.yml  -t "mesos-slave"`
+
+  `ansible-playbook -i hosts site.yml  -t "mesos"`
+
+  If everything works without any error, now you have running mesos cluster on aws instances.
+
+## verifying installation
+
+1.  If your plays works without any error. Now you can access Mesos master console using `http://<master-ip>:5050` run following in one of Mesos master node to find which instance is the leader of cluster.
+
+  ``mesos-resolve `cat /etc/mesos/zk` `` this will return master-ip. Then use it to access console
+
+2. To access marathon console use `http://<master-ip>:8080`
+
+3. If you want run simple task on mesos. run following command on one of master node.
+
+  ``MASTER=$(mesos-resolve `cat /etc/mesos/zk`)``
+
+  `mesos-execute --master=$MASTER --name="cluster-test" --command="sleep 5"`
+
+
+
+## Ansible roles
+- java - install oracle java 8
+- zookeeper - install zookeeper
+- mesos-master - install mesos mastera and marathon
+- mesos-slave  - install mesos slave

http://git-wip-us.apache.org/repos/asf/airavata/blob/d5a9c8aa/group_vars/all.yml
----------------------------------------------------------------------
diff --git a/group_vars/all.yml b/group_vars/all.yml
index f7d7ae5..62c83dc 100644
--- a/group_vars/all.yml
+++ b/group_vars/all.yml
@@ -1,22 +1,10 @@
 ---
 ansible_connection: ssh
-#ansible_ssh_user: root
 ansible_ssh_user: centos
-#ansible_ssh_private_key_file: /Users/syodage/Projects/mesos-deployment/jetcloud.key
 ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-aws.pem.txt
 
 user: centos
 group: centos
-user_home: "/home/{{user}}"
-
-# Mesos related properties
-#mesos_version: "1.0.1"
-# mesos_version: "0.28.2"
-# mesos_name: "mesos"
-# mesos_url: "http://www.apache.org/dist/mesos/{{mesos_version}}/{{mesos_name}}-{{mesos_version}}.tar.gz"
-# mesos_deploy_dir: "{{user_home}}/{{mesos_name}}-{{mesos_version}}"
-# mesos_build_dir: "{{mesos_deploy_dir}}/build"
-
 
 #Zookeeper related properties
 zookeeper_client_port: 2181

http://git-wip-us.apache.org/repos/asf/airavata/blob/d5a9c8aa/roles/mesos-master/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/mesos-master/tasks/main.yml b/roles/mesos-master/tasks/main.yml
index 6afefe1..effb35a 100644
--- a/roles/mesos-master/tasks/main.yml
+++ b/roles/mesos-master/tasks/main.yml
@@ -21,11 +21,8 @@
     state: enabled
     immediate: yes
   with_items:
-    # - "{{ zk_client_port }}/tcp"
-    # - "2888/tcp"
-    # - "3888/tcp"
     - "5050/tcp"
-    # - "marathon/tcp"
+    - "8080/tcp"
   become: yes
 
 - name: install utility - TODO delete this


[06/50] [abbrv] airavata git commit: Merge branch 'master' of github.com:shamrath/airavata-ansible

Posted by la...@apache.org.
Merge branch 'master' of github.com:shamrath/airavata-ansible


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: f50e7adc75331ba7fa8093aa06347f1c6f03edc8
Parents: 5f7bce6 fdafdcb
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Thu Jul 28 12:49:09 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Thu Jul 28 12:49:29 2016 -0400

----------------------------------------------------------------------
 README.md | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/f50e7adc/README.md
----------------------------------------------------------------------
diff --cc README.md
index a3e13b3,a3e13b3..2f8a22c
--- a/README.md
+++ b/README.md
@@@ -21,3 -21,3 +21,7 @@@ Ansible script to deploy Apache Airavat
  - `ansible-playbook -i hosts site.yml`
  - `ansible-playbook -i hosts site.yml -t "tags"`
  - `ansible-playbook -i hosts site.yml --start-at-task="name of the ansible task"`
++
++## Configurations
++
++- Set correct private key file to `ansible_ssh_private_key_file` property in group_vars/all


[40/50] [abbrv] airavata git commit: fixing gateway intialization issue

Posted by la...@apache.org.
fixing gateway intialization issue


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 264f616ffecd585d92e650685b504101208e79dc
Parents: c084683
Author: scnakandala <su...@gmail.com>
Authored: Thu Sep 22 12:32:49 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Sep 22 12:32:49 2016 -0400

----------------------------------------------------------------------
 .../core/experiment/catalog/impl/ExperimentCatalogImpl.java        | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/264f616f/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
index 8494493..53bd52b 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
@@ -91,6 +91,8 @@ public class ExperimentCatalogImpl implements ExperimentCatalog {
     public ExperimentCatalogImpl(String gateway, String username, String password) throws RegistryException{
         if (!ExpCatResourceUtils.isGatewayExist(gateway)){
             gatewayResource = (GatewayResource) ExpCatResourceUtils.createGateway(gateway);
+            gatewayResource.setGatewayName(gateway);
+            gatewayResource.setGatewayApprovalStatus(GatewayApprovalStatus.APPROVED.toString());
             gatewayResource.save();
         }else {
             gatewayResource = (GatewayResource) ExpCatResourceUtils.getGateway(gateway);


[13/50] [abbrv] airavata git commit: Deploy wso2is on aws EC2 instance

Posted by la...@apache.org.
Deploy wso2is on aws EC2 instance


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 93ec75b61ddaa5585700fed81a6e173b2850817d
Parents: 433ae48
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Tue Aug 16 22:19:12 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Tue Aug 16 22:19:12 2016 -0400

----------------------------------------------------------------------
 group_vars/all                        |  12 +-
 hosts                                 |  28 +-
 roles/env_setup/tasks/main.yml        |  33 +-
 roles/rabbitmq/tasks/main.yml         |  17 +-
 roles/rabbitmq/vars/main.yml          |   2 +
 roles/wso2_is/tasks/main.yml          |  69 +++
 roles/wso2_is/templates/carbon.xml.j2 | 688 +++++++++++++++++++++++++++++
 roles/wso2_is/vars/main.yml           |  18 +
 site.yml                              |   4 +
 9 files changed, 837 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/93ec75b6/group_vars/all
----------------------------------------------------------------------
diff --git a/group_vars/all b/group_vars/all
index bae52a5..e1b8187 100644
--- a/group_vars/all
+++ b/group_vars/all
@@ -1,10 +1,11 @@
 ---
 ansible_connection: ssh
-ansible_ssh_user: root
-ansible_ssh_private_key_file: /Users/syodage/Projects/scigap/JetCloud/jetcloud.key
+ansible_ssh_user: centos
+#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
 
-user: airavata
-group: airavata
+user: centos
+group: centos 
 user_home: "/home/{{ user }}"
 deployment_dir: "{{ user_home }}/master-deployment"
 
@@ -24,7 +25,8 @@ rabbitmq_server: "localhost"
 rabbitmq_vhost: "master"
 rabbitmq_user: "airavata"
 rabbitmq_password: "airavata"
-rabbitmq_broker_url: "amqp://{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ rabbitmq_server}}:5672/{{ rabbitmq_vhost }}"
+rabbitmq_port: "5672"
+rabbitmq_broker_url: "amqp://{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ rabbitmq_server}}:{{ rabbitmq_port }}/{{ rabbitmq_vhost }}"
 
 key_store: "airavata.jks"
 cred_key_store: "client_truststore.jks"

http://git-wip-us.apache.org/repos/asf/airavata/blob/93ec75b6/hosts
----------------------------------------------------------------------
diff --git a/hosts b/hosts
index 8a317b8..819e1ab 100644
--- a/hosts
+++ b/hosts
@@ -1,25 +1,29 @@
+---
 # inventory file : production
 
 [api-orch]
-#149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
-js-171-11.jetstream-cloud.org
+#js-156.196.jetstream-cloud.org
+#js-171-11.jetstream-cloud.org
 
 [gfac]
-#149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
-js-171-11.jetstream-cloud.org
+#js-156.196.jetstream-cloud.org
+#js-171-11.jetstream-cloud.org
 
 [pga]
-#149.165.156.196
-js-171-11.jetstream-cloud.org
+#js-156.196.jetstream-cloud.org
+#js-171-11.jetstream-cloud.org
 
 [zookeeper]
-#149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
-js-171-11.jetstream-cloud.org
+#js-156.196.jetstream-cloud.org
+#js-171-11.jetstream-cloud.org
 
 [rabbitmq]
-#149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
-js-171-11.jetstream-cloud.org
+#js-156.196.jetstream-cloud.org
+#js-171-11.jetstream-cloud.org rabbit_hostName="jetcloud-1-centos-7"
 
 [database]
-#149.165.156.196
-js-171-11.jetstream-cloud.org
+#js-156.196.jetstream-cloud.org
+#js-171-11.jetstream-cloud.org
+
+[wso2is]
+107.23.143.252

http://git-wip-us.apache.org/repos/asf/airavata/blob/93ec75b6/roles/env_setup/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/env_setup/tasks/main.yml b/roles/env_setup/tasks/main.yml
index a20b018..395d0a8 100644
--- a/roles/env_setup/tasks/main.yml
+++ b/roles/env_setup/tasks/main.yml
@@ -3,32 +3,29 @@
 #All commons tasks goes here
 - name: Create a new user group "{{ group }}"
   group: name={{ group }}
-  tags: user
 
 - name: Create a new user "{{ user }}"
   user: name={{ user }} group={{ group }}
-  tags: user
 
 ################################################################################
-- name: Install git latest version
-  yum: name=git state=latest update_cache=yes
-  tags: env
+- name: Install pre-requireties
+  yum: name={{ item }} state=latest update_cache=yes
+  with_items:
+    - git
+    - maven
+    - firewalld
+    - unzip  #need for wso2
 
-- name: Install maven latest version
-  yum: name=maven state=latest update_cache=yes
-  tags: env
 
 ################################################################################
 # Install Orcal Java
 - name: download oracle java 8 rpm
   get_url: url="{{ java_rpm_url }}" dest="{{ java_dir_source }}" headers='Cookie:oraclelicense=accept-securebackup-cookie'
-  tags: env
 
 - name: Install oracle java 8
   yum: name="{{ java_dir_source }}/{{ java_rpm_filename }}" state=present
-  tags: env
 
-- name: set Java version as default
+- name: set Oracle Java {{ java_version_string }} as default
   alternatives:
     name="{{ item.exe }}"
     link="/usr/bin/{{ item.exe }}"
@@ -38,7 +35,17 @@
     - { path: "{{ java_home }}/jre/bin", exe: 'keytool' }
     - { path: "{{ java_home }}/bin", exe: 'javac' }
     - { path: "{{ java_home }}/bin", exe: 'javadoc' }
-  tags: env
 
-# End
+  # TODO: stop iptables service, can't have both iptables and firewalld on same host
+  # if we try to stop non existing service ansible fails.
+# - name: Stop iptables, ip6tables services
+#   service: name="{{ item }}" state=stopped
+#   with_items:
+#     - iptables
+#     - ip6tables
+
+- name: Start firewalld service
+  service: name=firewalld state=started
+  become: yes
+
 ...

http://git-wip-us.apache.org/repos/asf/airavata/blob/93ec75b6/roles/rabbitmq/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/rabbitmq/tasks/main.yml b/roles/rabbitmq/tasks/main.yml
index 56ae071..d1e7ce5 100644
--- a/roles/rabbitmq/tasks/main.yml
+++ b/roles/rabbitmq/tasks/main.yml
@@ -1,23 +1,32 @@
 ---
-
-
 ################################################################################
 # Setup and run rabbitmq
 - name: Install erlang latest version
   yum: name=https://www.rabbitmq.com/releases/erlang/erlang-18.3-1.el7.centos.x86_64.rpm state=present
+  become: yes
 
 - name: Install Rabbitmq rpm
   yum: name=https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.3/rabbitmq-server-3.6.3-1.noarch.rpm state=present
+  become: yes
 
   # add hostname to /etc/hosts file
 - name: get ip4 address
-  command: dig +short myip.opendns.com @resolver1.opendns.com
+  # command: dig +short myip.opendns.com @resolver1.opendns.com
+  command: hostname -i
   register: _ip4
 
+- name: open rabbitmq ports
+  firewalld: port={{ item }} zone=public permanent=true state=enabled immediate=yes
+  with_items:
+    - "{{ rabbitmq_port }}/tcp"
+    - "{{ management_plugin_port }}/tcp"
+  become: yes
+
 - name: Edit /etc/hosts file
-  lineinfile: dest=/etc/hosts line="{{ _ip4.stdout }} {{ ansible_hostname }} {{ ansible_fqdn }}"
+  lineinfile: dest=/etc/hosts line="{{ _ip4.stdout }} {{ rabbit_hostName }}"
   notify:
     - restart rabbitmq
+  become: yes
 
 - name: Start Rabbitmq server
   service: name=rabbitmq-server state=started

http://git-wip-us.apache.org/repos/asf/airavata/blob/93ec75b6/roles/rabbitmq/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/rabbitmq/vars/main.yml b/roles/rabbitmq/vars/main.yml
new file mode 100644
index 0000000..c5ab904
--- /dev/null
+++ b/roles/rabbitmq/vars/main.yml
@@ -0,0 +1,2 @@
+---
+management_plugin_port: "15672"

http://git-wip-us.apache.org/repos/asf/airavata/blob/93ec75b6/roles/wso2_is/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/wso2_is/tasks/main.yml b/roles/wso2_is/tasks/main.yml
new file mode 100644
index 0000000..6cd03b0
--- /dev/null
+++ b/roles/wso2_is/tasks/main.yml
@@ -0,0 +1,69 @@
+---
+# TODO- replace java install with env_setup role
+# Install Orcal Java
+- name: download oracle java 8 rpm
+  get_url: url="{{ java_rpm_url }}" dest="{{ java_dir_source }}" headers='Cookie:oraclelicense=accept-securebackup-cookie'
+  become: yes
+  become_user: root
+
+- name: Install oracle java 8
+  yum: name="{{ java_dir_source }}/{{ java_rpm_filename }}" state=present
+  become: yes
+  become_user: root
+
+- name: set Oracle Java {{ java_version_string }} as default
+  alternatives:
+    name="{{ item.exe }}"
+    link="/usr/bin/{{ item.exe }}"
+    path="{{ item.path }}/{{ item.exe }}"
+  with_items:
+    - { path: "{{ java_home }}/jre/bin", exe: 'java' }
+    - { path: "{{ java_home }}/jre/bin", exe: 'keytool' }
+    - { path: "{{ java_home }}/bin", exe: 'javac' }
+    - { path: "{{ java_home }}/bin", exe: 'javadoc' }
+  become: yes
+  become_user: root
+
+- name: Install pre-requireties
+  yum: name=unzip state=latest update_cache=yes
+  become: yes
+
+- name: Install pre-requireties
+  yum: name=firewalld state=latest update_cache=yes
+  become: yes
+# downlaod wso2 is
+# extract it
+# - name: Download and unarchive wso2 is
+#   unarchive: src="{{ zookeeper_url }}" dest="{{ user_home }}" copy=no owner="{{ user }}" group="{{ group }}"
+# for now wso2is from localhost
+- name: Copy WSO2 IS
+  unarchive: >
+    src="{{ wso2_is_dist }}"
+    dest="{{ user_home }}/"
+    owner="{{ user }}"
+    group="{{ group }}"
+    creates="{{ user_home }}/{{ wso2_is_dir }}/bin/wso2server.sh"
+
+- name: Copy carbon.xml
+  template: src=carbon.xml.j2 dest="{{ user_home }}/{{ wso2_is_dir }}/repository/conf/carbon.xml" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r"
+
+
+- name: Start firewalld service
+  service: name=firewalld state=started
+  become: yes
+
+- name: open carabon management console port
+  firewalld: port=9443/tcp zone=public permanent=true state=enabled immediate=yes
+  become: yes
+
+# start wso2 is server
+- name: start wso2 is
+  command: ./bin/wso2server.sh start chdir="{{ user_home }}/{{ wso2_is_dir }}/" creates="{{ user_home }}/{{ wso2_is_dir }}/wso2carbon.pid"
+  environment:
+    JAVA_HOME: "{{ java_home }}"
+
+# - name: stop wso2 is
+  # command: ./bin/airavata-server-stop.sh -f chdir="{{ gfac_dir }}/{{ airavata_dist }}/" removes="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
+
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/93ec75b6/roles/wso2_is/templates/carbon.xml.j2
----------------------------------------------------------------------
diff --git a/roles/wso2_is/templates/carbon.xml.j2 b/roles/wso2_is/templates/carbon.xml.j2
new file mode 100755
index 0000000..5f421f2
--- /dev/null
+++ b/roles/wso2_is/templates/carbon.xml.j2
@@ -0,0 +1,688 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ 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.
+-->
+
+<!--
+    This is the main server configuration file
+
+    ${carbon.home} represents the carbon.home system property.
+    Other system properties can be specified in a similar manner.
+-->
+<Server xmlns="http://wso2.org/projects/carbon/carbon.xml">
+
+    <!--
+       Product Name
+    -->
+    <Name>WSO2 Identity Server</Name>
+
+    <!--
+       machine readable unique key to identify each product
+    -->
+    <ServerKey>IS</ServerKey>
+
+    <!--
+       Product Version
+    -->
+    <Version>5.1.0</Version>
+
+    <!--
+       Host name or IP address of the machine hosting this server
+       e.g. www.wso2.org, 192.168.1.10
+       This is will become part of the End Point Reference of the
+       services deployed on this server instance.
+    -->
+    <HostName>{{ ansible_fqdn }}</HostName>
+
+    <!--
+    Host name to be used for the Carbon management console
+    -->
+    <MgtHostName>localhost</MgtHostName>
+
+    <!--
+        The URL of the back end server. This is where the admin services are hosted and
+        will be used by the clients in the front end server.
+        This is required only for the Front-end server. This is used when seperating BE server from FE server
+       -->
+    <ServerURL>local:/${carbon.context}/services/</ServerURL>
+    <!--
+    <ServerURL>https://localhost:${carbon.management.port}${carbon.context}/services/</ServerURL>
+    -->
+     <!--
+     The URL of the index page. This is where the user will be redirected after signing in to the
+     carbon server.
+     -->
+    <!-- IndexPageURL>/carbon/admin/index.jsp</IndexPageURL-->
+
+    <!--
+    For cApp deployment, we have to identify the roles that can be acted by the current server.
+    The following property is used for that purpose. Any number of roles can be defined here.
+    Regular expressions can be used in the role.
+    Ex : <Role>.*</Role> means this server can act any role
+    -->
+    <ServerRoles>
+        <Role>IdentityServer</Role>
+    </ServerRoles>
+
+    <!-- uncommnet this line to subscribe to a bam instance automatically -->
+    <!--<BamServerURL>https://bamhost:bamport/services/</BamServerURL>-->
+
+    <!--
+       The fully qualified name of the server
+    -->
+    <Package>org.wso2.carbon</Package>
+
+    <!--
+       Webapp context root of WSO2 Carbon management console.
+    -->
+    <WebContextRoot>/</WebContextRoot>
+
+    <!--
+    	Proxy context path is a useful parameter to add a proxy path when a Carbon server is fronted by reverse proxy. In addtion
+        to the proxy host and proxy port this parameter allows you add a path component to external URLs. e.g.
+     		URL of the Carbon server -> https://10.100.1.1:9443/carbon
+   		URL of the reverse proxy -> https://prod.abc.com/appserver/carbon
+
+   	appserver - proxy context path. This specially required whenever you are generating URLs to displace in
+   	Carbon UI components.
+    -->
+    <!--
+    	<MgtProxyContextPath></MgtProxyContextPath>
+    	<ProxyContextPath></ProxyContextPath>
+    -->
+
+    <!-- In-order to  get the registry http Port from the back-end when the default http transport is not the same-->
+    <!--RegistryHttpPort>9763</RegistryHttpPort-->
+
+    <!--
+    Number of items to be displayed on a management console page. This is used at the
+    backend server for pagination of various items.
+    -->
+    <ItemsPerPage>15</ItemsPerPage>
+
+    <!-- The endpoint URL of the cloud instance management Web service -->
+    <!--<InstanceMgtWSEndpoint>https://ec2.amazonaws.com/</InstanceMgtWSEndpoint>-->
+
+    <!--
+       Ports used by this server
+    -->
+    <Ports>
+
+        <!-- Ports offset. This entry will set the value of the ports defined below to
+         the define value + Offset.
+         e.g. Offset=2 and HTTPS port=9443 will set the effective HTTPS port to 9445
+         -->
+        <Offset>0</Offset>
+
+        <!-- The JMX Ports -->
+        <JMX>
+            <!--The port RMI registry is exposed-->
+            <RMIRegistryPort>9999</RMIRegistryPort>
+            <!--The port RMI server should be exposed-->
+            <RMIServerPort>11111</RMIServerPort>
+        </JMX>
+
+        <!-- Embedded LDAP server specific ports -->
+        <EmbeddedLDAP>
+            <!-- Port which embedded LDAP server runs -->
+            <LDAPServerPort>10389</LDAPServerPort>
+            <!-- Port which KDC (Kerberos Key Distribution Center) server runs -->
+            <KDCServerPort>8000</KDCServerPort>
+        </EmbeddedLDAP>
+
+	<!--
+             Override datasources JNDIproviderPort defined in bps.xml and datasources.properties files
+	-->
+	<!--<JNDIProviderPort>2199</JNDIProviderPort>-->
+	<!--Override receive port of thrift based entitlement service.-->
+	<ThriftEntitlementReceivePort>10500</ThriftEntitlementReceivePort>
+
+    <!--
+     This is the proxy port of the worker cluster. These need to be configured in a scenario where
+     manager node is not exposed through the load balancer through which the workers are exposed
+     therefore doesn't have a proxy port.
+    <WorkerHttpProxyPort>80</WorkerHttpProxyPort>
+    <WorkerHttpsProxyPort>443</WorkerHttpsProxyPort>
+    -->
+
+    </Ports>
+
+    <!--
+        JNDI Configuration
+    -->
+    <JNDI>
+        <!--
+             The fully qualified name of the default initial context factory
+        -->
+        <DefaultInitialContextFactory>org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory</DefaultInitialContextFactory>
+        <!--
+             The restrictions that are done to various JNDI Contexts in a Multi-tenant environment
+        -->
+        <Restrictions>
+            <!--
+                Contexts that will be available only to the super-tenant
+            -->
+            <!-- <SuperTenantOnly>
+                <UrlContexts>
+                    <UrlContext>
+                        <Scheme>foo</Scheme>
+                    </UrlContext>
+                    <UrlContext>
+                        <Scheme>bar</Scheme>
+                    </UrlContext>
+                </UrlContexts>
+            </SuperTenantOnly> -->
+            <!--
+                Contexts that are common to all tenants
+            -->
+            <AllTenants>
+                <UrlContexts>
+                    <UrlContext>
+                        <Scheme>java</Scheme>
+                    </UrlContext>
+                    <!-- <UrlContext>
+                        <Scheme>foo</Scheme>
+                    </UrlContext> -->
+                </UrlContexts>
+            </AllTenants>
+            <!--
+                 All other contexts not mentioned above will be available on a per-tenant basis
+                 (i.e. will not be shared among tenants)
+            -->
+        </Restrictions>
+    </JNDI>
+
+    <!--
+        Property to determine if the server is running an a cloud deployment environment.
+        This property should only be used to determine deployment specific details that are
+        applicable only in a cloud deployment, i.e when the server deployed *-as-a-service.
+    -->
+    <IsCloudDeployment>false</IsCloudDeployment>
+
+    <!--
+	Property to determine whether usage data should be collected for metering purposes
+    -->
+    <EnableMetering>false</EnableMetering>
+
+    <!-- The Max time a thread should take for execution in seconds -->
+    <MaxThreadExecutionTime>600</MaxThreadExecutionTime>
+
+    <!--
+        A flag to enable or disable Ghost Deployer. By default this is set to false. That is
+        because the Ghost Deployer works only with the HTTP/S transports. If you are using
+        other transports, don't enable Ghost Deployer.
+    -->
+    <GhostDeployment>
+        <Enabled>false</Enabled>
+    </GhostDeployment>
+
+
+    <!--
+        Eager loading or lazy loading is a design pattern commonly used in computer programming which
+        will initialize an object upon creation or load on-demand. In carbon, lazy loading is used to
+        load tenant when a request is received only. Similarly Eager loading is used to enable load
+        existing tenants after carbon server starts up. Using this feature, you will be able to include
+        or exclude tenants which are to be loaded when server startup.
+
+        We can enable only one LoadingPolicy at a given time.
+
+        1. Tenant Lazy Loading
+           This is the default behaviour and enabled by default. With this policy, tenants are not loaded at
+           server startup, but loaded based on-demand (i.e when a request is received for a tenant).
+           The default tenant idle time is 30 minutes.
+
+        2. Tenant Eager Loading
+           This is by default not enabled. It can be be enabled by un-commenting the <EagerLoading> section.
+           The eager loading configurations supported are as below. These configurations can be given as the
+           value for <Include> element with eager loading.
+                (i)Load all tenants when server startup             -   *
+                (ii)Load all tenants except foo.com & bar.com       -   *,!foo.com,!bar.com
+                (iii)Load only foo.com &  bar.com to be included    -   foo.com,bar.com
+    -->
+    <Tenant>
+        <LoadingPolicy>
+            <LazyLoading>
+                <IdleTime>30</IdleTime>
+            </LazyLoading>
+            <!-- <EagerLoading>
+                   <Include>*,!foo.com,!bar.com</Include>
+            </EagerLoading>-->
+        </LoadingPolicy>
+    </Tenant>
+
+    <!--
+     Caching related configurations
+    -->
+    <Cache>
+        <!-- Default cache timeout in minutes -->
+        <DefaultCacheTimeout>15</DefaultCacheTimeout>
+    </Cache>
+
+    <!--
+    Axis2 related configurations
+    -->
+    <Axis2Config>
+        <!--
+             Location of the Axis2 Services & Modules repository
+
+             This can be a directory in the local file system, or a URL.
+
+             e.g.
+             1. /home/wso2wsas/repository/ - An absolute path
+             2. repository - In this case, the path is relative to CARBON_HOME
+             3. file:///home/wso2wsas/repository/
+             4. http://wso2wsas/repository/
+        -->
+        <RepositoryLocation>${carbon.home}/repository/deployment/server/</RepositoryLocation>
+
+        <!--
+         Deployment update interval in seconds. This is the interval between repository listener
+         executions.
+        -->
+        <DeploymentUpdateInterval>15</DeploymentUpdateInterval>
+
+        <!--
+            Location of the main Axis2 configuration descriptor file, a.k.a. axis2.xml file
+
+            This can be a file on the local file system, or a URL
+
+            e.g.
+            1. /home/repository/axis2.xml - An absolute path
+            2. conf/axis2.xml - In this case, the path is relative to CARBON_HOME
+            3. file:///home/carbon/repository/axis2.xml
+            4. http://repository/conf/axis2.xml
+        -->
+        <ConfigurationFile>${carbon.home}/repository/conf/axis2/axis2.xml</ConfigurationFile>
+
+        <!--
+          ServiceGroupContextIdleTime, which will be set in ConfigurationContex
+          for multiple clients which are going to access the same ServiceGroupContext
+          Default Value is 30 Sec.
+        -->
+        <ServiceGroupContextIdleTime>30000</ServiceGroupContextIdleTime>
+
+        <!--
+          This repository location is used to crete the client side configuration
+          context used by the server when calling admin services.
+        -->
+        <ClientRepositoryLocation>${carbon.home}/repository/deployment/client/</ClientRepositoryLocation>
+        <!-- This axis2 xml is used in createing the configuration context by the FE server
+         calling to BE server -->
+        <clientAxis2XmlLocation>${carbon.home}/repository/conf/axis2/axis2_client.xml</clientAxis2XmlLocation>
+        <!-- If this parameter is set, the ?wsdl on an admin service will not give the admin service wsdl. -->
+        <HideAdminServiceWSDLs>true</HideAdminServiceWSDLs>
+
+	<!--WARNING-Use With Care! Uncommenting bellow parameter would expose all AdminServices in HTTP transport.
+	With HTTP transport your credentials and data routed in public channels are vulnerable for sniffing attacks.
+	Use bellow parameter ONLY if your communication channels are confirmed to be secured by other means -->
+        <!--HttpAdminServices>*</HttpAdminServices-->
+
+    </Axis2Config>
+
+    <!--
+       The default user roles which will be created when the server
+       is started up for the first time.
+    -->
+    <ServiceUserRoles>
+        <Role>
+            <Name>admin</Name>
+            <Description>Default Administrator Role</Description>
+        </Role>
+        <Role>
+            <Name>user</Name>
+            <Description>Default User Role</Description>
+        </Role>
+    </ServiceUserRoles>
+
+    <!--
+      Enable following config to allow Emails as usernames.
+    -->
+    <!--EnableEmailUserName>true</EnableEmailUserName-->
+
+    <!--
+      Security configurations
+    -->
+    <Security>
+        <!--
+            KeyStore which will be used for encrypting/decrypting passwords
+            and other sensitive information.
+        -->
+        <KeyStore>
+            <!-- Keystore file location-->
+            <Location>${carbon.home}/repository/resources/security/wso2carbon.jks</Location>
+            <!-- Keystore type (JKS/PKCS12 etc.)-->
+            <Type>JKS</Type>
+            <!-- Keystore password-->
+            <Password>wso2carbon</Password>
+            <!-- Private Key alias-->
+            <KeyAlias>wso2carbon</KeyAlias>
+            <!-- Private Key password-->
+            <KeyPassword>wso2carbon</KeyPassword>
+        </KeyStore>
+
+        <!--
+            System wide trust-store which is used to maintain the certificates of all
+            the trusted parties.
+        -->
+        <TrustStore>
+            <!-- trust-store file location -->
+            <Location>${carbon.home}/repository/resources/security/client-truststore.jks</Location>
+            <!-- trust-store type (JKS/PKCS12 etc.) -->
+            <Type>JKS</Type>
+            <!-- trust-store password -->
+            <Password>wso2carbon</Password>
+        </TrustStore>
+
+        <!--
+            The Authenticator configuration to be used at the JVM level. We extend the
+            java.net.Authenticator to make it possible to authenticate to given servers and
+            proxies.
+        -->
+        <NetworkAuthenticatorConfig>
+            <!--
+                Below is a sample configuration for a single authenticator. Please note that
+                all child elements are mandatory. Not having some child elements would lead to
+                exceptions at runtime.
+            -->
+            <!-- <Credential> -->
+                <!--
+                    the pattern that would match a subset of URLs for which this authenticator
+                    would be used
+                -->
+                <!-- <Pattern>regularExpression</Pattern> -->
+                <!--
+                    the type of this authenticator. Allowed values are:
+                    1. server
+                    2. proxy
+                -->
+                <!-- <Type>proxy</Type> -->
+                <!-- the username used to log in to server/proxy -->
+                <!-- <Username>username</Username> -->
+                <!-- the password used to log in to server/proxy -->
+                <!-- <Password>password</Password> -->
+            <!-- </Credential> -->
+        </NetworkAuthenticatorConfig>
+
+        <!--
+         The Tomcat realm to be used for hosted Web applications. Allowed values are;
+         1. UserManager
+         2. Memory
+
+         If this is set to 'UserManager', the realm will pick users & roles from the system's
+         WSO2 User Manager. If it is set to 'memory', the realm will pick users & roles from
+         CARBON_HOME/repository/conf/tomcat/tomcat-users.xml
+        -->
+        <TomcatRealm>UserManager</TomcatRealm>
+
+	<!--Option to disable storing of tokens issued by STS-->
+	<DisableTokenStore>false</DisableTokenStore>
+
+	<!--
+	 Security token store class name. If this is not set, default class will be
+	 org.wso2.carbon.security.util.SecurityTokenStore
+	-->
+	<TokenStoreClassName>org.wso2.carbon.identity.sts.store.DBTokenStore</TokenStoreClassName>
+
+
+
+        <!-- Configurations to avoid Cross Site Request Forgery vulnerabilities -->
+        <CSRFPreventionConfig>
+            <!-- CSRFPreventionFilter configurations that adopts Synchronizer Token Pattern -->
+            <CSRFPreventionFilter>
+                <!-- Set below to true to enable the CSRFPreventionFilter -->
+                <Enabled>false</Enabled>
+                <!-- Url Pattern to skip application of CSRF protection-->
+                <SkipUrlPattern>(.*)(/images|/css|/js|/docs)(.*)</SkipUrlPattern>
+            </CSRFPreventionFilter>
+        </CSRFPreventionConfig>
+
+        <!-- Configuration to enable or disable CR and LF sanitization filter-->
+        <CRLFPreventionConfig>
+            <!--Set below to true to enable the CRLFPreventionFilter-->
+            <Enabled>true</Enabled>
+        </CRLFPreventionConfig>
+    </Security>
+
+    <!--
+       The temporary work directory
+    -->
+    <WorkDirectory>${carbon.home}/tmp/work</WorkDirectory>
+
+    <!--
+       House-keeping configuration
+    -->
+    <HouseKeeping>
+
+        <!--
+           true  - Start House-keeping thread on server startup
+           false - Do not start House-keeping thread on server startup.
+                   The user will run it manually as and when he wishes.
+        -->
+        <AutoStart>true</AutoStart>
+
+        <!--
+           The interval in *minutes*, between house-keeping runs
+        -->
+        <Interval>10</Interval>
+
+        <!--
+          The maximum time in *minutes*, temp files are allowed to live
+          in the system. Files/directories which were modified more than
+          "MaxTempFileLifetime" minutes ago will be removed by the
+          house-keeping task
+        -->
+        <MaxTempFileLifetime>30</MaxTempFileLifetime>
+    </HouseKeeping>
+
+    <!--
+       Configuration for handling different types of file upload & other file uploading related
+       config parameters.
+       To map all actions to a particular FileUploadExecutor, use
+       <Action>*</Action>
+    -->
+    <FileUploadConfig>
+        <!--
+           The total file upload size limit in MB
+        -->
+        <TotalFileSizeLimit>100</TotalFileSizeLimit>
+
+        <Mapping>
+            <Actions>
+                <Action>keystore</Action>
+                <Action>certificate</Action>
+                <Action>*</Action>
+            </Actions>
+            <Class>org.wso2.carbon.ui.transports.fileupload.AnyFileUploadExecutor</Class>
+        </Mapping>
+
+        <Mapping>
+            <Actions>
+                <Action>jarZip</Action>
+            </Actions>
+            <Class>org.wso2.carbon.ui.transports.fileupload.JarZipUploadExecutor</Class>
+        </Mapping>
+        <Mapping>
+            <Actions>
+                <Action>dbs</Action>
+            </Actions>
+            <Class>org.wso2.carbon.ui.transports.fileupload.DBSFileUploadExecutor</Class>
+        </Mapping>
+        <Mapping>
+            <Actions>
+                <Action>tools</Action>
+            </Actions>
+            <Class>org.wso2.carbon.ui.transports.fileupload.ToolsFileUploadExecutor</Class>
+        </Mapping>
+        <Mapping>
+            <Actions>
+                <Action>toolsAny</Action>
+            </Actions>
+            <Class>org.wso2.carbon.ui.transports.fileupload.ToolsAnyFileUploadExecutor</Class>
+        </Mapping>
+    </FileUploadConfig>
+
+    <!-- FileNameRegEx is used to validate the file input/upload/write-out names.
+    e.g.
+     <FileNameRegEx>^(?!(?:CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\.[^.])?$)[^&lt;&gt:"/\\|?*\x00-\x1F][^&lt;&gt:"/\\|?*\x00-\x1F\ .]$</FileNameRegEx>
+    -->
+    <!--<FileNameRegEx></FileNameRegEx>-->
+
+    <!--
+       Processors which process special HTTP GET requests such as ?wsdl, ?policy etc.
+
+       In order to plug in a processor to handle a special request, simply add an entry to this
+       section.
+
+       The value of the Item element is the first parameter in the query string(e.g. ?wsdl)
+       which needs special processing
+
+       The value of the Class element is a class which implements
+       org.wso2.carbon.transport.HttpGetRequestProcessor
+    -->
+    <HttpGetRequestProcessors>
+        <Processor>
+            <Item>info</Item>
+            <Class>org.wso2.carbon.core.transports.util.InfoProcessor</Class>
+        </Processor>
+        <Processor>
+            <Item>wsdl</Item>
+            <Class>org.wso2.carbon.core.transports.util.Wsdl11Processor</Class>
+        </Processor>
+        <Processor>
+            <Item>wsdl2</Item>
+            <Class>org.wso2.carbon.core.transports.util.Wsdl20Processor</Class>
+        </Processor>
+        <Processor>
+            <Item>xsd</Item>
+            <Class>org.wso2.carbon.core.transports.util.XsdProcessor</Class>
+        </Processor>
+    </HttpGetRequestProcessors>
+
+    <!-- Deployment Synchronizer Configuration. t Enabled value to true when running with "svn based" dep sync.
+	In master nodes you need to set both AutoCommit and AutoCheckout to true
+	and in  worker nodes set only AutoCheckout to true.
+    -->
+    <DeploymentSynchronizer>
+        <Enabled>false</Enabled>
+        <AutoCommit>false</AutoCommit>
+        <AutoCheckout>true</AutoCheckout>
+        <RepositoryType>svn</RepositoryType>
+        <SvnUrl>http://svnrepo.example.com/repos/</SvnUrl>
+        <SvnUser>username</SvnUser>
+        <SvnPassword>password</SvnPassword>
+        <SvnUrlAppendTenantId>true</SvnUrlAppendTenantId>
+    </DeploymentSynchronizer>
+
+    <!-- Deployment Synchronizer Configuration. Uncomment the following section when running with "registry based" dep sync.
+        In master nodes you need to set both AutoCommit and AutoCheckout to true
+        and in  worker nodes set only AutoCheckout to true.
+    -->
+    <!--<DeploymentSynchronizer>
+        <Enabled>true</Enabled>
+        <AutoCommit>false</AutoCommit>
+        <AutoCheckout>true</AutoCheckout>
+    </DeploymentSynchronizer>-->
+
+    <!-- Mediation persistence configurations. Only valid if mediation features are available i.e. ESB -->
+    <!--<MediationConfig>
+        <LoadFromRegistry>false</LoadFromRegistry>
+        <SaveToFile>false</SaveToFile>
+        <Persistence>enabled</Persistence>
+        <RegistryPersistence>enabled</RegistryPersistence>
+    </MediationConfig>-->
+
+    <!--
+    Server intializing code, specified as implementation classes of org.wso2.carbon.core.ServerInitializer.
+    This code will be run when the Carbon server is initialized
+    -->
+    <ServerInitializers>
+        <!--<Initializer></Initializer>-->
+    </ServerInitializers>
+
+    <!--
+    Indicates whether the Carbon Servlet is required by the system, and whether it should be
+    registered
+    -->
+    <RequireCarbonServlet>${require.carbon.servlet}</RequireCarbonServlet>
+
+    <!--
+    Carbon H2 OSGI Configuration
+    By default non of the servers start.
+        name="web" - Start the web server with the H2 Console
+        name="webPort" - The port (default: 8082)
+        name="webAllowOthers" - Allow other computers to connect
+        name="webSSL" - Use encrypted (HTTPS) connections
+        name="tcp" - Start the TCP server
+        name="tcpPort" - The port (default: 9092)
+        name="tcpAllowOthers" - Allow other computers to connect
+        name="tcpSSL" - Use encrypted (SSL) connections
+        name="pg" - Start the PG server
+        name="pgPort"  - The port (default: 5435)
+        name="pgAllowOthers"  - Allow other computers to connect
+        name="trace" - Print additional trace information; for all servers
+        name="baseDir" - The base directory for H2 databases; for all servers
+    -->
+    <!--H2DatabaseConfiguration>
+        <property name="web" />
+        <property name="webPort">8082</property>
+        <property name="webAllowOthers" />
+        <property name="webSSL" />
+        <property name="tcp" />
+        <property name="tcpPort">9092</property>
+        <property name="tcpAllowOthers" />
+        <property name="tcpSSL" />
+        <property name="pg" />
+        <property name="pgPort">5435</property>
+        <property name="pgAllowOthers" />
+        <property name="trace" />
+        <property name="baseDir">${carbon.home}</property>
+    </H2DatabaseConfiguration-->
+    <!--Disabling statistics reporter by default-->
+    <StatisticsReporterDisabled>true</StatisticsReporterDisabled>
+
+    <!-- Enable accessing Admin Console via HTTP -->
+    <!-- EnableHTTPAdminConsole>true</EnableHTTPAdminConsole -->
+
+    <!--
+       Default Feature Repository of WSO2 Carbon.
+    -->
+    <FeatureRepository>
+	    <RepositoryName>default repository</RepositoryName>
+	    <RepositoryURL>http://product-dist.wso2.com/p2/carbon/releases/wilkes/</RepositoryURL>
+    </FeatureRepository>
+
+    <!--
+	Configure API Management
+   -->
+   <APIManagement>
+
+	<!--Uses the embedded API Manager by default. If you want to use an external
+	API Manager instance to manage APIs, configure below  externalAPIManager-->
+
+	<Enabled>true</Enabled>
+
+	<!--Uncomment and configure API Gateway and
+	Publisher URLs to use external API Manager instance-->
+
+	<!--ExternalAPIManager>
+
+		<APIGatewayURL>http://localhost:8281</APIGatewayURL>
+		<APIPublisherURL>http://localhost:8281/publisher</APIPublisherURL>
+
+	</ExternalAPIManager-->
+
+	<LoadAPIContextsInServerStartup>true</LoadAPIContextsInServerStartup>
+   </APIManagement>
+</Server>

http://git-wip-us.apache.org/repos/asf/airavata/blob/93ec75b6/roles/wso2_is/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/wso2_is/vars/main.yml b/roles/wso2_is/vars/main.yml
new file mode 100644
index 0000000..f7b4eb7
--- /dev/null
+++ b/roles/wso2_is/vars/main.yml
@@ -0,0 +1,18 @@
+---
+#Variables associated with this role
+# Oracle Java 8
+java_dir_source: "/usr/local/src"
+
+java_version: 8
+java_version_update: 91
+java_version_build: '14'
+java_version_string: "1.{{ java_version }}.0_{{ java_version_update }}"
+java_home: "/usr/java/jdk1.{{ java_version }}.0_{{ java_version_update }}"
+
+java_rpm_filename: "jdk-{{ java_version }}u{{ java_version_update }}-linux-x64.rpm"
+java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/{{ java_version }}u{{ java_version_update }}-b{{ java_version_build }}/{{ java_rpm_filename }}"
+
+wso2_is_rul: http://wso2.com/products/identity-server/#download
+wso2_is_dist: wso2is-5.1.0.zip
+wso2_is_dir: wso2is-5.1.0
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/93ec75b6/site.yml
----------------------------------------------------------------------
diff --git a/site.yml b/site.yml
index 63c2fae..0de15ef 100644
--- a/site.yml
+++ b/site.yml
@@ -36,4 +36,8 @@
   roles:
     - database
 
+- hosts: wso2is
+  tags: wso2is
+  roles:
+    - wso2_is
 ...


[05/50] [abbrv] airavata git commit: Refactor readme

Posted by la...@apache.org.
Refactor readme


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 5f7bce68e19bec727d203c1e5f1fc961f12c86db
Parents: bbe01a7
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Thu Jul 28 12:43:43 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Thu Jul 28 12:48:53 2016 -0400

----------------------------------------------------------------------
 README.md | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/5f7bce68/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 14839a7..a3e13b3 100644
--- a/README.md
+++ b/README.md
@@ -1,19 +1,23 @@
 # airavata-ansible
+
 Ansible script to deploy Apache Airavata
 
 ## Support OS
-  * Centos 7
+
+- Centos 7
 
 ## Roles
-**setup** :- Create user and group, install oracle java 8   
-**zookeeper** :- Download and install zookeeper.  
-**rabbitmq** :- Download and install rabbitmq as service.  
-**common** :- Checkout Airavata source from git and run maven build. Move keystore files.  
-**gfac** :- Setup Gfac deployment and Change configurations.  
-**api-orch** :- Setup Api-Orch deployment and Change configurations.  
-**pga** :- Deploy Airavata PHP Gateway.  
+
+- **setup** :- Create user and group, install oracle java 8
+- **zookeeper** :- Download and install zookeeper.
+- **rabbitmq** :- Download and install rabbitmq as service.
+- **common** :- Checkout Airavata source from git and run maven build. Move keystore files.
+- **gfac** :- Setup Gfac deployment and Change configurations.
+- **api-orch** :- Setup Api-Orch deployment and Change configurations.
+- **pga** :- Deploy Airavata PHP Gateway._(Under development)_
 
 ## Useful commands
-  * `ansible-playbook -i hosts site.yml`  
-  * `ansible-playbook -i hosts site.yml -t "tags"`  
-  * `ansible-playbook -i hosts site.yml --start-at-task="name of the ansible task"`
+
+- `ansible-playbook -i hosts site.yml`
+- `ansible-playbook -i hosts site.yml -t "tags"`
+- `ansible-playbook -i hosts site.yml --start-at-task="name of the ansible task"`


[37/50] [abbrv] airavata git commit: Update properties

Posted by la...@apache.org.
Update properties


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 72f35c19c66b038dab4bc20f6365a80b857692cd
Parents: 2ab5a72
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Mon Sep 19 14:35:24 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Mon Sep 19 14:35:24 2016 -0400

----------------------------------------------------------------------
 group_vars/all.yml                                |  5 +++--
 .../templates/airavata-server.properties.j2       |  2 ++
 .../gfac/templates/airavata-server.properties.j2  |  2 ++
 roles/pga/tasks/main.yml                          |  7 +++++++
 roles/pga/templates/pga_config.php.j2             | 18 ++++++++++++++----
 roles/pga/vars/main.yml                           | 16 ++++++++--------
 .../templates/airavata-server.properties.j2       |  2 ++
 7 files changed, 38 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/72f35c19/group_vars/all.yml
----------------------------------------------------------------------
diff --git a/group_vars/all.yml b/group_vars/all.yml
index 7dfd8d4..d49f583 100644
--- a/group_vars/all.yml
+++ b/group_vars/all.yml
@@ -2,7 +2,7 @@
 ansible_connection: ssh
 # 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/dev-deployment-key.pem
 # ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-aws.pem.txt
 
 user: centos
@@ -44,9 +44,10 @@ zookeeper_url: "{{ groups['zookeeper'][0] }}:{{ zookeeper_client_port }}"
 api_server_name: "apiserver-node0"
 api_server_host: "{{ansible_fqdn}}"
 api_server_port: "8930"
-api_secured: "true"
+api_secured: "false"
 tls_enable: "false"
 api_server_tls_port: "9930"
+enable_sharing: false
 
 # Orchestrator  related variables
 orchestrator_name: "orchestrator-node0"

http://git-wip-us.apache.org/repos/asf/airavata/blob/72f35c19/roles/api-orch/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/api-orch/templates/airavata-server.properties.j2 b/roles/api-orch/templates/airavata-server.properties.j2
index 5a01525..e36b029 100644
--- a/roles/api-orch/templates/airavata-server.properties.j2
+++ b/roles/api-orch/templates/airavata-server.properties.j2
@@ -43,6 +43,7 @@ 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=admin
@@ -185,6 +186,7 @@ credential.store.jdbc.driver=com.mysql.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

http://git-wip-us.apache.org/repos/asf/airavata/blob/72f35c19/roles/gfac/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/gfac/templates/airavata-server.properties.j2 b/roles/gfac/templates/airavata-server.properties.j2
index 5a01525..e36b029 100644
--- a/roles/gfac/templates/airavata-server.properties.j2
+++ b/roles/gfac/templates/airavata-server.properties.j2
@@ -43,6 +43,7 @@ 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=admin
@@ -185,6 +186,7 @@ credential.store.jdbc.driver=com.mysql.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

http://git-wip-us.apache.org/repos/asf/airavata/blob/72f35c19/roles/pga/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/pga/tasks/main.yml b/roles/pga/tasks/main.yml
index 80beac2..6fe1df5 100644
--- a/roles/pga/tasks/main.yml
+++ b/roles/pga/tasks/main.yml
@@ -32,6 +32,13 @@
   yum: name=php-mcrypt state=latest update_cache=yes
   become: yes
 
+# - name: Check previous deployments
+#   stat: path="{{ doc_root_dir }}" get_md5=no get_checksum=no
+#   register: check
+
+- name: delete previous deployments
+  file: path="{{ doc_root_dir }}" state=absent
+
 - name: Git clone php gateway
   git: repo=https://github.com/apache/airavata-php-gateway.git
        dest="{{ doc_root_dir }}" version=master

http://git-wip-us.apache.org/repos/asf/airavata/blob/72f35c19/roles/pga/templates/pga_config.php.j2
----------------------------------------------------------------------
diff --git a/roles/pga/templates/pga_config.php.j2 b/roles/pga/templates/pga_config.php.j2
index 703f67f..7b38575 100644
--- a/roles/pga/templates/pga_config.php.j2
+++ b/roles/pga/templates/pga_config.php.j2
@@ -11,17 +11,17 @@ return array(
         /**
          * Admin Role Name
          */
-        'admin-role-name' => 'Internal/everyone',
+        'admin-role-name' => 'admin',
 
         /**
          * Read only Admin Role Name
          */
-        'read-only-admin-role-name' => 'Internal/everyone',
+        'read-only-admin-role-name' => 'admin-read-only',
 
         /**
          * Gateway user role
          */
-        'user-role-name' => 'Internal/everyone',
+        'user-role-name' => 'gateway-user',
 
         /**
          * Tenant Domain
@@ -49,6 +49,11 @@ return array(
         'oauth-client-secret' => '{{ oauth_client_secret }}',
 
         /**
+         * OAuth Grant Type (password or authorization_code)
+         */
+        'oauth-grant-type' => 'password',
+
+        /**
          * Identity server domain
          */
         'server' => 'idp.scigap.org',
@@ -151,7 +156,12 @@ return array(
          /**
          * Gateway data store resource id
          */
-         'gateway-data-store-resource-id' => '{{ gateway_data_store_resource_id }}'
+         'gateway-data-store-resource-id' => '{{ gateway_data_store_resource_id }}',
+
+         /**
+          * Data Sharing enabled
+          */
+          'data-sharing-enabled' => false
     ],
 
     /**

http://git-wip-us.apache.org/repos/asf/airavata/blob/72f35c19/roles/pga/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/pga/vars/main.yml b/roles/pga/vars/main.yml
index b7ba81f..35c5122 100644
--- a/roles/pga/vars/main.yml
+++ b/roles/pga/vars/main.yml
@@ -7,15 +7,15 @@ user_data_dir: "/var/www/user_data"
 httpd_conf_file_location: "/etc/httpd/conf"
 
 ## WSO2 IS related variables
-tenant_domain: "master2.airavata"
-admin_username: "master2"
-admin_password: "master"
-oauth_client_key: "5_GFR88Nzd4XvGthSMF1fnOJPuMa"
-oauth_client_secret: "KNTf_LPLuGBDbRVZwkrP_fF5z2Ea"
+tenant_domain: "prod.testdrive"
+admin_username: "tdaadmin"
+admin_password: "SciDeploy"
+oauth_client_key: "RuLl_Uw7i_KXaLoAGJkiasTfyBYa"
+oauth_client_secret: "vD9yi2ANkChzgWiih3RahrIcfsoa"
 
 ## Airavata Client related variables
 #airavata_server: "tls://gw77.iu.xsede.org"
-airavata_server: "http://{{ groups['api-orch'][0] }}"
+airavata_server: "{{ groups['api-orch'][0] }}"
 airavata_port: "8930"
 gateway_id: "default"
 # relative to document root dir
@@ -23,8 +23,8 @@ experiment_data_dir: "{{ user_data_dir }}"
 gateway_data_store_resource_id: "gw75.iu.xsede.org_3e40e62b-be11-4590-bf24-b1b6796c3572"
 
 ## Portal related variables
-super_admin_portal: "false"
-admin_emails: "'sgg@iu.edu','blas@gmail.com'"
+super_admin_portal: "true"
+admin_emails: "'sgg@iu.edu'"
 portal_email_username: "pga.airavata@gmail.com"
 portal_email_password: "airavata12"
 ...

http://git-wip-us.apache.org/repos/asf/airavata/blob/72f35c19/roles/registry/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/registry/templates/airavata-server.properties.j2 b/roles/registry/templates/airavata-server.properties.j2
index 5a01525..e36b029 100644
--- a/roles/registry/templates/airavata-server.properties.j2
+++ b/roles/registry/templates/airavata-server.properties.j2
@@ -43,6 +43,7 @@ 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=admin
@@ -185,6 +186,7 @@ credential.store.jdbc.driver=com.mysql.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


[32/50] [abbrv] airavata git commit: Change hostnames in runtime to avoid address bind issue

Posted by la...@apache.org.
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 <sh...@gmail.com>
Authored: Wed Sep 14 13:10:43 2016 -0400
Committer: Shameera Rathnayaka <sh...@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


[10/50] [abbrv] airavata git commit: Added airavata role tags

Posted by la...@apache.org.
Added airavata role tags


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 1fb43694649a5d0ad12a78fd13deb748e5bbeaaa
Parents: 22a68cc
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Mon Aug 1 14:32:38 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Mon Aug 1 14:32:38 2016 -0400

----------------------------------------------------------------------
 site.yml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/1fb43694/site.yml
----------------------------------------------------------------------
diff --git a/site.yml b/site.yml
index d86dac0..7f775db 100644
--- a/site.yml
+++ b/site.yml
@@ -1,26 +1,26 @@
 ---
 #Master playbook
 - hosts: zookeeper
-  tags: zookeeper
+  tags: zookeeper, airavata
   roles:
     - env_setup
     - zookeeper
 
 - hosts: rabbitmq
-  tags: rabbitmq
+  tags: rabbitmq, airavata
   roles:
     - env_setup
     - rabbitmq
 
 - hosts: gfac
-  tags: gfac
+  tags: gfac, airavata
   roles:
     - env_setup
     - common
     - gfac
 
 - hosts: api-orch
-  tags: api-orch
+  tags: api-orch, airavata
   roles:
     - env_setup
     - common


[49/50] [abbrv] airavata git commit: [AIRAVATA-2065] Introduce more robust logging mechanism for Airavata

Posted by la...@apache.org.
[AIRAVATA-2065] Introduce more robust logging mechanism for Airavata

Summary:
1. Add configurable KafkaAppender (default turned off) which will push
the airavata logs to kafka topic.

2. Use configured kafka topic prefix and construct the topic name based on
the airavata role running.

3. Bring back logback as the logging library.
4. Use git describe in the server version string and introduce new serverId with more metadata.
5. Added new class to handle specifically AWS deployment (use aws-metadata service).
6. Add MDC context to orchestrator and gfac thread executions.

Test Plan: Deployed a Airavata setup in AWS with ES cluster and tested the logs.

Reviewers: supun, ajinkya, suresh

Differential Revision: https://airavata.exana.io/D2


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 342400cf310a8cd9d3350751f31e6895e4ecf603
Parents: 59142dd
Author: Lahiru Ginnaliya Gamathige <la...@apache.org>
Authored: Sun Aug 21 00:49:58 2016 -0700
Committer: Lahiru Ginnaliya Gamathige <la...@apache.org>
Committed: Wed Sep 28 00:29:05 2016 -0700

----------------------------------------------------------------------
 modules/commons/pom.xml                         |  12 +-
 .../airavata/common/utils/BuildConstant.java    |  26 ++++
 .../airavata/common/logging/Exception.java      |  66 +++++++++
 .../airavata/common/logging/LogEntry.java       | 132 ++++++++++++++++++
 .../airavata/common/logging/MDCConstants.java   |  30 ++++
 .../apache/airavata/common/logging/MDCUtil.java |  32 +++++
 .../airavata/common/logging/ServerId.java       |  68 +++++++++
 .../common/logging/kafka/KafkaAppender.java     | 115 ++++++++++++++++
 .../airavata/common/utils/AiravataZKUtils.java  |  13 +-
 .../common/utils/ApplicationSettings.java       |  34 +++--
 .../airavata/common/utils/AwsMetadata.java      | 137 +++++++++++++++++++
 .../airavata/common/utils/ServerSettings.java   |  34 +++++
 .../main/resources/airavata-server.properties   |   8 +-
 modules/distribution/pom.xml                    |  19 +--
 .../gfac/bes/provider/impl/BESProvider.java     |   5 +-
 .../impl/JSDLGeneratorTestWithMyProxyAuth.java  |   2 +-
 .../apache/airavata/gfac/core/GFacUtils.java    |   2 +-
 .../gfac/core/context/ProcessContext.java       |   4 +-
 .../airavata/gfac/core/context/TaskContext.java |   4 +-
 .../gfac/impl/task/BESJobSubmissionTask.java    |  11 +-
 .../gfac/monitor/email/EmailBasedMonitor.java   |  16 +--
 .../services/impl/BigRed2TestWithSSHAuth.java   |   2 +-
 .../impl/GSISSHProviderTestWithMyProxyAuth.java |   2 +-
 .../impl/SSHProviderTestWithSSHAuth.java        |   2 +-
 .../airavata/gfac/server/GfacServerHandler.java |  42 +++---
 .../server/OrchestratorServerHandler.java       |  33 +++--
 modules/registry/registry-core/pom.xml          |  27 ----
 .../org/apache/airavata/server/ServerMain.java  |  38 ++++-
 .../utils/PropertyReader.java                   |   3 +-
 .../core/AbstractThriftDeserializer.java        |   3 +-
 pom.xml                                         |  65 +++++++++
 31 files changed, 873 insertions(+), 114 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/commons/pom.xml
----------------------------------------------------------------------
diff --git a/modules/commons/pom.xml b/modules/commons/pom.xml
index a2136c6..f4231ce 100644
--- a/modules/commons/pom.xml
+++ b/modules/commons/pom.xml
@@ -115,7 +115,6 @@
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.curator</groupId>
@@ -127,12 +126,21 @@
             <artifactId>libthrift</artifactId>
             <version>${thrift.version}</version>
         </dependency>
-
         <dependency>
             <groupId>com.google.code.gson</groupId>
             <artifactId>gson</artifactId>
             <version>${google.gson.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.kafka</groupId>
+            <artifactId>kafka-clients</artifactId>
+            <version>${kafka-clients.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>${logback.version}</version>
+        </dependency>
     </dependencies>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/commons/src/main/java-templates/org/apache/airavata/common/utils/BuildConstant.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java-templates/org/apache/airavata/common/utils/BuildConstant.java b/modules/commons/src/main/java-templates/org/apache/airavata/common/utils/BuildConstant.java
new file mode 100644
index 0000000..8cf5ddf
--- /dev/null
+++ b/modules/commons/src/main/java-templates/org/apache/airavata/common/utils/BuildConstant.java
@@ -0,0 +1,26 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.airavata.common.utils;
+
+public class BuildConstant {
+    public static final String VERSION = "${git-describe}";
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/commons/src/main/java/org/apache/airavata/common/logging/Exception.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/logging/Exception.java b/modules/commons/src/main/java/org/apache/airavata/common/logging/Exception.java
new file mode 100644
index 0000000..cea0c95
--- /dev/null
+++ b/modules/commons/src/main/java/org/apache/airavata/common/logging/Exception.java
@@ -0,0 +1,66 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.airavata.common.logging;
+
+
+public class Exception {
+
+    private String message;
+
+    private String[] stackTrace;
+
+    private String className;
+
+    public Exception(String message, String[] stackTrace) {
+        this.message = message;
+        this.stackTrace = stackTrace;
+    }
+
+    public Exception(String message, String[] stackTrace, String className) {
+        this.message = message;
+        this.stackTrace = stackTrace;
+        this.className = className;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public String[] getStackTrace() {
+        return stackTrace;
+    }
+
+    public void setStackTrace(String[] stackTrace) {
+        this.stackTrace = stackTrace;
+    }
+
+    public String getClassName() {
+        return className;
+    }
+
+    public void setClassName(String className) {
+        this.className = className;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/commons/src/main/java/org/apache/airavata/common/logging/LogEntry.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/logging/LogEntry.java b/modules/commons/src/main/java/org/apache/airavata/common/logging/LogEntry.java
new file mode 100644
index 0000000..72fc4a0
--- /dev/null
+++ b/modules/commons/src/main/java/org/apache/airavata/common/logging/LogEntry.java
@@ -0,0 +1,132 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.airavata.common.logging;
+
+
+import java.lang.*;
+import java.util.Map;
+
+public class LogEntry {
+
+    private ServerId serverId;
+
+    private String message;
+
+    private String timestamp;
+
+    private String level;
+
+    private String loggerName;
+
+    private Map<String, String> mdc;
+
+    private String threadName;
+
+    private Exception exception;
+
+    public LogEntry(ServerId serverId, String message, String timestamp, String level, String loggerName, Map<String,
+            String> mdc, String threadName, Exception exception) {
+        this.serverId = serverId;
+        this.message = message;
+        this.timestamp = timestamp;
+        this.level = level;
+        this.loggerName = loggerName;
+        this.mdc = mdc;
+        this.threadName = threadName;
+        this.exception = exception;
+    }
+
+    public LogEntry(ServerId serverId, String message, String timestamp, String level, String loggerName, Map<String,
+            String> mdc, String threadName) {
+        this.serverId = serverId;
+        this.message = message;
+        this.timestamp = timestamp;
+        this.level = level;
+        this.loggerName = loggerName;
+        this.mdc = mdc;
+        this.threadName = threadName;
+    }
+
+
+    public ServerId getServerId() {
+        return serverId;
+    }
+
+    public void setServerId(ServerId serverId) {
+        this.serverId = serverId;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public String getTimestamp() {
+        return timestamp;
+    }
+
+    public void setTimestamp(String timestamp) {
+        this.timestamp = timestamp;
+    }
+
+    public String getLevel() {
+        return level;
+    }
+
+    public void setLevel(String level) {
+        this.level = level;
+    }
+
+    public String getLoggerName() {
+        return loggerName;
+    }
+
+    public void setLoggerName(String loggerName) {
+        this.loggerName = loggerName;
+    }
+
+    public Map<String, String> getMdc() {
+        return mdc;
+    }
+
+    public void setMdc(Map<String, String> mdc) {
+        this.mdc = mdc;
+    }
+
+    public String getThreadName() {
+        return threadName;
+    }
+
+    public void setThreadName(String threadName) {
+        this.threadName = threadName;
+    }
+
+    public Exception getException() {
+        return exception;
+    }
+
+    public void setException(Exception exception) {
+        this.exception = exception;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/commons/src/main/java/org/apache/airavata/common/logging/MDCConstants.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/logging/MDCConstants.java b/modules/commons/src/main/java/org/apache/airavata/common/logging/MDCConstants.java
new file mode 100644
index 0000000..487bce0
--- /dev/null
+++ b/modules/commons/src/main/java/org/apache/airavata/common/logging/MDCConstants.java
@@ -0,0 +1,30 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.airavata.common.logging;
+
+
+public class MDCConstants {
+    public static final String EXPERIMENT_ID = "experiment_id";
+    public static final String GATEWAY_ID = "gateway_id";
+    public static final String EXPERIMENT_NAME = "experiment_name";
+    public static final String PROCESS_ID = "process_id";
+    public static final String TOKEN_ID = "token_id";
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/commons/src/main/java/org/apache/airavata/common/logging/MDCUtil.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/logging/MDCUtil.java b/modules/commons/src/main/java/org/apache/airavata/common/logging/MDCUtil.java
new file mode 100644
index 0000000..4549d25
--- /dev/null
+++ b/modules/commons/src/main/java/org/apache/airavata/common/logging/MDCUtil.java
@@ -0,0 +1,32 @@
+///
+// Copyright (c) 2016. Highfive Technologies, Inc.
+///
+package org.apache.airavata.common.logging;
+import org.slf4j.MDC;
+
+import java.util.Map;
+
+public class MDCUtil {
+    public static Runnable wrapWithMDC(Runnable r) {
+        Map<String, String> mdc = MDC.getCopyOfContextMap();
+        return () -> {
+            Map<String, String> oldMdc = MDC.getCopyOfContextMap();
+
+            if (mdc == null) {
+                MDC.clear();
+            } else {
+                MDC.setContextMap(mdc);
+            }
+            try {
+                r.run();
+            } finally {
+                if (oldMdc == null) {
+                    MDC.clear();
+                } else {
+                    MDC.setContextMap(oldMdc);
+                }
+            }
+
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/commons/src/main/java/org/apache/airavata/common/logging/ServerId.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/logging/ServerId.java b/modules/commons/src/main/java/org/apache/airavata/common/logging/ServerId.java
new file mode 100644
index 0000000..9611302
--- /dev/null
+++ b/modules/commons/src/main/java/org/apache/airavata/common/logging/ServerId.java
@@ -0,0 +1,68 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.airavata.common.logging;
+
+public class ServerId {
+    private String serverId;
+    private String hostName;
+    private String version;
+
+    private String[] roles; // gfac, orchestrator, apiserver,
+
+    public ServerId(String serverId, String hostName, String version, String[] roles) {
+        this.serverId = serverId;
+        this.hostName = hostName;
+        this.version = version;
+        this.roles = roles;
+    }
+
+    public String getServerId() {
+        return serverId;
+    }
+
+    public void setServerId(String serverId) {
+        this.serverId = serverId;
+    }
+
+    public String getHostName() {
+        return hostName;
+    }
+
+    public void setHostName(String hostName) {
+        this.hostName = hostName;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    public String[] getRoles() {
+        return roles;
+    }
+
+    public void setRoles(String[] roles) {
+        this.roles = roles;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/commons/src/main/java/org/apache/airavata/common/logging/kafka/KafkaAppender.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/logging/kafka/KafkaAppender.java b/modules/commons/src/main/java/org/apache/airavata/common/logging/kafka/KafkaAppender.java
new file mode 100644
index 0000000..0617bcf
--- /dev/null
+++ b/modules/commons/src/main/java/org/apache/airavata/common/logging/kafka/KafkaAppender.java
@@ -0,0 +1,115 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.airavata.common.logging.kafka;
+
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.classic.spi.IThrowableProxy;
+import ch.qos.logback.classic.spi.StackTraceElementProxy;
+import ch.qos.logback.core.UnsynchronizedAppenderBase;
+import com.google.gson.Gson;
+import org.apache.airavata.common.logging.Exception;
+import org.apache.airavata.common.logging.LogEntry;
+import org.apache.airavata.common.logging.ServerId;
+import org.apache.airavata.common.utils.AwsMetadata;
+import org.apache.airavata.common.utils.BuildConstant;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.kafka.clients.producer.KafkaProducer;
+import org.apache.kafka.clients.producer.Producer;
+import org.apache.kafka.clients.producer.ProducerRecord;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.time.Instant;
+import java.util.Arrays;
+import java.util.Properties;
+
+public class KafkaAppender extends UnsynchronizedAppenderBase<ILoggingEvent> {
+    private final static Logger logger = LoggerFactory.getLogger(KafkaAppender.class);
+
+    private final Producer<String, String> producer;
+    private final String kafkaTopic;
+
+    private  ServerId serverId = null;
+
+    public KafkaAppender(String kafkaHost, String kafkaTopicPrefix) {
+        Properties props = new Properties();
+        props.put("bootstrap.servers", kafkaHost);
+        props.put("acks", "0");
+        props.put("retries", 0);
+        props.put("batch.size", 16384);
+        props.put("linger.ms", 10000); // Send the batch every 10 seconds
+        props.put("buffer.memory", 33554432);
+        props.put("producer.type", "async");
+        props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
+        props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
+        this.kafkaTopic = createKafkaTopic(kafkaTopicPrefix);
+        logger.info("Starting kafka producer: bootstrap-server:{}, topic : {}", kafkaHost, this.kafkaTopic);
+        this.producer = new KafkaProducer<>(props);
+        if(ServerSettings.isRunningOnAws()) {
+            final AwsMetadata awsMetadata = new AwsMetadata();
+            serverId = new ServerId(awsMetadata.getId(), awsMetadata.getHostname(),
+                    BuildConstant.VERSION, ServerSettings.getServerRoles());
+        } else {
+            serverId = new ServerId(ServerSettings.getIp(), ServerSettings.getIp(),
+                    BuildConstant.VERSION, ServerSettings.getServerRoles());
+        }
+    }
+
+    @Override
+    protected void append(ILoggingEvent event) {
+        event.prepareForDeferredProcessing();
+        //todo do more elegant streaming approach to publish logs
+
+        if (!event.getLevel().equals(Level.ALL) &&         // OFF AND ALL are not loggable levels
+                !event.getLevel().equals(Level.OFF)) {
+            final IThrowableProxy throwableProxy = event.getThrowableProxy();
+            final LogEntry entry = throwableProxy != null ?
+                    new LogEntry(serverId, event.getMessage(), Instant.ofEpochMilli(event.getTimeStamp()).toString(),
+                            event.getLevel().toString(), event.getLoggerName(), event.getMDCPropertyMap(),
+                            event.getThreadName() != null ? event.getThreadName() : null,
+                            new Exception(throwableProxy.getMessage(), toStringArray(throwableProxy.getStackTraceElementProxyArray())
+                            , throwableProxy.getClassName()))
+                    : new LogEntry(serverId, event.getMessage(), Instant.ofEpochMilli(event.getTimeStamp()).toString(),
+                    event.getLevel().toString(), event.getLoggerName(), event.getMDCPropertyMap(),
+                    event.getThreadName() != null ? event.getThreadName() : null);
+            producer.send(new ProducerRecord<>(kafkaTopic, new Gson().toJson(entry)));
+        }
+    }
+
+
+    private String[] toStringArray(StackTraceElementProxy[] stackTraceElement) {
+        return Arrays.stream(stackTraceElement).map(StackTraceElementProxy::getSTEAsString).toArray(String[]::new);
+    }
+
+    private String createKafkaTopic(String kafkaTopicPrefix) {
+        final String[] serverRoles = ServerSettings.getServerRoles();
+        if (serverRoles.length >= 4) {
+            return String.format("%s_all_logs", kafkaTopicPrefix);
+        }
+        return String.format("%s_%s_logs", kafkaTopicPrefix, ServerSettings.getServerRoles()[0]);
+    }
+
+    public void close() {
+        producer.close();
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/commons/src/main/java/org/apache/airavata/common/utils/AiravataZKUtils.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/utils/AiravataZKUtils.java b/modules/commons/src/main/java/org/apache/airavata/common/utils/AiravataZKUtils.java
index 5faf985..75f91fd 100644
--- a/modules/commons/src/main/java/org/apache/airavata/common/utils/AiravataZKUtils.java
+++ b/modules/commons/src/main/java/org/apache/airavata/common/utils/AiravataZKUtils.java
@@ -119,13 +119,14 @@ public class AiravataZKUtils implements Watcher {
     public static void startEmbeddedZK(ServerCnxnFactory cnxnFactory) {
         if (ServerSettings.isEmbeddedZK()) {
             ServerConfig serverConfig = new ServerConfig();
-            URL resource = AiravataZKUtils.class.getClassLoader().getResource("zoo.cfg");
-            if (resource == null) {
-                logger.error("There is no zoo.cfg file in the classpath... Failed to start Zookeeper Server");
-                System.exit(1);
-            }
+            URL resource = ApplicationSettings.loadFile("zoo.cfg");
             try {
+                if (resource == null) {
+                    logger.error("There is no zoo.cfg file in the classpath... Failed to start Zookeeper Server");
+                    System.exit(1);
+                }
                 serverConfig.parse(resource.getPath());
+
             } catch (QuorumPeerConfig.ConfigException e) {
                 logger.error("Error while starting embedded Zookeeper", e);
                 System.exit(2);
@@ -193,7 +194,5 @@ public class AiravataZKUtils implements Watcher {
         } else {
             return bytesToLong(curatorClient.getData().storingStatIn(exists).forPath(cancelDeliveryTagPath));
         }
-
-
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/commons/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java b/modules/commons/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
index 9ce0786..dc7944f 100644
--- a/modules/commons/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
+++ b/modules/commons/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
@@ -25,9 +25,11 @@ import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.*;
 import java.util.regex.Matcher;
@@ -35,10 +37,12 @@ import java.util.regex.Pattern;
 
 public class ApplicationSettings {
     public static final String SERVER_PROPERTIES="airavata-server.properties";
-    
-	public static String ADDITIONAL_SETTINGS_FILES = "external.settings";
+    public static final String AIRAVATA_CONFIG_DIR = "airavata.config.dir";
+
+    public static String ADDITIONAL_SETTINGS_FILES = "external.settings";
 
 	protected Properties properties = new Properties();
+
     private Exception propertyLoadException;
 
 
@@ -63,7 +67,6 @@ public class ApplicationSettings {
 	private void loadProperties() {
 		URL url = getPropertyFileURL();
         try {
-        	
             properties.load(url.openStream());
             logger.info("Settings loaded from "+url.toString());
             URL[] externalSettingsFileURLs = getExternalSettingsFileURLs();
@@ -77,7 +80,7 @@ public class ApplicationSettings {
 	}
 
 	protected URL getPropertyFileURL() {
-		return ApplicationSettings.class.getClassLoader().getResource(SERVER_PROPERTIES);
+		return ApplicationSettings.loadFile(SERVER_PROPERTIES);
 	}
 	
 	protected URL[] getExternalSettingsFileURLs(){
@@ -86,7 +89,7 @@ public class ApplicationSettings {
 			String externalSettingsFileNames = getSettingImpl(ADDITIONAL_SETTINGS_FILES);
 			String[] externalSettingFiles = externalSettingsFileNames.split(",");
 			for (String externalSettingFile : externalSettingFiles) {
-				URL externalSettingFileURL = ApplicationSettings.class.getClassLoader().getResource(externalSettingFile);
+				URL externalSettingFileURL = ApplicationSettings.loadFile(externalSettingFile);
 				if (externalSettingFileURL==null){
 					logger.warn("Could not file external settings file "+externalSettingFile);
 				}else{
@@ -313,11 +316,11 @@ public class ApplicationSettings {
      * Static methods which will be used by the users
      */
     
-    public static String getSetting(String key) throws ApplicationSettingsException{
+    public static String getSetting(String key) throws ApplicationSettingsException {
     	return getInstance().getSettingImpl(key);
     }
-    
-    public static String getSetting(String key, String defaultValue){
+
+    public static String getSetting(String key, String defaultValue) {
     	return getInstance().getSettingImpl(key,defaultValue);
 
     }
@@ -426,4 +429,19 @@ public class ApplicationSettings {
     public static ShutdownStrategy getShutdownStrategy() throws Exception{
     	return getInstance().getShutdownStrategyImpl();
     }
+
+    public static URL loadFile(String fileName) {
+        final URL resource = ApplicationSettings.class.getClassLoader().getResource(fileName);
+        if(resource == null) {
+            if(System.getProperty(AIRAVATA_CONFIG_DIR) != null) {
+                final String airavataConfigDir = System.getProperty(AIRAVATA_CONFIG_DIR);
+                try {
+                     return new File(airavataConfigDir + File.separator + fileName).toURI().toURL();
+                } catch (MalformedURLException e) {
+                    logger.error("Error parsing the file from airavata.config.dir", airavataConfigDir);
+                }
+            }
+        }
+        return resource;
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/commons/src/main/java/org/apache/airavata/common/utils/AwsMetadata.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/utils/AwsMetadata.java b/modules/commons/src/main/java/org/apache/airavata/common/utils/AwsMetadata.java
new file mode 100644
index 0000000..f9b4a65
--- /dev/null
+++ b/modules/commons/src/main/java/org/apache/airavata/common/utils/AwsMetadata.java
@@ -0,0 +1,137 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.airavata.common.utils;
+
+
+import com.google.common.base.Preconditions;
+import com.google.common.net.InetAddresses;
+import com.google.gson.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.InetAddress;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+public class AwsMetadata {
+    private static final Logger log = LoggerFactory.getLogger(AwsMetadata.class);
+    private static final String METADATA_URI_BASE = "http://169.254.169.254/";
+    private static final String REGION_SUFFIX = "/latest/dynamic/instance-identity/document";
+    private static final String ZONE_SUFFIX = "/latest/meta-data/placement/availability-zone";
+    private static final String PUBLIC_IPV4_SUFFIX = "/latest/meta-data/public-ipv4";
+    private static final String PRIVATE_IPV4_SUFFIX = "latest/meta-data/local-ipv4";
+    private static final String HOSTNAME_SUFFIX = "/latest/meta-data/hostname";
+    private static final String ID_SUFFIX = "/latest/meta-data/instance-id";
+
+    private final URI baseUri;
+
+    private String id;
+    private String region;
+    private String hostname;
+    private String zone;
+    private InetAddress publicIp;
+    private InetAddress privateIp;
+
+    public AwsMetadata() {
+        try {
+            baseUri = new URI(METADATA_URI_BASE);
+        } catch (URISyntaxException e) {
+            Preconditions.checkState(false, "Unexpected URI Syntax Exception: {}", e);
+            throw new RuntimeException(e);
+        }
+    }
+
+    public String getRegion() {
+        if (region == null) {
+            try {
+                String dynamicData = getMetadataAt(REGION_SUFFIX);
+                if (dynamicData != null) {
+                    final JsonObject asJsonObject = new JsonParser().parse(dynamicData).getAsJsonObject();
+                    region = asJsonObject.get("region").getAsString();
+                }
+            } catch (ClassCastException e) {
+                log.error("Unable to get region, expecting a JSON Object", e);
+            }
+        }
+        return region;
+    }
+
+    public String getZoneName() {
+        if (zone == null) {
+            zone = getMetadataAt(ZONE_SUFFIX);
+        }
+        return zone;
+    }
+
+    public String getId() {
+        if (id == null) {
+            id = getMetadataAt(ID_SUFFIX);
+        }
+
+        return id;
+    }
+
+    public String getHostname() {
+        if (hostname == null) {
+            hostname = getMetadataAt(HOSTNAME_SUFFIX);
+        }
+        return hostname;
+    }
+
+    public InetAddress getPublicIpAddress() {
+        if (publicIp == null) {
+            String ip = getMetadataAt(PUBLIC_IPV4_SUFFIX);
+            if (ip != null) {
+                publicIp = InetAddresses.forString(ip);
+            }
+        }
+        return publicIp;
+    }
+
+    public InetAddress getInternalIpAddress() {
+        if (privateIp == null) {
+            String ip = getMetadataAt(PRIVATE_IPV4_SUFFIX);
+            if (ip != null) {
+                privateIp = InetAddresses.forString(ip);
+            }
+        }
+        return privateIp;
+    }
+
+    private String getMetadataAt(String suffix) {
+        try {
+            URI resolved = baseUri.resolve(suffix);
+            StringBuilder builder = new StringBuilder();
+            String line = null;
+            try (BufferedReader reader = new BufferedReader(new InputStreamReader(resolved.toURL().openStream()))) {
+                while ((line = reader.readLine()) != null) {
+                    builder.append(line);
+                }
+                return builder.toString();
+            }
+        } catch (Exception e) {
+            // ignore for now to make sure local servers don't go verbose
+        }
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/commons/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/utils/ServerSettings.java b/modules/commons/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
index bb11264..3ac2a6e 100644
--- a/modules/commons/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
+++ b/modules/commons/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
@@ -27,6 +27,8 @@ import org.slf4j.LoggerFactory;
 
 import java.net.InetAddress;
 import java.net.UnknownHostException;
+import java.util.HashMap;
+import java.util.Map;
 
 public class ServerSettings extends ApplicationSettings {
 
@@ -108,6 +110,15 @@ public class ServerSettings extends ApplicationSettings {
     private static final String EMAIL_BASED_MONITOR_STORE_PROTOCOL = "email.based.monitor.store.protocol";
     private static final String ENABLE_EMAIL_BASED_MONITORING = "enable.email.based.monitoring";
 
+    private static final String IS_RUNNING_ON_AWS = "isRunningOnAws";
+    private static final String ENABLE_KAFKA_LOGGING = "enable.kafka.logging";
+    private static final String KAFKA_BROKER_LIST = "kafka.broker.list";
+    private static final String KAFKA_TOPIC_PREFIX = "kafka.topic.prefix";
+    private static final String SERVER_ROLES = "server.roles";
+
+    // todo until AIRAVATA-2066 is finished, keep server side list configurations here.
+    private static Map<String, String[]> listConfigurations = new HashMap<>();
+
     private static boolean stopAllThreads = false;
     private static boolean emailBaseNotificationEnable;
     private static String outputLocation;
@@ -405,4 +416,27 @@ public class ServerSettings extends ApplicationSettings {
     public static Boolean isEnableSharing() throws ApplicationSettingsException {
         return Boolean.parseBoolean(getSetting(ENABLE_SHARING));
     }
+    public static boolean isRunningOnAws() {
+        return Boolean.valueOf(getSetting(IS_RUNNING_ON_AWS, "false"));
+    }
+
+    public static String getKafkaBrokerList() {
+        return getSetting(KAFKA_BROKER_LIST, null);
+    }
+
+    public static String getKafkaTopicPrefix() {
+        return getSetting(KAFKA_TOPIC_PREFIX, "all");
+    }
+
+    public static boolean isEnabledKafkaLogging() {
+        return Boolean.valueOf(getSetting(ENABLE_KAFKA_LOGGING, "false"));
+    }
+
+    public static void setServerRoles(String[] roles) {
+        listConfigurations.put(SERVER_ROLES, roles);
+    }
+
+    public static String[] getServerRoles() {
+        return listConfigurations.get(SERVER_ROLES);
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/configuration/server/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/airavata-server.properties b/modules/configuration/server/src/main/resources/airavata-server.properties
index 30a6338..aa84353 100644
--- a/modules/configuration/server/src/main/resources/airavata-server.properties
+++ b/modules/configuration/server/src/main/resources/airavata-server.properties
@@ -285,4 +285,10 @@ authorization.policy=airavata-default-xacml-policy
 #### authorization cache related configuration ####
 authz.cache.enabled=true
 authz.cache.manager.class=org.apache.airavata.api.server.security.authzcache.DefaultAuthzCacheManager
-in.memory.cache.size=1000
\ No newline at end of file
+in.memory.cache.size=1000
+
+# Kafka Logging related configuration
+isRunningOnAws=false
+kafka.broker.list=localhost:9092
+kafka.topic.prefix=local
+enable.kafka.logging=false

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml
index 78d9bb9..d096739 100644
--- a/modules/distribution/pom.xml
+++ b/modules/distribution/pom.xml
@@ -164,14 +164,6 @@
             <artifactId>jcl-over-slf4j</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-        </dependency>
-        <dependency>
             <groupId>com.amazonaws</groupId>
             <artifactId>aws-java-sdk</artifactId>
             <version>1.9.0</version>
@@ -559,7 +551,16 @@
             <artifactId>curator-framework</artifactId>
             <version>${curator.version}</version>
         </dependency>
-
+        <dependency>
+            <groupId>org.apache.kafka</groupId>
+            <artifactId>kafka-clients</artifactId>
+            <version>${kafka-clients.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>${logback.version}</version>
+        </dependency>
         <!-- ======================== Sample =================== -->
         <dependency>
             <groupId>org.apache.airavata</groupId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
index b287b8e..b8d06df 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
@@ -144,10 +144,9 @@ public class BESProvider extends AbstractProvider implements GFacProvider,
             JobDetails jobDetails = new JobDetails();
             FactoryClient factory = new FactoryClient(eprt, secProperties);
 
-            log.info(String.format("Activity Submitting to %s ... \n",
-                    factoryUrl));
+            log.info(String.format("Activity Submitting to %s ... \n", factoryUrl));
             CreateActivityResponseDocument response = factory.createActivity(cad);
-            log.info(String.format("Activity Submitted to %s \n", factoryUrl));
+            log.info("Activity Submitted to {} \n", factoryUrl);
 
             EndpointReferenceType activityEpr = response.getCreateActivityResponse().getActivityIdentifier();
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/gfac/gfac-bes/src/test/java/org/apache/airavata/core/gfac/services/impl/JSDLGeneratorTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/test/java/org/apache/airavata/core/gfac/services/impl/JSDLGeneratorTestWithMyProxyAuth.java b/modules/gfac/gfac-bes/src/test/java/org/apache/airavata/core/gfac/services/impl/JSDLGeneratorTestWithMyProxyAuth.java
index cf9b82a..90f67a1 100644
--- a/modules/gfac/gfac-bes/src/test/java/org/apache/airavata/core/gfac/services/impl/JSDLGeneratorTestWithMyProxyAuth.java
+++ b/modules/gfac/gfac-bes/src/test/java/org/apache/airavata/core/gfac/services/impl/JSDLGeneratorTestWithMyProxyAuth.java
@@ -106,7 +106,7 @@ import static org.junit.Assert.assertTrue;
 //	}
 //
 //	protected GFacConfiguration getGFACConfig() throws Exception{
-//        URL resource = BESProviderTestWithMyProxyAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+//        URL resource = ApplicationSettings.loadFile(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
 //        System.out.println(resource.getFile());
 //        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()),null,null);
 //		return gFacConfiguration;

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
index cc1f17b..7e2154e 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
@@ -809,7 +809,7 @@ public class GFacUtils {
     public static File createJobFile(TaskContext taskContext, JobDescriptor jobDescriptor, JobManagerConfiguration jobManagerConfiguration) throws GFacException {
         try {
             TransformerFactory factory = TransformerFactory.newInstance();
-            URL resource = GFacUtils.class.getClassLoader().getResource(jobManagerConfiguration.getJobDescriptionTemplateName());
+            URL resource = ApplicationSettings.loadFile(jobManagerConfiguration.getJobDescriptionTemplateName());
 
             if (resource == null) {
                 String error = "System configuration file '" + jobManagerConfiguration.getJobDescriptionTemplateName()

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java
index 8a2cc4e..4b40159 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java
@@ -370,8 +370,8 @@ public class ProcessContext {
 
 	public void setProcessStatus(ProcessStatus status) {
 		if (status != null) {
-			log.info("expId: {}, processId: {} :- Process status changed {} -> {}", getExperimentId(), processId,
-					getProcessState().name(), status.getState().name());
+			log.info(String.format("expId: %s, processId: %s :- Process status changed %s -> %s", getExperimentId(), processId,
+					getProcessState().name(), status.getState().name()));
 			List<ProcessStatus> processStatuses = new ArrayList<>();
 			processStatuses.add(status);
 			processModel.setProcessStatuses(processStatuses);

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/TaskContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/TaskContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/TaskContext.java
index 6f95d3d..74e8b65 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/TaskContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/TaskContext.java
@@ -64,9 +64,9 @@ public class TaskContext {
 	}
 
 	public void setTaskStatus(TaskStatus taskStatus) {
-		log.info("expId: {}, processId: {}, taskId: {}, type: {}:- Task status changed {} -> {}", parentProcessContext
+		log.info(String.format("expId: %s, processId: %s, taskId: %s, type: %s : Task status changed %s -> %s", parentProcessContext
 				.getExperimentId(), parentProcessContext.getProcessId(), getTaskId(), getTaskType().name(),
-				getTaskState().name(), taskStatus .getState().name());
+				getTaskState().name(), taskStatus .getState().name()));
 		List<TaskStatus> taskStatuses = new ArrayList<>();
 		taskStatuses.add(taskStatus);
 		taskModel.setTaskStatuses(taskStatuses);

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/BESJobSubmissionTask.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/BESJobSubmissionTask.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/BESJobSubmissionTask.java
index a4dcb5d..e4757e8 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/BESJobSubmissionTask.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/BESJobSubmissionTask.java
@@ -151,8 +151,7 @@ public class BESJobSubmissionTask implements JobSubmissionTask {
             jobDetails.setProcessId(taskContext.getProcessId());
             FactoryClient factory = new FactoryClient(eprt, secProperties);
 
-            log.info(String.format("Activity Submitting to %s ... \n",
-                    factoryUrl));
+            log.info(String.format("Activity Submitting to %s ... \n", factoryUrl));
             CreateActivityResponseDocument response = factory.createActivity(cad);
             log.info(String.format("Activity Submitted to %s \n", factoryUrl));
 
@@ -220,8 +219,8 @@ public class BESJobSubmissionTask implements JobSubmissionTask {
                 JobState applicationJobStatus = JobState.COMPLETE;
                 jobDetails.setJobStatuses(Arrays.asList(new JobStatus(applicationJobStatus)));
                 GFacUtils.saveJobStatus(processContext, jobDetails);
-                log.info("Job Id: {}, exit code: {}, exit status: {}", jobDetails.getJobId(),
-                        activityStatus.getExitCode(), ActivityStateEnumeration.FINISHED.toString());
+                log.info(String.format("Job Id: %s, exit code: %s, exit status: %s", jobDetails.getJobId(),
+                        activityStatus.getExitCode(), ActivityStateEnumeration.FINISHED.toString()));
 
 //                if (activityStatus.getExitCode() == 0) {
 //                } else {
@@ -266,7 +265,7 @@ public class BESJobSubmissionTask implements JobSubmissionTask {
                         fileName = localFilePath.substring(localFilePath.lastIndexOf("/") + 1);
                         URI destinationURI = TaskUtils.getDestinationURI(taskContext, hostName, inputPath, fileName);
                         remoteFilePath = destinationURI.getPath();
-                        log.info("SCP local file :{} -> from remote :{}", localFilePath, remoteFilePath);
+                        log.info(String.format("SCP local file :%s -> from remote :%s", localFilePath, remoteFilePath));
                         SSHUtils.scpTo(localFilePath, remoteFilePath, sshSession);
                         output.setValue(destinationURI.toString());
                         break;
@@ -313,7 +312,7 @@ public class BESJobSubmissionTask implements JobSubmissionTask {
                     remoteFilePath = remoteFileURI.getPath();
                     fileName = remoteFilePath.substring(remoteFilePath.lastIndexOf("/") + 1);
                     localFilePath = pc.getInputDir() + File.separator + fileName;
-                    log.info("SCP remote file :{} -> to local :{}", remoteFilePath, localFilePath);
+                    log.info(String.format("SCP remote file :%s -> to local :%s", remoteFilePath, localFilePath));
                     SSHUtils.scpFrom(remoteFilePath, localFilePath, sshSession);
                     input.setValue("file:/" + localFilePath);
                 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
index b24aa75..bf2bdbb 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
@@ -91,7 +91,7 @@ public class EmailBasedMonitor implements JobMonitor, Runnable{
         properties = new Properties();
         properties.put("mail.store.protocol", storeProtocol);
         timer = new Timer("CancelJobHandler", true);
-        long period = 1000*60*5; // five minute delay between successive task executions.
+        long period = 1000 * 60 * 5; // five minute delay between successive task executions.
         timer.schedule(new CancelTimerTask(), 0 , period);
     }
 
@@ -117,7 +117,7 @@ public class EmailBasedMonitor implements JobMonitor, Runnable{
 	}
 	@Override
 	public void monitor(String jobId, TaskContext taskContext) {
-		log.info("[EJM]: Added monitor Id : " + jobId + " to email based monitor map");
+		log.info(String.format("[EJM]: Added monitor Id : %s to email based monitor map", jobId));
 		jobMonitorMap.put(jobId, taskContext);
         taskContext.getParentProcessContext().setPauseTaskExecution(true);
 	}
@@ -203,7 +203,7 @@ public class EmailBasedMonitor implements JobMonitor, Runnable{
 					    continue;
 				    } else {
                         quite = false;
-					    log.info("[EJM]: " + jobMonitorMap.size() + " job/s in job monitor map");
+					    log.info(String.format("[EJM]: %d job/s in job monitor map", jobMonitorMap.size()));
 				    }
 				    if (!store.isConnected()) {
 					    store.connect();
@@ -267,13 +267,13 @@ public class EmailBasedMonitor implements JobMonitor, Runnable{
                 if (jobStatusResult.getJobId() != null) {
                     taskContext = jobMonitorMap.get(jobStatusResult.getJobId());
                 } else {
-                    log.info("Returned null for job id, message subject--> {}" , message.getSubject());
+                    log.info(String.format("Returned null for job id, message subject--> %s" , message.getSubject()));
                 }
                 if (taskContext == null) {
                     if (jobStatusResult.getJobName() != null) {
                         taskContext = jobMonitorMap.get(jobStatusResult.getJobName());
                     } else {
-                        log.info("Returned null for job name, message subject --> {}" , message.getSubject());
+                        log.info(String.format("Returned null for job name, message subject --> %s" , message.getSubject()));
                     }
                 }
                 if (taskContext != null) {
@@ -378,9 +378,9 @@ public class EmailBasedMonitor implements JobMonitor, Runnable{
 			    log.info("[EJM]: Publishing status changes to amqp. " + jobDetails);
 			    GFacUtils.saveJobStatus(parentProcessContext, jobModel);
 		    } catch (GFacException e) {
-			    log.error("expId: {}, processId: {}, taskId: {}, jobId: {} :- Error while save and publishing Job " +
-                        "status {}", taskContext.getExperimentId(), taskContext.getProcessId(), jobModel
-                        .getTaskId(), jobModel.getJobId(), jobStatus.getJobState());
+			    log.error(String.format("expId: %s, processId: %s, taskId: %s, jobId: %s :- Error while save and publishing Job " +
+                        "status %s", taskContext.getExperimentId(), taskContext.getProcessId(), jobModel
+                        .getTaskId(), jobModel.getJobId(), jobStatus.getJobState()));
 		    }
 	    }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
index 4aecd57..fbad51c 100644
--- a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
@@ -91,7 +91,7 @@
 //            System.out.println("Use -Dssh.username=xxx -Dssh.password=yyy -Dssh.keypass=zzz " +
 //                    "-Dprivate.ssh.key -Dpublic.ssh.key -Dssh.working.directory ");
 //        }
-//        URL resource = BigRed2TestWithSSHAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+//        URL resource = ApplicationSettings.loadFile(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
 //        assert resource != null;
 //        System.out.println(resource.getFile());
 //        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
index 4ca5684..9d352a4 100644
--- a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
@@ -90,7 +90,7 @@
 //                    "E.g :- mvn clean install -Dmyproxy.username=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
 //            throw new Exception("Need my proxy user name password to run tests.");
 //        }
-//        URL resource = GSISSHProviderTestWithMyProxyAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+//        URL resource = ApplicationSettings.loadFile(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
 //        assert resource != null;
 //        System.out.println(resource.getFile());
 //        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
index 4aa0df1..bdbadda 100644
--- a/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
+++ b/modules/gfac/gfac-impl/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
@@ -54,7 +54,7 @@
 //    @Before
 //    public void setUp() throws Exception {
 //
-//    	URL resource = SSHProviderTestWithSSHAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+//    	URL resource = ApplicationSettings.loadFile(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
 //        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()),null);
 ////        gFacConfiguration.s
 //        //have to set InFlwo Handlers and outFlowHandlers

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
index cd484bb..7394e62 100644
--- a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
+++ b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
@@ -23,6 +23,8 @@ package org.apache.airavata.gfac.server;
 import org.apache.airavata.common.exception.AiravataException;
 import org.apache.airavata.common.exception.AiravataStartupException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.logging.MDCConstants;
+import org.apache.airavata.common.logging.MDCUtil;
 import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.common.utils.ThriftUtils;
@@ -60,10 +62,12 @@ import org.apache.zookeeper.ZooDefs;
 import org.apache.zookeeper.data.Stat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.MDC;
 
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.List;
+import java.util.Map;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -152,13 +156,11 @@ public class GfacServerHandler implements GfacService.Iface {
      */
     public boolean submitProcess(String processId, String gatewayId, String tokenId) throws
             TException {
-        requestCount++;
-        log.info("-----------------------------------" + requestCount + "-----------------------------------------");
-        log.info(processId, "GFac Received submit job request for the Process: {} process: {}", processId,
-                processId);
-
+        MDC.put(MDCConstants.PROCESS_ID, processId);
+        MDC.put(MDCConstants.GATEWAY_ID, gatewayId);
+        MDC.put(MDCConstants.TOKEN_ID, tokenId);
         try {
-	        executorService.execute(new GFacWorker(processId, gatewayId, tokenId));
+	        executorService.execute(MDCUtil.wrapWithMDC(new GFacWorker(processId, gatewayId, tokenId)));
         } catch (GFacException e) {
             log.error("Failed to submit process", e);
 
@@ -184,28 +186,29 @@ public class GfacServerHandler implements GfacService.Iface {
         }
 
 
-        public void onMessage(MessageContext message) {
-            log.info(" Message Received with message id '" + message.getMessageId()
-		            + "' and with message type '" + message.getType());
-            if (message.getType().equals(MessageType.LAUNCHPROCESS)) {
+        public void onMessage(MessageContext messageContext) {
+            MDC.put(MDCConstants.GATEWAY_ID, messageContext.getGatewayId());
+            log.info(" Message Received with message id '" + messageContext.getMessageId()
+		            + "' and with message type '" + messageContext.getType());
+            if (messageContext.getType().equals(MessageType.LAUNCHPROCESS)) {
 	            ProcessStatus status = new ProcessStatus();
 	            status.setState(ProcessState.STARTED);
                 try {
                     ProcessSubmitEvent event = new ProcessSubmitEvent();
-                    TBase messageEvent = message.getEvent();
+                    TBase messageEvent = messageContext.getEvent();
                     byte[] bytes = ThriftUtils.serializeThriftObject(messageEvent);
                     ThriftUtils.createThriftFromBytes(bytes, event);
-	                if (message.isRedeliver()) {
+	                if (messageContext.isRedeliver()) {
 		                // check the process is already active in this instance.
 		                if (Factory.getGfacContext().getProcess(event.getProcessId()) != null) {
 			                // update deliver tag
 			                try {
-				                updateDeliveryTag(curatorClient, gfacServerName, event, message );
+				                updateDeliveryTag(curatorClient, gfacServerName, event, messageContext );
 				                return;
 			                } catch (Exception e) {
 				                log.error("Error while updating delivery tag for redelivery message , messageId : " +
-						                message.getMessageId(), e);
-				                processLaunchSubscriber.sendAck(message.getDeliveryTag());
+						                messageContext.getMessageId(), e);
+				                processLaunchSubscriber.sendAck(messageContext.getDeliveryTag());
 			                }
 		                } else {
 			                // read process status from registry
@@ -220,8 +223,9 @@ public class GfacServerHandler implements GfacService.Iface {
 	                Factory.getDefaultExpCatalog().update(ExperimentCatalogModelType.PROCESS_STATUS, status, event
 			                .getProcessId());
 	                publishProcessStatus(event, status);
+                    MDC.put(MDCConstants.EXPERIMENT_ID, event.getExperimentId());
                     try {
-                        createProcessZKNode(curatorClient, gfacServerName, event, message);
+                        createProcessZKNode(curatorClient, gfacServerName, event, messageContext);
                         boolean isCancel = setCancelWatcher(curatorClient, event.getExperimentId(), event.getProcessId());
                         if (isCancel) {
                             if (status.getState() == ProcessState.STARTED) {
@@ -237,7 +241,7 @@ public class GfacServerHandler implements GfacService.Iface {
                                 status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
                                 Factory.getDefaultExpCatalog().update(ExperimentCatalogModelType.PROCESS_STATUS, status, event.getProcessId());
                                 publishProcessStatus(event, status);
-                                processLaunchSubscriber.sendAck(message.getDeliveryTag());
+                                processLaunchSubscriber.sendAck(messageContext.getDeliveryTag());
                                 return;
                             } else {
                                 setCancelData(event.getExperimentId(),event.getProcessId());
@@ -246,7 +250,7 @@ public class GfacServerHandler implements GfacService.Iface {
                         submitProcess(event.getProcessId(), event.getGatewayId(), event.getTokenId());
                     } catch (Exception e) {
                         log.error(e.getMessage(), e);
-                        processLaunchSubscriber.sendAck(message.getDeliveryTag());
+                        processLaunchSubscriber.sendAck(messageContext.getDeliveryTag());
                     }
                 } catch (TException e) {
                     log.error(e.getMessage(), e); //nobody is listening so nothing to throw
@@ -254,6 +258,8 @@ public class GfacServerHandler implements GfacService.Iface {
                     log.error("Error while updating experiment status", e);
                 } catch (AiravataException e) {
 	                log.error("Error while publishing process status", e);
+                } finally {
+                    MDC.clear();
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java b/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
index 725a0b1..5eeeb30 100644
--- a/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
+++ b/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
@@ -23,6 +23,8 @@ package org.apache.airavata.orchestrator.server;
 
 import org.apache.airavata.common.exception.AiravataException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.logging.MDCConstants;
+import org.apache.airavata.common.logging.MDCUtil;
 import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.common.utils.ThriftUtils;
@@ -67,6 +69,7 @@ import org.apache.thrift.TException;
 import org.apache.zookeeper.data.Stat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.MDC;
 
 import java.util.*;
 
@@ -139,7 +142,7 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface {
 			ZKPaths.mkdirs(curatorClient.getZookeeperClient().getZooKeeper(), experimentCancelNode);
             experiment = (ExperimentModel) experimentCatalog.get(ExperimentCatalogModelType.EXPERIMENT, experimentId);
             if (experiment == null) {
-                log.error(experimentId, "Error retrieving the Experiment by the given experimentID: {} ", experimentId);
+                log.error("Experiment ID should not be NULL");
                 return false;
             }
 
@@ -225,7 +228,7 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface {
                 status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
                 OrchestratorUtils.updageAndPublishExperimentStatus(experimentId, status, publisher, gatewayId);
                 log.info("expId: {}, Launched experiment ", experimentId);
-                OrchestratorServerThreadPoolExecutor.getCachedThreadPool().execute(new SingleAppExperimentRunner(experimentId, token, gatewayId));
+                OrchestratorServerThreadPoolExecutor.getCachedThreadPool().execute(MDCUtil.wrapWithMDC(new SingleAppExperimentRunner(experimentId, token, gatewayId)));
             } else if (executionType == ExperimentType.WORKFLOW) {
                 //its a workflow execution experiment
                 log.debug(experimentId, "Launching workflow experiment {}.", experimentId);
@@ -591,7 +594,7 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface {
 
 		@Override
 		public void onMessage(MessageContext messageContext) {
-
+			MDC.put(MDCConstants.GATEWAY_ID, messageContext.getGatewayId());
 			switch (messageContext.getType()) {
 				case EXPERIMENT:
 					launchExperiment(messageContext);
@@ -604,6 +607,7 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface {
 					log.error("Orchestrator got un-support message type : " + messageContext.getType());
 					break;
 			}
+			MDC.clear();
 		}
 
 		private void cancelExperiment(MessageContext messageContext) {
@@ -611,6 +615,7 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface {
 				byte[] bytes = ThriftUtils.serializeThriftObject(messageContext.getEvent());
 				ExperimentSubmitEvent expEvent = new ExperimentSubmitEvent();
 				ThriftUtils.createThriftFromBytes(bytes, expEvent);
+				log.info(String.format("Cancelling experiment with experimentId: %s gateway Id: %s", expEvent.getExperimentId(), expEvent.getGatewayId()));
 				terminateExperiment(expEvent.getExperimentId(), expEvent.getGatewayId());
 			} catch (TException e) {
 				log.error("Experiment cancellation failed due to Thrift conversion error", e);
@@ -622,13 +627,16 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface {
 	}
 
 	private void launchExperiment(MessageContext messageContext) {
+		ExperimentSubmitEvent expEvent = new ExperimentSubmitEvent();
 		try {
-            byte[] bytes = ThriftUtils.serializeThriftObject(messageContext.getEvent());
-            ExperimentSubmitEvent expEvent = new ExperimentSubmitEvent();
-            ThriftUtils.createThriftFromBytes(bytes, expEvent);
-            if (messageContext.isRedeliver()) {
+			byte[] bytes = ThriftUtils.serializeThriftObject(messageContext.getEvent());
+			ThriftUtils.createThriftFromBytes(bytes, expEvent);
+			MDC.put(MDCConstants.EXPERIMENT_ID, expEvent.getExperimentId());
+			log.info(String.format("Launching experiment with experimentId: %s gateway Id: %s", expEvent.getExperimentId(), expEvent.getGatewayId()));
+			if (messageContext.isRedeliver()) {
 				ExperimentModel experimentModel = (ExperimentModel) experimentCatalog.
 						get(ExperimentCatalogModelType.EXPERIMENT, expEvent.getExperimentId());
+				MDC.put(MDCConstants.EXPERIMENT_NAME, experimentModel.getExperimentName());
 				if (experimentModel.getExperimentStatus().get(0).getState() == ExperimentState.CREATED) {
 					launchExperiment(expEvent.getExperimentId(), expEvent.getGatewayId());
 				}
@@ -636,11 +644,18 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface {
                 launchExperiment(expEvent.getExperimentId(), expEvent.getGatewayId());
             }
 		} catch (TException e) {
-            log.error("Experiment launch failed due to Thrift conversion error", e);
+			String logMessage =  expEvent.getExperimentId() != null && expEvent.getGatewayId() != null ?
+					String.format("Experiment launch failed due to Thrift conversion error, experimentId: %s, gatewayId: %s",
+					expEvent.getExperimentId(), expEvent.getGatewayId()): "Experiment launch failed due to Thrift conversion error";
+            log.error(logMessage,  e);
 		} catch (RegistryException e) {
-			log.error("Experiment launch failed due to registry access issue", e);
+			String logMessage =  expEvent.getExperimentId() != null && expEvent.getGatewayId() != null ?
+					String.format("Experiment launch failed due to registry access issue, experimentId: %s, gatewayId: %s",
+					expEvent.getExperimentId(), expEvent.getGatewayId()): "Experiment launch failed due to registry access issue";
+			log.error(logMessage, e);
 		}finally {
 			experimentSubscriber.sendAck(messageContext.getDeliveryTag());
+			MDC.clear();
 		}
 	}
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/registry/registry-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/pom.xml b/modules/registry/registry-core/pom.xml
index 1bea32f..c2b26b2 100644
--- a/modules/registry/registry-core/pom.xml
+++ b/modules/registry/registry-core/pom.xml
@@ -102,33 +102,6 @@
 
     <build>
         <plugins>
-            <plugin>
-                <groupId>org.apache.openjpa</groupId>
-                <artifactId>openjpa-maven-plugin</artifactId>
-                <version>2.2.0</version>
-                <configuration>
-                    <includes>**/entities/*.class</includes>
-                    <excludes>**/entities/XML*.class</excludes>
-                    <addDefaultConstructor>true</addDefaultConstructor>
-                    <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>enhancer</id>
-                        <phase>process-classes</phase>
-                        <goals>
-                            <goal>enhance</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.apache.openjpa</groupId>
-                        <artifactId>openjpa</artifactId>
-                        <version>2.2.0</version>
-                    </dependency>
-                </dependencies>
-            </plugin>
             <!--<plugin>-->
                 <!--<groupId>org.apache.maven.plugins</groupId>-->
                 <!--<artifactId>maven-antrun-plugin</artifactId>-->

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/server/src/main/java/org/apache/airavata/server/ServerMain.java
----------------------------------------------------------------------
diff --git a/modules/server/src/main/java/org/apache/airavata/server/ServerMain.java b/modules/server/src/main/java/org/apache/airavata/server/ServerMain.java
index 99387de..1c0483d 100644
--- a/modules/server/src/main/java/org/apache/airavata/server/ServerMain.java
+++ b/modules/server/src/main/java/org/apache/airavata/server/ServerMain.java
@@ -20,13 +20,18 @@
  */
 package org.apache.airavata.server;
 
+import ch.qos.logback.classic.LoggerContext;
+import org.apache.airavata.api.Airavata;
+import org.apache.airavata.common.exception.AiravataException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.logging.kafka.KafkaAppender;
 import org.apache.airavata.common.utils.*;
 import org.apache.airavata.common.utils.ApplicationSettings.ShutdownStrategy;
 import org.apache.airavata.common.utils.IServer.ServerStatus;
 import org.apache.airavata.common.utils.StringUtil.CommandLineParameters;
 import org.apache.commons.cli.ParseException;
 import org.apache.zookeeper.server.ServerCnxnFactory;
+import org.slf4j.ILoggerFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -154,15 +159,41 @@ public class ServerMain {
 //		});
 //	}
 	
-	public static void main(String args[]) throws ParseException, IOException {
-        CommandLineParameters commandLineParameters = StringUtil.getCommandLineParser(args);
+	public static void main(String args[]) throws ParseException, IOException, AiravataException {
+		ServerSettings.mergeSettingsCommandLineArgs(args);
+		ServerSettings.setServerRoles(ApplicationSettings.getSetting(SERVERS_KEY, "all").split(","));
+
+		if (ServerSettings.isEnabledKafkaLogging()) {
+			final ILoggerFactory iLoggerFactory = LoggerFactory.getILoggerFactory();
+			if (iLoggerFactory instanceof LoggerContext) {
+				final KafkaAppender kafkaAppender = new KafkaAppender(ServerSettings.getKafkaBrokerList(),
+						ServerSettings.getKafkaTopicPrefix());
+				kafkaAppender.setContext((LoggerContext) iLoggerFactory);
+				kafkaAppender.setName("kafka-appender");
+				kafkaAppender.clearAllFilters();
+				kafkaAppender.start();
+				// Until AIRAVATA-2073 filter org.apache.kafka logs
+				((LoggerContext) iLoggerFactory).getLogger("org.apache.airavata").addAppender(kafkaAppender);
+				((LoggerContext) iLoggerFactory).getLogger("org.apache.zookeeper").addAppender(kafkaAppender);
+				((LoggerContext) iLoggerFactory).getLogger("org.apache.derby").addAppender(kafkaAppender);
+				((LoggerContext) iLoggerFactory).getLogger("org.apache.commons").addAppender(kafkaAppender);
+				((LoggerContext) iLoggerFactory).getLogger("org.apache.thrift").addAppender(kafkaAppender);
+				((LoggerContext) iLoggerFactory).getLogger("com").addAppender(kafkaAppender);
+			} else {
+				logger.warn("Kafka logging is enabled but cannot find logback LoggerContext, found", iLoggerFactory.getClass().toString());
+				throw new AiravataException("Kafka logging is enabled but cannot find logback LoggerContext");
+			}
+		} else {
+			logger.info("Kafka logging is disabled in airavata server configurations");
+		}
+
+		CommandLineParameters commandLineParameters = StringUtil.getCommandLineParser(args);
         if (commandLineParameters.getArguments().contains(STOP_COMMAND_STR)){
             performServerStopRequest(commandLineParameters);
         }else{
             AiravataZKUtils.startEmbeddedZK(cnxnFactory);
             performServerStart(args);
 		}
-
     }
 
 
@@ -173,7 +204,6 @@ public class ServerMain {
 		for (String string : args) {
 			logger.info("Server Arguments: " + string);
 		}
-		ServerSettings.mergeSettingsCommandLineArgs(args);
 		String serverNames;
 		try {
 			serverNames = ApplicationSettings.getSetting(SERVERS_KEY);

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/utils/PropertyReader.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/utils/PropertyReader.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/utils/PropertyReader.java
index f7b8e1f..9df1745 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/utils/PropertyReader.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/utils/PropertyReader.java
@@ -21,6 +21,7 @@
 
 package org.apache.airavata.testsuite.multitenantedairavata.utils;
 
+import org.apache.airavata.common.utils.ApplicationSettings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -41,7 +42,7 @@ public class PropertyReader {
     }
 
     protected void loadProperties() throws IOException {
-        URL airavataURL = PropertyFileType.class.getClassLoader().getResource(TestFrameworkConstants.AIRAVATA_CLIENT_PROPERTIES);
+        URL airavataURL = ApplicationSettings.loadFile(TestFrameworkConstants.AIRAVATA_CLIENT_PROPERTIES);
         if (airavataURL != null){
             airavataClientProperties.load(airavataURL.openStream());
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/modules/user-profile/user-profile-core/src/main/java/org/apache/airavata/userprofile/core/AbstractThriftDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/user-profile/user-profile-core/src/main/java/org/apache/airavata/userprofile/core/AbstractThriftDeserializer.java b/modules/user-profile/user-profile-core/src/main/java/org/apache/airavata/userprofile/core/AbstractThriftDeserializer.java
index 83af52b..d4b1863 100644
--- a/modules/user-profile/user-profile-core/src/main/java/org/apache/airavata/userprofile/core/AbstractThriftDeserializer.java
+++ b/modules/user-profile/user-profile-core/src/main/java/org/apache/airavata/userprofile/core/AbstractThriftDeserializer.java
@@ -91,8 +91,7 @@ public abstract class AbstractThriftDeserializer<E extends TFieldIdEnum, T exten
             // Validate that the instance contains all required fields.
             validate(instance);
         } catch (final TException e) {
-            log.error(String.format("Unable to deserialize JSON '%s' to type '%s'.",
-                    jp.getValueAsString(), instance.getClass().getName(), e));
+            log.error(String.format("Unable to deserialize JSON %s to type %s.", jp.getValueAsString(), instance.getClass().getName()), e);
             ctxt.mappingException(e.getMessage());
         }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/342400cf/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3988fd0..a65df09 100644
--- a/pom.xml
+++ b/pom.xml
@@ -101,6 +101,8 @@
         <snakeyaml.version>1.15</snakeyaml.version>
 		<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
 		<maven.replacer.plugin.version>1.5.3</maven.replacer.plugin.version>
+		<kafka-clients.version>0.8.2.2</kafka-clients.version>
+		<logback.version>1.1.6</logback.version>
 	</properties>
 
 	<developers>
@@ -434,6 +436,16 @@
 				<artifactId>curator-framework</artifactId>
 				<version>${curator.version}</version>
 			</dependency>
+			<dependency>
+				<groupId>org.apache.kafka</groupId>
+				<artifactId>kafka-clients</artifactId>
+				<version>${kafka-clients.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>ch.qos.logback</groupId>
+				<artifactId>logback-classic</artifactId>
+				<version>${logback.version}</version>
+			</dependency>
 		</dependencies>
 	</dependencyManagement>
 
@@ -480,6 +492,39 @@
 			<build>
 				<plugins>
 					<plugin>
+						<groupId>org.codehaus.mojo</groupId>
+						<artifactId>templating-maven-plugin</artifactId>
+						<version>1.0.0</version>
+						<executions>
+							<execution>
+								<id>filtering-java-templates</id>
+								<goals>
+									<goal>filter-sources</goal>
+								</goals>
+							</execution>
+						</executions>
+					</plugin>
+					<plugin>
+						<groupId>com.lukegb.mojo</groupId>
+						<artifactId>gitdescribe-maven-plugin</artifactId>
+						<version>3.0</version>
+						<executions>
+							<execution>
+								<goals>
+									<goal>gitdescribe</goal>
+								</goals>
+								<id>git-describe</id>
+								<phase>initialize</phase>
+								<configuration>
+									<extraArguments>
+										<param>--tags</param>
+									</extraArguments>
+									<descriptionProperty>git-describe</descriptionProperty>
+								</configuration>
+							</execution>
+						</executions>
+					</plugin>
+					<plugin>
 						<groupId>org.apache.maven.plugins</groupId>
 						<artifactId>maven-remote-resources-plugin</artifactId>
 						<executions>
@@ -542,6 +587,26 @@
 							</excludes>
 						</configuration>
 					</plugin>
+					<plugin>
+						<groupId>com.lukegb.mojo</groupId>
+						<artifactId>gitdescribe-maven-plugin</artifactId>
+						<version>3.0</version>
+						<executions>
+							<execution>
+								<goals>
+									<goal>gitdescribe</goal>
+								</goals>
+								<id>git-describe</id>
+								<phase>initialize</phase>
+								<configuration>
+									<extraArguments>
+										<param>--tags</param>
+									</extraArguments>
+									<descriptionProperty>git-describe</descriptionProperty>
+								</configuration>
+							</execution>
+						</executions>
+					</plugin>
 				</plugins>
 			</build>
 			<activation>


[14/50] [abbrv] airavata git commit: Add NOTE and updated gitignore file

Posted by la...@apache.org.
Add NOTE and updated gitignore file


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: ab13cf62878e03fefd7d23ca66079571e5d40403
Parents: 93ec75b
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Tue Aug 16 22:22:01 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Tue Aug 16 22:22:01 2016 -0400

----------------------------------------------------------------------
 .gitignore | 3 +++
 NOTE       | 5 +++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/ab13cf62/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index d939922..485e140 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,4 @@
 site.retry
+additional-resources.yml
+jetcloud.*
+shameera-*

http://git-wip-us.apache.org/repos/asf/airavata/blob/ab13cf62/NOTE
----------------------------------------------------------------------
diff --git a/NOTE b/NOTE
new file mode 100644
index 0000000..b4979b5
--- /dev/null
+++ b/NOTE
@@ -0,0 +1,5 @@
+#Bind to 'hostname -f' output to access from outside.
+
+#aws
+add new tcp rule under associate security group to open ports
+disable or add firewall rule to open ports


[16/50] [abbrv] airavata git commit: Start zookeeper as a systemd service

Posted by la...@apache.org.
Start zookeeper as a systemd service


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 86a3919970469f2ada367b8d12e0726716723693
Parents: c18b06c
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Thu Aug 18 00:11:38 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Thu Aug 18 00:11:38 2016 -0400

----------------------------------------------------------------------
 roles/common/handlers/main.yml                 | 45 ---------------------
 roles/common/tasks/main.yml                    | 38 ++++++++---------
 roles/common/vars/main.yml                     |  2 +-
 roles/zookeeper/handlers/main.yml              | 19 +++------
 roles/zookeeper/tasks/main.yml                 | 25 +++++++++++-
 roles/zookeeper/templates/zookeeper.service.j2 | 15 +++++++
 roles/zookeeper/vars/main.yml                  |  2 +-
 site.yml                                       |  1 +
 8 files changed, 67 insertions(+), 80 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/86a39199/roles/common/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/common/handlers/main.yml b/roles/common/handlers/main.yml
deleted file mode 100644
index d5c99e94..0000000
--- a/roles/common/handlers/main.yml
+++ /dev/null
@@ -1,45 +0,0 @@
----
-# Handler file
-# Can have multiple handlers
-
-# Zookeeper related handlers
-- name: start zookeeper
-  command: ./bin/zkServer.sh start chdir={{zookeeper_dir}}/ creates={{zookeeper_data_dir}}/zookeeper_server.pid
-  become: true
-  become_user: "{{ user }}"
-
-- name: stop zookeeper
-  command: ./bin/zkServer.sh stop chdir={{zookeeper_dir}}/ removes={{zookeeper_data_dir}}/zookeeper_server.pid
-  become: true
-  become_user: "{{ user }}"
-
-- name: restart zookeeper
-  command: ./bin/zkServer.sh restart chdir={{zookeeper_dir}}/ removes={{zookeeper_data_dir}}/zookeeper_server.pid
-  become: true
-  become_user: "{{ user }}"
-
-# Rabbitmq related handlers
-- name: start rabbitmq
-  service: name=rabbitmq-server state=started
-
-- name: stop rabbitmq
-  service: name=rabbitmq-server state=stopped
-
-- name: restart rabbitmq
-  service: name=rabbitmq-server state=restarted
-
-# Gfac related handlers
-- name: start gfac
-  command: ./bin/airavata-server-start.sh gfac -d chdir="{{ gfac_dir }}/{{ airavata_dist }}/" creates="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
-
-- name: stop gfac
-  command: ./bin/airavata-server-stop.sh -f chdir="{{ gfac_dir }}/{{ airavata_dist }}/" removes="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
-
-# Gfac related handlers
-- name: start api-orch
-  command: ./bin/airavata-server-start.sh api-orch -d chdir="{{ api_orch_dir }}/{{ airavata_dist }}/" creates="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
-
-- name: stop api-orch
-  command: ./bin/airavata-server-stop.sh -f chdir="{{ api_orch_dir }}/{{ airavata_dist }}/" removes="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
-
-...

http://git-wip-us.apache.org/repos/asf/airavata/blob/86a39199/roles/common/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml
index 31bfaae..9c1884d 100644
--- a/roles/common/tasks/main.yml
+++ b/roles/common/tasks/main.yml
@@ -4,43 +4,45 @@
   with_items:
     - git
     - maven
+  become: yes
 
 # Setup airavata source
 - name: Create deployment directory {{ deployment_dir }}
   file: path={{ deployment_dir }} state=directory mode=0755
-  become: true
-  become_user: "{{ user }}"
-  tags: deploy
 
 - name: Create source directory
-  file: path={{airavata_source_dir}} state=directory mode=0755 owner={{ user }} group={{ group }}
-  tags: deploy
+  file: path={{airavata_source_dir}}
+        state=directory
+        mode=0755
+        owner={{ user }}
+        group={{ group }}
 
 - name: git checkout from airavata github
-  git: repo=https://git-wip-us.apache.org/repos/asf/airavata.git  dest="{{ airavata_source_dir }}" version=master
+  git: repo=https://git-wip-us.apache.org/repos/asf/airavata.git
+       dest="{{ airavata_source_dir }}"
+       version="{{ git_branch }}"
   register: checkout
-  become: true
-  become_user: "{{ user }}"
-  tags: deploy, update_gfac, update_api_orch, update
+  tags: update
 
 - name: Run maven build
   command: mvn clean install -Dmaven.test.skip=true chdir="{{ airavata_source_dir }}/"
   when: (checkout|success) or (checkout|skipped)
   register: build
-  become: true
-  become_user: "{{ user }}"
-  tags: deploy, update_gfac, update_api_orch, update
+  tags: update
 
 ################################################################################
 # copy key store and trust store files
 - name: Create KeyStores directory
-  file: path="{{ key_stores_location }}" state=directory owner="{{ user }}" group="{{ group }}"
-  tags: deploy
+  file: path="{{ key_stores_location }}"
+        state=directory
+        owner="{{ user }}" group="{{ group }}"
 
 - name: Transfer airavata.jks KeyStore file
-  copy: src="{{ key_store }}" dest="{{ key_stores_location }}/{{ key_store }}" owner="{{ user }}" group="{{ group }}"
-  tags: deploy
+  copy: src="{{ key_store }}"
+        dest="{{ key_stores_location }}/{{ key_store }}"
+        owner="{{ user }}" group="{{ group }}"
 
 - name: Transfer client trust store KeyStore file
-  copy: src="{{ cred_key_store }}" dest="{{ key_stores_location }}/{{ cred_key_store }}" owner="{{ user }}" group="{{ group }}"
-  tags: deploy
+  copy: src="{{ cred_key_store }}"
+        dest="{{ key_stores_location }}/{{ cred_key_store }}"
+        owner="{{ user }}" group="{{ group }}"

http://git-wip-us.apache.org/repos/asf/airavata/blob/86a39199/roles/common/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/common/vars/main.yml b/roles/common/vars/main.yml
index 0071b42..0df33c5 100644
--- a/roles/common/vars/main.yml
+++ b/roles/common/vars/main.yml
@@ -1,5 +1,5 @@
 ---
 # Common variables
 airavata_source_dir: "{{ user_home }}/source"
-
+git_branch: master
 ...

http://git-wip-us.apache.org/repos/asf/airavata/blob/86a39199/roles/zookeeper/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/handlers/main.yml b/roles/zookeeper/handlers/main.yml
index c6d7c34..5f30254 100644
--- a/roles/zookeeper/handlers/main.yml
+++ b/roles/zookeeper/handlers/main.yml
@@ -1,19 +1,12 @@
 ---
-
-# Zookeeper related handlers
 - name: start zookeeper
-  command: ./bin/zkServer.sh start chdir={{zookeeper_dir}}/ creates={{zookeeper_data_dir}}/zookeeper_server.pid
-  become: true
-  become_user: "{{ user }}"
+  service: name=zookeeper state=started
+  become: yes
 
 - name: stop zookeeper
-  command: ./bin/zkServer.sh stop chdir={{zookeeper_dir}}/ removes={{zookeeper_data_dir}}/zookeeper_server.pid
-  become: true
-  become_user: "{{ user }}"
+  service: name=zookeeper state=stopped
+  become: yes
 
 - name: restart zookeeper
-  command: ./bin/zkServer.sh restart chdir={{zookeeper_dir}}/ removes={{zookeeper_data_dir}}/zookeeper_server.pid
-  become: true
-  become_user: "{{ user }}"
-
-...
+  service: name=zookeeper state=restarted
+  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/86a39199/roles/zookeeper/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/tasks/main.yml b/roles/zookeeper/tasks/main.yml
index 90a2d30..78bcec2 100644
--- a/roles/zookeeper/tasks/main.yml
+++ b/roles/zookeeper/tasks/main.yml
@@ -2,12 +2,33 @@
 ################################################################################
 # Setup and run Zookeeper
 - name: Download and unarchive zookeeper
-  unarchive: src="{{ zookeeper_url }}" dest="{{ user_home }}" copy=no owner="{{ user }}" group="{{ group }}"
+  unarchive: src="{{ zookeeper_url }}"
+      dest="{{ user_home }}"
+      copy=no
+      owner="{{ user }}"
+      group="{{ group }}"
+
+- name: open zookeeper port
+  firewalld: port=2181/tcp zone=public permanent=true state=enabled immediate=yes
+  become: yes
 
 - name: Copy zoo.cfg file
   template: src=zoo.cfg.j2 dest="{{ zookeeper_dir }}/conf/zoo.cfg" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r"
   notify:
-    - start zookeeper
     - restart zookeeper
 
+- name: Check if systemd exists
+  stat: path=/usr/lib/systemd/system/
+  register: systemd_check
+
+- name: Systemd script.
+  template: src=zookeeper.service.j2 dest=/usr/lib/systemd/system/zookeeper.service
+  when: systemd_check.stat.exists == true
+  notify:
+    - restart zookeeper
+  become: yes
+
+- name: reload systemd daemons
+  command: systemctl daemon-reload
+  become: yes
 ...

http://git-wip-us.apache.org/repos/asf/airavata/blob/86a39199/roles/zookeeper/templates/zookeeper.service.j2
----------------------------------------------------------------------
diff --git a/roles/zookeeper/templates/zookeeper.service.j2 b/roles/zookeeper/templates/zookeeper.service.j2
new file mode 100644
index 0000000..19c3718
--- /dev/null
+++ b/roles/zookeeper/templates/zookeeper.service.j2
@@ -0,0 +1,15 @@
+# {{ansible_managed}}
+
+[Unit]
+Description=ZooKeeper
+
+
+[Service]
+Type=forking
+ExecStart={{zookeeper_dir}}/bin/zkServer.sh start
+ExecStop={{ zookeeper_dir }}/bin/zkServer.sh stop
+Restart=always
+TimeoutSec=300
+
+[Install]
+WantedBy=multi-user.target

http://git-wip-us.apache.org/repos/asf/airavata/blob/86a39199/roles/zookeeper/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/vars/main.yml b/roles/zookeeper/vars/main.yml
index dd40e56..825f26f 100644
--- a/roles/zookeeper/vars/main.yml
+++ b/roles/zookeeper/vars/main.yml
@@ -5,7 +5,7 @@ zookeeper_version: 3.4.8
 zookeeper_url: http://www.us.apache.org/dist/zookeeper/zookeeper-{{zookeeper_version}}/zookeeper-{{zookeeper_version}}.tar.gz
 
 apt_cache_timeout: 3600
-client_port: 2183
+client_port: 2181
 init_limit: 5
 sync_limit: 2
 tick_time: 2000

http://git-wip-us.apache.org/repos/asf/airavata/blob/86a39199/site.yml
----------------------------------------------------------------------
diff --git a/site.yml b/site.yml
index bae8573..6a7a634 100644
--- a/site.yml
+++ b/site.yml
@@ -4,6 +4,7 @@
   tags: zookeeper, airavata
   roles:
     - env_setup
+    - java
     - zookeeper
 
 - hosts: rabbitmq


[47/50] [abbrv] airavata git commit: changing ansible ports

Posted by la...@apache.org.
changing ansible ports


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: b7a79203d79046339377cbe5820a3a6bc380fb6c
Parents: 514567c
Author: scnakandala <su...@gmail.com>
Authored: Tue Sep 27 14:21:27 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Tue Sep 27 14:21:27 2016 -0400

----------------------------------------------------------------------
 dev-tools/ansible/hosts | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/b7a79203/dev-tools/ansible/hosts
----------------------------------------------------------------------
diff --git a/dev-tools/ansible/hosts b/dev-tools/ansible/hosts
index 4fc8675..9dbec9c 100644
--- a/dev-tools/ansible/hosts
+++ b/dev-tools/ansible/hosts
@@ -2,25 +2,25 @@
 # inventory file : production
 
 [zookeeper]
-54.221.13.4
+149.165.171.13
 
 [rabbitmq]
-54.221.13.4
+149.165.171.12
 
 [database]
-54.196.189.115
+149.165.171.1
 
-[wso2is]
+#[wso2is]
 #52.87.209.219
 
 [registry]
-54.89.119.195
+149.165.171.0
 
 [api-orch]
-54.89.119.195
+149.165.170.105
 
 [gfac]
-54.165.169.111
+149.165.170.104
 
 [pga]
-#54.237.220.234
+149.165.170.103


[12/50] [abbrv] airavata git commit: Use fqdn instead of ip4 address in hosts file, removed redundent tags from rabbitmq and zookeeper

Posted by la...@apache.org.
Use fqdn instead of ip4 address in hosts file, removed redundent tags from rabbitmq and zookeeper


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 433ae48bb6b38d850f64d3ce6392acd6c4fd8d64
Parents: 414c0e9
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Mon Aug 1 23:19:33 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Mon Aug 1 23:19:33 2016 -0400

----------------------------------------------------------------------
 group_vars/all                 |  6 +++---
 hosts                          | 12 ++++++------
 roles/rabbitmq/tasks/main.yml  | 14 +++++---------
 roles/zookeeper/tasks/main.yml |  2 --
 4 files changed, 14 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/433ae48b/group_vars/all
----------------------------------------------------------------------
diff --git a/group_vars/all b/group_vars/all
index 6098bc1..bae52a5 100644
--- a/group_vars/all
+++ b/group_vars/all
@@ -34,15 +34,15 @@ key_stores_location: "{{ deployment_dir }}/keystores"
 mysql_connector_jar: "mysql-connector-java-5.1.37-bin.jar"
 
 api_server_name: "apiserver-node0"
-api_server_host: "{{ host_address }}"
+api_server_host: "{{ ansible_fqdn }}"
 api_server_port: "8930"
 
 orchestrator_name: "orchestrator-node0"
-orchestrator_host: "{{ host_address }}"
+orchestrator_host: "{{ ansible_fqdn }}"
 orchestrator_port: "8940"
 
 gfac_name: "gfac-node0"
-gfac_host: "{{ host_address }}"
+gfac_host: "{{ ansible_fqdn }}"
 gfac_port: "8950"
 
 monitor_email_address: "jobs@scigap.org"

http://git-wip-us.apache.org/repos/asf/airavata/blob/433ae48b/hosts
----------------------------------------------------------------------
diff --git a/hosts b/hosts
index 2865ff1..8a317b8 100644
--- a/hosts
+++ b/hosts
@@ -2,24 +2,24 @@
 
 [api-orch]
 #149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
-149.165.171.11 host_name=js-171-11 host_address=149.165.171.11
+js-171-11.jetstream-cloud.org
 
 [gfac]
 #149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
-149.165.171.11 host_name=js-171-11 host_address=149.165.171.11
+js-171-11.jetstream-cloud.org
 
 [pga]
 #149.165.156.196
-149.165.171.11
+js-171-11.jetstream-cloud.org
 
 [zookeeper]
 #149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
-149.165.171.11 host_name=js-171-11 host_address=149.165.171.11
+js-171-11.jetstream-cloud.org
 
 [rabbitmq]
 #149.165.156.196 host_name=js-156-196 host_address=149.165.156.196
-149.165.171.11 host_name=js-171-11 host_address=149.165.171.11
+js-171-11.jetstream-cloud.org
 
 [database]
 #149.165.156.196
-149.165.171.11
+js-171-11.jetstream-cloud.org

http://git-wip-us.apache.org/repos/asf/airavata/blob/433ae48b/roles/rabbitmq/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/rabbitmq/tasks/main.yml b/roles/rabbitmq/tasks/main.yml
index 1d0647b..56ae071 100644
--- a/roles/rabbitmq/tasks/main.yml
+++ b/roles/rabbitmq/tasks/main.yml
@@ -5,31 +5,28 @@
 # Setup and run rabbitmq
 - name: Install erlang latest version
   yum: name=https://www.rabbitmq.com/releases/erlang/erlang-18.3-1.el7.centos.x86_64.rpm state=present
-  tags: rabbitmq, dependency
-
 
 - name: Install Rabbitmq rpm
   yum: name=https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.3/rabbitmq-server-3.6.3-1.noarch.rpm state=present
-  tags: rabbimq, dependency
 
   # add hostname to /etc/hosts file
+- name: get ip4 address
+  command: dig +short myip.opendns.com @resolver1.opendns.com
+  register: _ip4
+
 - name: Edit /etc/hosts file
-  lineinfile: dest=/etc/hosts line="{{ host_address }} {{host_name}}"
+  lineinfile: dest=/etc/hosts line="{{ _ip4.stdout }} {{ ansible_hostname }} {{ ansible_fqdn }}"
   notify:
     - restart rabbitmq
-  tags: rabbitmq, dependency
 
 - name: Start Rabbitmq server
   service: name=rabbitmq-server state=started
-  tags: rabbitmq, dependency
 
 - name: Enable rabbitmq management plugin
   rabbitmq_plugin: names=rabbitmq_management state=enabled
-  tags: rabbitmq, dependency
 
 - name: Create rabbitmq vhost {{ rabbitmq_vhost }}
   rabbitmq_vhost: name="{{ rabbitmq_vhost }}" state=present
-  tags: rabbitmq, dependency
 
 - name: Add user {{ rabbitmq_user }} to vhost {{ rabbitmq_vhost }}  and give permission
   rabbitmq_user: user="{{ rabbitmq_user }}"
@@ -39,6 +36,5 @@
                  read_priv=.*
                  write_priv=.*
                  state=present
-  tags: rabbitmq, dependency
 
 ...

http://git-wip-us.apache.org/repos/asf/airavata/blob/433ae48b/roles/zookeeper/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/tasks/main.yml b/roles/zookeeper/tasks/main.yml
index c1fd86b..90a2d30 100644
--- a/roles/zookeeper/tasks/main.yml
+++ b/roles/zookeeper/tasks/main.yml
@@ -3,13 +3,11 @@
 # Setup and run Zookeeper
 - name: Download and unarchive zookeeper
   unarchive: src="{{ zookeeper_url }}" dest="{{ user_home }}" copy=no owner="{{ user }}" group="{{ group }}"
-  tags: zookeeper, dependency
 
 - name: Copy zoo.cfg file
   template: src=zoo.cfg.j2 dest="{{ zookeeper_dir }}/conf/zoo.cfg" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r"
   notify:
     - start zookeeper
     - restart zookeeper
-  tags: zookeeper, dependency
 
 ...


[45/50] [abbrv] airavata git commit: Imported ansible-airavata repo to airavata repo

Posted by la...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/pga/templates/pga_config.php.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/pga/templates/pga_config.php.j2
index 0000000,0000000..7b38575
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/pga/templates/pga_config.php.j2
@@@ -1,0 -1,0 +1,248 @@@
++<?php
++return array(
++    /**
++     * *****************************************************************
++     *  WSO2 Identity Server Related Configurations
++     * *****************************************************************
++     */
++
++    'wsis' => [
++
++        /**
++         * Admin Role Name
++         */
++        'admin-role-name' => 'admin',
++
++        /**
++         * Read only Admin Role Name
++         */
++        'read-only-admin-role-name' => 'admin-read-only',
++
++        /**
++         * Gateway user role
++         */
++        'user-role-name' => 'gateway-user',
++
++        /**
++         * Tenant Domain
++         */
++        'tenant-domain' => '{{ tenant_domain }}',
++
++        /**
++         * Tenant admin's username
++         */
++        'admin-username' => '{{ admin_username }}',
++
++        /**
++         * Tenant admin's password
++         */
++        'admin-password' => '{{ admin_password }}',
++
++        /**
++         * OAuth client key
++         */
++        'oauth-client-key' => '{{ oauth_client_key }}',
++
++        /**
++         * OAuth client secret
++         */
++        'oauth-client-secret' => '{{ oauth_client_secret }}',
++
++        /**
++         * OAuth Grant Type (password or authorization_code)
++         */
++        'oauth-grant-type' => 'password',
++
++        /**
++         * Identity server domain
++         */
++        'server' => 'idp.scigap.org',
++
++        /**
++         * Identity server url
++         */
++        'service-url' => 'https://idp.scigap.org:9443/',
++
++        /**
++         * Enable HTTPS server verification
++         */
++        'verify-peer' => true,
++
++        /**
++         * Path to the server certificate file
++         */
++        'cafile-path' => app_path() . '/resources/security/idp_scigap_org.pem',
++
++        /**
++         * Allow self signed server certificates
++         */
++        'allow-self-signed-cert' => false
++    ],
++
++
++    /**
++     * *****************************************************************
++     *  Airavata Client Configurations
++     * *****************************************************************
++     */
++    'airavata' => [
++
++        /**
++         * Airavata API server location. Use tls:// as the protocol to
++         * connect TLS enabled Airavata
++         */
++        'airavata-server' => '{{ airavata_server }}',
++
++        /**
++         * Airavata API server port
++         */
++        'airavata-port' => '{{ airavata_port }}',
++
++        /**
++         * Airavata API server thrift communication timeout
++         */
++        'airavata-timeout' => '1000000',
++
++        /**
++         * PGA Gateway ID
++         */
++        'gateway-id' => '{{ gateway_id }}',
++
++        /**
++         * Maximum size of a file which is allowed to upload to the server
++         */
++        'server-allowed-file-size' => 64,
++
++        /**
++         * absolute path of the data dir
++         */
++        'experiment-data-absolute-path' => '{{ experiment_data_dir }}',
++
++        /**
++         * Advanced experiments options
++         */
++        'advanced-experiment-options' => '',
++
++        /**
++         * Default queue name
++         */
++        'queue-name' => 'long',
++
++        /**
++         * Default node count
++         */
++        'node-count' => '1',
++
++        /**
++         * Default total core count
++         */
++        'total-cpu-count' => '16',
++
++        /**
++         * Default wall time limit
++         */
++        'wall-time-limit' => '30',
++
++        /**
++         * Enable app-catalog cache
++         */
++        'enable-app-catalog-cache' => true,
++
++        /**
++         * Life time of app catalog data cache in minutes
++         */
++        'app-catalog-cache-duration' => 5,
++
++         /**
++         * Gateway data store resource id
++         */
++         'gateway-data-store-resource-id' => '{{ gateway_data_store_resource_id }}',
++
++         /**
++          * Data Sharing enabled
++          */
++          'data-sharing-enabled' => false
++    ],
++
++    /**
++     * *****************************************************************
++     *  Portal Related Configurations
++     * *****************************************************************
++     */
++    'portal' => [
++        /**
++         * Whether this portal is the SciGaP admin portal
++         */
++        'super-admin-portal' => {{ super_admin_portal }},
++
++        /**
++         * Set the name of theme in use here
++         */
++        'theme' => 'base',
++
++        /**
++         * Portal title
++         */
++        'portal-title' => 'Airavata PHP Gateway',
++
++        /**
++         * Email address of the portal admin. Portal admin well get email notifications for events
++         * such as new user creation
++         */
++        'admin-emails' => [{{ admin_emails }}],
++
++        /**
++         * Email account that the portal should login to send emails
++         */
++        'portal-email-username' => '{{ portal_email_username }}',
++
++        /**
++         * Password for the portal's email account
++         */
++        'portal-email-password' => '{{ portal_email_password }}',
++
++        /**
++         * SMTP server on which the portal should connect
++         */
++        'portal-smtp-server-host' => 'smtp.gmail.com',
++
++        /**
++         * SMTP server port on which the portal should connect
++         */
++        'portal-smtp-server-port' => '587',
++
++        /**
++         * Set JIRA Issue Collector scripts here.
++         */
++        'jira-help' =>
++        [
++            /**
++             * Report Issue Script issued for your app by Atlassian JIRA
++             */
++            'report-issue-script' => '',
++            /**
++             * Collector id at the end of the above script
++             */
++            'report-issue-collector-id' => '',
++            /**
++             * Create Report Script issued for your app by Atlassian JIRA
++             */
++            'request-feature-script' => '',
++            /**
++             * Collector id at the end of the above script
++             */
++            'request-feature-collector-id' => ''
++        ],
++
++        /**
++         * Set Google Analytics Id here. ID format that generates from
++         * creating tracker object should be
++         *
++         * UA-XXXXX-Y
++         *
++         * for it to be working correctly. Currently it is only set for
++         * sending pageviews.
++         */
++        'google-analytics-id' => ''
++    ]
++);

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/pga/vars/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/pga/vars/main.yml
index 0000000,0000000..298e897
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/pga/vars/main.yml
@@@ -1,0 -1,0 +1,30 @@@
++---
++pga_user: "pga"
++pga_group: "pga"
++doc_root_dir: "/var/www/html/php-gateway"
++user_data_dir: "/var/www/user_data"
++#httpd_conf_file: "/etc/httpd/conf/httpd.conf"
++httpd_conf_file_location: "/etc/httpd/conf"
++
++## WSO2 IS related variables
++tenant_domain: "prod.testdrive"
++admin_username: "tdaadmin"
++admin_password: "SciDeploy"
++oauth_client_key: "RuLl_Uw7i_KXaLoAGJkiasTfyBYa"
++oauth_client_secret: "vD9yi2ANkChzgWiih3RahrIcfsoa"
++
++## Airavata Client related variables
++#airavata_server: "tls://gw77.iu.xsede.org"
++airavata_server: "{{ groups['api-orch'][0] }}"
++airavata_port: "8930"
++gateway_id: "{{ default_gateway }}"
++# relative to document root dir
++experiment_data_dir: "{{ user_data_dir }}"
++gateway_data_store_resource_id: "js-170-103.jetstream-cloud.org_6497a464-3121-4b64-a7cb-d195b0a26c19"
++
++## Portal related variables
++super_admin_portal: "true"
++admin_emails: "'sgg@iu.edu'"
++portal_email_username: "pga.airavata@gmail.com"
++portal_email_password: "airavata12"
++...

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/rabbitmq/handlers/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/rabbitmq/handlers/main.yml
index 0000000,0000000..fef807a
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/rabbitmq/handlers/main.yml
@@@ -1,0 -1,0 +1,13 @@@
++---
++# Rabbitmq related handlers
++- name: start rabbitmq
++  service: name=rabbitmq-server state=started enabled=yes
++  become: yes
++
++- name: stop rabbitmq
++  service: name=rabbitmq-server state=stopped
++  become: yes
++
++- name: restart rabbitmq
++  service: name=rabbitmq-server state=restarted enabled=yes
++  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/rabbitmq/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/rabbitmq/tasks/main.yml
index 0000000,0000000..f44a0a6
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/rabbitmq/tasks/main.yml
@@@ -1,0 -1,0 +1,60 @@@
++---
++################################################################################
++# Setup and run rabbitmq
++- name: Install erlang latest version
++  yum: name=https://www.rabbitmq.com/releases/erlang/erlang-18.3-1.el7.centos.x86_64.rpm state=present
++  become: yes
++
++- name: Install Rabbitmq rpm
++  yum: name=https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.3/rabbitmq-server-3.6.3-1.noarch.rpm state=present
++  become: yes
++
++  # add hostname to /etc/hosts file
++- name: get ip4 address
++  # command: dig +short myip.opendns.com @resolver1.opendns.com
++  command: hostname -i
++  register: _ip4
++
++- name: open rabbitmq ports
++  firewalld: port={{ item }} zone=public permanent=true state=enabled immediate=yes
++  with_items:
++    - "{{ rabbitmq_port }}/tcp"
++    - "{{ management_plugin_port }}/tcp"
++  become: yes
++
++- name: Edit /etc/hosts file
++  lineinfile: dest=/etc/hosts line="{{ _ip4.stdout }} {{ ansible_fqdn }}"
++  notify:
++    - restart rabbitmq
++  become: yes
++
++- name: Start Rabbitmq server
++  service: name=rabbitmq-server state=started enabled=yes
++  become: yes
++
++- name: Enable rabbitmq management plugin
++  rabbitmq_plugin: names=rabbitmq_management state=enabled
++  notify:
++    - restart rabbitmq
++  become: yes
++
++- name: Create rabbitmq vhost {{ rabbitmq_vhost }}
++  rabbitmq_vhost: name="{{ rabbitmq_vhost }}" state=present
++  become: yes
++
++- name: Add user {{ rabbitmq_user }} to vhost {{ rabbitmq_vhost }}  and give permission
++  rabbitmq_user: user="{{ rabbitmq_user }}"
++                 password="{{ rabbitmq_password }}"
++                 vhost="{{ rabbitmq_vhost }}"
++                 tags="administrator"
++                 configure_priv=.*
++                 read_priv=.*
++                 write_priv=.*
++                 state=present
++  become: yes
++
++- name: restart rabbitmq
++  service: name=rabbitmq-server state=restarted
++  become: yes
++
++...

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/rabbitmq/vars/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/rabbitmq/vars/main.yml
index 0000000,0000000..c5ab904
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/rabbitmq/vars/main.yml
@@@ -1,0 -1,0 +1,2 @@@
++---
++management_plugin_port: "15672"

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/registry/files/mysql-connector-java-5.1.37-bin.jar
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/registry/files/mysql-connector-java-5.1.37-bin.jar
index 0000000,0000000..465af67
new file mode 100644
Binary files differ

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/registry/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/registry/tasks/main.yml
index 0000000,0000000..9bd2784
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/registry/tasks/main.yml
@@@ -1,0 -1,0 +1,59 @@@
++---
++
++################################################################################
++- name: Create registry deployment directory
++  file: path="{{ registry_dir }}" state=directory owner={{ user }} group={{ group }}
++  when: build|success
++
++- name: Check previous deployments
++  stat: path="{{ registry_dir }}/{{ airavata_dist }}" get_md5=no get_checksum=no
++  register: check
++
++- name: stop registry
++  command: ./bin/airavata-server-stop.sh -f
++           chdir="{{ registry_dir }}/{{ airavata_dist }}/"
++           removes="{{ registry_dir }}/{{ airavata_dist }}/bin/server_start_*"
++  when: check.stat.exists == True
++
++- name: Delete previous deployments
++  file: path="{{ registry_dir }}/{{ airavata_dist }}" state=absent
++
++- name: Copy distribution to registry deployment directory
++  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"
++            owner={{ user }}
++            group={{ group }}
++            mode="u=rw,g=r,o=r"
++
++- name: Copy Mysql jar to lib
++  copy: src="{{ mysql_connector_jar }}"
++        dest="{{ registry_dir }}/{{ airavata_dist }}/lib/{{ mysql_connector_jar }}"
++        owner={{ user }}
++        group={{ group }}
++
++
++- name: Open firwall ports
++  firewalld: port="{{ registry_port }}/tcp" zone=public permanent=true state=enabled immediate=yes
++  become_user: root
++
++- name: stop registry
++  command: ./bin/airavata-server-stop.sh -f
++           chdir="{{ registry_dir }}/{{ airavata_dist }}/"
++           removes="{{ registry_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++- name: start registry
++  command: ./bin/airavata-server-start.sh regserver -d
++           chdir="{{ registry_dir }}/{{ airavata_dist }}/"
++           creates="{{ registry_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++
++...

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/registry/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/registry/templates/airavata-server.properties.j2
index 0000000,0000000..b8d093e
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/registry/templates/airavata-server.properties.j2
@@@ -1,0 -1,0 +1,281 @@@
++#
++#
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements.  See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership.  The ASF licenses this file
++# to you 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.
++#
++
++###########################################################################
++#
++#  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
++# MySql database configuration
++registry.jdbc.driver=com.mysql.jdbc.Driver
++registry.jdbc.url=jdbc:mysql://{{ 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=admin
++default.registry.password=admin
++default.registry.password.hash.method=SHA
++default.registry.gateway={{ 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
++# MySql database configuration
++appcatalog.jdbc.driver=com.mysql.jdbc.Driver
++appcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ 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
++# MySql database configuration
++replicacatalog.jdbc.driver=com.mysql.jdbc.Driver
++replicacatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
++replicacatalog.jdbc.user={{ db_user }}
++replicacatalog.jdbc.password={{ db_password }}
++replicacatalog.validationQuery=SELECT 1 from CONFIGURATION
++
++###########################################################################
++#  Workflow Catalog DB Configuration
++###########################################################################
++#for derby [AiravataJPARegistry]
++#workflowcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
++#workflowcatalog.jdbc.url=jdbc:derby://localhost:1527/workflow_catalog;create=true;user=airavata;password=airavata
++# MySql database configuration
++workflowcatalog.jdbc.driver=com.mysql.jdbc.Driver
++workflowcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
++workflowcatalog.jdbc.user={{ db_user }}
++workflowcatalog.jdbc.password={{ db_password }}
++workflowcatalog.validationQuery=SELECT 1 from CONFIGURATION
++
++###########################################################################
++#  User Profile MongoDB Configuration
++###########################################################################
++userprofile.mongodb.host=localhost
++userprofile.mongodb.port=27017
++
++
++###########################################################################
++#  Server module Configuration
++###########################################################################
++#credential store server should be started before API server
++#This is obsolete property with new script files.
++#servers=credentialstore,apiserver,orchestrator
++
++
++###########################################################################
++#  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
++
++###########################################################################
++#  Orchestrator Server Configurations
++###########################################################################
++orchestrator=org.apache.airavata.orchestrator.server.OrchestratorServer
++orchestrator.server.name={{ orchestrator_name }}
++orchestrator.server.host={{ orchestrator_host }}
++orchestrator.server.port={{ orchestrator_port }}
++orchestrator.server.min.threads=50
++job.validators=org.apache.airavata.orchestrator.core.validator.impl.BatchQueueValidator,org.apache.airavata.orchestrator.core.validator.impl.ExperimentStatusValidator
++submitter.interval=10000
++threadpool.size=10
++start.submitter=true
++embedded.mode=true
++enable.validation=true
++
++###########################################################################
++#  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
++
++###########################################################################
++#  GFac Server Configurations
++###########################################################################
++gfac=org.apache.airavata.gfac.server.GfacServer
++gfac.server.name={{ gfac_name }}
++gfac.server.host={{ gfac_host }}
++gfac.server.port={{ gfac_port }}
++gfac.thread.pool.size=50
++host.scheduler=org.apache.airavata.gfac.impl.DefaultHostScheduler
++
++
++
++###########################################################################
++# Airavata Workflow Interpreter Configurations
++###########################################################################
++workflowserver=org.apache.airavata.api.server.WorkflowServer
++enactment.thread.pool.size=10
++
++#to define custom workflow parser user following property
++#workflow.parser=org.apache.airavata.workflow.core.parser.AiravataWorkflowBuilder
++
++
++
++###########################################################################
++#  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 }}
++credential.store.keystore.alias={{ cred_keystore_alias }}
++credential.store.keystore.password={{ cred_keystore_passwd }}
++credential.store.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ credential_store }}
++credential.store.jdbc.user={{ db_user }}
++credential.store.jdbc.password={{ db_password }}
++credential.store.jdbc.driver=com.mysql.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
++email.based.monitor.host=imap.gmail.com
++email.based.monitor.address={{ monitor_email_address }}
++email.based.monitor.password={{ monitor_email_password }}
++email.based.monitor.folder.name=INBOX
++# either imaps or pop3
++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
++
++###########################################################################
++# 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.api.server.security.DefaultAiravataSecurityManager
++### 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 }}
++keystore.password={{ keystore_passwd }}
++#### trust store configuration ####
++trust.store={{ keystores_location }}/{{ client_truststore }}
++trust.store.password=airavata
++#### remote authorization server url ####
++remote.oauth.authorization.server=https://idp.scigap.org:9443/services/
++#### xacml based authorization policy ####
++authorization.policy=airavata-default-xacml-policy
++#### authorization cache related configuration ####
++authz.cache.enabled=true
++authz.cache.manager.class=org.apache.airavata.api.server.security.authzcache.DefaultAuthzCacheManager
++in.memory.cache.size=1000

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/wso2_is/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/wso2_is/tasks/main.yml
index 0000000,0000000..1e506c2
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/wso2_is/tasks/main.yml
@@@ -1,0 -1,0 +1,41 @@@
++---
++- name: install role pre-requireties
++  yum: name=unzip state=latest update_cache=yes
++  become: yes
++
++# downlaod wso2 is
++# extract it
++# - name: Download and unarchive wso2 is
++#   unarchive: src="{{ zookeeper_url }}" dest="{{ user_home }}" copy=no owner="{{ user }}" group="{{ group }}"
++# for now wso2is from localhost
++
++- name: copy WSO2 IS
++  unarchive: >
++    src="{{ wso2_is_dist }}"
++    dest="{{ user_home }}/"
++    owner="{{ user }}"
++    group="{{ group }}"
++    creates="{{ user_home }}/{{ wso2_is_dir }}/bin/wso2server.sh"
++
++- name: copy carbon.xml
++  template: >
++    src=carbon.xml.j2
++    dest="{{ user_home }}/{{ wso2_is_dir }}/repository/conf/carbon.xml"
++    owner="{{ user }}"
++    group="{{ group }}"
++    mode="u=rw,g=r,o=r"
++
++- name: open carabon management console port
++  firewalld: port=9443/tcp zone=public permanent=true state=enabled immediate=yes
++  become: yes
++
++# start wso2 is server
++- name: start wso2 is
++  command: ./bin/wso2server.sh start chdir="{{ user_home }}/{{ wso2_is_dir }}/" creates="{{ user_home }}/{{ wso2_is_dir }}/wso2carbon.pid"
++  environment:
++    JAVA_HOME: "{{ java_home }}"
++
++# - name: stop wso2 is
++  # command: ./bin/airavata-server-stop.sh -f chdir="{{ gfac_dir }}/{{ airavata_dist }}/" removes="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++...

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/wso2_is/templates/carbon.xml.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/wso2_is/templates/carbon.xml.j2
index 0000000,0000000..5f421f2
new file mode 100755
--- /dev/null
+++ b/dev-tools/ansible/roles/wso2_is/templates/carbon.xml.j2
@@@ -1,0 -1,0 +1,688 @@@
++<?xml version="1.0" encoding="ISO-8859-1"?>
++<!--
++ Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
++
++ 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.
++-->
++
++<!--
++    This is the main server configuration file
++
++    ${carbon.home} represents the carbon.home system property.
++    Other system properties can be specified in a similar manner.
++-->
++<Server xmlns="http://wso2.org/projects/carbon/carbon.xml">
++
++    <!--
++       Product Name
++    -->
++    <Name>WSO2 Identity Server</Name>
++
++    <!--
++       machine readable unique key to identify each product
++    -->
++    <ServerKey>IS</ServerKey>
++
++    <!--
++       Product Version
++    -->
++    <Version>5.1.0</Version>
++
++    <!--
++       Host name or IP address of the machine hosting this server
++       e.g. www.wso2.org, 192.168.1.10
++       This is will become part of the End Point Reference of the
++       services deployed on this server instance.
++    -->
++    <HostName>{{ ansible_fqdn }}</HostName>
++
++    <!--
++    Host name to be used for the Carbon management console
++    -->
++    <MgtHostName>localhost</MgtHostName>
++
++    <!--
++        The URL of the back end server. This is where the admin services are hosted and
++        will be used by the clients in the front end server.
++        This is required only for the Front-end server. This is used when seperating BE server from FE server
++       -->
++    <ServerURL>local:/${carbon.context}/services/</ServerURL>
++    <!--
++    <ServerURL>https://localhost:${carbon.management.port}${carbon.context}/services/</ServerURL>
++    -->
++     <!--
++     The URL of the index page. This is where the user will be redirected after signing in to the
++     carbon server.
++     -->
++    <!-- IndexPageURL>/carbon/admin/index.jsp</IndexPageURL-->
++
++    <!--
++    For cApp deployment, we have to identify the roles that can be acted by the current server.
++    The following property is used for that purpose. Any number of roles can be defined here.
++    Regular expressions can be used in the role.
++    Ex : <Role>.*</Role> means this server can act any role
++    -->
++    <ServerRoles>
++        <Role>IdentityServer</Role>
++    </ServerRoles>
++
++    <!-- uncommnet this line to subscribe to a bam instance automatically -->
++    <!--<BamServerURL>https://bamhost:bamport/services/</BamServerURL>-->
++
++    <!--
++       The fully qualified name of the server
++    -->
++    <Package>org.wso2.carbon</Package>
++
++    <!--
++       Webapp context root of WSO2 Carbon management console.
++    -->
++    <WebContextRoot>/</WebContextRoot>
++
++    <!--
++    	Proxy context path is a useful parameter to add a proxy path when a Carbon server is fronted by reverse proxy. In addtion
++        to the proxy host and proxy port this parameter allows you add a path component to external URLs. e.g.
++     		URL of the Carbon server -> https://10.100.1.1:9443/carbon
++   		URL of the reverse proxy -> https://prod.abc.com/appserver/carbon
++
++   	appserver - proxy context path. This specially required whenever you are generating URLs to displace in
++   	Carbon UI components.
++    -->
++    <!--
++    	<MgtProxyContextPath></MgtProxyContextPath>
++    	<ProxyContextPath></ProxyContextPath>
++    -->
++
++    <!-- In-order to  get the registry http Port from the back-end when the default http transport is not the same-->
++    <!--RegistryHttpPort>9763</RegistryHttpPort-->
++
++    <!--
++    Number of items to be displayed on a management console page. This is used at the
++    backend server for pagination of various items.
++    -->
++    <ItemsPerPage>15</ItemsPerPage>
++
++    <!-- The endpoint URL of the cloud instance management Web service -->
++    <!--<InstanceMgtWSEndpoint>https://ec2.amazonaws.com/</InstanceMgtWSEndpoint>-->
++
++    <!--
++       Ports used by this server
++    -->
++    <Ports>
++
++        <!-- Ports offset. This entry will set the value of the ports defined below to
++         the define value + Offset.
++         e.g. Offset=2 and HTTPS port=9443 will set the effective HTTPS port to 9445
++         -->
++        <Offset>0</Offset>
++
++        <!-- The JMX Ports -->
++        <JMX>
++            <!--The port RMI registry is exposed-->
++            <RMIRegistryPort>9999</RMIRegistryPort>
++            <!--The port RMI server should be exposed-->
++            <RMIServerPort>11111</RMIServerPort>
++        </JMX>
++
++        <!-- Embedded LDAP server specific ports -->
++        <EmbeddedLDAP>
++            <!-- Port which embedded LDAP server runs -->
++            <LDAPServerPort>10389</LDAPServerPort>
++            <!-- Port which KDC (Kerberos Key Distribution Center) server runs -->
++            <KDCServerPort>8000</KDCServerPort>
++        </EmbeddedLDAP>
++
++	<!--
++             Override datasources JNDIproviderPort defined in bps.xml and datasources.properties files
++	-->
++	<!--<JNDIProviderPort>2199</JNDIProviderPort>-->
++	<!--Override receive port of thrift based entitlement service.-->
++	<ThriftEntitlementReceivePort>10500</ThriftEntitlementReceivePort>
++
++    <!--
++     This is the proxy port of the worker cluster. These need to be configured in a scenario where
++     manager node is not exposed through the load balancer through which the workers are exposed
++     therefore doesn't have a proxy port.
++    <WorkerHttpProxyPort>80</WorkerHttpProxyPort>
++    <WorkerHttpsProxyPort>443</WorkerHttpsProxyPort>
++    -->
++
++    </Ports>
++
++    <!--
++        JNDI Configuration
++    -->
++    <JNDI>
++        <!--
++             The fully qualified name of the default initial context factory
++        -->
++        <DefaultInitialContextFactory>org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory</DefaultInitialContextFactory>
++        <!--
++             The restrictions that are done to various JNDI Contexts in a Multi-tenant environment
++        -->
++        <Restrictions>
++            <!--
++                Contexts that will be available only to the super-tenant
++            -->
++            <!-- <SuperTenantOnly>
++                <UrlContexts>
++                    <UrlContext>
++                        <Scheme>foo</Scheme>
++                    </UrlContext>
++                    <UrlContext>
++                        <Scheme>bar</Scheme>
++                    </UrlContext>
++                </UrlContexts>
++            </SuperTenantOnly> -->
++            <!--
++                Contexts that are common to all tenants
++            -->
++            <AllTenants>
++                <UrlContexts>
++                    <UrlContext>
++                        <Scheme>java</Scheme>
++                    </UrlContext>
++                    <!-- <UrlContext>
++                        <Scheme>foo</Scheme>
++                    </UrlContext> -->
++                </UrlContexts>
++            </AllTenants>
++            <!--
++                 All other contexts not mentioned above will be available on a per-tenant basis
++                 (i.e. will not be shared among tenants)
++            -->
++        </Restrictions>
++    </JNDI>
++
++    <!--
++        Property to determine if the server is running an a cloud deployment environment.
++        This property should only be used to determine deployment specific details that are
++        applicable only in a cloud deployment, i.e when the server deployed *-as-a-service.
++    -->
++    <IsCloudDeployment>false</IsCloudDeployment>
++
++    <!--
++	Property to determine whether usage data should be collected for metering purposes
++    -->
++    <EnableMetering>false</EnableMetering>
++
++    <!-- The Max time a thread should take for execution in seconds -->
++    <MaxThreadExecutionTime>600</MaxThreadExecutionTime>
++
++    <!--
++        A flag to enable or disable Ghost Deployer. By default this is set to false. That is
++        because the Ghost Deployer works only with the HTTP/S transports. If you are using
++        other transports, don't enable Ghost Deployer.
++    -->
++    <GhostDeployment>
++        <Enabled>false</Enabled>
++    </GhostDeployment>
++
++
++    <!--
++        Eager loading or lazy loading is a design pattern commonly used in computer programming which
++        will initialize an object upon creation or load on-demand. In carbon, lazy loading is used to
++        load tenant when a request is received only. Similarly Eager loading is used to enable load
++        existing tenants after carbon server starts up. Using this feature, you will be able to include
++        or exclude tenants which are to be loaded when server startup.
++
++        We can enable only one LoadingPolicy at a given time.
++
++        1. Tenant Lazy Loading
++           This is the default behaviour and enabled by default. With this policy, tenants are not loaded at
++           server startup, but loaded based on-demand (i.e when a request is received for a tenant).
++           The default tenant idle time is 30 minutes.
++
++        2. Tenant Eager Loading
++           This is by default not enabled. It can be be enabled by un-commenting the <EagerLoading> section.
++           The eager loading configurations supported are as below. These configurations can be given as the
++           value for <Include> element with eager loading.
++                (i)Load all tenants when server startup             -   *
++                (ii)Load all tenants except foo.com & bar.com       -   *,!foo.com,!bar.com
++                (iii)Load only foo.com &  bar.com to be included    -   foo.com,bar.com
++    -->
++    <Tenant>
++        <LoadingPolicy>
++            <LazyLoading>
++                <IdleTime>30</IdleTime>
++            </LazyLoading>
++            <!-- <EagerLoading>
++                   <Include>*,!foo.com,!bar.com</Include>
++            </EagerLoading>-->
++        </LoadingPolicy>
++    </Tenant>
++
++    <!--
++     Caching related configurations
++    -->
++    <Cache>
++        <!-- Default cache timeout in minutes -->
++        <DefaultCacheTimeout>15</DefaultCacheTimeout>
++    </Cache>
++
++    <!--
++    Axis2 related configurations
++    -->
++    <Axis2Config>
++        <!--
++             Location of the Axis2 Services & Modules repository
++
++             This can be a directory in the local file system, or a URL.
++
++             e.g.
++             1. /home/wso2wsas/repository/ - An absolute path
++             2. repository - In this case, the path is relative to CARBON_HOME
++             3. file:///home/wso2wsas/repository/
++             4. http://wso2wsas/repository/
++        -->
++        <RepositoryLocation>${carbon.home}/repository/deployment/server/</RepositoryLocation>
++
++        <!--
++         Deployment update interval in seconds. This is the interval between repository listener
++         executions.
++        -->
++        <DeploymentUpdateInterval>15</DeploymentUpdateInterval>
++
++        <!--
++            Location of the main Axis2 configuration descriptor file, a.k.a. axis2.xml file
++
++            This can be a file on the local file system, or a URL
++
++            e.g.
++            1. /home/repository/axis2.xml - An absolute path
++            2. conf/axis2.xml - In this case, the path is relative to CARBON_HOME
++            3. file:///home/carbon/repository/axis2.xml
++            4. http://repository/conf/axis2.xml
++        -->
++        <ConfigurationFile>${carbon.home}/repository/conf/axis2/axis2.xml</ConfigurationFile>
++
++        <!--
++          ServiceGroupContextIdleTime, which will be set in ConfigurationContex
++          for multiple clients which are going to access the same ServiceGroupContext
++          Default Value is 30 Sec.
++        -->
++        <ServiceGroupContextIdleTime>30000</ServiceGroupContextIdleTime>
++
++        <!--
++          This repository location is used to crete the client side configuration
++          context used by the server when calling admin services.
++        -->
++        <ClientRepositoryLocation>${carbon.home}/repository/deployment/client/</ClientRepositoryLocation>
++        <!-- This axis2 xml is used in createing the configuration context by the FE server
++         calling to BE server -->
++        <clientAxis2XmlLocation>${carbon.home}/repository/conf/axis2/axis2_client.xml</clientAxis2XmlLocation>
++        <!-- If this parameter is set, the ?wsdl on an admin service will not give the admin service wsdl. -->
++        <HideAdminServiceWSDLs>true</HideAdminServiceWSDLs>
++
++	<!--WARNING-Use With Care! Uncommenting bellow parameter would expose all AdminServices in HTTP transport.
++	With HTTP transport your credentials and data routed in public channels are vulnerable for sniffing attacks.
++	Use bellow parameter ONLY if your communication channels are confirmed to be secured by other means -->
++        <!--HttpAdminServices>*</HttpAdminServices-->
++
++    </Axis2Config>
++
++    <!--
++       The default user roles which will be created when the server
++       is started up for the first time.
++    -->
++    <ServiceUserRoles>
++        <Role>
++            <Name>admin</Name>
++            <Description>Default Administrator Role</Description>
++        </Role>
++        <Role>
++            <Name>user</Name>
++            <Description>Default User Role</Description>
++        </Role>
++    </ServiceUserRoles>
++
++    <!--
++      Enable following config to allow Emails as usernames.
++    -->
++    <!--EnableEmailUserName>true</EnableEmailUserName-->
++
++    <!--
++      Security configurations
++    -->
++    <Security>
++        <!--
++            KeyStore which will be used for encrypting/decrypting passwords
++            and other sensitive information.
++        -->
++        <KeyStore>
++            <!-- Keystore file location-->
++            <Location>${carbon.home}/repository/resources/security/wso2carbon.jks</Location>
++            <!-- Keystore type (JKS/PKCS12 etc.)-->
++            <Type>JKS</Type>
++            <!-- Keystore password-->
++            <Password>wso2carbon</Password>
++            <!-- Private Key alias-->
++            <KeyAlias>wso2carbon</KeyAlias>
++            <!-- Private Key password-->
++            <KeyPassword>wso2carbon</KeyPassword>
++        </KeyStore>
++
++        <!--
++            System wide trust-store which is used to maintain the certificates of all
++            the trusted parties.
++        -->
++        <TrustStore>
++            <!-- trust-store file location -->
++            <Location>${carbon.home}/repository/resources/security/client-truststore.jks</Location>
++            <!-- trust-store type (JKS/PKCS12 etc.) -->
++            <Type>JKS</Type>
++            <!-- trust-store password -->
++            <Password>wso2carbon</Password>
++        </TrustStore>
++
++        <!--
++            The Authenticator configuration to be used at the JVM level. We extend the
++            java.net.Authenticator to make it possible to authenticate to given servers and
++            proxies.
++        -->
++        <NetworkAuthenticatorConfig>
++            <!--
++                Below is a sample configuration for a single authenticator. Please note that
++                all child elements are mandatory. Not having some child elements would lead to
++                exceptions at runtime.
++            -->
++            <!-- <Credential> -->
++                <!--
++                    the pattern that would match a subset of URLs for which this authenticator
++                    would be used
++                -->
++                <!-- <Pattern>regularExpression</Pattern> -->
++                <!--
++                    the type of this authenticator. Allowed values are:
++                    1. server
++                    2. proxy
++                -->
++                <!-- <Type>proxy</Type> -->
++                <!-- the username used to log in to server/proxy -->
++                <!-- <Username>username</Username> -->
++                <!-- the password used to log in to server/proxy -->
++                <!-- <Password>password</Password> -->
++            <!-- </Credential> -->
++        </NetworkAuthenticatorConfig>
++
++        <!--
++         The Tomcat realm to be used for hosted Web applications. Allowed values are;
++         1. UserManager
++         2. Memory
++
++         If this is set to 'UserManager', the realm will pick users & roles from the system's
++         WSO2 User Manager. If it is set to 'memory', the realm will pick users & roles from
++         CARBON_HOME/repository/conf/tomcat/tomcat-users.xml
++        -->
++        <TomcatRealm>UserManager</TomcatRealm>
++
++	<!--Option to disable storing of tokens issued by STS-->
++	<DisableTokenStore>false</DisableTokenStore>
++
++	<!--
++	 Security token store class name. If this is not set, default class will be
++	 org.wso2.carbon.security.util.SecurityTokenStore
++	-->
++	<TokenStoreClassName>org.wso2.carbon.identity.sts.store.DBTokenStore</TokenStoreClassName>
++
++
++
++        <!-- Configurations to avoid Cross Site Request Forgery vulnerabilities -->
++        <CSRFPreventionConfig>
++            <!-- CSRFPreventionFilter configurations that adopts Synchronizer Token Pattern -->
++            <CSRFPreventionFilter>
++                <!-- Set below to true to enable the CSRFPreventionFilter -->
++                <Enabled>false</Enabled>
++                <!-- Url Pattern to skip application of CSRF protection-->
++                <SkipUrlPattern>(.*)(/images|/css|/js|/docs)(.*)</SkipUrlPattern>
++            </CSRFPreventionFilter>
++        </CSRFPreventionConfig>
++
++        <!-- Configuration to enable or disable CR and LF sanitization filter-->
++        <CRLFPreventionConfig>
++            <!--Set below to true to enable the CRLFPreventionFilter-->
++            <Enabled>true</Enabled>
++        </CRLFPreventionConfig>
++    </Security>
++
++    <!--
++       The temporary work directory
++    -->
++    <WorkDirectory>${carbon.home}/tmp/work</WorkDirectory>
++
++    <!--
++       House-keeping configuration
++    -->
++    <HouseKeeping>
++
++        <!--
++           true  - Start House-keeping thread on server startup
++           false - Do not start House-keeping thread on server startup.
++                   The user will run it manually as and when he wishes.
++        -->
++        <AutoStart>true</AutoStart>
++
++        <!--
++           The interval in *minutes*, between house-keeping runs
++        -->
++        <Interval>10</Interval>
++
++        <!--
++          The maximum time in *minutes*, temp files are allowed to live
++          in the system. Files/directories which were modified more than
++          "MaxTempFileLifetime" minutes ago will be removed by the
++          house-keeping task
++        -->
++        <MaxTempFileLifetime>30</MaxTempFileLifetime>
++    </HouseKeeping>
++
++    <!--
++       Configuration for handling different types of file upload & other file uploading related
++       config parameters.
++       To map all actions to a particular FileUploadExecutor, use
++       <Action>*</Action>
++    -->
++    <FileUploadConfig>
++        <!--
++           The total file upload size limit in MB
++        -->
++        <TotalFileSizeLimit>100</TotalFileSizeLimit>
++
++        <Mapping>
++            <Actions>
++                <Action>keystore</Action>
++                <Action>certificate</Action>
++                <Action>*</Action>
++            </Actions>
++            <Class>org.wso2.carbon.ui.transports.fileupload.AnyFileUploadExecutor</Class>
++        </Mapping>
++
++        <Mapping>
++            <Actions>
++                <Action>jarZip</Action>
++            </Actions>
++            <Class>org.wso2.carbon.ui.transports.fileupload.JarZipUploadExecutor</Class>
++        </Mapping>
++        <Mapping>
++            <Actions>
++                <Action>dbs</Action>
++            </Actions>
++            <Class>org.wso2.carbon.ui.transports.fileupload.DBSFileUploadExecutor</Class>
++        </Mapping>
++        <Mapping>
++            <Actions>
++                <Action>tools</Action>
++            </Actions>
++            <Class>org.wso2.carbon.ui.transports.fileupload.ToolsFileUploadExecutor</Class>
++        </Mapping>
++        <Mapping>
++            <Actions>
++                <Action>toolsAny</Action>
++            </Actions>
++            <Class>org.wso2.carbon.ui.transports.fileupload.ToolsAnyFileUploadExecutor</Class>
++        </Mapping>
++    </FileUploadConfig>
++
++    <!-- FileNameRegEx is used to validate the file input/upload/write-out names.
++    e.g.
++     <FileNameRegEx>^(?!(?:CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\.[^.])?$)[^&lt;&gt:"/\\|?*\x00-\x1F][^&lt;&gt:"/\\|?*\x00-\x1F\ .]$</FileNameRegEx>
++    -->
++    <!--<FileNameRegEx></FileNameRegEx>-->
++
++    <!--
++       Processors which process special HTTP GET requests such as ?wsdl, ?policy etc.
++
++       In order to plug in a processor to handle a special request, simply add an entry to this
++       section.
++
++       The value of the Item element is the first parameter in the query string(e.g. ?wsdl)
++       which needs special processing
++
++       The value of the Class element is a class which implements
++       org.wso2.carbon.transport.HttpGetRequestProcessor
++    -->
++    <HttpGetRequestProcessors>
++        <Processor>
++            <Item>info</Item>
++            <Class>org.wso2.carbon.core.transports.util.InfoProcessor</Class>
++        </Processor>
++        <Processor>
++            <Item>wsdl</Item>
++            <Class>org.wso2.carbon.core.transports.util.Wsdl11Processor</Class>
++        </Processor>
++        <Processor>
++            <Item>wsdl2</Item>
++            <Class>org.wso2.carbon.core.transports.util.Wsdl20Processor</Class>
++        </Processor>
++        <Processor>
++            <Item>xsd</Item>
++            <Class>org.wso2.carbon.core.transports.util.XsdProcessor</Class>
++        </Processor>
++    </HttpGetRequestProcessors>
++
++    <!-- Deployment Synchronizer Configuration. t Enabled value to true when running with "svn based" dep sync.
++	In master nodes you need to set both AutoCommit and AutoCheckout to true
++	and in  worker nodes set only AutoCheckout to true.
++    -->
++    <DeploymentSynchronizer>
++        <Enabled>false</Enabled>
++        <AutoCommit>false</AutoCommit>
++        <AutoCheckout>true</AutoCheckout>
++        <RepositoryType>svn</RepositoryType>
++        <SvnUrl>http://svnrepo.example.com/repos/</SvnUrl>
++        <SvnUser>username</SvnUser>
++        <SvnPassword>password</SvnPassword>
++        <SvnUrlAppendTenantId>true</SvnUrlAppendTenantId>
++    </DeploymentSynchronizer>
++
++    <!-- Deployment Synchronizer Configuration. Uncomment the following section when running with "registry based" dep sync.
++        In master nodes you need to set both AutoCommit and AutoCheckout to true
++        and in  worker nodes set only AutoCheckout to true.
++    -->
++    <!--<DeploymentSynchronizer>
++        <Enabled>true</Enabled>
++        <AutoCommit>false</AutoCommit>
++        <AutoCheckout>true</AutoCheckout>
++    </DeploymentSynchronizer>-->
++
++    <!-- Mediation persistence configurations. Only valid if mediation features are available i.e. ESB -->
++    <!--<MediationConfig>
++        <LoadFromRegistry>false</LoadFromRegistry>
++        <SaveToFile>false</SaveToFile>
++        <Persistence>enabled</Persistence>
++        <RegistryPersistence>enabled</RegistryPersistence>
++    </MediationConfig>-->
++
++    <!--
++    Server intializing code, specified as implementation classes of org.wso2.carbon.core.ServerInitializer.
++    This code will be run when the Carbon server is initialized
++    -->
++    <ServerInitializers>
++        <!--<Initializer></Initializer>-->
++    </ServerInitializers>
++
++    <!--
++    Indicates whether the Carbon Servlet is required by the system, and whether it should be
++    registered
++    -->
++    <RequireCarbonServlet>${require.carbon.servlet}</RequireCarbonServlet>
++
++    <!--
++    Carbon H2 OSGI Configuration
++    By default non of the servers start.
++        name="web" - Start the web server with the H2 Console
++        name="webPort" - The port (default: 8082)
++        name="webAllowOthers" - Allow other computers to connect
++        name="webSSL" - Use encrypted (HTTPS) connections
++        name="tcp" - Start the TCP server
++        name="tcpPort" - The port (default: 9092)
++        name="tcpAllowOthers" - Allow other computers to connect
++        name="tcpSSL" - Use encrypted (SSL) connections
++        name="pg" - Start the PG server
++        name="pgPort"  - The port (default: 5435)
++        name="pgAllowOthers"  - Allow other computers to connect
++        name="trace" - Print additional trace information; for all servers
++        name="baseDir" - The base directory for H2 databases; for all servers
++    -->
++    <!--H2DatabaseConfiguration>
++        <property name="web" />
++        <property name="webPort">8082</property>
++        <property name="webAllowOthers" />
++        <property name="webSSL" />
++        <property name="tcp" />
++        <property name="tcpPort">9092</property>
++        <property name="tcpAllowOthers" />
++        <property name="tcpSSL" />
++        <property name="pg" />
++        <property name="pgPort">5435</property>
++        <property name="pgAllowOthers" />
++        <property name="trace" />
++        <property name="baseDir">${carbon.home}</property>
++    </H2DatabaseConfiguration-->
++    <!--Disabling statistics reporter by default-->
++    <StatisticsReporterDisabled>true</StatisticsReporterDisabled>
++
++    <!-- Enable accessing Admin Console via HTTP -->
++    <!-- EnableHTTPAdminConsole>true</EnableHTTPAdminConsole -->
++
++    <!--
++       Default Feature Repository of WSO2 Carbon.
++    -->
++    <FeatureRepository>
++	    <RepositoryName>default repository</RepositoryName>
++	    <RepositoryURL>http://product-dist.wso2.com/p2/carbon/releases/wilkes/</RepositoryURL>
++    </FeatureRepository>
++
++    <!--
++	Configure API Management
++   -->
++   <APIManagement>
++
++	<!--Uses the embedded API Manager by default. If you want to use an external
++	API Manager instance to manage APIs, configure below  externalAPIManager-->
++
++	<Enabled>true</Enabled>
++
++	<!--Uncomment and configure API Gateway and
++	Publisher URLs to use external API Manager instance-->
++
++	<!--ExternalAPIManager>
++
++		<APIGatewayURL>http://localhost:8281</APIGatewayURL>
++		<APIPublisherURL>http://localhost:8281/publisher</APIPublisherURL>
++
++	</ExternalAPIManager-->
++
++	<LoadAPIContextsInServerStartup>true</LoadAPIContextsInServerStartup>
++   </APIManagement>
++</Server>

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/wso2_is/vars/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/wso2_is/vars/main.yml
index 0000000,0000000..f7b4eb7
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/wso2_is/vars/main.yml
@@@ -1,0 -1,0 +1,18 @@@
++---
++#Variables associated with this role
++# Oracle Java 8
++java_dir_source: "/usr/local/src"
++
++java_version: 8
++java_version_update: 91
++java_version_build: '14'
++java_version_string: "1.{{ java_version }}.0_{{ java_version_update }}"
++java_home: "/usr/java/jdk1.{{ java_version }}.0_{{ java_version_update }}"
++
++java_rpm_filename: "jdk-{{ java_version }}u{{ java_version_update }}-linux-x64.rpm"
++java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/{{ java_version }}u{{ java_version_update }}-b{{ java_version_build }}/{{ java_rpm_filename }}"
++
++wso2_is_rul: http://wso2.com/products/identity-server/#download
++wso2_is_dist: wso2is-5.1.0.zip
++wso2_is_dir: wso2is-5.1.0
++...

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/zookeeper/handlers/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/zookeeper/handlers/main.yml
index 0000000,0000000..daefebe
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/zookeeper/handlers/main.yml
@@@ -1,0 -1,0 +1,12 @@@
++---
++- name: start zookeeper
++  service: name=zookeeper state=started enabled=yes
++  become: yes
++
++- name: stop zookeeper
++  service: name=zookeeper state=stopped
++  become: yes
++
++- name: restart zookeeper
++  service: name=zookeeper state=restarted enabled=yes
++  become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/zookeeper/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/zookeeper/tasks/main.yml
index 0000000,0000000..78bcec2
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/zookeeper/tasks/main.yml
@@@ -1,0 -1,0 +1,34 @@@
++---
++################################################################################
++# Setup and run Zookeeper
++- name: Download and unarchive zookeeper
++  unarchive: src="{{ zookeeper_url }}"
++      dest="{{ user_home }}"
++      copy=no
++      owner="{{ user }}"
++      group="{{ group }}"
++
++- name: open zookeeper port
++  firewalld: port=2181/tcp zone=public permanent=true state=enabled immediate=yes
++  become: yes
++
++- name: Copy zoo.cfg file
++  template: src=zoo.cfg.j2 dest="{{ zookeeper_dir }}/conf/zoo.cfg" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r"
++  notify:
++    - restart zookeeper
++
++- name: Check if systemd exists
++  stat: path=/usr/lib/systemd/system/
++  register: systemd_check
++
++- name: Systemd script.
++  template: src=zookeeper.service.j2 dest=/usr/lib/systemd/system/zookeeper.service
++  when: systemd_check.stat.exists == true
++  notify:
++    - restart zookeeper
++  become: yes
++
++- name: reload systemd daemons
++  command: systemctl daemon-reload
++  become: yes
++...

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/zookeeper/templates/zoo.cfg.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/zookeeper/templates/zoo.cfg.j2
index 0000000,0000000..8426b98
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/zookeeper/templates/zoo.cfg.j2
@@@ -1,0 -1,0 +1,28 @@@
++# The number of milliseconds of each tick
++tickTime={{tick_time}}
++# The number of ticks that the initial
++# synchronization phase can take
++initLimit={{init_limit}}
++# The number of ticks that can pass between
++# sending a request and getting an acknowledgement
++syncLimit={{sync_limit}}
++# the directory where the snapshot is stored.
++# do not use /tmp for storage, /tmp here is just
++# example sakes.
++dataDir={{zookeeper_data_dir}}
++# the port at which the clients will connect
++clientPort={{ client_port }}
++# the maximum number of client connections.
++# increase this if you need to handle more clients
++#maxClientCnxns=60
++#
++# Be sure to read the maintenance section of the
++# administrator guide before turning on autopurge.
++#
++# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
++#
++# The number of snapshots to retain in dataDir
++#autopurge.snapRetainCount=3
++# Purge task interval in hours
++# Set to "0" to disable auto purge feature
++#autopurge.purgeInterval=1

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/zookeeper/templates/zookeeper.service.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/zookeeper/templates/zookeeper.service.j2
index 0000000,0000000..19c3718
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/zookeeper/templates/zookeeper.service.j2
@@@ -1,0 -1,0 +1,15 @@@
++# {{ansible_managed}}
++
++[Unit]
++Description=ZooKeeper
++
++
++[Service]
++Type=forking
++ExecStart={{zookeeper_dir}}/bin/zkServer.sh start
++ExecStop={{ zookeeper_dir }}/bin/zkServer.sh stop
++Restart=always
++TimeoutSec=300
++
++[Install]
++WantedBy=multi-user.target

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/zookeeper/vars/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/zookeeper/vars/main.yml
index 0000000,0000000..a3e10db
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/zookeeper/vars/main.yml
@@@ -1,0 -1,0 +1,17 @@@
++---
++#Variables associated with this role
++# zookeeper related variable
++zookeeper_version: 3.4.8
++zookeeper_url: http://www.us.apache.org/dist/zookeeper/zookeeper-{{zookeeper_version}}/zookeeper-{{zookeeper_version}}.tar.gz
++
++apt_cache_timeout: 3600
++client_port: "{{ zookeeper_client_port }}" 
++init_limit: 5
++sync_limit: 2
++tick_time: 2000
++data_dir: /var/lib/zookeeper
++log_dir: /var/log/zookeeper
++zookeeper_dir: "{{ user_home }}/zookeeper-{{zookeeper_version}}"
++zookeeper_data_dir: "{{ zookeeper_dir }}/data"
++
++...

http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/site.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/site.yml
index 0000000,0000000..69ff15b
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/site.yml
@@@ -1,0 -1,0 +1,76 @@@
++---
++#Master playbook
++- hosts: zookeeper
++  tags: zookeeper, airavata
++  roles:
++    - env_setup
++    - java
++    - zookeeper
++
++- hosts: rabbitmq
++  tags: rabbitmq, airavata
++  roles:
++    - env_setup
++    - rabbitmq
++
++- hosts: database
++  tags: mysql , airavata
++  roles:
++    - env_setup
++    - role: database
++      become: yes
++      become_user: "{{user}}"
++
++- hosts: wso2is
++  tags: wso2is
++  roles:
++    - env_setup
++    - java
++    - role: wso2_is
++      become: yes
++      become_user: "{{user}}"
++
++
++- hosts: gfac
++  tags: gfac, airavata
++  roles:
++    - env_setup
++    - java
++    - 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
++    - role: common
++      become: yes
++      become_user: "{{user}}"
++    - role: api-orch
++      become: yes
++      become_user: "{{user}}"
++
++- hosts: registry
++  tags: registry, airavata
++  roles:
++    - env_setup
++    - java
++    - role: common
++      become: yes
++      become_user: "{{user}}"
++    - role: registry
++      become: yes
++      become_user: "{{user}}"
++
++- hosts: pga
++  tags: pga
++  roles:
++    - env_setup
++    - pga
++
++...


[29/50] [abbrv] airavata git commit: Added registry ansible script

Posted by la...@apache.org.
Added registry ansible script


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 9e6f2b1913932baec2d678100446c2557b4e10e3
Parents: 5c9cec8
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Mon Sep 12 13:20:28 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Mon Sep 12 13:20:28 2016 -0400

----------------------------------------------------------------------
 group_vars/all.yml                              |  15 +-
 hosts                                           |  15 +-
 .../templates/airavata-server.properties.j2     |   8 +
 .../templates/airavata-server.properties.j2     |   8 +
 .../files/mysql-connector-java-5.1.37-bin.jar   | Bin 0 -> 985603 bytes
 roles/registry/tasks/main.yml                   |  55 ++++
 .../templates/airavata-server.properties.j2     | 282 +++++++++++++++++++
 7 files changed, 373 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f2b19/group_vars/all.yml
----------------------------------------------------------------------
diff --git a/group_vars/all.yml b/group_vars/all.yml
index 0269ff2..615085a 100644
--- a/group_vars/all.yml
+++ b/group_vars/all.yml
@@ -39,19 +39,26 @@ rabbitmq_broker_url: "amqp://{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ rabb
 # Zoookeeper related variables
 zookeeper_client_port: 2181
 zookeeper_url: "{{ groups['zookeeper'][0] }}:{{ zookeeper_client_port }}"
-# API Server and Orchestrator related variables
+# API Server related variables
 api_server_name: "apiserver-node0"
-api_server_host: "{{ ansible_fqdn }}"
+api_server_host: "{{ansible_fqdn}}"
 api_server_port: "8930"
 api_secured: "true"
 tls_enable: "false"
 api_server_tls_port: "9930"
 
+# Orchestrator  related variables
 orchestrator_name: "orchestrator-node0"
-orchestrator_host: "{{ ansible_fqdn }}"
+orchestrator_host: "{{ansible_fqdn}}"
 orchestrator_port: "8940"
 api_orch_dir: "{{ deployment_dir }}/api-orchestrator"
 
+# registry related variables
+registry_name: regserver-node0
+registry_host: "{{groups['registry'][0]}}"
+registry_port: 8970
+registry_dir: "{{ deployment_dir }}/registry"
+
 # Credential and keystore related variables
 #authorization_server: "https://{{ groups['wso2is'][0]}}:9443/services/"
 authorization_server: "https://idp.scigap.org:9443/services/"
@@ -63,7 +70,7 @@ client_truststore_passwd: "airavata"
 cred_keystore: "airavata_sym.jks"
 cred_keystore_passwd: "airavata"
 cred_keystore_alias: "airavata"
-cred_store_server_host: "{{ ansible_fqdn }}"
+cred_store_server_host: "{{ groups['database'][0] }}"
 cred_store_port: "8960"
 keystores_location: "{{ deployment_dir }}/keystores"
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f2b19/hosts
----------------------------------------------------------------------
diff --git a/hosts b/hosts
index 9fd1d8e..4fc8675 100644
--- a/hosts
+++ b/hosts
@@ -2,22 +2,25 @@
 # inventory file : production
 
 [zookeeper]
-52.91.41.223
+54.221.13.4
 
 [rabbitmq]
-52.91.41.223
+54.221.13.4
 
 [database]
-54.221.0.3
+54.196.189.115
 
 [wso2is]
 #52.87.209.219
 
+[registry]
+54.89.119.195
+
 [api-orch]
-54.164.53.207
+54.89.119.195
 
 [gfac]
-54.85.248.150
+54.165.169.111
 
 [pga]
-54.88.152.194
+#54.237.220.234

http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f2b19/roles/api-orch/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/api-orch/templates/airavata-server.properties.j2 b/roles/api-orch/templates/airavata-server.properties.j2
index 9418e82..435842f 100644
--- a/roles/api-orch/templates/airavata-server.properties.j2
+++ b/roles/api-orch/templates/airavata-server.properties.j2
@@ -128,6 +128,14 @@ start.submitter=true
 embedded.mode=true
 enable.validation=true
 
+###########################################################################
+#  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
 
 ###########################################################################
 #  GFac Server Configurations

http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f2b19/roles/gfac/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/gfac/templates/airavata-server.properties.j2 b/roles/gfac/templates/airavata-server.properties.j2
index 9418e82..435842f 100644
--- a/roles/gfac/templates/airavata-server.properties.j2
+++ b/roles/gfac/templates/airavata-server.properties.j2
@@ -128,6 +128,14 @@ start.submitter=true
 embedded.mode=true
 enable.validation=true
 
+###########################################################################
+#  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
 
 ###########################################################################
 #  GFac Server Configurations

http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f2b19/roles/registry/files/mysql-connector-java-5.1.37-bin.jar
----------------------------------------------------------------------
diff --git a/roles/registry/files/mysql-connector-java-5.1.37-bin.jar b/roles/registry/files/mysql-connector-java-5.1.37-bin.jar
new file mode 100644
index 0000000..465af67
Binary files /dev/null and b/roles/registry/files/mysql-connector-java-5.1.37-bin.jar differ

http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f2b19/roles/registry/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/registry/tasks/main.yml b/roles/registry/tasks/main.yml
new file mode 100644
index 0000000..1c4ba85
--- /dev/null
+++ b/roles/registry/tasks/main.yml
@@ -0,0 +1,55 @@
+---
+
+################################################################################
+- name: Create registry deployment directory
+  file: path="{{ registry_dir }}" state=directory owner={{ user }} group={{ group }}
+  when: build|success
+
+- name: Check previous deployments
+  stat: path="{{ registry_dir }}/{{ airavata_dist }}" get_md5=no get_checksum=no
+  register: check
+
+- name: stop registry
+  command: ./bin/airavata-server-stop.sh -f
+           chdir="{{ registry_dir }}/{{ airavata_dist }}/"
+           removes="{{ registry_dir }}/{{ airavata_dist }}/bin/server_start_*"
+  when: check.stat.exists == True
+
+- name: Delete previous deployments
+  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 }}"
+             dest="{{ registry_dir }}/"
+             copy=no
+
+- name: Copy Airavata server properties file
+  template: src=airavata-server.properties.j2
+            dest="{{ registry_dir }}/{{ airavata_dist }}/bin/airavata-server.properties"
+            owner={{ user }}
+            group={{ group }}
+            mode="u=rw,g=r,o=r"
+
+- name: Copy Mysql jar to lib
+  copy: src="{{ mysql_connector_jar }}"
+        dest="{{ registry_dir }}/{{ airavata_dist }}/lib/{{ mysql_connector_jar }}"
+        owner={{ user }}
+        group={{ group }}
+
+
+- name: Open firwall ports
+  firewalld: port="{{ registry_port }}/tcp" zone=public permanent=true state=enabled immediate=yes
+  become: yes
+
+- name: stop registry
+  command: ./bin/airavata-server-stop.sh -f
+           chdir="{{ registry_dir }}/{{ airavata_dist }}/"
+           removes="{{ registry_dir }}/{{ airavata_dist }}/bin/server_start_*"
+
+- name: start registry
+  command: ./bin/airavata-server-start.sh regserver -d
+           chdir="{{ registry_dir }}/{{ airavata_dist }}/"
+           creates="{{ registry_dir }}/{{ airavata_dist }}/bin/server_start_*"
+
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f2b19/roles/registry/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/registry/templates/airavata-server.properties.j2 b/roles/registry/templates/airavata-server.properties.j2
new file mode 100644
index 0000000..435842f
--- /dev/null
+++ b/roles/registry/templates/airavata-server.properties.j2
@@ -0,0 +1,282 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+#
+
+###########################################################################
+#
+#  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
+# MySql database configuration
+registry.jdbc.driver=com.mysql.jdbc.Driver
+registry.jdbc.url=jdbc:mysql://{{ 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
+
+# Properties for default user mode
+default.registry.user=admin
+default.registry.password=admin
+default.registry.password.hash.method=SHA
+default.registry.gateway=default
+
+###########################################################################
+#  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
+# MySql database configuration
+appcatalog.jdbc.driver=com.mysql.jdbc.Driver
+appcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ 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
+# MySql database configuration
+replicacatalog.jdbc.driver=com.mysql.jdbc.Driver
+replicacatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
+replicacatalog.jdbc.user={{ db_user }}
+replicacatalog.jdbc.password={{ db_password }}
+replicacatalog.validationQuery=SELECT 1 from CONFIGURATION
+
+###########################################################################
+#  Workflow Catalog DB Configuration
+###########################################################################
+#for derby [AiravataJPARegistry]
+#workflowcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+#workflowcatalog.jdbc.url=jdbc:derby://localhost:1527/workflow_catalog;create=true;user=airavata;password=airavata
+# MySql database configuration
+workflowcatalog.jdbc.driver=com.mysql.jdbc.Driver
+workflowcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
+workflowcatalog.jdbc.user={{ db_user }}
+workflowcatalog.jdbc.password={{ db_password }}
+workflowcatalog.validationQuery=SELECT 1 from CONFIGURATION
+
+###########################################################################
+#  User Profile MongoDB Configuration
+###########################################################################
+userprofile.mongodb.host=localhost
+userprofile.mongodb.port=27017
+
+
+###########################################################################
+#  Server module Configuration
+###########################################################################
+#credential store server should be started before API server
+#This is obsolete property with new script files.
+#servers=credentialstore,apiserver,orchestrator
+
+
+###########################################################################
+#  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
+
+###########################################################################
+#  Orchestrator Server Configurations
+###########################################################################
+orchestrator=org.apache.airavata.orchestrator.server.OrchestratorServer
+orchestrator.server.name={{ orchestrator_name }}
+orchestrator.server.host={{ orchestrator_host }}
+orchestrator.server.port={{ orchestrator_port }}
+orchestrator.server.min.threads=50
+job.validators=org.apache.airavata.orchestrator.core.validator.impl.BatchQueueValidator,org.apache.airavata.orchestrator.core.validator.impl.ExperimentStatusValidator
+submitter.interval=10000
+threadpool.size=10
+start.submitter=true
+embedded.mode=true
+enable.validation=true
+
+###########################################################################
+#  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
+
+###########################################################################
+#  GFac Server Configurations
+###########################################################################
+gfac=org.apache.airavata.gfac.server.GfacServer
+gfac.server.name={{ gfac_name }}
+gfac.server.host={{ gfac_host }}
+gfac.server.port={{ gfac_port }}
+gfac.thread.pool.size=50
+host.scheduler=org.apache.airavata.gfac.impl.DefaultHostScheduler
+
+
+
+###########################################################################
+# Airavata Workflow Interpreter Configurations
+###########################################################################
+workflowserver=org.apache.airavata.api.server.WorkflowServer
+enactment.thread.pool.size=10
+
+#to define custom workflow parser user following property
+#workflow.parser=org.apache.airavata.workflow.core.parser.AiravataWorkflowBuilder
+
+
+
+###########################################################################
+#  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 }}
+credential.store.keystore.alias={{ cred_keystore_alias }}
+credential.store.keystore.password={{ cred_keystore_passwd }}
+credential.store.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ credential_store }}
+credential.store.jdbc.user={{ db_user }}
+credential.store.jdbc.password={{ db_password }}
+credential.store.jdbc.driver=com.mysql.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
+
+# 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
+email.based.monitor.host=imap.gmail.com
+email.based.monitor.address={{ monitor_email_address }}
+email.based.monitor.password={{ monitor_email_password }}
+email.based.monitor.folder.name=INBOX
+# either imaps or pop3
+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
+
+###########################################################################
+# 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 }}
+status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
+task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQProcessLaunchPublisher
+rabbitmq.status.exchange.name=airavata_rabbitmq_exchange
+rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
+durable.queue=false
+prefetch.count=200
+launch.queue.name=launch.queue
+cancel.queue.name=cancel.queue
+activity.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
+rabbitmq.exchange.name=airavata_rabbitmq_exchange
+
+###########################################################################
+# 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.api.server.security.DefaultAiravataSecurityManager
+### 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 }}
+keystore.password={{ keystore_passwd }}
+#### trust store configuration ####
+trust.store={{ keystores_location }}/{{ client_truststore }}
+trust.store.password=airavata
+#### remote authorization server url ####
+remote.oauth.authorization.server=https://idp.scigap.org:9443/services/
+#### xacml based authorization policy ####
+authorization.policy=airavata-default-xacml-policy
+#### authorization cache related configuration ####
+authz.cache.enabled=true
+authz.cache.manager.class=org.apache.airavata.api.server.security.authzcache.DefaultAuthzCacheManager
+in.memory.cache.size=1000


[07/50] [abbrv] airavata git commit: Added pga role to deploy pga, fix #1

Posted by la...@apache.org.
Added pga role to deploy pga, fix #1


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: c5b37ac515fbeb400358e0f31ff147eae0fca0bb
Parents: f50e7ad
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Fri Jul 29 01:15:03 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Fri Jul 29 01:15:03 2016 -0400

----------------------------------------------------------------------
 hosts                                 |   3 +-
 roles/pga/tasks/main.yml              |  66 ++++++++
 roles/pga/templates/pga_config.php.j2 | 238 +++++++++++++++++++++++++++++
 roles/pga/vars/main.yml               |  28 ++++
 site.yml                              |   8 +
 5 files changed, 342 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/c5b37ac5/hosts
----------------------------------------------------------------------
diff --git a/hosts b/hosts
index 11a03c7..66f650f 100644
--- a/hosts
+++ b/hosts
@@ -9,7 +9,8 @@
 #149.165.171.11 host_name=js-171-11 host_address=149.165.171.11
 
 [pga]
-149.165.156.196
+#149.165.156.196
+149.165.171.11
 
 [zookeeper]
 149.165.156.196 host_name=js-156-196 host_address=149.165.156.196

http://git-wip-us.apache.org/repos/asf/airavata/blob/c5b37ac5/roles/pga/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/pga/tasks/main.yml b/roles/pga/tasks/main.yml
new file mode 100644
index 0000000..ae08942
--- /dev/null
+++ b/roles/pga/tasks/main.yml
@@ -0,0 +1,66 @@
+---
+# - name: Create a new user group "{{ pga_group }}"
+#   group: name={{ pga_group }}
+#   # tags: user
+#
+# - name: Create a new user "{{ pga_user }}"
+#   user: name={{ pga_user }} group={{ pga_group }}
+#   # tags: user
+
+- name: Install pre-requireties
+  yum: name="{{ item }}" state=latest update_cache=yes
+  with_items:
+    - git
+    - httpd
+    - php-soap
+    - php
+    - composer
+    - php-mcrypt
+    - firewalld
+
+# This doesn't work sometimes, make sure selinux is dissabled in remote machine
+# - name: Allow selinux outbound connection from web server
+  # command: setsebool -P httpd_can_network_connect 1
+
+- name: Create root directory
+  file: path="{{ doc_root_dir }}" state=directory
+
+- name: Git clone php gateway
+  git: repo=https://github.com/apache/airavata-php-gateway.git dest="{{ doc_root_dir }}" version=master
+
+- name: Run composer update
+  command: composer update chdir="{{ doc_root_dir }}"
+
+- name: Create user data dir {{ user_data_dir }}
+  file: path="{{ user_data_dir }}" state=directory
+
+# step 6: Change pga configurations
+- name: Copy pga config file
+  template: src=pga_config.php.j2 dest="{{ doc_root_dir }}/app/config/pga_config.php"
+
+# do we need to change permissions for root user?
+# - name: Change storage permissions  to g+rwx
+#   acl: name="{{ doc_root_dir }}/app/storage" entity="{{ pga_group }}" etype=group permissions="rwx" state=present
+
+# Ignored step 8,9 in doc by assuming selinux is dissabled in remote machine
+
+# TODO: stop iptables service, can't have both iptables and firewalld on same host
+- name: Stop iptables, ip6tables services
+  service: name="{{ item }}" state=stopped
+  with_items:
+    - iptables
+    - ip6tables
+
+- name: Start firewalld service
+  service: name=firewalld state=started
+
+- name: Eanble https and http service on public zone
+  firewalld: service="{{ item }}" permanent=true state=enabled zone=public immediate=True
+  with_items:
+    - http
+    - https
+
+- name: Edit file
+  lineinfile: dest="{{ httpd_conf_file }}" regexp=^AllowOverride line="AllowOverride All"
+
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/c5b37ac5/roles/pga/templates/pga_config.php.j2
----------------------------------------------------------------------
diff --git a/roles/pga/templates/pga_config.php.j2 b/roles/pga/templates/pga_config.php.j2
new file mode 100644
index 0000000..703f67f
--- /dev/null
+++ b/roles/pga/templates/pga_config.php.j2
@@ -0,0 +1,238 @@
+<?php
+return array(
+    /**
+     * *****************************************************************
+     *  WSO2 Identity Server Related Configurations
+     * *****************************************************************
+     */
+
+    'wsis' => [
+
+        /**
+         * Admin Role Name
+         */
+        'admin-role-name' => 'Internal/everyone',
+
+        /**
+         * Read only Admin Role Name
+         */
+        'read-only-admin-role-name' => 'Internal/everyone',
+
+        /**
+         * Gateway user role
+         */
+        'user-role-name' => 'Internal/everyone',
+
+        /**
+         * Tenant Domain
+         */
+        'tenant-domain' => '{{ tenant_domain }}',
+
+        /**
+         * Tenant admin's username
+         */
+        'admin-username' => '{{ admin_username }}',
+
+        /**
+         * Tenant admin's password
+         */
+        'admin-password' => '{{ admin_password }}',
+
+        /**
+         * OAuth client key
+         */
+        'oauth-client-key' => '{{ oauth_client_key }}',
+
+        /**
+         * OAuth client secret
+         */
+        'oauth-client-secret' => '{{ oauth_client_secret }}',
+
+        /**
+         * Identity server domain
+         */
+        'server' => 'idp.scigap.org',
+
+        /**
+         * Identity server url
+         */
+        'service-url' => 'https://idp.scigap.org:9443/',
+
+        /**
+         * Enable HTTPS server verification
+         */
+        'verify-peer' => true,
+
+        /**
+         * Path to the server certificate file
+         */
+        'cafile-path' => app_path() . '/resources/security/idp_scigap_org.pem',
+
+        /**
+         * Allow self signed server certificates
+         */
+        'allow-self-signed-cert' => false
+    ],
+
+
+    /**
+     * *****************************************************************
+     *  Airavata Client Configurations
+     * *****************************************************************
+     */
+    'airavata' => [
+
+        /**
+         * Airavata API server location. Use tls:// as the protocol to
+         * connect TLS enabled Airavata
+         */
+        'airavata-server' => '{{ airavata_server }}',
+
+        /**
+         * Airavata API server port
+         */
+        'airavata-port' => '{{ airavata_port }}',
+
+        /**
+         * Airavata API server thrift communication timeout
+         */
+        'airavata-timeout' => '1000000',
+
+        /**
+         * PGA Gateway ID
+         */
+        'gateway-id' => '{{ gateway_id }}',
+
+        /**
+         * Maximum size of a file which is allowed to upload to the server
+         */
+        'server-allowed-file-size' => 64,
+
+        /**
+         * absolute path of the data dir
+         */
+        'experiment-data-absolute-path' => '{{ experiment_data_dir }}',
+
+        /**
+         * Advanced experiments options
+         */
+        'advanced-experiment-options' => '',
+
+        /**
+         * Default queue name
+         */
+        'queue-name' => 'long',
+
+        /**
+         * Default node count
+         */
+        'node-count' => '1',
+
+        /**
+         * Default total core count
+         */
+        'total-cpu-count' => '16',
+
+        /**
+         * Default wall time limit
+         */
+        'wall-time-limit' => '30',
+
+        /**
+         * Enable app-catalog cache
+         */
+        'enable-app-catalog-cache' => true,
+
+        /**
+         * Life time of app catalog data cache in minutes
+         */
+        'app-catalog-cache-duration' => 5,
+
+         /**
+         * Gateway data store resource id
+         */
+         'gateway-data-store-resource-id' => '{{ gateway_data_store_resource_id }}'
+    ],
+
+    /**
+     * *****************************************************************
+     *  Portal Related Configurations
+     * *****************************************************************
+     */
+    'portal' => [
+        /**
+         * Whether this portal is the SciGaP admin portal
+         */
+        'super-admin-portal' => {{ super_admin_portal }},
+
+        /**
+         * Set the name of theme in use here
+         */
+        'theme' => 'base',
+
+        /**
+         * Portal title
+         */
+        'portal-title' => 'Airavata PHP Gateway',
+
+        /**
+         * Email address of the portal admin. Portal admin well get email notifications for events
+         * such as new user creation
+         */
+        'admin-emails' => [{{ admin_emails }}],
+
+        /**
+         * Email account that the portal should login to send emails
+         */
+        'portal-email-username' => '{{ portal_email_username }}',
+
+        /**
+         * Password for the portal's email account
+         */
+        'portal-email-password' => '{{ portal_email_password }}',
+
+        /**
+         * SMTP server on which the portal should connect
+         */
+        'portal-smtp-server-host' => 'smtp.gmail.com',
+
+        /**
+         * SMTP server port on which the portal should connect
+         */
+        'portal-smtp-server-port' => '587',
+
+        /**
+         * Set JIRA Issue Collector scripts here.
+         */
+        'jira-help' =>
+        [
+            /**
+             * Report Issue Script issued for your app by Atlassian JIRA
+             */
+            'report-issue-script' => '',
+            /**
+             * Collector id at the end of the above script
+             */
+            'report-issue-collector-id' => '',
+            /**
+             * Create Report Script issued for your app by Atlassian JIRA
+             */
+            'request-feature-script' => '',
+            /**
+             * Collector id at the end of the above script
+             */
+            'request-feature-collector-id' => ''
+        ],
+
+        /**
+         * Set Google Analytics Id here. ID format that generates from
+         * creating tracker object should be
+         *
+         * UA-XXXXX-Y
+         *
+         * for it to be working correctly. Currently it is only set for
+         * sending pageviews.
+         */
+        'google-analytics-id' => ''
+    ]
+);

http://git-wip-us.apache.org/repos/asf/airavata/blob/c5b37ac5/roles/pga/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/pga/vars/main.yml b/roles/pga/vars/main.yml
new file mode 100644
index 0000000..1ece511
--- /dev/null
+++ b/roles/pga/vars/main.yml
@@ -0,0 +1,28 @@
+---
+pga_user: "pga"
+pga_group: "pga"
+doc_root_dir: "/var/www/html/php-gateway"
+user_data_dir: "/var/www/user_data"
+httpd_conf_file: "/etc/httpd/conf/httpd.conf"
+
+## WSO2 IS related variables
+tenant_domain: "master2.airavata"
+admin_username: "master2"
+admin_password: "master"
+oauth_client_key: "5_GFR88Nzd4XvGthSMF1fnOJPuMa"
+oauth_client_secret: "KNTf_LPLuGBDbRVZwkrP_fF5z2Ea"
+
+## Airavata Client related variables
+airavata_server: "tls://gw77.iu.xsede.org"
+airavata_port: "9930"
+gateway_id: "default"
+# relative to document root dir
+experiment_data_dir: "{{ user_data_dir }}"
+gateway_data_store_resource_id: "gw75.iu.xsede.org_3e40e62b-be11-4590-bf24-b1b6796c3572"
+
+## Portal related variables
+super_admin_portal: "false"
+admin_emails: "'sgg@iu.edu','blas@gmail.com'"
+portal_email_username: "pga.airavata@gmail.com"
+portal_email_password: "airavata12"
+...

http://git-wip-us.apache.org/repos/asf/airavata/blob/c5b37ac5/site.yml
----------------------------------------------------------------------
diff --git a/site.yml b/site.yml
index cf71290..728d3f0 100644
--- a/site.yml
+++ b/site.yml
@@ -1,25 +1,33 @@
 ---
 #Master playbook
 - hosts: zookeeper
+  tags: zookeeper
   roles:
     - setup
     - zookeeper
 
 - hosts: rabbitmq
+  tags: rabbitmq
   roles:
     - setup
     - rabbitmq
 
 - hosts: gfac
+  tags: gfac
   roles:
     - setup
     - common
     - gfac
 
 - hosts: api-orch
+  tags: api-orch
   roles:
     - setup
     - common
     - api-orch
 
+- hosts: pga
+  tags: pga
+  roles:
+    - pga
 ...


[38/50] [abbrv] airavata git commit: setting default gateway approval status

Posted by la...@apache.org.
setting default gateway approval status


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: f3b8e021cbaba7e218a70dbf7b9d1a59e9b11047
Parents: a5156a9
Author: scnakandala <su...@gmail.com>
Authored: Wed Sep 21 17:12:00 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Wed Sep 21 17:12:00 2016 -0400

----------------------------------------------------------------------
 .../core/experiment/catalog/impl/ExperimentCatalogImpl.java        | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/f3b8e021/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
index 3bc0b92..8494493 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
@@ -38,6 +38,7 @@ import org.apache.airavata.model.status.ProcessStatus;
 import org.apache.airavata.model.status.TaskStatus;
 import org.apache.airavata.model.task.TaskModel;
 import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.model.workspace.GatewayApprovalStatus;
 import org.apache.airavata.model.workspace.Notification;
 import org.apache.airavata.model.workspace.Project;
 import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
@@ -65,6 +66,7 @@ public class ExperimentCatalogImpl implements ExperimentCatalog {
             if (!ExpCatResourceUtils.isGatewayExist(ServerSettings.getDefaultUserGateway())){
                 gatewayResource = (GatewayResource) ExpCatResourceUtils.createGateway(ServerSettings.getDefaultUserGateway());
                 gatewayResource.setGatewayName(ServerSettings.getDefaultUserGateway());
+                gatewayResource.setGatewayApprovalStatus(GatewayApprovalStatus.APPROVED.toString());
                 gatewayResource.save();
             }else {
                 gatewayResource = (GatewayResource) ExpCatResourceUtils.getGateway(ServerSettings.getDefaultUserGateway());


[18/50] [abbrv] airavata git commit: Airavata pga and gfac works perfectly

Posted by la...@apache.org.
Airavata pga and gfac works perfectly


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

Branch: refs/heads/lahiru/AIRAVATA-2065
Commit: 2b6f220a06f7ca255471648d4a0ce480d789787c
Parents: 6e0715b
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Mon Aug 22 16:12:22 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Mon Aug 22 16:12:22 2016 -0400

----------------------------------------------------------------------
 group_vars/all                                  |  54 ------------
 group_vars/all.yml                              |  78 ++++++++++++++++++
 hosts                                           |  33 +++-----
 roles/api-orch/handlers/main.yml                |   8 +-
 roles/api-orch/tasks/main.yml                   |  80 ++++++++++--------
 .../templates/airavata-server.properties.j2     |  34 ++++----
 roles/api-orch/vars/main.yml                    |   3 -
 roles/common/files/airavata.jks                 | Bin 1410 -> 2289 bytes
 roles/common/files/airavata_sym.jks             | Bin 0 -> 501 bytes
 roles/common/files/client_truststore.jks        | Bin 3558 -> 0 bytes
 roles/common/tasks/main.yml                     |  25 ++++--
 roles/common/vars/main.yml                      |   3 +-
 roles/database/handlers/main.yml                |   4 +
 roles/database/tasks/main.yml                   |  27 ++++--
 roles/database/vars/main.yml                    |  14 ++++
 roles/gfac/tasks/main.yml                       |  82 +++++++++++--------
 .../templates/airavata-server.properties.j2     |  34 ++++----
 roles/gfac/vars/main.yml                        |   3 -
 roles/pga/tasks/main.yml                        |  54 +++++++-----
 roles/rabbitmq/handlers/main.yml                |   4 +-
 roles/rabbitmq/tasks/main.yml                   |   2 +-
 roles/zookeeper/handlers/main.yml               |   4 +-
 roles/zookeeper/vars/main.yml                   |   2 +-
 site.yml                                        |  28 ++++---
 24 files changed, 325 insertions(+), 251 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/group_vars/all
----------------------------------------------------------------------
diff --git a/group_vars/all b/group_vars/all
deleted file mode 100644
index da3b24e..0000000
--- a/group_vars/all
+++ /dev/null
@@ -1,54 +0,0 @@
----
-ansible_connection: ssh
-ansible_ssh_user: centos
-#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
-
-user: centos
-group: centos
-user_home: "/home/{{ user }}"
-deployment_dir: "{{ user_home }}/master-deployment"
-
-airavata_dist: "apache-airavata-server-0.17-SNAPSHOT"
-airavata_dist_name: "{{ airavata_dist }}-bin.tar.gz"
-
-db_server: "gw62.iu.xsede.org"
-db_server_port: "3306"
-db_user: "airavata"
-db_password: "airavata"
-app_catalog: "app_catalog"
-exp_catalog: "exp_catalog"
-replica_catalog: "replica_catalog"
-workflow_catalog: "wf_catalog"
-credential_store: "credential_store"
-
-rabbitmq_server: "localhost"
-rabbitmq_vhost: "master"
-rabbitmq_user: "airavata"
-rabbitmq_password: "airavata"
-rabbitmq_port: "5672"
-rabbitmq_broker_url: "amqp://{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ rabbitmq_server}}:{{ rabbitmq_port }}/{{ rabbitmq_vhost }}"
-
-key_store: "airavata.jks"
-cred_key_store: "client_truststore.jks"
-cred_store_server_host: "gw77.iu.xsede.org"
-key_stores_location: "{{ deployment_dir }}/keystores"
-
-mysql_connector_jar: "mysql-connector-java-5.1.37-bin.jar"
-
-api_server_name: "apiserver-node0"
-api_server_host: "{{ ansible_fqdn }}"
-api_server_port: "8930"
-
-orchestrator_name: "orchestrator-node0"
-orchestrator_host: "{{ ansible_fqdn }}"
-orchestrator_port: "8940"
-
-gfac_name: "gfac-node0"
-gfac_host: "{{ ansible_fqdn }}"
-gfac_port: "8950"
-
-monitor_email_address: "jobs@scigap.org"
-monitor_email_password: "xxxxx"
-
-...

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/group_vars/all.yml
----------------------------------------------------------------------
diff --git a/group_vars/all.yml b/group_vars/all.yml
new file mode 100644
index 0000000..0269ff2
--- /dev/null
+++ b/group_vars/all.yml
@@ -0,0 +1,78 @@
+---
+ansible_connection: ssh
+ansible_ssh_user: centos
+#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
+
+user: centos
+group: centos
+user_home: "/home/{{ user }}"
+
+# deployment related variables
+deployment_dir: "{{ user_home }}/master-deployment"
+airavata_source_dir: "{{ user_home }}/source"
+airavata_dist: "apache-airavata-server-0.17-SNAPSHOT"
+airavata_dist_name: "{{ airavata_dist }}-bin.tar.gz"
+git_branch: master
+
+# Database related variables
+db_server: "{{ groups['database'][0] }}"
+db_server_port: "3306"
+db_user: "airavata"
+db_password: "airavata"
+app_catalog: "app_catalog"
+exp_catalog: "exp_catalog"
+replica_catalog: "replica_catalog"
+workflow_catalog: "wf_catalog"
+credential_store: "credential_store"
+
+mysql_connector_jar: "mysql-connector-java-5.1.37-bin.jar"
+
+# Rabbitmq related vareables
+rabbitmq_server: "{{ groups['rabbitmq'][0] }}"
+rabbitmq_vhost: "master"
+rabbitmq_user: "airavata"
+rabbitmq_password: "airavata"
+rabbitmq_port: "5672"
+rabbitmq_broker_url: "amqp://{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ rabbitmq_server}}:{{ rabbitmq_port }}/{{ rabbitmq_vhost }}"
+
+# Zoookeeper related variables
+zookeeper_client_port: 2181
+zookeeper_url: "{{ groups['zookeeper'][0] }}:{{ zookeeper_client_port }}"
+# API Server and Orchestrator related variables
+api_server_name: "apiserver-node0"
+api_server_host: "{{ ansible_fqdn }}"
+api_server_port: "8930"
+api_secured: "true"
+tls_enable: "false"
+api_server_tls_port: "9930"
+
+orchestrator_name: "orchestrator-node0"
+orchestrator_host: "{{ ansible_fqdn }}"
+orchestrator_port: "8940"
+api_orch_dir: "{{ deployment_dir }}/api-orchestrator"
+
+# Credential and keystore related variables
+#authorization_server: "https://{{ groups['wso2is'][0]}}:9443/services/"
+authorization_server: "https://idp.scigap.org:9443/services/"
+keystore: "airavata.jks"
+keystore_passwd: "airavata"
+#client_truststore: "client_truststore.jks"
+client_truststore: "airavata.jks"
+client_truststore_passwd: "airavata"
+cred_keystore: "airavata_sym.jks"
+cred_keystore_passwd: "airavata"
+cred_keystore_alias: "airavata"
+cred_store_server_host: "{{ ansible_fqdn }}"
+cred_store_port: "8960"
+keystores_location: "{{ deployment_dir }}/keystores"
+
+# Gfac related variables
+gfac_name: "gfac-node0"
+gfac_host: "{{ ansible_fqdn }}"
+gfac_port: "8950"
+gfac_dir: "{{ deployment_dir }}/gfac-instance"
+
+# Monitoring variables
+monitor_email_address: "test.airavata@gmail.com"
+monitor_email_password: "airavata"

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/hosts
----------------------------------------------------------------------
diff --git a/hosts b/hosts
index b14e7fd..4ff2de0 100644
--- a/hosts
+++ b/hosts
@@ -1,30 +1,23 @@
 ---
 # inventory file : production
 
-[api-orch]
-#js-156.196.jetstream-cloud.org
-#js-171-11.jetstream-cloud.org
-
-[gfac]
-#js-156.196.jetstream-cloud.org
-#js-171-11.jetstream-cloud.org
-
-[pga]
-#js-156.196.jetstream-cloud.org
-#js-171-11.jetstream-cloud.org
-
 [zookeeper]
-#js-156.196.jetstream-cloud.org
-#js-171-11.jetstream-cloud.org
+52.91.41.223
 
 [rabbitmq]
-#js-156.196.jetstream-cloud.org
-#js-171-11.jetstream-cloud.org rabbit_hostName="jetcloud-1-centos-7"
-54.236.73.114
+52.91.41.223
 
 [database]
-#js-156.196.jetstream-cloud.org
-#js-171-11.jetstream-cloud.org
+54.221.0.3
 
 [wso2is]
-52.91.87.213
+#52.87.209.219
+
+[api-orch]
+54.164.53.207
+
+[gfac]
+54.85.248.150
+
+[pga]
+54.236.200.110

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/api-orch/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/api-orch/handlers/main.yml b/roles/api-orch/handlers/main.yml
index c1a828d..a2288d9 100644
--- a/roles/api-orch/handlers/main.yml
+++ b/roles/api-orch/handlers/main.yml
@@ -2,9 +2,13 @@
 
 # Api server, Orchestrator related handlers
 - name: start api-orch
-  command: ./bin/airavata-server-start.sh api-orch -d chdir="{{ api_orch_dir }}/{{ airavata_dist }}/" creates="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
+  command: ./bin/airavata-server-start.sh api-orch -d
+           chdir="{{ api_orch_dir }}/{{ airavata_dist }}/"
+           creates="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
 
 - name: stop api-orch
-  command: ./bin/airavata-server-stop.sh -f chdir="{{ api_orch_dir }}/{{ airavata_dist }}/" removes="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
+  command: ./bin/airavata-server-stop.sh -f
+           chdir="{{ api_orch_dir }}/{{ airavata_dist }}/"
+           removes="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
 
 ...

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/api-orch/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/api-orch/tasks/main.yml b/roles/api-orch/tasks/main.yml
index 827f520..369bb2b 100644
--- a/roles/api-orch/tasks/main.yml
+++ b/roles/api-orch/tasks/main.yml
@@ -4,51 +4,61 @@
 - name: Create api-orchestrator deployment directory
   file: path="{{ api_orch_dir }}" state=directory owner="{{ user }}" group="{{ group }}"
   when: build|success
-  tags: deploy, update_api_orch, update
 
 - name: Check previous deployments
   stat: path="{{ api_orch_dir }}/{{ airavata_dist }}" get_md5=no get_checksum=no
-  register: pp
-  tags: deploy, update_api_orch, update
-
-- block:
-    - name: stop api-orch
-      command: ./bin/airavata-server-stop.sh -f chdir="{{ api_orch_dir }}/{{ airavata_dist }}/" removes="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
-
-    - name: Delete previous deployments
-      file: path="{{ gfac_dir }}/{{ airavata_dist }}" state=absent
-
-  when: pp.stat.exists == True
-  tags: deploy, update_api_orch, update
-#
-# - block:
-#     - name: Remove pervious backup directory
-#       file: path="{{ api_orch_dir }}/backup" state=absent
-#       notify:
-#         - stop api-orch
-#
-#     - name: Backup previous deployment directory
-#       copy: src="{{ api_orch_dir }}/{{ airavata_dist }}" dest="{{ api_orch_dir }}/backup" copy=no
-#
-#   when: p.stat.exist == True
-#   tags: deploy update_api_orch update
+  register: check
+
+- name: stop api-orch
+  command: ./bin/airavata-server-stop.sh -f
+            chdir="{{ api_orch_dir }}/{{ airavata_dist }}/"
+            removes="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
+  when: check.stat.exists == True
+
+- name: Delete previous deployments
+  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 }}" dest="{{ api_orch_dir }}/" copy=no
-  become: yes
-  become_user: "{{ user }}"
-  tags: deploy, update_api_orch, update
+  unarchive: src="{{ airavata_source_dir }}/distribution/target/{{ airavata_dist_name }}"
+             dest="{{ api_orch_dir }}/"
+             copy=no
 
 - name: Copy Airavata server properties file
-  template: src=airavata-server.properties.j2 dest="{{ api_orch_dir }}/{{ airavata_dist }}/bin/airavata-server.properties" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r"
-  tags: deploy, update_api_orch, update
+  template: src=airavata-server.properties.j2
+            dest="{{ api_orch_dir }}/{{ airavata_dist }}/bin/airavata-server.properties"
+            owner={{ user }}
+            group={{ group }}
+            mode="u=rw,g=r,o=r"
 
 - name: Copy Gfac configuration file
-  template: src=gfac-config.yaml.j2 dest="{{ api_orch_dir }}/{{ airavata_dist }}/bin/gfac-config.yaml" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r"
-  tags: deploy, update_api_orch, update
+  template: src=gfac-config.yaml.j2
+            dest="{{ api_orch_dir }}/{{ airavata_dist }}/bin/gfac-config.yaml"
+            owner={{ user }}
+            group={{ group }}
+            mode="u=rw,g=r,o=r"
 
 - name: Copy Mysql jar to lib
-  copy: src="{{ mysql_connector_jar }}" dest="{{ api_orch_dir }}/{{ airavata_dist }}/lib/{{ mysql_connector_jar }}" owner="{{ user }}" group="{{ group }}"
-  tags: deploy, update_api_orch, update
+  copy: src={{ mysql_connector_jar }}
+        dest="{{ api_orch_dir }}/{{ airavata_dist }}/lib/{{ mysql_connector_jar }}"
+        owner={{ user }}
+        group={{ group }}
+
+- name: Open firwall ports
+  firewalld: port={{ item }} zone=public permanent=true state=enabled immediate=yes
+  with_items:
+    - "{{ api_server_port }}/tcp"
+    - "{{ orchestrator_port }}/tcp"
+    - "{{ cred_store_port }}/tcp"
+  become: yes
+
+- name: stop api-orch
+  command: ./bin/airavata-server-stop.sh -f
+           chdir="{{ api_orch_dir }}/{{ airavata_dist }}/"
+           removes="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
+
+- name: start api-orch
+  command: ./bin/airavata-server-start.sh api-orch -d
+           chdir="{{ api_orch_dir }}/{{ airavata_dist }}/"
+           creates="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
 
 ...

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/api-orch/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/api-orch/templates/airavata-server.properties.j2 b/roles/api-orch/templates/airavata-server.properties.j2
index 449a7fd..9418e82 100644
--- a/roles/api-orch/templates/airavata-server.properties.j2
+++ b/roles/api-orch/templates/airavata-server.properties.j2
@@ -34,7 +34,7 @@
 #registry.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
 # MySql database configuration
 registry.jdbc.driver=com.mysql.jdbc.Driver
-registry.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ exp_catalog }}
+registry.jdbc.url=jdbc:mysql://{{ 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.
@@ -107,21 +107,16 @@ userprofile.mongodb.port=27017
 ###########################################################################
 #  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
 
 ###########################################################################
-#  API Server SSL Configurations
-###########################################################################
-apiserver.tls.enabled=true
-apiserver.keystore={{ key_stores_location }}/{{ key_store }}
-apiserver.keystore.password=airavata
-
-###########################################################################
 #  Orchestrator Server Configurations
 ###########################################################################
+orchestrator=org.apache.airavata.orchestrator.server.OrchestratorServer
 orchestrator.server.name={{ orchestrator_name }}
 orchestrator.server.host={{ orchestrator_host }}
 orchestrator.server.port={{ orchestrator_port }}
@@ -137,6 +132,7 @@ enable.validation=true
 ###########################################################################
 #  GFac Server Configurations
 ###########################################################################
+gfac=org.apache.airavata.gfac.server.GfacServer
 gfac.server.name={{ gfac_name }}
 gfac.server.host={{ gfac_host }}
 gfac.server.port={{ gfac_port }}
@@ -171,15 +167,15 @@ job.notification.flags=abe
 ###########################################################################
 # Credential Store module Configuration
 ###########################################################################
-credential.store.keystore.url=/home/airavata/airavata_sym.jks
-credential.store.keystore.alias=airavata
-credential.store.keystore.password=airavata
+credential.store.keystore.url={{ keystores_location }}/{{ cred_keystore }}
+credential.store.keystore.alias={{ cred_keystore_alias }}
+credential.store.keystore.password={{ cred_keystore_passwd }}
 credential.store.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ credential_store }}
 credential.store.jdbc.user={{ db_user }}
 credential.store.jdbc.password={{ db_password }}
 credential.store.jdbc.driver=com.mysql.jdbc.Driver
 credential.store.server.host={{ cred_store_server_host }}
-credential.store.server.port=8960
+credential.store.server.port={{ cred_store_port }}
 credentialstore=org.apache.airavata.credential.store.server.CredentialStoreServer
 
 # these properties used by credential store email notifications
@@ -250,23 +246,23 @@ rabbitmq.exchange.name=airavata_rabbitmq_exchange
 # Zookeeper Server Configuration
 ###########################################################################
 embedded.zk=false
-zookeeper.server.connection=localhost:2181
+zookeeper.server.connection={{ zookeeper_url }}
 zookeeper.timeout=30000
 
 ########################################################################
 ## API Security Configuration
 ########################################################################
-api.secured=true
+api.secured={{ api_secured }}
 security.manager.class=org.apache.airavata.api.server.security.DefaultAiravataSecurityManager
 ### TLS related configuration ####
-TLS.enabled=true
-TLS.api.server.port=9930
+TLS.enabled={{ tls_enable }}
+TLS.api.server.port={{ api_server_tls_port }}
 TLS.client.timeout=10000
 #### keystore configuration ####
-keystore.path={{ key_stores_location }}/{{ key_store }}
-keystore.password=airavata
+keystore.path={{ keystores_location }}/{{ keystore }}
+keystore.password={{ keystore_passwd }}
 #### trust store configuration ####
-trust.store={{ key_stores_location }}/{{ cred_key_store }}
+trust.store={{ keystores_location }}/{{ client_truststore }}
 trust.store.password=airavata
 #### remote authorization server url ####
 remote.oauth.authorization.server=https://idp.scigap.org:9443/services/

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/api-orch/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/api-orch/vars/main.yml b/roles/api-orch/vars/main.yml
deleted file mode 100644
index 16b85b0..0000000
--- a/roles/api-orch/vars/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-# API Server and Orchestrator related variables
-api_orch_dir: "{{ deployment_dir }}/api-orchestrator"

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/common/files/airavata.jks
----------------------------------------------------------------------
diff --git a/roles/common/files/airavata.jks b/roles/common/files/airavata.jks
index e0e46e2..685cc00 100644
Binary files a/roles/common/files/airavata.jks and b/roles/common/files/airavata.jks differ

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/common/files/airavata_sym.jks
----------------------------------------------------------------------
diff --git a/roles/common/files/airavata_sym.jks b/roles/common/files/airavata_sym.jks
new file mode 100644
index 0000000..3dd27d6
Binary files /dev/null and b/roles/common/files/airavata_sym.jks differ

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/common/files/client_truststore.jks
----------------------------------------------------------------------
diff --git a/roles/common/files/client_truststore.jks b/roles/common/files/client_truststore.jks
deleted file mode 100644
index 4d39906..0000000
Binary files a/roles/common/files/client_truststore.jks and /dev/null differ

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/common/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml
index 9c1884d..4289515 100644
--- a/roles/common/tasks/main.yml
+++ b/roles/common/tasks/main.yml
@@ -26,23 +26,30 @@
 
 - name: Run maven build
   command: mvn clean install -Dmaven.test.skip=true chdir="{{ airavata_source_dir }}/"
-  when: (checkout|success) or (checkout|skipped)
+  environment:
+      MAVEN_OPTS: "-Xmx1024m"
   register: build
   tags: update
+  # when: (checkout|success) and (checkout.changed == true)
 
 ################################################################################
 # copy key store and trust store files
 - name: Create KeyStores directory
-  file: path="{{ key_stores_location }}"
+  file: path={{ keystores_location }}
         state=directory
-        owner="{{ user }}" group="{{ group }}"
+        owner={{ user }} group={{ group }}
 
 - name: Transfer airavata.jks KeyStore file
-  copy: src="{{ key_store }}"
-        dest="{{ key_stores_location }}/{{ key_store }}"
-        owner="{{ user }}" group="{{ group }}"
+  copy: src={{ keystore }}
+        dest="{{ keystores_location }}/{{ keystore }}"
+        owner={{ user }} group={{ group }}
+
+- name: Transfer airavata_sym.jks KeyStore file
+  copy: src={{ cred_keystore }}
+        dest="{{ keystores_location }}/{{ cred_keystore }}"
+        owner={{ user }} group={{ group }}
 
 - name: Transfer client trust store KeyStore file
-  copy: src="{{ cred_key_store }}"
-        dest="{{ key_stores_location }}/{{ cred_key_store }}"
-        owner="{{ user }}" group="{{ group }}"
+  copy: src={{ client_truststore }}
+        dest="{{ keystores_location }}/{{ client_truststore }}"
+        owner={{ user }} group={{ group }}

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/common/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/common/vars/main.yml b/roles/common/vars/main.yml
index 0df33c5..e2d93e7 100644
--- a/roles/common/vars/main.yml
+++ b/roles/common/vars/main.yml
@@ -1,5 +1,4 @@
 ---
 # Common variables
-airavata_source_dir: "{{ user_home }}/source"
-git_branch: master
+
 ...

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/database/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/database/handlers/main.yml b/roles/database/handlers/main.yml
index 5400e8b..1906365 100644
--- a/roles/database/handlers/main.yml
+++ b/roles/database/handlers/main.yml
@@ -7,4 +7,8 @@
   service: name=mariadb state=stopped
   become: yes
 
+- name: restart mariadb
+  service: name=mariadb state=restarted enabled=yes
+  become: yes
+
 ...

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/database/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/database/tasks/main.yml b/roles/database/tasks/main.yml
index 5fb75e4..4a75abb 100644
--- a/roles/database/tasks/main.yml
+++ b/roles/database/tasks/main.yml
@@ -38,16 +38,25 @@
 - name: create databases
   mysql_db: name="{{ item }}" state=present
   with_items:
-    - "{{ app_catalog }}"
-    - "{{ exp_catalog }}"
-    - "{{ replica_catalog }}"
-    - "{{ workflow_catalog }}"
-    - "{{ credential_store }}"
+    - "{{ mysql_databases }}"
 
-- name: create new user {{ db_user }} with all privilege
-  mysql_user: name="{{ db_user }}" password="{{ db_password }}" priv=*.*:ALL state=present
+- name: give access to {{ db_user }} from remote
+  mysql_user: name="{{ db_user }}" password="{{ db_password }}" host="{{ item }}"
+  with_items:
+    - "{{ groups['api-orch'] }}"
+    - "{{ groups['gfac'] }}"
+  tags: testdb
 
-- name: open database port
-  firewalld: port="{{ db_server_port }}/tcp" zone=public permanent=true state=enabled immediate=yes
+- name: create new user {{ db_user }} with all privilege
+  mysql_user: name="{{ db_user }}"
+              password="{{ db_password }}"
+              append_privs=yes
+              host_all=yes
+              priv=*.*:ALL,GRANT state=present
+  tags: testdb
+
+- name: open firewall port {{ db_server_port }}
+  firewalld: port="{{ db_server_port }}/tcp"
+             zone=public permanent=true state=enabled immediate=yes
   become: yes
 ...

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/database/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/database/vars/main.yml b/roles/database/vars/main.yml
index 3bbc070..1f37424 100644
--- a/roles/database/vars/main.yml
+++ b/roles/database/vars/main.yml
@@ -4,4 +4,18 @@ mysql_packages:
   - mariadb
 mysql_root_password: "admin"
 
+mysql_databases:
+    - "{{ app_catalog }}"
+    - "{{ exp_catalog }}"
+    - "{{ replica_catalog }}"
+    - "{{ workflow_catalog }}"
+    - "{{ credential_store }}"
+
+mysql_privs:
+    - "{{ app_catalog }}.*:ALL"
+    - "{{ exp_catalog }}.*:ALL"
+    - "{{ replica_catalog }}.*:ALL"
+    - "{{ workflow_catalog }}.*:ALL"
+    - "{{ credential_store }}.*:ALL"
+
 ...

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/gfac/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/gfac/tasks/main.yml b/roles/gfac/tasks/main.yml
index bae85cf..06d6dda 100644
--- a/roles/gfac/tasks/main.yml
+++ b/roles/gfac/tasks/main.yml
@@ -3,51 +3,61 @@
 ################################################################################
 # gfac deployments
 - name: Create Gfac deployment directory
-  file: path="{{ gfac_dir }}" state=directory owner="{{ user }}" group="{{ group }}"
+  file: path="{{ gfac_dir }}" state=directory owner={{ user }} group={{ group }}
   when: build|success
-  tags: deploy, update_gfac, update
 
 - name: Check previous deployments
   stat: path="{{ gfac_dir }}/{{ airavata_dist }}" get_md5=no get_checksum=no
-  register: p
-  tags: deploy, update_gfac, update
-
-- block:
-    - name: stop gfac
-      command: ./bin/airavata-server-stop.sh -f chdir="{{ gfac_dir }}/{{ airavata_dist }}/" removes="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
-
-    - name: Delete previous deployments
-      file: path="{{ gfac_dir }}/{{ airavata_dist }}" state=absent
-
-  when: p.stat.exists == True
-  tags: deploy, update_gfac, update
-
-# - block:
-#     - name: Remove pervious backup directory
-#       file: path="{{ gfac_dir }}/backup" state=absent
-#       notify:
-#         - stop gfac
-#
-#     - name: Backup previous deployment directory
-#       copy: src="{{ gfac_dir }}/{{ airavata_dist }}" dest="{{ gfac_dir }}/backup" copy=no
-#
-#   when: p.stat.exists == True
-#   tags: deploy, update_gfac, update
+  register: check
+
+- name: stop gfac
+  command: ./bin/airavata-server-stop.sh -f
+           chdir="{{ gfac_dir }}/{{ airavata_dist }}/"
+           removes="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
+  when: check.stat.exists == True
+
+- name: Delete previous deployments
+  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 }}" dest="{{ gfac_dir }}/" copy=no
-  become: yes
-  become_user: "{{ user }}"
-  tags: deploy, update_gfac, update
+  unarchive: src="{{ airavata_source_dir }}/distribution/target/{{ airavata_dist_name }}"
+             dest="{{ gfac_dir }}/"
+             copy=no
 
 - name: Copy Airavata server properties file
-  template: src=airavata-server.properties.j2 dest="{{ gfac_dir }}/{{ airavata_dist }}/bin/airavata-server.properties" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r"
-  tags: deploy, update_gfac, update
+  template: src=airavata-server.properties.j2
+            dest="{{ gfac_dir }}/{{ airavata_dist }}/bin/airavata-server.properties"
+            owner={{ user }}
+            group={{ group }}
+            mode="u=rw,g=r,o=r"
 
 - name: Copy Gfac configuration file
-  template: src=gfac-config.yaml.j2 dest="{{ gfac_dir }}/{{ airavata_dist }}/bin/gfac-config.yaml" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r"
-  tags: deploy, update_gfac, update
+  template: src=gfac-config.yaml.j2
+            dest="{{ gfac_dir }}/{{ airavata_dist }}/bin/gfac-config.yaml"
+            owner={{ user }}
+            group={{ group }}
+            mode="u=rw,g=r,o=r"
 
 - name: Copy Mysql jar to lib
-  copy: src="{{ mysql_connector_jar }}" dest="{{ gfac_dir }}/{{ airavata_dist }}/lib/{{ mysql_connector_jar }}" owner="{{ user }}" group="{{ group }}"
-  tags: deploy, update_gfac, update
+  copy: src="{{ mysql_connector_jar }}"
+        dest="{{ gfac_dir }}/{{ airavata_dist }}/lib/{{ mysql_connector_jar }}"
+        owner={{ user }}
+        group={{ group }}
+
+
+- name: Open firwall ports
+  firewalld: port="{{ gfac_port }}/tcp" zone=public permanent=true state=enabled immediate=yes
+  become: yes
+
+- 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 
+  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/2b6f220a/roles/gfac/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/gfac/templates/airavata-server.properties.j2 b/roles/gfac/templates/airavata-server.properties.j2
index 449a7fd..9418e82 100644
--- a/roles/gfac/templates/airavata-server.properties.j2
+++ b/roles/gfac/templates/airavata-server.properties.j2
@@ -34,7 +34,7 @@
 #registry.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
 # MySql database configuration
 registry.jdbc.driver=com.mysql.jdbc.Driver
-registry.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ exp_catalog }}
+registry.jdbc.url=jdbc:mysql://{{ 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.
@@ -107,21 +107,16 @@ userprofile.mongodb.port=27017
 ###########################################################################
 #  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
 
 ###########################################################################
-#  API Server SSL Configurations
-###########################################################################
-apiserver.tls.enabled=true
-apiserver.keystore={{ key_stores_location }}/{{ key_store }}
-apiserver.keystore.password=airavata
-
-###########################################################################
 #  Orchestrator Server Configurations
 ###########################################################################
+orchestrator=org.apache.airavata.orchestrator.server.OrchestratorServer
 orchestrator.server.name={{ orchestrator_name }}
 orchestrator.server.host={{ orchestrator_host }}
 orchestrator.server.port={{ orchestrator_port }}
@@ -137,6 +132,7 @@ enable.validation=true
 ###########################################################################
 #  GFac Server Configurations
 ###########################################################################
+gfac=org.apache.airavata.gfac.server.GfacServer
 gfac.server.name={{ gfac_name }}
 gfac.server.host={{ gfac_host }}
 gfac.server.port={{ gfac_port }}
@@ -171,15 +167,15 @@ job.notification.flags=abe
 ###########################################################################
 # Credential Store module Configuration
 ###########################################################################
-credential.store.keystore.url=/home/airavata/airavata_sym.jks
-credential.store.keystore.alias=airavata
-credential.store.keystore.password=airavata
+credential.store.keystore.url={{ keystores_location }}/{{ cred_keystore }}
+credential.store.keystore.alias={{ cred_keystore_alias }}
+credential.store.keystore.password={{ cred_keystore_passwd }}
 credential.store.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ credential_store }}
 credential.store.jdbc.user={{ db_user }}
 credential.store.jdbc.password={{ db_password }}
 credential.store.jdbc.driver=com.mysql.jdbc.Driver
 credential.store.server.host={{ cred_store_server_host }}
-credential.store.server.port=8960
+credential.store.server.port={{ cred_store_port }}
 credentialstore=org.apache.airavata.credential.store.server.CredentialStoreServer
 
 # these properties used by credential store email notifications
@@ -250,23 +246,23 @@ rabbitmq.exchange.name=airavata_rabbitmq_exchange
 # Zookeeper Server Configuration
 ###########################################################################
 embedded.zk=false
-zookeeper.server.connection=localhost:2181
+zookeeper.server.connection={{ zookeeper_url }}
 zookeeper.timeout=30000
 
 ########################################################################
 ## API Security Configuration
 ########################################################################
-api.secured=true
+api.secured={{ api_secured }}
 security.manager.class=org.apache.airavata.api.server.security.DefaultAiravataSecurityManager
 ### TLS related configuration ####
-TLS.enabled=true
-TLS.api.server.port=9930
+TLS.enabled={{ tls_enable }}
+TLS.api.server.port={{ api_server_tls_port }}
 TLS.client.timeout=10000
 #### keystore configuration ####
-keystore.path={{ key_stores_location }}/{{ key_store }}
-keystore.password=airavata
+keystore.path={{ keystores_location }}/{{ keystore }}
+keystore.password={{ keystore_passwd }}
 #### trust store configuration ####
-trust.store={{ key_stores_location }}/{{ cred_key_store }}
+trust.store={{ keystores_location }}/{{ client_truststore }}
 trust.store.password=airavata
 #### remote authorization server url ####
 remote.oauth.authorization.server=https://idp.scigap.org:9443/services/

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/gfac/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/gfac/vars/main.yml b/roles/gfac/vars/main.yml
deleted file mode 100644
index f5451c3..0000000
--- a/roles/gfac/vars/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-# Gfac related variables
-gfac_dir: "{{ deployment_dir }}/gfac-instance"

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/pga/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/pga/tasks/main.yml b/roles/pga/tasks/main.yml
index ae08942..05bca80 100644
--- a/roles/pga/tasks/main.yml
+++ b/roles/pga/tasks/main.yml
@@ -1,35 +1,44 @@
 ---
-# - name: Create a new user group "{{ pga_group }}"
-#   group: name={{ pga_group }}
-#   # tags: user
-#
-# - name: Create a new user "{{ pga_user }}"
-#   user: name={{ pga_user }} group={{ pga_group }}
-#   # tags: user
+- name: Create root directory
+  file: path="{{ doc_root_dir }}" state=directory
+  become: yes
 
 - name: Install pre-requireties
   yum: name="{{ item }}" state=latest update_cache=yes
   with_items:
     - git
     - httpd
-    - php-soap
     - php
-    - composer
+    - php-soap
     - php-mcrypt
-    - firewalld
+    - libselinux-python
+    - composer
+  become: yes
 
-# This doesn't work sometimes, make sure selinux is dissabled in remote machine
 # - name: Allow selinux outbound connection from web server
   # command: setsebool -P httpd_can_network_connect 1
 
-- name: Create root directory
-  file: path="{{ doc_root_dir }}" state=directory
+- name: install composer
+  yum: name=composer state=latest update_cache=yes
+  become: yes
 
 - name: Git clone php gateway
-  git: repo=https://github.com/apache/airavata-php-gateway.git dest="{{ doc_root_dir }}" version=master
+  git: repo=https://github.com/apache/airavata-php-gateway.git
+       dest="{{ doc_root_dir }}" version=master
+  become: yes
+
+  #Make sure selinux is dissabled in remote machine
+- name: Disable selinux
+  selinux: state=disabled
+  become: yes
 
 - name: Run composer update
-  command: composer update chdir="{{ doc_root_dir }}"
+  composer: command=update working_dir="{{ doc_root_dir }}"
+  become: yes
+
+# - name: Run composer update
+#   command: composer update chdir="{{ doc_root_dir }}"
+#   become: yes
 
 - name: Create user data dir {{ user_data_dir }}
   file: path="{{ user_data_dir }}" state=directory
@@ -38,6 +47,7 @@
 - name: Copy pga config file
   template: src=pga_config.php.j2 dest="{{ doc_root_dir }}/app/config/pga_config.php"
 
+
 # do we need to change permissions for root user?
 # - name: Change storage permissions  to g+rwx
 #   acl: name="{{ doc_root_dir }}/app/storage" entity="{{ pga_group }}" etype=group permissions="rwx" state=present
@@ -45,22 +55,22 @@
 # Ignored step 8,9 in doc by assuming selinux is dissabled in remote machine
 
 # TODO: stop iptables service, can't have both iptables and firewalld on same host
-- name: Stop iptables, ip6tables services
-  service: name="{{ item }}" state=stopped
-  with_items:
-    - iptables
-    - ip6tables
+# - name: Stop iptables, ip6tables services
+#   service: name="{{ item }}" state=stopped
+#   with_items:
+#     - iptables
+#     - ip6tables
 
 - name: Start firewalld service
   service: name=firewalld state=started
+  become: yes
 
 - name: Eanble https and http service on public zone
   firewalld: service="{{ item }}" permanent=true state=enabled zone=public immediate=True
   with_items:
     - http
     - https
+  become: yes
 
 - name: Edit file
   lineinfile: dest="{{ httpd_conf_file }}" regexp=^AllowOverride line="AllowOverride All"
-
-...

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/rabbitmq/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/rabbitmq/handlers/main.yml b/roles/rabbitmq/handlers/main.yml
index 5ce5a59..fef807a 100644
--- a/roles/rabbitmq/handlers/main.yml
+++ b/roles/rabbitmq/handlers/main.yml
@@ -1,7 +1,7 @@
 ---
 # Rabbitmq related handlers
 - name: start rabbitmq
-  service: name=rabbitmq-server state=started
+  service: name=rabbitmq-server state=started enabled=yes
   become: yes
 
 - name: stop rabbitmq
@@ -9,5 +9,5 @@
   become: yes
 
 - name: restart rabbitmq
-  service: name=rabbitmq-server state=restarted
+  service: name=rabbitmq-server state=restarted enabled=yes
   become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/rabbitmq/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/rabbitmq/tasks/main.yml b/roles/rabbitmq/tasks/main.yml
index b487737..f44a0a6 100644
--- a/roles/rabbitmq/tasks/main.yml
+++ b/roles/rabbitmq/tasks/main.yml
@@ -29,7 +29,7 @@
   become: yes
 
 - name: Start Rabbitmq server
-  service: name=rabbitmq-server state=started
+  service: name=rabbitmq-server state=started enabled=yes
   become: yes
 
 - name: Enable rabbitmq management plugin

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/zookeeper/handlers/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/handlers/main.yml b/roles/zookeeper/handlers/main.yml
index 5f30254..daefebe 100644
--- a/roles/zookeeper/handlers/main.yml
+++ b/roles/zookeeper/handlers/main.yml
@@ -1,6 +1,6 @@
 ---
 - name: start zookeeper
-  service: name=zookeeper state=started
+  service: name=zookeeper state=started enabled=yes
   become: yes
 
 - name: stop zookeeper
@@ -8,5 +8,5 @@
   become: yes
 
 - name: restart zookeeper
-  service: name=zookeeper state=restarted
+  service: name=zookeeper state=restarted enabled=yes
   become: yes

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/roles/zookeeper/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/zookeeper/vars/main.yml b/roles/zookeeper/vars/main.yml
index 825f26f..a3e10db 100644
--- a/roles/zookeeper/vars/main.yml
+++ b/roles/zookeeper/vars/main.yml
@@ -5,7 +5,7 @@ zookeeper_version: 3.4.8
 zookeeper_url: http://www.us.apache.org/dist/zookeeper/zookeeper-{{zookeeper_version}}/zookeeper-{{zookeeper_version}}.tar.gz
 
 apt_cache_timeout: 3600
-client_port: 2181
+client_port: "{{ zookeeper_client_port }}" 
 init_limit: 5
 sync_limit: 2
 tick_time: 2000

http://git-wip-us.apache.org/repos/asf/airavata/blob/2b6f220a/site.yml
----------------------------------------------------------------------
diff --git a/site.yml b/site.yml
index 6dd294e..a9472dd 100644
--- a/site.yml
+++ b/site.yml
@@ -13,10 +13,24 @@
     - env_setup
     - rabbitmq
 
+- hosts: database
+  tags: mysql
+  roles:
+    - env_setup
+    - database
+
+- hosts: wso2is
+  tags: wso2is
+  roles:
+    - env_setup
+    - java
+    - wso2_is
+
 - hosts: gfac
   tags: gfac, airavata
   roles:
     - env_setup
+    - java
     - common
     - gfac
 
@@ -24,24 +38,14 @@
   tags: api-orch, airavata
   roles:
     - env_setup
+    - java
     - common
     - api-orch
 
 - hosts: pga
   tags: pga
   roles:
-    - pga
-
-- hosts: database
-  tags: mysql
-  roles:
     - env_setup
-    - database
+    - pga
 
-- hosts: wso2is
-  tags: wso2is
-  roles:
-    - env_setup
-    - java
-    - wso2_is
 ...