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

Dockerizing the bootstrapper app #160

Merged
merged 10 commits into from
Jan 15, 2024

Conversation

walisc
Copy link
Collaborator

@walisc walisc commented Dec 11, 2023

Ticket: JMPI-771
Other Related Tickets: N/A
Other Related PRS: N/A


Describe of changes

This change dockerizes the current bootstrapper, allowing it to be part of the deployed stack/ a service in the swarm. This allows it to have access to the backend services deployed in the swarm for data management, primarily kafka, postgres, and dgraph.

Please note

  • the dockerized version assumes that you have started all other hub services i.e you have run devops/linux/docker/helper/scripts/d-stack-up-hub-containers.sh
  • The is a wrapper script that can call the dockerized bootstrapper (see devops/linux/docker/helper/bootstrapper/bootstrapper-docker.sh). You can use this to call the bootstrapper methods, for example ./helper/bootstrapper/bootstrapper-docker.sh data resetAll

How to test / configure

  • Run JeMPI as you would normally
  • After the hub services start you should see logging similar to
2023-12-11 00:27:07 [ INFO ] Jempi Bootstrapper > Data:  Resetting Postgres data and schemas.
2023-12-11 00:27:07 [ INFO ] Jempi Bootstrapper > Data:  Deleting Postgres data
2023-12-11 00:27:07 [ INFO ] Jempi Bootstrapper > Data:  Deleting Postgres tables
2023-12-11 00:27:07 [ INFO ] Jempi Bootstrapper > Data:  Loading Postgres schema data.
2023-12-11 00:27:07 [ INFO ] org.jembi.jempi.libmpi.dgraph.LibDgraph:  LibDgraph Constructor
2023-12-11 00:27:07 [ INFO ] org.jembi.jempi.libmpi.dgraph.LibDgraph:  [alpha-01] [9080]
2023-12-11 00:27:07 [ INFO ] org.jembi.jempi.libmpi.dgraph.LibDgraph:  LibDgraph Constructor
2023-12-11 00:27:07 [ INFO ] org.jembi.jempi.libmpi.dgraph.LibDgraph:  [alpha-01] [9080]
2023-12-11 00:27:07 [ INFO ] Jempi Bootstrapper > Data > DGraph:  Resetting DGraph data and schemas.
2023-12-11 00:27:07 [ INFO ] Jempi Bootstrapper > Data > DGraph:  Deleting DGraph data and schemas.
2023-12-11 00:27:08 [ INFO ] Jempi Bootstrapper > Data > DGraph:  Loading DGraph schema data.
2023-12-11 00:27:09 [ INFO ] Jempi Bootstrapper > Data > Kafka:  Connecting to the kafka bootstrap server 'kafka-01:9092'
2023-12-11 00:27:09 [ INFO ] Jempi Bootstrapper > Data > Kafka:  Connecting to the kafka bootstrap server 'kafka-01:9092'
2023-12-11 00:27:09 [ INFO ] Jempi Bootstrapper > Data > Kafka:  Resetting kafka data and schemas.
2023-12-11 00:27:09 [ INFO ] Jempi Bootstrapper > Data > Kafka:  Deleting kafka topics.

@walisc walisc marked this pull request as draft December 11, 2023 06:44
@walisc walisc requested a review from ajinkyagadewar January 15, 2024 04:59
@walisc walisc marked this pull request as ready for review January 15, 2024 05:00
Copy link
Collaborator

@ajinkyagadewar ajinkyagadewar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@walisc looks good to me. There is one typo; please fix it and we are good to merge.

String dbName = schemaDetails.dbName();
String dbSchemaFilePath = schemaDetails.schemaFilePath();

LOGGER.info(String.format("---> Create schama for database %s", dbName));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo here @walisc: schema

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ajinkyagadewar . Have update this 👍🏽 . Thanks!

@ajinkyagadewar ajinkyagadewar merged commit 003b6a4 into dev Jan 15, 2024
@ajinkyagadewar ajinkyagadewar deleted the dev-jmpi-771-dockerize-bootstrapper-app branch January 15, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants