diff --git a/.fossa.yml b/.fossa.yml index 005b660973c55b1ecb92b77bff52c5159978f3db..53918d38674d68c2e504a7a0c450d08ffe14d0d0 100644 --- a/.fossa.yml +++ b/.fossa.yml @@ -8,27 +8,27 @@ cli: project: Indexer analyze: modules: - - name: indexer-service - type: mvn - target: pom.xml - path: . - - name: indexer-core - type: mvn - target: indexer-core/pom.xml - path: . - - name: indexer-aws - type: mvn - target: provider/indexer-aws/pom.xml - path: . - - name: indexer-azure - type: mvn - target: provider/indexer-azure/pom.xml - path: . - - name: indexer-gcp - type: mvn - target: provider/indexer-gcp/pom.xml - path: . - - name: indexer-ibm - type: mvn - target: provider/indexer-ibm/pom.xml - path: . + - name: indexer-service + type: mvn + target: pom.xml + path: . + - name: indexer-core + type: mvn + target: indexer-core/pom.xml + path: . + - name: indexer-aws + type: mvn + target: provider/indexer-aws/pom.xml + path: . + - name: indexer-azure + type: mvn + target: provider/indexer-azure/pom.xml + path: . + - name: indexer-gcp + type: mvn + target: provider/indexer-gc/pom.xml + path: . + - name: indexer-ibm + type: mvn + target: provider/indexer-ibm/pom.xml + path: . diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index abddb645eb2fe0dd82af8c4feed98c9bc2f8f300..a8ca2bffe630a107f1c5bdefe2a0c27d94752b35 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,11 +20,10 @@ variables: IBM_BUILD_SUBDIR: provider/indexer-ibm IBM_INT_TEST_SUBDIR: testing/indexer-test-ibm - + IBM_HELM_CONFIG_PATH: devops/ibm/ibm-indexer-config IBM_HELM_DEPLOY_PATH: devops/ibm/ibm-indexer-deploy - AZURE_SERVICE: indexer AZURE_BUILD_SUBDIR: provider/indexer-azure AZURE_TEST_SUBDIR: testing/indexer-test-azure @@ -58,9 +57,9 @@ include: file: "publishing/pages.yml" - project: "osdu/platform/ci-cd-pipelines" - file: "cloud-providers/osdu-gcp-global.yml" + file: "cloud-providers/gc-global.yml" - - local: "devops/gcp/pipeline/override-stages.yml" + - local: "devops/gc/pipeline/override-stages.yml" aws-test-java: tags: ["aws-internal-test"] diff --git a/NOTICE b/NOTICE index 85c36a670d0357c270ae04929c517d49927a1791..72cdc32aa0254ff63dacb3be4082f69ab18979fc 100644 --- a/NOTICE +++ b/NOTICE @@ -359,7 +359,7 @@ The following software have components provided under the terms of this license: - Apache Maven Wagon :: Providers :: SSH External Provider (from https://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-ssh-external) - Apache Maven Wagon :: Providers :: SSH Provider (from https://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-ssh) - Apache Velocity (from http://velocity.apache.org/engine/devel/, http://velocity.apache.org/engine/releases/velocity-1.6.1/, http://velocity.apache.org/engine/releases/velocity-1.6.2/) -- AssertJ fluent assertions (from ${project.parent.url}#${project.artifactId}, https://repo1.maven.org/maven2/org/assertj/assertj-core) +- AssertJ Core (from ${project.organization.url}#${project.artifactId}) - Asynchronous Http Client (from https://repo1.maven.org/maven2/org/asynchttpclient/async-http-client) - Asynchronous Http Client Netty Utils (from https://repo1.maven.org/maven2/org/asynchttpclient/async-http-client-netty-utils) - AutoValue Annotations (from https://github.com/google/auto/tree/master/value, https://repo1.maven.org/maven2/com/google/auto/value/auto-value-annotations) @@ -619,12 +619,12 @@ The following software have components provided under the terms of this license: - compiler (from http://github.com/spullara/mustache.java) - datastore-v1-proto-client (from https://repo1.maven.org/maven2/com/google/cloud/datastore/datastore-v1-proto-client) - documentdb-bulkexecutor (from http://azure.microsoft.com/en-us/services/documentdb/) -- elasticsearch (from https://github.com/elastic/elasticsearch, https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch) -- elasticsearch-cli (from https://github.com/elastic/elasticsearch) -- elasticsearch-core (from https://github.com/elastic/elasticsearch) -- elasticsearch-geo (from https://github.com/elastic/elasticsearch) -- elasticsearch-secure-sm (from https://github.com/elastic/elasticsearch) -- elasticsearch-x-content (from https://github.com/elastic/elasticsearch) +- elasticsearch (from https://github.com/elastic/elasticsearch, https://github.com/elastic/elasticsearch.git, https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch) +- elasticsearch-cli (from https://github.com/elastic/elasticsearch, https://github.com/elastic/elasticsearch.git) +- elasticsearch-core (from https://github.com/elastic/elasticsearch, https://github.com/elastic/elasticsearch.git) +- elasticsearch-geo (from https://github.com/elastic/elasticsearch.git) +- elasticsearch-secure-sm (from https://github.com/elastic/elasticsearch, https://github.com/elastic/elasticsearch.git) +- elasticsearch-x-content (from https://github.com/elastic/elasticsearch, https://github.com/elastic/elasticsearch.git) - error-prone annotations (from https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations) - io.grpc:grpc-alts (from https://github.com/grpc/grpc-java) - io.grpc:grpc-api (from https://github.com/grpc/grpc-java) @@ -666,11 +666,11 @@ The following software have components provided under the terms of this license: - proto-google-cloud-iamcredentials-v1 (from https://github.com/googleapis/google-cloud-java, https://github.com/googleapis/java-iamcredentials/proto-google-cloud-iamcredentials-v1, https://repo1.maven.org/maven2/com/google/api/grpc/proto-google-cloud-iamcredentials-v1) - proto-google-cloud-logging-v2 (from https://github.com/googleapis/java-logging/proto-google-cloud-logging-v2, https://repo1.maven.org/maven2/com/google/api/grpc/proto-google-cloud-logging-v2) - proto-google-cloud-pubsub-v1 (from https://github.com/googleapis/googleapis, https://github.com/googleapis/java-pubsub/proto-google-cloud-pubsub-v1) -- proto-google-common-protos (from https://github.com/googleapis/api-client-staging, https://github.com/googleapis/googleapis, https://github.com/googleapis/java-iam/proto-google-common-protos) -- proto-google-iam-v1 (from https://github.com/googleapis/googleapis, https://github.com/googleapis/java-iam/proto-google-iam-v1) +- proto-google-common-protos (from https://github.com/googleapis/api-client-staging, https://github.com/googleapis/gapic-generator-java, https://github.com/googleapis/googleapis, https://github.com/googleapis/java-iam/proto-google-common-protos) +- proto-google-iam-v1 (from https://github.com/googleapis/gapic-generator-java, https://github.com/googleapis/googleapis, https://github.com/googleapis/java-iam/proto-google-iam-v1) - rank-eval (from https://github.com/elastic/elasticsearch.git) - resilience4j (from https://github.com/resilience4j/resilience4j, https://resilience4j.readme.io, ttps://resilience4j.readme.io) -- rest (from https://github.com/elastic/elasticsearch) +- rest (from https://github.com/elastic/elasticsearch.git) - rest-high-level (from https://github.com/elastic/elasticsearch) - spring-security-crypto (from http://spring.io/spring-security, https://spring.io/projects/spring-security, https://spring.io/spring-security) - spring-security-oauth2-client (from http://spring.io/spring-security, https://spring.io/projects/spring-security, https://spring.io/spring-security) @@ -696,7 +696,7 @@ BSD-2-Clause ======================================================================== The following software have components provided under the terms of this license: -- API Common (from https://github.com/googleapis, https://github.com/googleapis/api-common-java) +- API Common (from https://github.com/googleapis, https://github.com/googleapis/api-common-java, https://repo1.maven.org/maven2/com/google/api/api-common) - Apache Lucene (module: memory) (from https://lucene.apache.org/) - Apache Lucene (module: misc) (from https://lucene.apache.org/, https://repo1.maven.org/maven2/org/apache/lucene/lucene-misc) - Apache Lucene (module: spatial-extras) (from https://lucene.apache.org/, https://repo1.maven.org/maven2/org/apache/lucene/lucene-spatial-extras) @@ -729,7 +729,7 @@ BSD-3-Clause ======================================================================== The following software have components provided under the terms of this license: -- API Common (from https://github.com/googleapis, https://github.com/googleapis/api-common-java) +- API Common (from https://github.com/googleapis, https://github.com/googleapis/api-common-java, https://repo1.maven.org/maven2/com/google/api/api-common) - ASM Analysis (from http://asm.ow2.io/) - ASM Commons (from http://asm.ow2.io/, https://repo1.maven.org/maven2/org/ow2/asm/asm-commons) - ASM Core (from http://asm.ow2.io/, http://asm.ow2.org/) @@ -1248,7 +1248,7 @@ SunPro The following software have components provided under the terms of this license: - Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) -- elasticsearch-core (from https://github.com/elastic/elasticsearch) +- elasticsearch-core (from https://github.com/elastic/elasticsearch, https://github.com/elastic/elasticsearch.git) ======================================================================== W3C diff --git a/README.md b/README.md index bb9c8f1987d65d1c6feda5e184507048200f71ee..0b2fc26ecb867f1ebb0c569a5f4f4c948b3a7471 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ running the `os-indexer` Azure implementation ## Google Cloud Implementation -All documentation for the Google Cloud implementation of `os-indexer` lives [here](./provider/indexer-gcp/README.md) +All documentation for the Google Cloud implementation of `os-indexer` lives [here](./provider/indexer-gc/README.md) ## AWS Implementation -All documentation for the AWS implementation of `os-indexer` lives [here](./provider/indexer-aws/README.md) \ No newline at end of file +All documentation for the AWS implementation of `os-indexer` lives [here](./provider/indexer-aws/README.md) diff --git a/devops/gcp/configmap/Chart.yaml b/devops/gc/configmap/Chart.yaml similarity index 95% rename from devops/gcp/configmap/Chart.yaml rename to devops/gc/configmap/Chart.yaml index c500f6dd586a566a8f55be1c428d40da77b506e1..e72a77a34467c2ecb86f77a7dca187980ccbff6e 100644 --- a/devops/gcp/configmap/Chart.yaml +++ b/devops/gc/configmap/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: gcp-indexer-configmap +name: gc-indexer-configmap description: A Helm chart for Kubernetes # A chart can be either an 'application' or a 'library' chart. @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.16.0" +appVersion: "1.19.0" diff --git a/devops/gcp/configmap/README.md b/devops/gc/configmap/README.md similarity index 97% rename from devops/gcp/configmap/README.md rename to devops/gc/configmap/README.md index b2ba4e39df9aa8505dc20042ae5701813528a74d..f3a74af3f4bfc0e067b516561908966894dbf86d 100644 --- a/devops/gcp/configmap/README.md +++ b/devops/gc/configmap/README.md @@ -60,7 +60,7 @@ First you need to set variables in **values.yaml** file using any code editor. S Run this command from within this directory: ```console -helm install gcp-indexer-configmap . +helm install gc-indexer-configmap . ``` ## Uninstalling the Chart @@ -68,7 +68,7 @@ helm install gcp-indexer-configmap . To uninstall the helm deployment: ```console -helm uninstall gcp-indexer-configmap +helm uninstall gc-indexer-configmap ``` [Move-to-Top](#configmap-helm-chart) diff --git a/devops/gcp/configmap/templates/variables.yaml b/devops/gc/configmap/templates/variables.yaml similarity index 100% rename from devops/gcp/configmap/templates/variables.yaml rename to devops/gc/configmap/templates/variables.yaml diff --git a/devops/gcp/configmap/values.yaml b/devops/gc/configmap/values.yaml similarity index 97% rename from devops/gcp/configmap/values.yaml rename to devops/gc/configmap/values.yaml index 79aa287b308a549fb61ff7658c405b3cccda7736..d66cad07278578f3b0b5a5c832ba64adca0f8458 100644 --- a/devops/gcp/configmap/values.yaml +++ b/devops/gc/configmap/values.yaml @@ -14,7 +14,7 @@ data: securityHttpsCertificateTrust: "true" springProfilesActive: "gcp" storageHost: "http://storage" - # gcp + # Google Cloud googleAudiences: "" conf: appName: "indexer" diff --git a/devops/gcp/deploy/Chart.yaml b/devops/gc/deploy/Chart.yaml similarity index 96% rename from devops/gcp/deploy/Chart.yaml rename to devops/gc/deploy/Chart.yaml index 0c734669619861963d0ae8e80968babc7dbfbbbf..d7f8b27ec306171387e9d34e203a2c7a2e74bbba 100644 --- a/devops/gcp/deploy/Chart.yaml +++ b/devops/gc/deploy/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: gcp-indexer-deploy +name: gc-indexer-deploy description: A Helm chart for Kubernetes # A chart can be either an 'application' or a 'library' chart. @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.16.0" +appVersion: "1.19.0" diff --git a/devops/gcp/deploy/README.md b/devops/gc/deploy/README.md similarity index 97% rename from devops/gcp/deploy/README.md rename to devops/gc/deploy/README.md index 91af5795453aa4fce107ed48e2bd7a692dc92f0b..a86a3cc947ebddf31c85dd30101d83e799c50f17 100644 --- a/devops/gcp/deploy/README.md +++ b/devops/gc/deploy/README.md @@ -56,7 +56,7 @@ First you need to set variables in **values.yaml** file using any code editor. S Run this command from within this directory: ```console -helm install gcp-indexer-deploy . +helm install gc-indexer-deploy . ``` ## Uninstalling the Chart @@ -64,7 +64,7 @@ helm install gcp-indexer-deploy . To uninstall the helm deployment: ```console -helm uninstall gcp-indexer-deploy +helm uninstall gc-indexer-deploy ``` [Move-to-Top](#deploy-helm-chart) diff --git a/devops/gcp/deploy/templates/deployment.yaml b/devops/gc/deploy/templates/deployment.yaml similarity index 100% rename from devops/gcp/deploy/templates/deployment.yaml rename to devops/gc/deploy/templates/deployment.yaml diff --git a/devops/gcp/deploy/templates/service-account.yaml b/devops/gc/deploy/templates/service-account.yaml similarity index 100% rename from devops/gcp/deploy/templates/service-account.yaml rename to devops/gc/deploy/templates/service-account.yaml diff --git a/devops/gcp/deploy/templates/service.yaml b/devops/gc/deploy/templates/service.yaml similarity index 100% rename from devops/gcp/deploy/templates/service.yaml rename to devops/gc/deploy/templates/service.yaml diff --git a/devops/gcp/deploy/templates/virtual-service.yaml b/devops/gc/deploy/templates/virtual-service.yaml similarity index 100% rename from devops/gcp/deploy/templates/virtual-service.yaml rename to devops/gc/deploy/templates/virtual-service.yaml diff --git a/devops/gcp/deploy/values.yaml b/devops/gc/deploy/values.yaml similarity index 100% rename from devops/gcp/deploy/values.yaml rename to devops/gc/deploy/values.yaml diff --git a/devops/gc/pipeline/override-stages.yml b/devops/gc/pipeline/override-stages.yml new file mode 100644 index 0000000000000000000000000000000000000000..e14557ddd5d4093b0d0a8a92a2c9d1214ec4217c --- /dev/null +++ b/devops/gc/pipeline/override-stages.yml @@ -0,0 +1,7 @@ +variables: + GC_SERVICE: indexer + GC_VENDOR: gc + +gc-anthos-test: + variables: + GC_VENDOR: anthos diff --git a/devops/gcp/pipeline/override-stages.yml b/devops/gcp/pipeline/override-stages.yml deleted file mode 100644 index 466c27c54721f606de555b9a5ffe4a5287ba5882..0000000000000000000000000000000000000000 --- a/devops/gcp/pipeline/override-stages.yml +++ /dev/null @@ -1,7 +0,0 @@ -variables: - OSDU_GCP_SERVICE: indexer - OSDU_GCP_VENDOR: gcp - -osdu-gcp-anthos-test: - variables: - OSDU_GCP_VENDOR: anthos diff --git a/docs/tutorial/IndexerService.md b/docs/tutorial/IndexerService.md index 106753b26f384f1206b682f81855d8f791b11e7d..7d32460d94b8774dcaf5e888baae2e17fd35fad6 100644 --- a/docs/tutorial/IndexerService.md +++ b/docs/tutorial/IndexerService.md @@ -11,9 +11,9 @@ - [Data Partition provision](#data-partition-provision) - [Schema change](#schema-change) - [Schema Service adoption](#schema-service-adoption) - * [R3 Schema Support](#r3-schema-support) + - [R3 Schema Support](#r3-schema-support) - [Troubleshoot Indexing Issues](#troubleshoot-indexing-issues) - * [Get indexing status](#get-indexing-status) + - [Get indexing status](#get-indexing-status) ## Introduction <a name="introduction"></a> @@ -27,28 +27,31 @@ parent, acl, namespace, type, version, legaltags, index to each record at the ti ## Indexer API access <a name="indexer-api-access"></a> -* Required roles +- Required roles Indexer service requires that users (and service accounts) have dedicated roles in order to use it. Users must be a member of `users.datalake.viewers` or `users.datalake.editors` or `users.datalake.admins`, roles can be assigned using the [Entitlements Service](/solutions/osdu/tutorials/core-services/entitlementsservice). Please look at the API documentation for specific requirements. In addition to service roles, users __must__ be a member of data groups to access the data. -* Required headers +- Required headers The OSDU Data Platform stores data in different partitions, depending on the different accounts in the OSDU system. A user may belong to more than one account. As a user, after logging into the OSDU portal, you need to select the account you wish to be active. Likewise, when using the Search APIs, you need to specify the active account in the header called `data-partition-id`. The correct `data-partition-id` can be obtained from the CFS services. The `data-partition-id` enables the search within the mapped partition. e.g. + ``` data-partition-id: opendes ``` -* Optional headers +- Optional headers The `correlation-id` is a traceable ID to track the journey of a single request. The `correlation-id` can be a GUID on the header with a key. It is best practice to provide the correlation-id so the request can be tracked through all the services. + ``` correlation-id: 1e0fef08-22fd-49b1-a5cc-dffa21bc0b70 ``` + If the service is initiating the request, an ID should be generated. If the `correlation-id` is not provided, then a new ID will be generated by the service so that the request would be traceable. [Back to table of contents](#TOC) @@ -65,12 +68,12 @@ Provides build and git related information. GET /api/indexer/v2/info HTTP/1.1 ``` -#### Example response: +#### Example response ```json { "groupId": "org.opengroup.osdu", - "artifactId": "indexer-gcp", + "artifactId": "indexer-gc", "version": "0.10.0-SNAPSHOT", "buildTime": "2021-07-09T14:29:51.584Z", "branch": "feature/GONRG-2681_Build_info", @@ -140,12 +143,12 @@ will use the same schema and overwrite records with the same ids. Default value #### Request body `kind` <br /> -  (required, String) Kind to be re-indexed. - +  (required, String) Kind to be re-indexed. [Back to table of contents](#TOC) ## Delete API <a name="delete"></a> + Delete API is used to delete an index for a specific kind. Only users who belong to the Entitlement groups 'users.datalake.ops' can make calls to this API. @@ -165,9 +168,9 @@ curl --request DELETE \ ### Data Partition provision <a name="data-partition-provision"></a> -Configures Search backend for a data partition. +Configures Search backend for a data partition. -```http +```http PUT /api/indexer/v2/partitions/provision HTTP/1.1 ``` @@ -181,6 +184,7 @@ curl --request PUT \ --header 'content-type: application/json' \ --header 'data-partition-id: opendes'' ``` + </details> #### Prerequisite @@ -244,14 +248,14 @@ Indexer service support r3 schema. These schemas are created via Schema service. Here is an example following end-to-end workflow can be exercised (please update the schema based on your environment): -* Ingest r3 schema for `opendes:wks:master-data--Wellbore:1.0.0`. Schema service payload can be +- Ingest r3 schema for `opendes:wks:master-data--Wellbore:1.0.0`. Schema service payload can be found [here](https://community.opengroup.org/osdu/platform/system/indexer-service/-/blob/master/testing/indexer-test-core/src/main/resources/testData/r3-index_record_wks_master.schema.json) . -* Ingest r3 master-data Wellbore record. Storage service payload can be +- Ingest r3 master-data Wellbore record. Storage service payload can be found [here](https://community.opengroup.org/osdu/platform/system/indexer-service/-/blob/master/testing/indexer-test-core/src/main/resources/testData/r3-index_record_wks_master.json) -* Records can be searched via Search service. Here is sample payload: +- Records can be searched via Search service. Here is sample payload: ``` POST /api/search/v2/query HTTP/1.1 @@ -322,9 +326,9 @@ Details of the index block: 1) trace: This field collects all the issues related to the indexing and concatenates using '|'. This is a String field. 2) statusCode: This field determines the category of the error. This is integer field. It can have the following values: - * 200 - All OK - * 404 - Schema is missing in Storage - * 400 - Some fields were not properly mapped with the schema defined + - 200 - All OK + - 404 - Schema is missing in Storage + - 400 - Some fields were not properly mapped with the schema defined 3) lastUpdateTime: This field captures the last time the record was updated by the indexer service. This is datetime field so you can do range queries on this field. @@ -346,4 +350,4 @@ The above query will return all records which had problems due to fields mismatc Please refer to the [Search service](https://community.opengroup.org/osdu/platform/system/search-service/-/blob/master/docs/api/search_openapi.yaml#L28) documentation for examples on different kinds of search queries. -[Back to table of contents](#TOC) \ No newline at end of file +[Back to table of contents](#TOC) diff --git a/pom.xml b/pom.xml index d763305b3e4f019a98bdd412b656db87bca9c960..2552ca9c0bab62ad418973339c54fb7b3898c292 100644 --- a/pom.xml +++ b/pom.xml @@ -173,7 +173,7 @@ <module>indexer-core</module> <module>provider/indexer-aws</module> <module>provider/indexer-azure</module> - <module>provider/indexer-gcp</module> + <module>provider/indexer-gc</module> <module>provider/indexer-ibm</module> </modules> diff --git a/provider/indexer-gcp/README.md b/provider/indexer-gc/README.md similarity index 81% rename from provider/indexer-gcp/README.md rename to provider/indexer-gc/README.md index b822088558f04cefb2bdf744de7e258d99df9926..40f0a3b857e18748efcf064cb99357ff2ddc97fb 100644 --- a/provider/indexer-gcp/README.md +++ b/provider/indexer-gc/README.md @@ -1,7 +1,9 @@ # Indexer Service -os-indexer-gcp is a [Spring Boot](https://spring.io/projects/spring-boot) service that is responsible for indexing Records that enable the `os-search` service to execute OSDU R2 domain searches against Elasticsearch. + +Indexer-gc is a [Spring Boot](https://spring.io/projects/spring-boot) service that is responsible for indexing Records that enable the `search` service to execute OSDU R2 domain searches against Elasticsearch. ## Table of Contents <a name="TOC"></a> + * [Getting started](#Getting-started) * [Mappers](#Mappers) * [Settings and Configuration](#Settings-and-Configuration) @@ -12,15 +14,20 @@ os-indexer-gcp is a [Spring Boot](https://spring.io/projects/spring-boot) servic * [Licence](#License) ## Getting Started + These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. # Configuration ## Service Configuration -### Anthos: -[Anthos service configuration ](docs/anthos/README.md) -### Google Cloud: -[Google Cloud service configuration ](docs/gcp/README.md) + +### Anthos + +[Anthos service configuration](docs/anthos/README.md) + +### Google Cloud + +[Google Cloud service configuration](docs/gc/README.md) ## Mappers @@ -28,32 +35,40 @@ This is a universal solution created using EPAM OQM mappers technology. It allow implementations of message brokers. For more information about mappers: -- [OQM Readme](https://community.opengroup.org/osdu/platform/system/lib/cloud/gcp/oqm/-/blob/master/README.md) +* [OQM Readme](https://community.opengroup.org/osdu/platform/system/lib/cloud/gcp/oqm/-/blob/master/README.md) ### Limitations of the current version In the current version, the mappers are equipped with several drivers to the stores and the message broker: -- OQM (mapper to message brokers): Google PubSub; RabbitMQ +* OQM (mapper to message brokers): Google PubSub; RabbitMQ ## Settings and Configuration ### Prerequisites + 1. Mandatory - - JDK 8 - - Lombok 1.16 or later - - Maven + +* JDK 8 +* Lombok 1.16 or later +* Maven + 2. For Google Cloud only - - GCloud SDK with java (latest version) -### Anthos Service Configuration: -[Anthos service configuration ](docs/anthos/README.md) -### Google Cloud Service Configuration: -[Google Cloud service configuration ](docs/gcp/README.md) +* GCloud SDK with java (latest version) + +### Anthos Service Configuration + +[Anthos service configuration](docs/anthos/README.md) + +### Google Cloud Service Configuration + +[Google Cloud service configuration](docs/gc/README.md) ## Run service ### Run Locally + Check that maven is installed: ```bash @@ -95,6 +110,7 @@ $ cat ~/.m2/settings.xml ```bash gcloud components update ``` + * Set Google Project Id: ```bash @@ -129,10 +145,11 @@ mvn clean install -DskipTests After configuring your environment as specified above, you can follow these steps to build and run the application. These steps should be invoked from the *repository root.* ```bash -cd provider/indexer-gcp/ && mvn spring-boot:run +cd provider/indexer-gc && mvn spring-boot:run ``` ## Testing + Navigate to indexer service's root folder and run all the tests: ```bash @@ -140,33 +157,39 @@ Navigate to indexer service's root folder and run all the tests: $ (cd testing/indexer-test-core/ && mvn clean install) ``` -### Running E2E Tests +### Running E2E Tests This section describes how to run cloud OSDU E2E tests. -### Anthos test configuration: -[Anthos service configuration ](docs/anthos/README.md) -### Google Cloud test configuration: -[Google Cloud service configuration ](docs/gcp/README.md) +### Anthos test configuration + +[Anthos service configuration](docs/anthos/README.md) + +### Google Cloud test configuration + +[Google Cloud service configuration](docs/gc/README.md) ## Deployment * Data-Lake Indexer Google Cloud Endpoints on App Engine Flex environment * Edit the app.yaml * Open the [app.yaml](indexer/src/main/appengine/app.yaml) file in editor, and replace the YOUR-PROJECT-ID `GOOGLE_CLOUD_PROJECT` line with Google Cloud Platform project Id. Also update `AUTHORIZE_API`, `CRON_JOB_IP`, `LEGAL_HOSTNAME`, `REGION` and `SECURITY_HTTPS_CERTIFICATE_TRUST` based on your deployment - + * Deploy + ```sh mvn appengine:deploy -pl org.opengroup.osdu.indexer:indexer -amd ``` * If you wish to deploy the search service without running tests + ```sh mvn appengine:deploy -pl org.opengroup.osdu.indexer:indexer -amd -DskipTests ``` or -* Google Documentation: https://cloud.google.com/cloud-build/docs/deploying-builds/deploy-appengine + +* Google Documentation: <https://cloud.google.com/cloud-build/docs/deploying-builds/deploy-appengine> #### Memory Store (Redis Instance) Setup @@ -179,23 +202,25 @@ The Redis instance must be created under the same region with the App Engine app ``` ## Entitlements groups + Storage service account should have entitlements groups listed below: -- service.entitlements.user -- users -- service.schema-service.viewers -- service.storage.admin -- service.search.admin +* service.entitlements.user +* users +* service.schema-service.viewers +* service.storage.admin +* service.search.admin ## Licence + Copyright © Google LLC Copyright © EPAM Systems - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/provider/indexer-gcp/cloudbuild/Dockerfile.cloudbuild b/provider/indexer-gc/cloudbuild/Dockerfile.cloudbuild similarity index 100% rename from provider/indexer-gcp/cloudbuild/Dockerfile.cloudbuild rename to provider/indexer-gc/cloudbuild/Dockerfile.cloudbuild diff --git a/provider/indexer-gcp/cloudbuild/cloudbuild.yaml b/provider/indexer-gc/cloudbuild/cloudbuild.yaml similarity index 51% rename from provider/indexer-gcp/cloudbuild/cloudbuild.yaml rename to provider/indexer-gc/cloudbuild/cloudbuild.yaml index 1d0c9ba890efb3b13d71d7517e9ce2951f56eb00..61563cdfab89df5b11a8244e9f14614472fc013e 100644 --- a/provider/indexer-gcp/cloudbuild/cloudbuild.yaml +++ b/provider/indexer-gc/cloudbuild/cloudbuild.yaml @@ -15,17 +15,22 @@ # limitations under the License. steps: - - name: 'gcr.io/cloud-builders/docker' - args: [ - 'build', - '--build-arg', 'PROVIDER_NAME=${_PROVIDER_NAME}', - '--build-arg', 'PORT=${_PORT}', - '-t', 'gcr.io/$PROJECT_ID/${_APPLICATION_NAME}/${_GCP_SERVICE}-${_PROVIDER_NAME}:${_SHORT_SHA}', - '-t', 'gcr.io/$PROJECT_ID/${_APPLICATION_NAME}/${_GCP_SERVICE}-${_PROVIDER_NAME}:latest', - '-f', 'provider/${_GCP_SERVICE}-${_PROVIDER_NAME}/cloudbuild/Dockerfile.cloudbuild', - '.' - ] + - name: "gcr.io/cloud-builders/docker" + args: + [ + "build", + "--build-arg", + "PROVIDER_NAME=${_PROVIDER_NAME}", + "--build-arg", + "PORT=${_PORT}", + "-t", + "gcr.io/$PROJECT_ID/${_APPLICATION_NAME}/${_GC_SERVICE}-${_PROVIDER_NAME}:${_SHORT_SHA}", + "-t", + "gcr.io/$PROJECT_ID/${_APPLICATION_NAME}/${_GC_SERVICE}-${_PROVIDER_NAME}:latest", + "-f", + "provider/${_GC_SERVICE}-${_PROVIDER_NAME}/cloudbuild/Dockerfile.cloudbuild", + ".", + ] images: - - 'gcr.io/$PROJECT_ID/${_APPLICATION_NAME}/${_GCP_SERVICE}-${_PROVIDER_NAME}' - + - "gcr.io/$PROJECT_ID/${_APPLICATION_NAME}/${_GC_SERVICE}-${_PROVIDER_NAME}" diff --git a/provider/indexer-gcp/docs/anthos/README.md b/provider/indexer-gc/docs/anthos/README.md similarity index 99% rename from provider/indexer-gcp/docs/anthos/README.md rename to provider/indexer-gc/docs/anthos/README.md index ea9413fd186bdf7792c59aaad4ba807238ca4bbf..e86460c693608d9bb6eb3c7a03bc0503807919e7 100644 --- a/provider/indexer-gcp/docs/anthos/README.md +++ b/provider/indexer-gc/docs/anthos/README.md @@ -85,7 +85,7 @@ curl -L -X PATCH 'http://partition.com/api/partition/v1/partitions/opendes' -H ' "properties": { "elasticsearch.host": { "sensitive": false, - "value": "elastic.us-central1.gcp.cloud.es.io" + "value": "elastic.us-central1.gc.cloud.es.io" }, "elasticsearch.port": { "sensitive": false, diff --git a/provider/indexer-gcp/docs/anthos/pics/client.png b/provider/indexer-gc/docs/anthos/pics/client.png similarity index 100% rename from provider/indexer-gcp/docs/anthos/pics/client.png rename to provider/indexer-gc/docs/anthos/pics/client.png diff --git a/provider/indexer-gcp/docs/anthos/pics/rabbit.PNG b/provider/indexer-gc/docs/anthos/pics/rabbit.PNG similarity index 100% rename from provider/indexer-gcp/docs/anthos/pics/rabbit.PNG rename to provider/indexer-gc/docs/anthos/pics/rabbit.PNG diff --git a/provider/indexer-gcp/docs/anthos/pics/sa.png b/provider/indexer-gc/docs/anthos/pics/sa.png similarity index 100% rename from provider/indexer-gcp/docs/anthos/pics/sa.png rename to provider/indexer-gc/docs/anthos/pics/sa.png diff --git a/provider/indexer-gcp/docs/gcp/README.md b/provider/indexer-gc/docs/gc/README.md similarity index 92% rename from provider/indexer-gcp/docs/gcp/README.md rename to provider/indexer-gc/docs/gc/README.md index d5a5fa81c5c185c01ea136fe17a5fa673be1cf8e..981bcbade96336e5d612c4b617f6a3ba48664309 100644 --- a/provider/indexer-gcp/docs/gcp/README.md +++ b/provider/indexer-gc/docs/gc/README.md @@ -1,6 +1,6 @@ ## Service Configuration for Google Cloud -## Environment variables: +## Environment variables Define the following environment variables. @@ -8,7 +8,7 @@ Must have: | name | value | description | sensitive? | source | |----------------------------------------------|---------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|---------------------------------------------------| -| `GOOGLE_AUDIENCES` | ex `*****.apps.googleusercontent.com` | Client ID for getting access to cloud resources | yes | https://console.cloud.google.com/apis/credentials | +| `GOOGLE_AUDIENCES` | ex `*****.apps.googleusercontent.com` | Client ID for getting access to cloud resources | yes | <https://console.cloud.google.com/apis/credentials> | | `SPRING_PROFILES_ACTIVE` | ex `gcp` | Spring profile that activate default configuration for Google Cloud environment | false | - | | `<ELASTICSEARCH_USER_ENV_VARIABLE_NAME>` | ex `user` | Elasticsearch user, name of that variable not defined at the service level, the name will be received through partition service. Each tenant can have it's own ENV name value, and it must be present in ENV of Indexer service, see [Partition properties set](#Properties-set-in-Partition-service) | yes | - | | `<ELASTICSEARCH_PASSWORD_ENV_VARIABLE_NAME>` | ex `password` | Elasticsearch password, name of that variable not defined at the service level, the name will be received through partition service. Each tenant can have it's own ENV name value, and it must be present in ENV of Indexer service, see [Partition properties set](#Properties-set-in-Partition-service) | false | - | @@ -30,9 +30,9 @@ Defined in default application property file but possible to override: | `STORAGE_HOST` | ex `https://storage.com` | Storage host | no | output of infrastructure deployment | | `INDEXER_QUEUE_HOST` | ex `http://indexer-queue/api/indexer-queue/v1/_dps/task-handlers/enqueue` | Indexer-Queue host endpoint used for reprocessing tasks | no | output of infrastructure deployment | | `SCHEMA_BASE_HOST` | ex `https://schema.com` | Schema service host | no | output of infrastructure deployment | -| `GOOGLE_APPLICATION_CREDENTIALS` | ex `/path/to/directory/service-key.json` | Service account credentials, you only need this if running locally | yes | https://console.cloud.google.com/iam-admin/serviceaccounts | +| `GOOGLE_APPLICATION_CREDENTIALS` | ex `/path/to/directory/service-key.json` | Service account credentials, you only need this if running locally | yes | <https://console.cloud.google.com/iam-admin/serviceaccounts> | -These variables define service behavior, and are used to switch between `anthos` or `gcp` environments, their overriding and usage in mixed mode was not tested. +These variables define service behavior, and are used to switch between `Reference` or `Google Cloud` environments, their overriding and usage in mixed mode was not tested. Usage of spring profiles is preferred. | name | value | description | sensitive? | source | @@ -41,27 +41,27 @@ Usage of spring profiles is preferred. | `OQMDRIVER` | `rabbitmq` or `pubsub` | Oqm driver mode that defines which message broker will be used | no | - | | `SERVICE_TOKEN_PROVIDER` | `GCP` or `OPENID` | Service account token provider, `GCP` means use Google service account `OPEIND` means use OpenId provider like `Keycloak` | no | - | -## Pubsub configuration: +## Pubsub configuration Pubsub should have topics and subscribers with names and configs: | TOPIC NAME | Subscription name | Subscription config | |-----------------------------|------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | indexing-progress | (Consumer not implemented) | (Consumer not implemented) | -| records-changed | indexer-records-changed | `Maximum delivery attempts: 5`<br/>`Retry policy: Retry after exponential backoff delay`<br/>`Minimum backoff duration: 10 seconds`<br/>`Maximum backoff duration: 600 seconds`<br/>`Grant forwarding permissions for dead letter` | -| records-changed-dead-letter | indexer-records-changed | `Subscription message retention duration: 7 days` | -| reprocess | indexer-reprocess | `Maximum delivery attempts: 5`<br/>`Retry policy: Retry after exponential backoff delay`<br/>`Minimum backoff duration: 10 seconds`<br/>`Maximum backoff duration: 600 seconds`<br/>`Grant forwarding permissions for dead letter` | -| reprocess-dead-letter | indexer-reprocess-dead-letter | `Subscription message retention duration: 7 days` | -| schema-changed | indexer-schema-changed | `Maximum delivery attempts: 5`<br/>`Retry policy: Retry after exponential backoff delay`<br/>`Minimum backoff duration: 10 seconds`<br/>`Maximum backoff duration: 600 seconds`<br/>`Grant forwarding permissions for dead letter` | -| schema-changed-dead-letter | indexer-schema-changed-dead-letter | `Subscription message retention duration: 7 days` | +| records-changed | indexer-records-changed | `Maximum delivery attempts: 5`<br/>`Retry policy: Retry after exponential backoff delay`<br/>`Minimum backoff duration: 10 seconds`<br/>`Maximum backoff duration: 600 seconds`<br/>`Grant forwarding permissions for dead letter` | +| records-changed-dead-letter | indexer-records-changed | `Subscription message retention duration: 7 days` | +| reprocess | indexer-reprocess | `Maximum delivery attempts: 5`<br/>`Retry policy: Retry after exponential backoff delay`<br/>`Minimum backoff duration: 10 seconds`<br/>`Maximum backoff duration: 600 seconds`<br/>`Grant forwarding permissions for dead letter` | +| reprocess-dead-letter | indexer-reprocess-dead-letter | `Subscription message retention duration: 7 days` | +| schema-changed | indexer-schema-changed | `Maximum delivery attempts: 5`<br/>`Retry policy: Retry after exponential backoff delay`<br/>`Minimum backoff duration: 10 seconds`<br/>`Maximum backoff duration: 600 seconds`<br/>`Grant forwarding permissions for dead letter` | +| schema-changed-dead-letter | indexer-schema-changed-dead-letter | `Subscription message retention duration: 7 days` | - -### Properties set in Partition service: +### Properties set in Partition service Note that properties can be set in Partition as `sensitive` in that case in property `value` should be present not value itself, but ENV variable name. -This variable should be present in environment of service that need that variable. +This variable should be present in environment of service that need that variable. Example: + ``` "elasticsearch.port": { "sensitive": false, <- value not sensitive @@ -73,7 +73,7 @@ Example: } ``` -There is no hardcode in services, all behaviour defined by sensitivity of property. +There is no hardcode in services, all behaviour defined by sensitivity of property. ## Elasticsearch configuration @@ -101,7 +101,7 @@ curl -L -X PATCH 'http://partition.com/api/partition/v1/partitions/opendes' -H ' "properties": { "elasticsearch.host": { "sensitive": false, - "value": "elastic.us-central1.gcp.cloud.es.io" + "value": "elastic.us-central1.gc.cloud.es.io" }, "elasticsearch.port": { "sensitive": false, @@ -120,7 +120,8 @@ curl -L -X PATCH 'http://partition.com/api/partition/v1/partitions/opendes' -H ' ``` -## Google cloud service account configuration : +## Google cloud service account configuration + TBD | Required roles | @@ -139,20 +140,20 @@ You will need to have the following environment variables defined. | `ELASTIC_PORT` | ex `9243` | Port Elasticsearch | yes | output of infrastructure deployment | | `GCLOUD_PROJECT` | ex `opendes` | Google Cloud Project Id | no | output of infrastructure deployment | | `INDEXER_HOST` | ex `https://os-indexer-dot-opendes.appspot.com/api/indexer/v2/` | Indexer API endpoint | no | output of infrastructure deployment | -| `ENTITLEMENTS_DOMAIN` | ex `opendes-gcp.projects.com` | OSDU R2 to run tests under | no | - | -| `INTEGRATION_TEST_AUDIENCE` | `********` | client application ID | yes | https://console.cloud.google.com/apis/credentials | +| `ENTITLEMENTS_DOMAIN` | ex `opendes-gc.projects.com` | OSDU R2 to run tests under | no | - | +| `INTEGRATION_TEST_AUDIENCE` | `********` | client application ID | yes | <https://console.cloud.google.com/apis/credentials> | | `OTHER_RELEVANT_DATA_COUNTRIES` | ex `US` | valid legal tag with a other relevant data countries | no | - | | `LEGAL_TAG` | ex `opendes-demo-legaltag` | valid legal tag with a other relevant data countries from `DEFAULT_OTHER_RELEVANT_DATA_COUNTRIES` | no | - | | `DEFAULT_DATA_PARTITION_ID_TENANT1` | ex `opendes` | HTTP Header 'Data-Partition-ID' | no | - | | `DEFAULT_DATA_PARTITION_ID_TENANT2` | ex `opendes` | HTTP Header 'Data-Partition-ID' | no | - | -| `SEARCH_INTEGRATION_TESTER` | `********` | Service account for API calls. Note: this user must have entitlements configured already | yes | https://console.cloud.google.com/iam-admin/serviceaccounts | +| `SEARCH_INTEGRATION_TESTER` | `********` | Service account for API calls. Note: this user must have entitlements configured already | yes | <https://console.cloud.google.com/iam-admin/serviceaccounts> | | `SEARCH_HOST` | ex `http://localhost:8080/api/search/v2/` | Endpoint of search service | no | - | | `STORAGE_HOST` | ex `http://os-storage-dot-opendes.appspot.com/api/storage/v2/` | Storage API endpoint | no | output of infrastructure deployment | | `SECURITY_HTTPS_CERTIFICATE_TRUST` | ex `false` | Elastic client connection uses TrustSelfSignedStrategy(), if it is 'true' | false | output of infrastructure deployment | **Entitlements configuration for integration accounts** -| INTEGRATION_TESTER | NO_DATA_ACCESS_TESTER | +| INTEGRATION_TESTER | NO_DATA_ACCESS_TESTER | |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------| | users<br/>users.datalake.ops<br/>service.storage.creator<br/>service.entitlements.user<br/>service.search.user<br/>service.search.admin<br/>data.test1<br/>data.integration.test<br/>users@{tenant1}@{domain}.com | @@ -161,5 +162,5 @@ Execute following command to build code and run all the integration tests: ```bash # Note: this assumes that the environment variables for integration tests as outlined # above are already exported in your environment. -$ (cd testing/indexer-test-gcp/ && mvn clean test) +$ (cd testing/indexer-test-gc/ && mvn clean test) ``` diff --git a/provider/indexer-gcp/pom.xml b/provider/indexer-gc/pom.xml similarity index 98% rename from provider/indexer-gcp/pom.xml rename to provider/indexer-gc/pom.xml index cff175ab689e4581911d43dd009b130e567fa285..0d796679549938d81f574726b052bddb5cb2c7cd 100644 --- a/provider/indexer-gcp/pom.xml +++ b/provider/indexer-gc/pom.xml @@ -9,10 +9,10 @@ <relativePath>../../pom.xml</relativePath> </parent> - <artifactId>indexer-gcp</artifactId> + <artifactId>indexer-gc</artifactId> <version>0.19.0-SNAPSHOT</version> - <name>indexer-gcp</name> - <description>Indexer Service GCP</description> + <name>indexer-gc</name> + <description>Indexer Service Google Cloud</description> <packaging>jar</packaging> <dependencies> diff --git a/provider/indexer-gcp/src/main/appengine/app.yaml b/provider/indexer-gc/src/main/appengine/app.yaml similarity index 100% rename from provider/indexer-gcp/src/main/appengine/app.yaml rename to provider/indexer-gc/src/main/appengine/app.yaml diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/IndexerGcpApplication.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/IndexerGcpApplication.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/IndexerGcpApplication.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/IndexerGcpApplication.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/AttributesCache.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/AttributesCache.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/AttributesCache.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/AttributesCache.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/CacheConfig.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/CacheConfig.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/CacheConfig.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/CacheConfig.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/ElasticCredentialsCache.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/ElasticCredentialsCache.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/ElasticCredentialsCache.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/ElasticCredentialsCache.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/IndexCache.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/IndexCache.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/IndexCache.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/IndexCache.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/SchemaCache.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/SchemaCache.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/SchemaCache.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/cache/SchemaCache.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/di/ElasticSearchConfig.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/di/ElasticSearchConfig.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/di/ElasticSearchConfig.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/di/ElasticSearchConfig.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/di/EntitlementsClientFactory.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/di/EntitlementsClientFactory.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/di/EntitlementsClientFactory.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/di/EntitlementsClientFactory.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/di/GcpConfigurationProperties.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/di/GcpConfigurationProperties.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/di/GcpConfigurationProperties.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/di/GcpConfigurationProperties.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/package-info.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/package-info.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/package-info.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/package-info.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/publish/ReprocessingTaskPublisher.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/publish/ReprocessingTaskPublisher.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/publish/ReprocessingTaskPublisher.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/publish/ReprocessingTaskPublisher.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/publish/StatusPublisherImpl.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/publish/StatusPublisherImpl.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/publish/StatusPublisherImpl.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/publish/StatusPublisherImpl.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/util/ServiceAccountJwtGcpClientImpl.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/util/ServiceAccountJwtGcpClientImpl.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/util/ServiceAccountJwtGcpClientImpl.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/common/util/ServiceAccountJwtGcpClientImpl.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/config/CustomContextConfiguration.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/config/CustomContextConfiguration.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/config/CustomContextConfiguration.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/config/CustomContextConfiguration.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/config/ScopeModifierPostProcessor.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/config/ScopeModifierPostProcessor.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/config/ScopeModifierPostProcessor.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/config/ScopeModifierPostProcessor.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/package-info.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/package-info.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/package-info.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/package-info.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/IndexerMessagingConfigProperties.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/IndexerMessagingConfigProperties.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/IndexerMessagingConfigProperties.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/IndexerMessagingConfigProperties.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/IndexerOqmMessageReceiver.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/IndexerOqmMessageReceiver.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/IndexerOqmMessageReceiver.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/IndexerOqmMessageReceiver.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/OqmSubscriberManager.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/OqmSubscriberManager.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/OqmSubscriberManager.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/OqmSubscriberManager.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/RecordsChangedSubscriptionConsumer.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/RecordsChangedSubscriptionConsumer.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/RecordsChangedSubscriptionConsumer.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/RecordsChangedSubscriptionConsumer.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/SubscriptionConsumer.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/SubscriptionConsumer.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/SubscriptionConsumer.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/SubscriptionConsumer.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/TenantSubscriberConfiguration.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/TenantSubscriberConfiguration.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/TenantSubscriberConfiguration.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/TenantSubscriberConfiguration.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/scope/ThreadDpsHeaders.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/scope/ThreadDpsHeaders.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/scope/ThreadDpsHeaders.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/scope/ThreadDpsHeaders.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/thread/ThreadScope.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/thread/ThreadScope.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/thread/ThreadScope.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/thread/ThreadScope.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/thread/ThreadScopeAttributes.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/thread/ThreadScopeAttributes.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/thread/ThreadScopeAttributes.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/thread/ThreadScopeAttributes.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/thread/ThreadScopeContextHolder.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/thread/ThreadScopeContextHolder.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/thread/ThreadScopeContextHolder.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/indexing/thread/ThreadScopeContextHolder.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/config/WebAppMainContextConfiguration.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/config/WebAppMainContextConfiguration.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/config/WebAppMainContextConfiguration.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/config/WebAppMainContextConfiguration.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/di/TenantInfoService.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/di/TenantInfoService.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/di/TenantInfoService.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/di/TenantInfoService.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/middleware/IndexFilter.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/middleware/IndexFilter.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/middleware/IndexFilter.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/middleware/IndexFilter.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/package-info.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/package-info.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/package-info.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/package-info.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/security/GcpSecurityConfig.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/security/GcpSecurityConfig.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/security/GcpSecurityConfig.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/security/GcpSecurityConfig.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/util/AppExceptionHandler.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/util/AppExceptionHandler.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/util/AppExceptionHandler.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/util/AppExceptionHandler.java diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/util/RequestInfoImpl.java b/provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/util/RequestInfoImpl.java similarity index 100% rename from provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/util/RequestInfoImpl.java rename to provider/indexer-gc/src/main/java/org/opengroup/osdu/indexer/provider/gcp/web/util/RequestInfoImpl.java diff --git a/provider/indexer-gcp/src/main/resources/application-anthos.properties b/provider/indexer-gc/src/main/resources/application-anthos.properties similarity index 100% rename from provider/indexer-gcp/src/main/resources/application-anthos.properties rename to provider/indexer-gc/src/main/resources/application-anthos.properties diff --git a/provider/indexer-gcp/src/main/resources/application-gcp.properties b/provider/indexer-gc/src/main/resources/application-gcp.properties similarity index 100% rename from provider/indexer-gcp/src/main/resources/application-gcp.properties rename to provider/indexer-gc/src/main/resources/application-gcp.properties diff --git a/provider/indexer-gcp/src/main/resources/application.properties b/provider/indexer-gc/src/main/resources/application.properties similarity index 100% rename from provider/indexer-gcp/src/main/resources/application.properties rename to provider/indexer-gc/src/main/resources/application.properties diff --git a/provider/indexer-gcp/src/main/resources/logback.xml b/provider/indexer-gc/src/main/resources/logback.xml similarity index 100% rename from provider/indexer-gcp/src/main/resources/logback.xml rename to provider/indexer-gc/src/main/resources/logback.xml diff --git a/provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/middleware/IndexFilterTest.java b/provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/middleware/IndexFilterTest.java similarity index 100% rename from provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/middleware/IndexFilterTest.java rename to provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/middleware/IndexFilterTest.java diff --git a/provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/IndexerOqmMessageReceiverTest.java b/provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/IndexerOqmMessageReceiverTest.java similarity index 100% rename from provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/IndexerOqmMessageReceiverTest.java rename to provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/IndexerOqmMessageReceiverTest.java diff --git a/provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/RecordsChangedSubscriptionConsumerTest.java b/provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/RecordsChangedSubscriptionConsumerTest.java similarity index 100% rename from provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/RecordsChangedSubscriptionConsumerTest.java rename to provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/provider/gcp/indexing/processing/RecordsChangedSubscriptionConsumerTest.java diff --git a/provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/service/CronServiceImplTest.java b/provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/service/CronServiceImplTest.java similarity index 100% rename from provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/service/CronServiceImplTest.java rename to provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/service/CronServiceImplTest.java diff --git a/provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/service/ElasticSettingServiceTest.java b/provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/service/ElasticSettingServiceTest.java similarity index 100% rename from provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/service/ElasticSettingServiceTest.java rename to provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/service/ElasticSettingServiceTest.java diff --git a/provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/service/IndexCopyServiceImplTest.java b/provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/service/IndexCopyServiceImplTest.java similarity index 100% rename from provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/service/IndexCopyServiceImplTest.java rename to provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/service/IndexCopyServiceImplTest.java diff --git a/provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/service/IndexerMappingServiceTest.java b/provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/service/IndexerMappingServiceTest.java similarity index 100% rename from provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/service/IndexerMappingServiceTest.java rename to provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/service/IndexerMappingServiceTest.java diff --git a/provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/service/ReindexServiceTest.java b/provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/service/ReindexServiceTest.java similarity index 100% rename from provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/service/ReindexServiceTest.java rename to provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/service/ReindexServiceTest.java diff --git a/provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/service/StorageServiceTest.java b/provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/service/StorageServiceTest.java similarity index 100% rename from provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/service/StorageServiceTest.java rename to provider/indexer-gc/src/test/java/org/opengroup/osdu/indexer/service/StorageServiceTest.java diff --git a/provider/indexer-gcp/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/provider/indexer-gc/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker similarity index 100% rename from provider/indexer-gcp/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker rename to provider/indexer-gc/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker diff --git a/provider/indexer-gcp/src/test/resources/test-events/empty-attributes-event.json b/provider/indexer-gc/src/test/resources/test-events/empty-attributes-event.json similarity index 100% rename from provider/indexer-gcp/src/test/resources/test-events/empty-attributes-event.json rename to provider/indexer-gc/src/test/resources/test-events/empty-attributes-event.json diff --git a/provider/indexer-gcp/src/test/resources/test-events/empty-data-event.json b/provider/indexer-gc/src/test/resources/test-events/empty-data-event.json similarity index 100% rename from provider/indexer-gcp/src/test/resources/test-events/empty-data-event.json rename to provider/indexer-gc/src/test/resources/test-events/empty-data-event.json diff --git a/provider/indexer-gcp/src/test/resources/test-events/formatted-as-cloud-task-indexer-reprocess-event.json b/provider/indexer-gc/src/test/resources/test-events/formatted-as-cloud-task-indexer-reprocess-event.json similarity index 100% rename from provider/indexer-gcp/src/test/resources/test-events/formatted-as-cloud-task-indexer-reprocess-event.json rename to provider/indexer-gc/src/test/resources/test-events/formatted-as-cloud-task-indexer-reprocess-event.json diff --git a/provider/indexer-gcp/src/test/resources/test-events/formatted-as-cloud-task-reindex-event.json b/provider/indexer-gc/src/test/resources/test-events/formatted-as-cloud-task-reindex-event.json similarity index 100% rename from provider/indexer-gcp/src/test/resources/test-events/formatted-as-cloud-task-reindex-event.json rename to provider/indexer-gc/src/test/resources/test-events/formatted-as-cloud-task-reindex-event.json diff --git a/provider/indexer-gcp/src/test/resources/test-events/formatted-as-cloud-task-storage-event.json b/provider/indexer-gc/src/test/resources/test-events/formatted-as-cloud-task-storage-event.json similarity index 100% rename from provider/indexer-gcp/src/test/resources/test-events/formatted-as-cloud-task-storage-event.json rename to provider/indexer-gc/src/test/resources/test-events/formatted-as-cloud-task-storage-event.json diff --git a/provider/indexer-gcp/src/test/resources/test-events/indexer-reprocess-event.json b/provider/indexer-gc/src/test/resources/test-events/indexer-reprocess-event.json similarity index 100% rename from provider/indexer-gcp/src/test/resources/test-events/indexer-reprocess-event.json rename to provider/indexer-gc/src/test/resources/test-events/indexer-reprocess-event.json diff --git a/provider/indexer-gcp/src/test/resources/test-events/reindex-event.json b/provider/indexer-gc/src/test/resources/test-events/reindex-event.json similarity index 100% rename from provider/indexer-gcp/src/test/resources/test-events/reindex-event.json rename to provider/indexer-gc/src/test/resources/test-events/reindex-event.json diff --git a/provider/indexer-gcp/src/test/resources/test-events/storage-index-event.json b/provider/indexer-gc/src/test/resources/test-events/storage-index-event.json similarity index 100% rename from provider/indexer-gcp/src/test/resources/test-events/storage-index-event.json rename to provider/indexer-gc/src/test/resources/test-events/storage-index-event.json diff --git a/provider/indexer-gcp/azure-build.yml b/provider/indexer-gcp/azure-build.yml deleted file mode 100644 index 5e9afc90215791c3178ddecdbb3bec7d8be4f216..0000000000000000000000000000000000000000 --- a/provider/indexer-gcp/azure-build.yml +++ /dev/null @@ -1,48 +0,0 @@ -# Maven -# Build your Java project and run tests with Apache Maven. -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/java - -trigger: - branches: - include: - - master - paths: - exclude: - - README.md - - .gitignore - -pool: - name: dps-build - demands: maven - -steps: -- task: Maven@3 - displayName: 'build, test, code coverage' - inputs: - mavenPomFile: 'pom.xml' - options: '--settings ./indexer-core/maven/settings.xml -DVSTS_FEED_TOKEN=$(VSTS_FEED_TOKEN) -U' - testResultsFiles: '**/*/TEST-*.xml' - codeCoverageToolOption: JaCoCo - goals: 'install' - -- task: Maven@3 - displayName: 'build, test, code coverage' - inputs: - mavenPomFile: 'pom.xml' - options: '--settings ./provider/indexer-gcp/maven/settings.xml -DVSTS_FEED_TOKEN=$(VSTS_FEED_TOKEN) -P indexer-gcp' - testResultsFiles: '**/*/TEST-*.xml' - codeCoverageToolOption: JaCoCo - goals: 'package' - -- task: ShellScript@2 - displayName: 'Bash Script: Stage artifacts' - inputs: - scriptPath: 'provider/indexer-gcp/scripts/stage-artifacts.sh' - args: '$(Build.ArtifactStagingDirectory)' - -- task: PublishBuildArtifacts@1 - displayName: 'Publish Artifact: drop' - inputs: - PathtoPublish: '$(build.artifactstagingdirectory)' - condition: succeededOrFailed() diff --git a/provider/indexer-gcp/kubernetes/deployments/deployment-os-indexer-service.yml b/provider/indexer-gcp/kubernetes/deployments/deployment-os-indexer-service.yml deleted file mode 100644 index 1a3a52456e0320876016f26a3d1f8cd1b914d6df..0000000000000000000000000000000000000000 --- a/provider/indexer-gcp/kubernetes/deployments/deployment-os-indexer-service.yml +++ /dev/null @@ -1,35 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: os-indexer-service - labels: - app: os-indexer-service -spec: - ports: - - name: http - port: 80 - targetPort: 8080 - selector: - app: os-indexer-service ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: os-indexer-service -spec: - replicas: 1 - template: - metadata: - labels: - app: os-indexer-service - version: v1 - spec: - containers: - - name: os-indexer-app - envFrom: - - configMapRef: - name: os-service-config - image: gcr.io/opendes/os-indexer-app - imagePullPolicy: Always - ports: - - containerPort: 8080 diff --git a/provider/indexer-gcp/scripts/config.sh b/provider/indexer-gcp/scripts/config.sh deleted file mode 100644 index 102b1bc9b5e86f5a8d93cc5697a7dd0739fbeb5e..0000000000000000000000000000000000000000 --- a/provider/indexer-gcp/scripts/config.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -if [ "$PROJECT_ID" = "" ] -then - export PROJECT_ID=$(gcloud config get-value project) -fi diff --git a/provider/indexer-gcp/scripts/deploy.sh b/provider/indexer-gcp/scripts/deploy.sh deleted file mode 100644 index fce3deef9e7edc096071c60393b4844e65153057..0000000000000000000000000000000000000000 --- a/provider/indexer-gcp/scripts/deploy.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -# deploy script - -# Exit as soon as a command fails -set -e - -SCRIPTS_DIR=$(dirname $0) -DROP_DIR=$(dirname $SCRIPTS_DIR) - -# Go to drop directory -cd $DROP_DIR -# convert to full path -DROP_DIR=`pwd` -echo "Current working directory: $DROP_DIR" - -DEPLOY_DIR=$DROP_DIR/deploy - -if [ -s $DEPLOY_DIR ]; then - rm -rf $DEPLOY_DIR/* -else - mkdir $DEPLOY_DIR -fi - -DEPLOY_SCRIPTS_DIR=$DEPLOY_DIR/scripts - -mkdir -p $DEPLOY_SCRIPTS_DIR - -echo "Copy artifacts to folder: $DEPLOY_DIR" -cp $DROP_DIR/app.yaml $DEPLOY_DIR -cp $DROP_DIR/indexer-gcp-*.jar $DEPLOY_DIR -cp $DROP_DIR/testing.zip $DEPLOY_DIR -cp $DROP_DIR/scripts/* $DEPLOY_SCRIPTS_DIR -chmod a+x $DEPLOY_SCRIPTS_DIR/*.sh - -# Go to deploy directory -cd $DEPLOY_DIR -echo "Current working directory: $DEPLOY_DIR" - -source $DEPLOY_SCRIPTS_DIR/config.sh - -echo "Deploying to gcp" -$DEPLOY_SCRIPTS_DIR/deploy2gcp.sh -echo "Deployed to gcp" \ No newline at end of file diff --git a/provider/indexer-gcp/scripts/deploy2gcp.sh.tmpl b/provider/indexer-gcp/scripts/deploy2gcp.sh.tmpl deleted file mode 100644 index b3f5589121c6763544d3a2528b479a157bf5fd94..0000000000000000000000000000000000000000 --- a/provider/indexer-gcp/scripts/deploy2gcp.sh.tmpl +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/bash - -# Exit as soon as a command fails -set -e - -{{$definitionName := getenv "BUILD_DEFINITIONNAME" -}} -{{$sourceBranchName := getenv "BUILD_SOURCEBRANCHNAME" -}} -{{$buildNumber := getenv "BUILD_BUILDNUMBER" -}} - -BUILD_DEFINITIONNAME={{$definitionName}} -BUILD_SOURCEBRANCHNAME={{$sourceBranchName}} -BUILD_BUILDNUMBER={{$buildNumber}} - -SCRIPTS_DIR=$(dirname $0) -DEPLOY_DIR=$(dirname $SCRIPTS_DIR) - -# Go to deploy directory -cd $DEPLOY_DIR -# convert to full path -DEPLOY_DIR=`pwd` -echo "Current working directory: $DEPLOY_DIR" - -source $SCRIPTS_DIR/config.sh - -echo "This script will deploy the app to $PROJECT_ID" - -if [ "$REGION" = "" ] -then - REGION=$(gcloud config get-value compute/region) -fi - -echo "Environment" -echo " Project = $PROJECT_ID" -echo " Compute zone = $CLOUDSDK_COMPUTE_ZONE" -echo " Build definition = $BUILD_DEFINITIONNAME" -echo " Source branch = $BUILD_SOURCEBRANCHNAME" -echo " Build number = $BUILD_BUILDNUMBER" -echo " Directory = $DEPLOY_DIR" - -VERSION_NUMBER=$BUILD_BUILDNUMBER -VERSION_NUMBER=$(echo "$VERSION_NUMBER" | tr _ - | tr . - | tr '[:upper:]' '[:lower:]') - -count=$(gcloud app services list --project $PROJECT_ID | grep os-indexer | wc -l) -if [ $count -gt 0 ]; then - CURRENT_VERSION=$(gcloud app services describe os-indexer --project $PROJECT_ID --format=json | jq --raw-output '.split.allocations | keys[0]') -else - CURRENT_VERSION="" -fi - -echo "Current version = $CURRENT_VERSION" -echo "Version to be deployed = $VERSION_NUMBER" - -if [ "$VERSION_NUMBER" != "$CURRENT_VERSION" -o "$BUILD_FORCE_DEPLOY" = "true" ] -then - SERVICE_NAME="os-indexer" - # If the version $VERSION_NUMBER already exists, but not serving traffic, gcloud app deploy will fail. In this case, simply start that version and migrate traffic to it - doesVersionExist=`gcloud app versions list --service=$SERVICE_NAME --project=$PROJECT_ID | grep $VERSION_NUMBER | wc -l` - if [ "$doesVersionExist" -eq "1" ] - then - echo "Starting version $VERSION_NUMBER" - gcloud app versions start $VERSION_NUMBER --service=$SERVICE_NAME --project=$PROJECT_ID --quiet - echo "Migrating all traffic to version $VERSION_NUMBER" - gcloud app services set-traffic $SERVICE_NAME --splits $VERSION_NUMBER=1 --project=$PROJECT_ID --quiet - else - export INDEXER_HOSTNAME="os-indexer-dot-$PROJECT_ID.appspot.com" - - echo "Replacing GOOGLE_CLOUD_PROJECT_PLACE_HOLDER with $PROJECT_ID" - sed -i "s|GOOGLE_CLOUD_PROJECT_PLACE_HOLDER|$PROJECT_ID|g" app.yaml - sed -i -e "s|AUTHORIZE_API_VAR|$AUTHORIZE_API|g" app.yaml - sed -i -e "s|CRON_JOB_IP_VAR|$CRON_JOB_IP|g" app.yaml - sed -i -e "s|LEGAL_HOSTNAME_VAR|$LEGAL_HOSTNAME|g" app.yaml - sed -i -e "s|REGION_VAR|$REGION|g" app.yaml - sed -i -e "s|ENVIRONMENT|$ENVIRONMENT|g" app.yaml - - echo "Content of app.yaml:" - cat app.yaml - - echo "Deploying $INDEXER_HOSTNAME service" - gcloud app deploy --project=$PROJECT_ID --version=$VERSION_NUMBER app.yaml - echo "$INDEXER_HOSTNAME service deployed successfully" - - fi -else - echo "Not deploying the application because $VERSION_NUMBER is already deployed and force deploy flag is not set to true" -fi diff --git a/provider/indexer-gcp/scripts/stage-artifacts.sh b/provider/indexer-gcp/scripts/stage-artifacts.sh deleted file mode 100644 index 33e36f2c3a6430017f35f40f27f49acb7590fe55..0000000000000000000000000000000000000000 --- a/provider/indexer-gcp/scripts/stage-artifacts.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -# Exit as soon as a command fails -set -e - -if [ ! $# = 1 ]; then - echo "Usage: $0 dir" - exit 1 -fi - -STAGE_DIR=$1 - -cd $BUILD_REPOSITORY_LOCALPATH/provider/indexer-gcp/scripts - -source ./config.sh - -#apply gomplate to deploy2gcp.sh.tmpl -gomplate -f ./deploy2gcp.sh.tmpl -o ./deploy2gcp.sh -chmod a+x ./*.sh -echo "Contents of deploy2gcp.sh:" -cat ./deploy2gcp.sh - -cd .. - -# Upload all build and deploy scripts as artifacts -cp -R ./scripts $STAGE_DIR -# Upload the build generated .jar file as an artifact -cp ./target/indexer-gcp-*-spring-boot.jar $STAGE_DIR - -echo "Staging deployment artifacts to folder: $STAGE_DIR" -cp ./src/main/appengine/app.yaml $STAGE_DIR - -# set current directory back to build repo root -cd $BUILD_REPOSITORY_LOCALPATH - -# Zip integration tests and upload it as artifact -pushd testing -zip -r testing.zip * -cp testing.zip $STAGE_DIR -popd - diff --git a/testing/indexer-test-gcp/pom.xml b/testing/indexer-test-gc/pom.xml similarity index 98% rename from testing/indexer-test-gcp/pom.xml rename to testing/indexer-test-gc/pom.xml index b6a4f0aeb225e62704bd9bebf0f016c3870044aa..b37d8200a20e535e0d4a75eccc55c7064ca619b7 100644 --- a/testing/indexer-test-gcp/pom.xml +++ b/testing/indexer-test-gc/pom.xml @@ -11,7 +11,7 @@ </parent> <groupId>org.opengroup.osdu.indexer</groupId> - <artifactId>indexer-test-gcp</artifactId> + <artifactId>indexer-test-gc</artifactId> <version>0.19.0-SNAPSHOT</version> <packaging>jar</packaging> diff --git a/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/record/RunTest.java b/testing/indexer-test-gc/src/test/java/org/opengroup/osdu/step_definitions/index/record/RunTest.java similarity index 100% rename from testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/record/RunTest.java rename to testing/indexer-test-gc/src/test/java/org/opengroup/osdu/step_definitions/index/record/RunTest.java diff --git a/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/record/Steps.java b/testing/indexer-test-gc/src/test/java/org/opengroup/osdu/step_definitions/index/record/Steps.java similarity index 100% rename from testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/record/Steps.java rename to testing/indexer-test-gc/src/test/java/org/opengroup/osdu/step_definitions/index/record/Steps.java diff --git a/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/info/RunTest.java b/testing/indexer-test-gc/src/test/java/org/opengroup/osdu/step_definitions/info/RunTest.java similarity index 100% rename from testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/info/RunTest.java rename to testing/indexer-test-gc/src/test/java/org/opengroup/osdu/step_definitions/info/RunTest.java diff --git a/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/info/Steps.java b/testing/indexer-test-gc/src/test/java/org/opengroup/osdu/step_definitions/info/Steps.java similarity index 100% rename from testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/info/Steps.java rename to testing/indexer-test-gc/src/test/java/org/opengroup/osdu/step_definitions/info/Steps.java diff --git a/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/util/GCPHTTPClient.java b/testing/indexer-test-gc/src/test/java/org/opengroup/osdu/util/GCPHTTPClient.java similarity index 100% rename from testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/util/GCPHTTPClient.java rename to testing/indexer-test-gc/src/test/java/org/opengroup/osdu/util/GCPHTTPClient.java diff --git a/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/util/JwtTokenUtil.java b/testing/indexer-test-gc/src/test/java/org/opengroup/osdu/util/JwtTokenUtil.java similarity index 100% rename from testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/util/JwtTokenUtil.java rename to testing/indexer-test-gc/src/test/java/org/opengroup/osdu/util/JwtTokenUtil.java diff --git a/testing/indexer-test-gcp/src/test/resources/logback-test.xml b/testing/indexer-test-gc/src/test/resources/logback-test.xml similarity index 100% rename from testing/indexer-test-gcp/src/test/resources/logback-test.xml rename to testing/indexer-test-gc/src/test/resources/logback-test.xml diff --git a/testing/pom.xml b/testing/pom.xml index 47dba683f267f21c38e9a0c66215a3bb253024e1..498df3dffccd76a45ef169e96f9c793419c143b8 100644 --- a/testing/pom.xml +++ b/testing/pom.xml @@ -35,7 +35,7 @@ <modules> <module>indexer-test-core</module> - <module>indexer-test-gcp</module> + <module>indexer-test-gc</module> <module>indexer-test-aws</module> <module>indexer-test-azure</module> <module>indexer-test-ibm</module>