#
#
# 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:1528/experiment_catalog;create=true;user=airavata;password=airavata
# MySql database configuration
#registry.jdbc.driver=com.mysql.jdbc.Driver
#registry.jdbc.url=jdbc:mysql://localhost:3306/experiment_catalog
registry.jdbc.user=airavata
registry.jdbc.password=airavata
start.derby.server.mode=true
validationQuery=SELECT 1 from CONFIGURATION
cache.enable=true
jpa.cache.size=5000
#jpa.connection.properties=MaxActive=10,MaxIdle=5,MinIdle=2,MaxWait=60000,testWhileIdle=true,testOnBorrow=true

# Properties for default user mode
default.registry.user=master
default.registry.password=master
default.registry.password.hash.method=SHA
default.registry.gateway=php_reference_gateway
# this is the path used to store intermediate data, this will be removed with third party file transfer implementation.
#local.data.dir=/home/airavata/experimentData/
local.data.dir=/tmp/experimentData/

#ip=127.0.0.1

###########################################################################
#  Application Catalog DB Configuration
###########################################################################
#for derby [AiravataJPARegistry]
appcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
appcatalog.jdbc.url=jdbc:derby://localhost:1528/app_catalog;create=true;user=airavata;password=airavata
# MySql database configuration
#appcatalog.jdbc.driver=com.mysql.jdbc.Driver
#appcatalog.jdbc.url=jdbc:mysql://localhost:3306/app_catalog
appcatalog.jdbc.user=airavata
appcatalog.jdbc.password=airavata
appcatalog.validationQuery=SELECT 1 from CONFIGURATION

###########################################################################
#  Server module Configuration
###########################################################################
servers=apiserver,orchestrator,gfac,credentialstore
#shutdown.trategy=NONE
shutdown.trategy=SELF_TERMINATE


###########################################################################
#  API Server Configurations
###########################################################################
apiserver=org.apache.airavata.api.server.AiravataAPIServer
apiserver.name=apiserver-node0
apiserver.host=localhost
apiserver.port=8930
apiserver.min.threads=50

###########################################################################
#  API Server SSL Configurations
###########################################################################
apiserver.tls.enabled=false
apiserver.keystore=/usr/local/apache2/htdocs/apache-airavata-server-0.16-SNAPSHOT/bin/airavata.jks
apiserver.keystore.password=airavata

###########################################################################
#  Orchestrator Server Configurations
###########################################################################
orchestrator=org.apache.airavata.orchestrator.server.OrchestratorServer
orchestrator.server.name=orchestrator-node0
orchestrator.server.host=localhost
orchestrator.server.port=8940
orchestrator.server.min.threads=50
#job.submitter=org.apache.airavata.orchestrator.core.impl.GFACEmbeddedJobSubmitter
#job.submitter=org.apache.airavata.orchestrator.core.impl.GFACPassiveJobSubmitter
#job.submitter=org.apache.airavata.orchestrator.core.impl.GFACRPCJobSubmitter
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=org.apache.airavata.gfac.server.GfacServer
gfac.server.name=gfac-node0
gfac.server.host=localhost
gfac.server.port=8950
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.AiravataWorkflowParser



###########################################################################
#  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
###########################################################################
start.credential.store=false
credential.store.keystore.url=/Users/chathuri/dev/airavata/credential-store/oa4mp/airavata_sym.jks
credential.store.keystore.alias=airavata
credential.store.keystore.password=airavata
credential.store.jdbc.url=jdbc:derby://localhost:1528/experiment_catalog;create=true;user=airavata;password=airavata
credential.store.jdbc.user=airavata
credential.store.jdbc.password=airavata
credential.store.jdbc.driver=org.apache.derby.jdbc.ClientDriver
credential.store.server.host=localhost
credential.store.server.port=8960
credentialstore=org.apache.airavata.credential.store.server.CredentialStoreServer
credential.store.thrift.server.keystore=/Users/chathuri/dev/airavata/credential-store/oa4mp/airavata.jks
credential.store.thrift.server.keystore.password=airavata

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 authentication is used.
# if user specify both password authentication gets the higher preference

################# ---------- For ssh key pair authentication ------------------- ################
#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 authentication.
#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=test@scigap.com
email.based.monitor.password=changeme
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
###########################################################################
#publisher
#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=amqp://airavata:airavata@localhost:5672/messaging

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=true
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=/usr/local/apache2/htdocs/apache-airavata-server-0.16-SNAPSHOT/bin/airavata.jks
keystore.password=airavata
#### trust store configuration ####
trust.store=/usr/local/apache2/htdocs/apache-airavata-server-0.16-SNAPSHOT/bin/client_truststore.jks
trust.store.password=airavata
#### remote authorization server url ####
remote.oauth.authorization.server=https://localhost: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
#### admin user credentials of authorization server ####
admin.user.name=admin
admin.password=admin
