The latest ingestion pipeline is designed to ingest data asynchronously into Redis Database. This pipeline would enable the IUDX Resource Server to serve latest data for IUDX specified resources that are available in the Database.
The Latest ingestion pipeline connects to various external dependencies namely
- Postgres SQL
- RabbitMQ
- Redis
Find the installations of the above along with the configurations to modify the database url, port and associated credentials in the appropriate sections here
- Clone this repo and change directory:
git clone https://github.com/datakaveri/latest-ingestion-pipeline.git && cd latest-ingestion-pipeline/vertx/
- Make a config file based on the template in
example-configs/config-dev.json
for non-clustered vertx andexample-configs/config-depl.json
for clustered vertx.- Modify the databroker url and associated credentials in the appropriate sections
- Populate secrets directory with following structure in the present directory:
secrets/ ├── all-verticles-configs/ (directory) │ ├── config-depl.json (needed for clustered vertx all verticles in one container) │ ├── config-dev.json (needed for non-clustered vertx all verticles in one container/maven based setup) │ └── one-verticle-configs/ (directory, needed for clustered vertx in multi-container)
- Populate
.lip.env
environment file based on template inexample-configs/example-evironment-file(.lip.env)
in the present directory
- DO NOT ADD actual config with credentials to
example-configs/
directory (even in your local git clone!). - If you would like to add your own config with different name than config-dev.json and config-depl.json, place in the
secrets/all-verticles-configs/
and follow the note sections of docker based and maven based setup. - Update all appropriate configs in
example-configs/
ONLY when there is addition of new config parameter options.
- Install docker and docker-compose (one time setup)
- Build the images
./docker/build.sh
- There are following two ways of setting/deploying the file server using docker-compose:
- Non-Clustered setup with all verticles running in a single container:
- This needs no hazelcast, zookeeper, the deployment can be done on non-swarm too and suitable for development environment.
- This makes use of iudx/lip-dev:latest image and config-dev.json present at
secrets/all-verticles-configs/config-dev.json
# Command to bring up the non-clustered latest-ingestion-pipeline container docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d # Command to bring down the non-clustered latest-ingestion-pipeline container docker-compose -f docker-compose.yml -f docker-compose.dev.yml down
- Clustered setup with all verticles running in a single container:
- This needs following things:
- This makes use of iudx/lip-depl:latest image and config-depl.json present at
secrets/all-verticles-configs/config-depl.json
# Command to bring up the clustered one latest-ingestion-pipeline container docker-compose -f docker-compose.yml -f docker-compose.depl.yml up -d # Command to bring down the clustered one latest-ingestion-pipeline container docker-compose -f docker-compose.yml -f docker-compose.depl.yml down
- Non-Clustered setup with all verticles running in a single container:
- If you want to try out or do temporary things, such as
- use different config file than the standard two
- Binding the ports of clustered latest-ingestion-pipeline container to host, etc.
Please use this technique of overriding/merging compose files i.e. using non-git versioned docker-compose.temp.yml file and do not modify the git-versioned files.
- Modify the git versioned compose files ONLY when the configuration is needed by all (or its for CI - can preferably name it as docker-compose.ci.yml) and commit and push to the repo.
- Install jdk 11 and maven
- Use the maven exec plugin based starter to start the server
mvn clean compile exec:java@ingestion-pipeline
- Maven based setup by default uses
secrets/all-verticles-configs/config-dev.json
and is non-clustered setup of verticles. Also it cannot take values from.lip.env
file and so the default values apply. - If you want to use a different named config called
config-x.json
, need to place it atsecrets/all-verticles-configs/config-x.json
and use following command to bring it up:mvn clean compile exec:java@ingestion-pipeline -Dconfig-dev.file=config-x.json