Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OZ-348: Align eip-demo service with the upgraded eip-client. #73

Merged
merged 3 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions demo/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ services:
env_file: ../eip.env
environment:
- NUMBER_OF_DEMO_PATIENTS=${NUMBER_OF_DEMO_PATIENTS}
- EIP_DB_NAME=${EIP_DB_NAME_DEMO}
- EIP_DB_USER=${EIP_DB_USER_DEMO}
- EIP_DB_PASSWORD=${EIP_DB_PASSWORD_DEMO}
volumes:
- "./eip/config:/config"
- "./eip/routes:/routes"
- "./eip/config:/eip-client/config"
- "./eip/routes:/eip-client/routes"
networks:
ozone:

networks:
ozone:
web:
external: true
external: true
136 changes: 3 additions & 133 deletions demo/eip/config/application.properties
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
# Number of demo patients used to generate demo data, defaults to 0
number.of.demo.patients=${NUMBER_OF_DEMO_PATIENTS}

camel.springboot.xml-routes=classpath*:camel/*.xml,file:routes/*.xml,file:routes/*/*.xml,file:routes/*/*/*.xml

openmrs.db.host=${OPENMRS_DB_HOST}

# The OpenMRS MySQL database port
openmrs.db.port=${OPENMRS_DB_PORT}

# The OpenMRS MySQL database name
openmrs.db.name=${OPENMRS_DB_NAME}
# *********************** General EIP sender properties ****************************************************************
# *********************** OAuth2 Configuration ****************************************************************
#

# Maximum size of each batch of source records to be read by debezium from the binlog files, maps to the
## debezium MySQL connector property named max.batch.size
#https://debezium.io/documentation/reference/1.6/connectors/mysql.html#mysql-property-max-batch-size
debezium.reader.maxBatchSize=2048

#Enabled Oauth when set to true
oauth.enabled=${OAUTH_ENABLED}

Expand All @@ -31,48 +13,8 @@ oauth.client.id=${OAUTH_CLIENT_ID}
oauth.client.secret=${OAUTH_CLIENT_SECRET}
#Authentication scope, can be multiple values separated by commas
oauth.client.scope=email

eip.home=/eip-home

# A comma separated list of database tables names to watch for changes
eip.watchedTables=

db-event.destinations=no-destination-routes

# ----------------------------------------------------------------------------------------------------------------------


# *********************** Logging Configuration ************************************************************************
#
# Uncomment this to use console logging otherwise defaults to the logback.xml file located on the classpath which is
# configured to log to ${eip.home}/logs/openmrs-eip.log
logging.config=classpath:logback-console.xml

# Logging level for the application loggers (all built-in routes and classes)
openmrs.eip.log.level=INFO

# Logging level for ONLY application class loggers
logging.level.org.openmrs.eip=${openmrs.eip.log.level}
# ----------------------------------------------------------------------------------------------------------------------


# *********************** Tomcat Configuration *************************************************************************
#
# Server HTTP port.
server.port=8083
# ----------------------------------------------------------------------------------------------------------------------


# *********************** H2 configuration *****************************************************************************
#
# Whether to enable the console
#spring.h2.console.enabled=false

# Path at which the console is available, defaults to /h2-console
# spring.h2.console.path=
# ----------------------------------------------------------------------------------------------------------------------


# *********************** Configuration of the OpenMRS Web App *********************************************************
#
# OpenMRS user credentials
Expand All @@ -82,78 +24,6 @@ openmrs.password=${OPENMRS_PASSWORD}
# OpenMRS base url
openmrs.baseUrl=${OPENMRS_URL}/openmrs

# *********************** OpenMRS Datasource config ********************************************************************
#
# Driver class of the openMRS datasource (should not be changed in a usual use)
spring.openmrs-datasource.driverClassName=com.mysql.jdbc.Driver
#
# Dialect of the openMRS datasource (should not be changed in a usual use)
spring.openmrs-datasource.dialect=org.hibernate.dialect.MySQLDialect

# Url of the openMRS datasource, you don't have to change this value as long you've set the placeholder property values
spring.openmrs-datasource.jdbcUrl=jdbc:mysql://${openmrs.db.host}:${openmrs.db.port}/${openmrs.db.name}

# User name of the openMRS datasource
spring.openmrs-datasource.username=${OPENMRS_DB_USER}

# Password of the openMRS datasource
spring.openmrs-datasource.password=${OPENMRS_DB_PASSWORD}
# ----------------------------------------------------------------------------------------------------------------------


# *********************** Configuration of the Management database *****************************************************
#
# Driver class of the management datasource (should not be changed in a usual use)
spring.mngt-datasource.driverClassName=org.h2.Driver

# Dialect of the management datasource (should not be changed in a usual use)
spring.mngt-datasource.dialect=org.hibernate.dialect.H2Dialect

# Url of the management datasource
spring.mngt-datasource.jdbcUrl=jdbc:h2:mem:${EIP_DB_NAME};DB_CLOSE_DELAY=30;LOCK_TIMEOUT=10000

# User name of the management datasource
spring.mngt-datasource.username=${EIP_DB_USER}

# Password of the management datasource
spring.mngt-datasource.password=${EIP_DB_PASSWORD}
# ----------------------------------------------------------------------------------------------------------------------


# *********************** Debezium Config ******************************************************************************
#
# For details explanations of this properties, please refer to
# https://debezium.io/documentation/reference/connectors/mysql.html#mysql-connector-properties
# Maps to the connect property named database.server.id, MUST match the server-id value in your my.cnf file when you
# enabled mysql binlog, DO NOT change after setting it
debezium.db.serverId=3

# Unique logical name of the MySQL database server, maps to the debezium MySQL connector property named
# database.server.name, DO NOT change after setting it
debezium.db.serverName=${openmrs.db.name}

# Database username for debezium user account you created to access the MySQL binlog, maps to the debezium MySQL
# connector property named database.user, it's highly recommended to create separate user account as described at
# https://debezium.io/documentation/reference/connectors/mysql.html#setting-up-mysql
debezium.db.user=${MYSQL_ADMIN_USER}

# Database password for debezium user account you created to access the MySQL binlog, maps to the debezium MySQL
# connector property named database.password
debezium.db.password=${MYSQL_ADMIN_USER_PASSWORD}

# Specifies the criteria for running a snapshot when the connector starts, DO NOT change after setting it, maps to the
# debezium MySQL connector property named snapshot.mode
debezium.snapshotMode=schema_only

# The 2 properties below are debezium engine specific and are documented at
# https://debezium.io/documentation/reference/development/engine.html#engine-properties
#
# Path to file where offsets are to be stored, maps to property named offset.storage.file.filename, DO NOT change after
# setting it
debezium.offsetFilename=offsets.txt

# Path to file where offsets are to be stored, maps to property named database.history.file.filename, DO NOT change
# after setting it
debezium.historyFilename=dbhistory.txt
# Number of demo patients used to generate demo data, defaults to 0
number.of.demo.patients=${NUMBER_OF_DEMO_PATIENTS}
# ----------------------------------------------------------------------------------------------------------------------
debezium.snapshotLockingMode=extended
2 changes: 1 addition & 1 deletion demo/eip/routes/generate-demo-data-route.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- Triggering generation of demo data on OpenMRS EMR after 10 minutes -->
<from uri="scheduler:generateDemoData?initialDelay=600000&amp;repeatCount=1" />

<log message="Sheduled demo data generation." />
<log message="Scheduled demo data generation." />

<to uri="direct:authenticate-to-openmrs"/>

Expand Down