diff --git a/README.md b/README.md index 8d75a5e..1944439 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ The api docs can be found [here](https://gis.iudx.io/apis). The Gis-interface Server connects with various external dependencies namely - PostgreSQL -- ImmuDB - RabbitMQ Find the installations of the above along with the configurations to modify the database url, port and associated credentials in the appropriate sections diff --git a/SETUP.md b/SETUP.md index 071e7ea..ab420c6 100644 --- a/SETUP.md +++ b/SETUP.md @@ -12,7 +12,6 @@ The Gis Interface connects with various external dependencies namely - `PostgreSQL` : used to store and query data related to - Token Invalidation - Fetching data -- `ImmuDB` : used to store metering information - `RabbitMQ` : used to receive token invalidation info @@ -20,38 +19,9 @@ The Gis Interface connects with various external dependencies namely The Gis Interface also connects with various DX dependencies namely - Authorization Server : used to download the certificate for token decoding - Catalogue Server : used to download the list of resources, access policies and query types supported on a resource. +- Auditing Server : used to store information of metering in ImmuDB and Postgres. ---- -## Setting up RabbitMQ for IUDX Gis Interface -- Refer to the docker files available [here](https://github.com/datakaveri/iudx-deployment/blob/master/Docker-Swarm-deployment/single-node/databroker) to setup RMQ. - - -In order to connect to the appropriate RabbitMQ instance, required information such as dataBrokerIP, dataBrokerPort etc. should be updated in the DataBrokerVerticle module available in [config-example.json](configs/config-example.json). - -**DataBrokerVerticle** -``` -{ - id": "iudx.gis.server.databroker.DataBrokerVerticle", - "verticleInstances": , - "dataBrokerIP": "localhost", - "dataBrokerPort": , - "dataBrokerVhost": , - "dataBrokerUserName": , - "dataBrokerPassword": , -Adding default apiserver ports - -- Default http port is 8080. -- Default port when ssl is enabled is 8443. -- Apiserver port configurable using parameter 'httpPort "dataBrokerManagementPort": , - "connectionTimeout": , - "requestedHeartbeat": , - "handshakeTimeout": , - "requestedChannelMax": , - "networkRecoveryInterval": , - "automaticRecoveryEnabled": "true" -} -``` ---- ## Setting up PostgreSQL for IUDX Gis Interface - Refer to the docker files available [here](https://github.com/datakaveri/iudx-deployment/blob/master/Docker-Swarm-deployment/single-node/postgres) to setup PostgreSQL @@ -72,29 +42,15 @@ In order to connect to the appropriate Postgres database, required information s "databasePassword": , "poolSize": } -``` -**DatabaseVerticle** -``` -{ - "id": "iudx.gis.server.database.DatabaseVerticle", - "verticleInstances": , - "databaseIP": "localhost", - "databasePort": , - "databaseName": , - "databaseUserName": , - "databasePassword": , - "dbClientPoolSize": -} -``` - +``` #### Schemas for PostgreSQL tables in IUDX Gis Interface 1. **Token Invalidation Table Schema** ``` CREATE TABLE IF NOT EXISTS revoked_tokens ( _id uuid NOT NULL, - expiry timestamp with time zone NOT NULL, + expiry timestamp without time zone NOT NULL, created_at timestamp without time zone NOT NULL, modified_at timestamp without time zone NOT NULL, CONSTRAINT revoke_tokens_pk PRIMARY KEY (_id) @@ -119,10 +75,8 @@ CREATE TABLE IF NOT EXISTS gis ``` ---- -## Setting up ImmuDB for IUDX Gis Interface -- Refer to the docker files available [here](https://github.com/datakaveri/iudx-deployment/blob/master/Docker-Swarm-deployment/single-node/immudb) to setup ImmuDB. -- Refer [this](https://github.com/datakaveri/iudx-deployment/blob/master/Docker-Swarm-deployment/single-node/immudb/docker/immudb-config-generator/immudb-config-generator.py) to create table/user. -- In order to connect to the appropriate ImmuDB database, required information such as meteringDatabaseIP, meteringDatabasePort etc. should be updated in the MeteringVerticle module available in [config-example.json](configs/config-example.json). +## Setting up Metering for IUDX Gis Interface +- In Metering Verticle we are pushing data in Auditing Server through RabbitMQ. [config-example.json](configs/config-example.json). **MeteringVerticle** @@ -130,29 +84,21 @@ CREATE TABLE IF NOT EXISTS gis { "id": "iudx.gis.server.metering.MeteringVerticle", "verticleInstances": , - "meteringDatabaseIP": "localhost", - "meteringDatabasePort": , - "meteringDatabaseName": , - "meteringDatabaseUserName": , - "meteringDatabasePassword": , - "meteringDatabaseTableName": - "meteringPoolSize": } ``` -**Metering Table Schema** +---- + +## Setting up Internal Cache Store +- In order to connect with the internal cache, we need to add cache verticle configs available in [config-example.json](configs/config-example.json). + +**CacheVerticle** + ``` -CREATE TABLE IF NOT EXISTS gisaudit ( - id VARCHAR[128] NOT NULL, - api VARCHAR[128], - userid VARCHAR[128], - epochtime INTEGER, - resourceid VARCHAR[200], - isotime VARCHAR[128], - providerid VARCHAR[128], - size INTEGER, - PRIMARY KEY id -); +{ + "id": "iudx.gis.server.cache.CacheVerticle", + "verticleInstances": 1 +} ``` ---- @@ -160,7 +106,6 @@ CREATE TABLE IF NOT EXISTS gisaudit ( ## Setting up RabbitMQ for IUDX Gis Interface - Refer to the docker files available [here](https://github.com/datakaveri/iudx-deployment/blob/master/Docker-Swarm-deployment/single-node/databroker) to setup RMQ. - In order to connect to the appropriate RabbitMQ instance, required information such as dataBrokerIP, dataBrokerPort etc. should be updated in the DataBrokerVerticle module available in [config-example.json](configs/config-example.json). **DataBrokerVerticle** @@ -170,16 +115,18 @@ In order to connect to the appropriate RabbitMQ instance, required information s "verticleInstances": , "dataBrokerIP": "localhost", "dataBrokerPort": , - "dataBrokerVhost": , "dataBrokerUserName": , "dataBrokerPassword": , - "dataBrokerManagementPort": , "connectionTimeout": , "requestedHeartbeat": , "handshakeTimeout": , "requestedChannelMax": , "networkRecoveryInterval": , - "automaticRecoveryEnabled": + "automaticRecoveryEnabled": , + "prodVhost": , + "internalVhost": , + "externalVhost": + } ``` diff --git a/src/test/java/iudx/gis/server/cache/CacheServiceTest.java b/src/test/java/iudx/gis/server/cache/CacheServiceTest.java index 7d6363f..d808264 100644 --- a/src/test/java/iudx/gis/server/cache/CacheServiceTest.java +++ b/src/test/java/iudx/gis/server/cache/CacheServiceTest.java @@ -264,6 +264,7 @@ public void refreshCacheTest(Vertx vertx, VertxTestContext testContext) { } }); } + @Description("refresh cache without passing key and value.") @Test public void refreshCacheTest_1(Vertx vertx, VertxTestContext testContext) {