Commit e4bd43ef authored by root's avatar root
Browse files

analytics-service

parent 25ef7140
No related merge requests found
Showing with 334 additions and 2 deletions
+334 -2
......@@ -14,6 +14,9 @@
tags: [deploy-user-service]
- role: deploy-gateway-service
tags: [deploy-gateway-service]
- role: deploy-analytics-service
tags: [deploy-analytics-service]
- role: stack-proxy
tags: [stack-proxy]
......
Role Name
=========
A brief description of the role goes here.
Requirements
------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
Role Variables
--------------
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
Dependencies
------------
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: username.rolename, x: 42 }
License
-------
BSD
Author Information
------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
---
# defaults file for deploy-sb-ext
\ No newline at end of file
---
# handlers file for deploy-sb-ext
\ No newline at end of file
galaxy_info:
author: your name
description: your description
company: your company (optional)
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker
# Some suggested licenses:
# - BSD (default)
# - MIT
# - GPLv2
# - GPLv3
# - Apache
# - CC-BY
license: license (GPLv2, CC-BY, etc)
min_ansible_version: 1.2
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
# Galaxy will use this branch. During import Galaxy will access files on
# this branch. If Travis integration is configured, only notifications for this
# branch will be accepted. Otherwise, in all cases, the repo's default branch
# (usually master) will be used.
#github_branch:
#
# platforms is a list of platforms, and each platform has a name and a list of versions.
#
# platforms:
# - name: Fedora
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
\ No newline at end of file
---
- name: Ensure env directory exists
file:
path: "{{ env_files_dir }}"
state: directory
- name: Create and save env template
template:
src: "{{ template_env_file_name }}"
dest: "{{ env_file_deployment_location }}"
---
- name: Ensure compose files directory exists
file:
path: "{{ compose_files_dir }}"
state: directory
\ No newline at end of file
- name: Create and move {{ user_friendly_name }} template
template:
src: "{{ template_compose_file_name }}"
dest: "{{ compose_file_deployment_location }}"
\ No newline at end of file
- name: Deploy {{ user_friendly_name }}
shell: docker stack deploy --with-registry-auth -c {{ compose_file_deployment_location }} {{ docker_service_stack_name }}
---
# tasks file for deploy-sb-ext
- import_tasks: create-and-save-env-file.yml
- import_tasks: create-compose-dir.yml
- import_tasks: create-compose-file.yml
- import_tasks: remove-existing-service.yml
- import_tasks: deploy-service.yml
- import_tasks: remove-compose-file.yml
# - import_tasks: remove-env-file.yml
---
- name: Remove the compose file from the location
file:
path: "{{ compose_file_deployment_location }}"
state: absent
\ No newline at end of file
---
- name: Remove the env file
file:
path: "{{ env_file_deployment_location }}"
state: absent
\ No newline at end of file
---
- name: Removing the existing service
shell: docker service rm {{ docker_service_stack_name }}_{{ docker_service_name }}
when: "force_reload==true"
ignore_errors: true
\ No newline at end of file
version: '3.7'
services:
{{ docker_service_name }}:
image: {{ docker_hub_url }}/{{ image_name }}:{{ tag }}
hostname: "{{ docker_service_name }}"
{% if publish_ports == true %}
ports:
- {{ host_port }}:{{ docker_port }}
{% endif %}
deploy:
placement:
constraints:
- node.role == {{ var_docker_deploy_node_type }}
replicas: {{ replicas }}
resources:
reservations:
memory: {{ reserved_memory }}
limits:
memory: {{ limited_memory }}
update_config:
parallelism: 1
delay: 0s
failure_action: rollback
order: start-first
rollback_config:
parallelism: 1
delay: 0s
restart_policy:
condition: on-failure
# healthcheck:
# test: wget --quiet --spider http://localhost:5902/v1/latest/terms/user
# interval: 10s
# timeout: 10s
# retries: 3
# start_period: 100s
volumes:
- {{ host_logs_location }}:{{ docker_logs_location }}
networks:
application_default:
aliases:
- {{ network_alias_name }}
env_file:
- {{ env_file_deployment_location }}
networks:
application_default:
external: true
\ No newline at end of file
server.port={{ service_analytics_port }}
spring.datasource.url=jdbc:mysql://{{ mysql_host }}:3306/smfanalytics
spring.datasource.username={{ mysql_username }}
spring.datasource.password={{ mysql_password }}
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
#----------------------------- ELASTIC SEARCH CONFIGURATIONS ------------------------------#
services.esindexer.quadnary.host=http://{{ elastic_host }}/
services.esindexer.quadnary.host.name={{ elastic_host }}
services.esindexer.quadnary.host.port=9200
services.esindexer.quadnary.username={{ elastic_username }}
services.esindexer.quadnary.password={{ elastic_password }}
# Kronos-RAIN Production
services.esindexer.primary.host={{ elastic_host }}
services.esindexer.primary.host.name={{ elastic_host }}
services.esindexer.primary.host.port=9200
services.esindexer.primary.username={{ elastic_username }}
services.esindexer.primary.password={{ elastic_password }}
#services.esindexer.secondary.host={{ elastic_host }}
#services.esindexer.secondary.host.name={{ elastic_host }}
#services.esindexer.secondary.host.port=9200
#services.esindexer.secondary.username={{ elastic_username }}
#services.esindexer.secondary.password={{ elastic_password }}
# Anuvad
services.esindexer.secondary.host={{ elastic_host }}
services.esindexer.secondary.host.name={{ elastic_host }}
services.esindexer.secondary.host.port=9200
services.esindexer.secondary.username={{ elastic_username }}
services.esindexer.secondary.password={{ elastic_password }}
services.esindexer.ternary.host={{ elastic_host }}
services.esindexer.ternary.host.name={{ elastic_host }}
services.esindexer.ternary.host.port=9200
services.esindexer.ternary.username={{ elastic_username }}
services.esindexer.ternary.password={{ elastic_password }}
es.index.name=_transaction
es.document.type=transaction
es.target.index.name=store_target
es.target.document.type=storeTarget
config.schema.paths=classpath*:schema/*.json
#----------------------------- MISCELLANEOUS CONFIGURATION ----------------------------------#
top.performance.record.count=5
es.services.esindexer.host.search=/_search
es.username={{ elastic_username }}
es.password={{ elastic_password }}
#----------------------------- AMAZON S3 CREDENTIALS -------------------------------------------------#
aws.access.key.id=test
aws.access.key.secret=test
aws.region=ap-south-1
aws.s3.audio.bucket=dss-project-bucket
#---------------------------- MDMS ---------------------------------------------------------------------#
egov.mdms-service.target.url=https://{{ egov_domain }}/egov-mdms-service/v1/_search
egov.mdms-service.request={"RequestInfo":{"authToken":""},"MdmsCriteria":{"tenantId":"pb","moduleDetails":[{"moduleName":"tenant","masterDetails":[{"name":"tenants"}]}]}}
# KAFKA SERVER CONFIGURATIONS
spring.kafka.bootstrap.servers={{ kafka_host }}:9092
spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer
spring.kafka.producer.value-serializer=org.springframework.kafka.support.serializer.JsonSerializer
# KAFKA PRODUCER CONFIGURATIONS
kafka.producer.config.retries_config=0
kafka.producer.config.batch_size_config=100000
kafka.producer.config.linger_ms_config=100
kafka.producer.config.buffer_memory_config=66554432
localhost
---
- hosts: localhost
remote_user: root
roles:
- deploy-sb-ext
\ No newline at end of file
---
# vars file for deploy-sb-ext
# For script
template_compose_file_name: analytics-service-compose-file.j2
template_env_file_name: analytics-service-env.j2
compose_file_name: "{{ service_analytics_service }}.yml"
env_file_name: "{{ service_analytics_service }}.env"
compose_file_deployment_location: "{{ compose_files_dir }}/{{ compose_file_name }}"
env_file_deployment_location: "{{ env_files_dir }}/{{ env_file_name }}"
analytics_friendly_name: analytics service
# For service
application_port: "{{ service_analytics_port }}"
image_name: "{{ image_analytics_service }}"
tag: "{{ tags_analytics_service }}"
host_port: "{{ application_port }}"
docker_port: "{{ application_port }}"
replicas: "{{ service_replicas_analytics_service }}"
reserved_memory: "{{ service_mem_reserved_analytics_service }}"
limited_memory: "{{ service_mem_limit_analytics_service }}"
health_check_endpoint: http://127.0.0.1:{{ docker_port }}/v1/course/new
network_alias_name: "{{ network_alias_analytics_service }}"
docker_service_stack_name: smf
docker_service_name: "{{ service_analytics_service }}"
force_reload: "{{ force_reload_analytics_service }}"
#host_logs_location: "{{ analytics_logs_path }}"
docker_logs_location: /logs
spring_datasource_jdbc_url: jdbc:postgresql://{{ postgresql_host }}:{{ postgresql_port }}/{{ postgresql_analytics_profile_database }}
# For application
spring_data_mongodb_uri: mongodb://{{ mongodb_analytics }}:{{ mongodb_password | urlencode }}@{{ mongodb_host }}:{{ mongodb_port }}/{{ mongodb_authentication_database }}
enable_new_assessments: 1
bodhi_ui_index: lexcontentindex
bodhi_content_port: "{{ service_content_service_port }}"
iap_certification_url: https://{{ var_common_iap_base }}/backend/Profile/CertificationResult
com_infosys_root_org: "{{ var_common_root_org }}"
com_infosys_org: "{{ var_common_org }}"
com_infosys_neo4j_ip: http://10.177.157.22:7474/graphaware/
com_infosys_enable_access_control: "{{ var_analytics_service_enable_access_control }}"
app_name: "Lex"
infosys_lex_core_ip: http://{{ network_alias_lex_core_service }}:{{ service_lex_core_port }}
......@@ -22,6 +22,10 @@ es.fs.interactions.index.name=fs-interactions
es.forms.fail.records.index.name=form-failure-records
es.forms.fail.records.index.type=formfailurerecords
es.fs.state.index.name=fs-forms-state
es.fs.statematrix.index.name=fs-forms-state-matrix
es.fs.workflowlog.index.name=fs-forms-workflow-log
file.config.path=/
file.config.name=FormConfig.yml
......@@ -56,3 +60,4 @@ azure_storage_key={{ storage_key }}
azure_storage_secret={{ storage_secret }}
azure_storage_container={{ container_name }}
user.routes.host.url=http://{{ service_user_service }}:{{ service_user_port }}
......@@ -16,7 +16,7 @@ zuul.routes.ingest.url=http://localhost:8097/
zuul.routes.analytics.path=/dashboard/**
zuul.routes.analytics.stripPrefix=false
zuul.routes.analytics.url=http://localhost:8091/
zuul.routes.analytics.url=http://{{ service_analytics_service }}:{{ service_analytics_port }}/
zuul.routes.form.path=/forms/**
zuul.routes.form.stripPrefix=false
......@@ -30,7 +30,9 @@ retail.user-info-header=x-user-info
#retail.open-endpoints-whitelist=/login,/forms/saveFormSubmit,/forms/getFormById,/forms/uploadData,/forms/getApplicationsById,/forms/getAllApplications,/forms/v1/saveFormSubmit,/user/requestOTP,/signIn
retail.open-endpoints-whitelist=/login,/forms/saveFormSubmit,/forms/getFormById,/forms/uploadData,/user/requestOTP,/signIn
retail.open-endpoints-whitelist=/login,/forms/saveFormSubmit,/forms/getFormById,/forms/uploadData,/user/requestOTP,/signIn,/user/generatePin,/forms/getAllFormStatus,/forms/v1/savePlainForm,/forms/getAllPlainForms,/forms/getPlainFormById
retail.mixed-mode-endpoints-whitelist=
spring.http.multipart.max-file-size=100MB
spring.http.multipart.max-request-size=100MB
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment