#
#
# 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.
#

---
ansible_connection: ssh

user: airavata
group: airavata
user_home: "/home/{{ user }}"

# deployment related variables
datalake_deployment_dir: "{{ user_home }}/data-lake-deployment"
datalake_source_dir: "{{ user_home }}/data-lake-source"
datalake_repo: "https://github.com/apache/airavata-data-lake.git"
datalake_git_branch: master
kafka_listener_port: 9092
kafka_url: "{{ groups['data-lake'][0] }}:9092"
custos_kafka_url: custos15.sciencegateways.iu.edu:9092
zookeeper_client_port: 2181
zookeeper_connection_url: localhost:2181
custos_host: prod.custos.usecustos.org
custos_port: 443

mft_deployment_dir: "{{ user_home }}/mft-deployment"
mft_source_dir: "{{ user_home }}/mft-source"
mft_repo: "https://github.com/apache/airavata-mft.git"
mft_git_branch: develop
mft_distribution_version: 0.01

custos_source_dir: "{{ user_home }}/custos-source"
custos_repo: "https://github.com/apache/airavata-custos.git"
custos_git_branch: baremetal

mft_default_agent_id: agent0
mft_default_agent_host: "{{ ansible_default_ipv4.address }}"
mft_default_agent_advertised_url: https://scigap12.sciencegateways.iu.edu:8443/downloads
mft_default_agent_port: 3333

mft_api_service_host: localhost
mft_api_service_http_port: 8088
mft_api_service_grpc_port: 7004
mft_api_service_id: 0

mft_resource_service_host: localhost
mft_resource_service_http_port: 8089
mft_resource_service_grpc_port: 7002
mft_resource_service_backend: org.apache.airavata.mft.resource.server.backend.datalake.DatalakeResourceBackend
mft_resource_service_custos_client_id: "{{ vault_mft_resource_service_custos_client_id }}"
mft_resource_service_custos_client_secret: "{{ vault_mft_resource_service_custos_client_secret }}"

mft_secret_service_host: localhost
mft_secret_service_http_port: 8081
mft_secret_service_grpc_port: 7003
mft_secret_service_backend: org.apache.airavata.mft.secret.server.backend.custos.CustosSecretBackend
mft_secret_service_custos_client_id: "{{ vault_mft_resource_service_custos_client_id }}"
mft_secret_service_custos_client_secret: "{{ vault_mft_resource_service_custos_client_secret }}"
mft_custos_agent_secret: "{{ vault_mft_custos_agent_secret }}"
mft_custos_agent: "{{ vault_mft_custos_agent }}"

mft_consul_host: localhost
mft_consul_port: 8500
consul_version: 1.7.1
consul_zip_file: consul_{{ consul_version }}_linux_amd64.zip
consul_install_dir: /usr/local/bin
consul_config_dir: /etc/consul
consul_data_dir: /var/data

datalake_distribution_version: 0.01-SNAPSHOT
datalake_drms_host: localhost
datalake_drms_grpc_port: 7070

datalake_drms_neo4j_uri: bolt://scigap10.sciencegateways.iu.edu:7687
datalake_drms_neo4j_user: ""
datalake_drms_neo4j_password: ""
datalake_drms_custos_client_id: "{{ vault_mft_resource_service_custos_client_id }}"
datalake_drms_custos_client_secret: "{{ vault_mft_resource_service_custos_client_secret }}"
datalake_drms_custos_host: "{{ custos_host }}"
datalake_drms_custos_port: "{{ custos_port }}"
datalake_drms_http_port: 8900
datalake_drms_datasource_host: scigap10.sciencegateways.iu.edu

datalake_synch_broker_url: "{{ custos_kafka_url }}"
datalake_synch_broker_consumer_group: custosEventsGroup
datalake_synch_broker_topic: 10000201-24565f21-a87a-46ac-a50c-6cdf0e41028c
datalake_synch_tenant_id: "{{ vault_workflow_manager_custos_id }}"

datalake_data_orch_datasource_url: jdbc:mysql://scigap10.sciencegateways.iu.edu:3306/data_orchestrator?useSSL=false&serverTimezone=UTC&useLegacyDatetimeCode=false&createDatabaseIfNotExist=true&allowPublicKeyRetrieval=true
datalake_data_orch_datasource_username: "{{ vault_datalake_data_orch_datasource_username }}"
datalake_data_orch_datasource_password: "{{ vault_datalake_data_orch_datasource_password }}"
datalake_data_orch_host: localhost
datalake_data_orch_http_port: 8899
datalake_data_orch_grpc_port: 6566
datalake_data_drms_rest_port: 10000
datalake_data_orch_broker_url: "{{ kafka_url }}"
datalake_data_orch_broker_consumer_group: DataOrchestratorGroup2
datalake_data_orch_broker_topic: data-orchestrator-file-events
datalake_data_orch_user_group: "{{ vault_datalake_data_orch_user_group }}"
datalake_data_orch_admin_group: "{{ vault_datalake_data_orch_admin_group }}"

workflow_deployment_dir: "{{ user_home }}/workflow-deployment"
workflow_zookeeper_url: "{{ zookeeper_connection_url }}"
workflow_helix_cluster_name: datalake

workflow_datasync_wm_name: datasync_wf
workflow_parsing_wm_name: parsing_wf

workflow_worker_kafka_url: "{{ kafka_url }}"
workflow_worker_kafka_publisher_name: mft-status-publisher
workflow_worker_kafka_publish_topic: mft-status-topic
workflow_worker_kafka_consumner_group: mft-even-group

workflow_manager_host: localhost
workflow_manager_grpc_port: 6565

workflow_manager_mft_callback_url: "{{ groups['data-lake'][0] }}:33335"
workflow_manager_mft_client_id: "{{ vault_workflow_manager_mft_client_id }}"
workflow_manager_mft_client_secret: "{{ vault_workflow_manager_mft_client_secret }}"

workflow_manager_custos_host: "{{ custos_host }}"
workflow_manager_custos_port: "{{ custos_port }}"
workflow_manager_custos_id: "{{ vault_workflow_manager_custos_id }}"
workflow_manager_custos_secret: "{{ vault_workflow_manager_custos_secret }}"
workflow_manager_work_dir: /data/tmp_data

emc_portal_source_dir: /home/airavata/emcenter-gateway
emc_portal_repo: https://github.com/SciGaP/emcenter-gateway.git
emc_portal_git_branch: master
emc_portal_tusd_source_dir: /home/airavata/tusd
emc_portal_host: "gateway.iubemcenter.indiana.edu"
emc_portal_client_id: "{{ vault_emc_portal_client_id }}"
emc_portal_client_sec: "{{ vault_emc_portal_client_sec }}"
emc_portal_client_users_group_id: "{{ vault_emc_portal_client_users_group_id }}"
emc_portal_client_admin_group_id: "{{ vault_emc_portal_client_admin_group_id }}"
emc_portal_client_redirect_uri: "https://{{ emc_portal_host }}/callback"
emc_portal_datalake_drms_url: "https://{{ groups['data-lake'][0] }}:8443"
emc_portal_resource_image_registry_url: "https://{{ emc_portal_host }}/resource-images"
emc_portal_custos_api_url: "https://{{ custos_host }}/apiserver/"
emc_portal_custos_super_client_id: "{{ vault_emc_portal_custos_super_client_id }}"

sharing_subnets:
  - "149.163.0.0/16"
  - "140.182.0.0/16"
  - "149.165.0.0/16"
  - "192.68.133.0/24"
  - "192.12.206.0/24"
  - "149.159.0.0/16"
  - "156.56.0.0/16"
  - "149.161.0.0/16"
  - "149.160.0.0/16"
  - "149.166.0.0/16"
  - "134.68.0.0/16"
  - "129.79.0.0/16"
