diff --git a/.github/workflows/awsdeploy.yml b/.github/workflows/awsdeploy.yml index 2634b0c47..bcb781076 100644 --- a/.github/workflows/awsdeploy.yml +++ b/.github/workflows/awsdeploy.yml @@ -67,27 +67,3 @@ jobs: secrets: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - - deploy-intg-submissions: - uses: ./.github/workflows/deploy-template.yml - needs: deploy-core - with: - service: integration-submissions - environment: ${{ inputs.environment }} - proper-name: ${{ inputs.proper-name }} - image-tag-override: ${{ inputs.image-tag-override }} - secrets: - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - - deploy-intg-evaluations: - uses: ./.github/workflows/deploy-template.yml - needs: deploy-core - with: - service: integration-evaluations - environment: ${{ inputs.environment }} - proper-name: ${{ inputs.proper-name }} - image-tag-override: ${{ inputs.image-tag-override }} - secrets: - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/ecrbuild-all.yml b/.github/workflows/ecrbuild-all.yml index 572443283..154f87bca 100644 --- a/.github/workflows/ecrbuild-all.yml +++ b/.github/workflows/ecrbuild-all.yml @@ -43,16 +43,6 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - build-intg-submissions: - uses: ./.github/workflows/ecrbuild-template.yml - # needs: - # - build-base - with: - package: integration-submissions - secrets: - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - build-jobs: uses: ./.github/workflows/ecrbuild-template.yml # needs: @@ -63,13 +53,3 @@ jobs: secrets: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - - build-intg-evaluations: - uses: ./.github/workflows/ecrbuild-template.yml - # needs: - # - build-base - with: - package: integration-evaluations - secrets: - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/Dockerfile b/Dockerfile index e87e6eb14..c4b581031 100644 --- a/Dockerfile +++ b/Dockerfile @@ -157,4 +157,3 @@ COPY --from=withpackage --chown=node:node /usr/src/app/integrations/evaluations/ COPY --from=withpackage --chown=node:node /usr/src/app/core/.env.docker ./integrations/evaluations/.env CMD node integrations/evaluations/server.js - diff --git a/core/app/api/v0/integrations/[...ts-rest]/_requests.http b/core/app/api/v0/integrations/[...ts-rest]/_requests.http deleted file mode 100644 index f416fde2c..000000000 --- a/core/app/api/v0/integrations/[...ts-rest]/_requests.http +++ /dev/null @@ -1,77 +0,0 @@ -@hostname = localhost -@port = 3000 -@host = {{hostname}}:{{port}} -@contentType = application/json -@token = super_secret_key -@submissionsIntegrationId = af837db6-9a1f-4b38-878f-f84fde8a0b50 -@submissionPubTypeId = e09e894f-b3cf-4e9b-aeaa-48f7cb8c6225 -@evaluationSummaryPubTypeId = 2981e8ca-dabe-416f-bce0-fcc418036529 -@evaluationPubTypeId = 81d18691-3ac4-42c1-b55b-d3b2c065b9ad -@evaluationsIntegrationId = d6177ad1-ae7d-43b7-9c12-dcd31a38f255 - -# Create a submission with an evaluation summary and two evaluations -POST http://{{host}}/api/v0/integrations/{{submissionsIntegrationId}}/pubs HTTP/1.1 -content-type: {{contentType}} -authorization: Bearer {{token}} - -{ - "pubTypeId": "{{submissionPubTypeId}}", - "values": { - "Title": "When Celebrities Speak: A Nationwide Twitter Experiment Promoting Vaccination In Indonesia", - "DOI": "10.1007/s00216-020-02650-1", - "URL": "https://link.springer.com/article/10.1007/s00216-020-02650-1", - "Abstract": "The paper's abstract." - }, - "children": [ - { - "pubTypeId": "{{evaluationSummaryPubTypeId}}", - "values": { - "Title": "Evaluation Summary of \"A Paper\"", - "Description": "", - "Manager's Notes": "hi" - }, - "children": [ - { - "pubTypeId": "{{evaluationPubTypeId}}", - "values": { - "Title": "Evaluation 1 of \"When Celebrities Speak: A Nationwide Twitter Experiment Promoting Vaccination In Indonesia\"", - "Description": "Evaluation A" - } - }, - { - "pubTypeId": "{{evaluationPubTypeId}}", - "values": { - "Title": "Evaluation 2 of \"When Celebrities Speak: A Nationwide Twitter Experiment Promoting Vaccination In Indonesia\"", - "Description": "Evaluation B" - } - } - ] - } - ] -} - -### - -# Reparent test -POST http://{{host}}/api/v0/integrations/{{submissionsIntegrationId}}/pubs HTTP/1.1 -content-type: {{contentType}} -authorization: Bearer {{token}} - -{ - "pubTypeId": "{{submissionPubTypeId}}", - "values": {}, - "id": "ab0fcb95-d3b9-4eee-9041-783062c0f8e7", - "parentId": "01bf280d-5b34-48ee-b836-2318b773a6b9" -} - -### - -# Generate Signed URL test -POST http://{{host}}/api/v0/integrations/{{evaluationsIntegrationId}}/asset HTTP/1.1 -content-type: {{contentType}} -authorization: Bearer {{token}} - -{ - "pubId": "ab0fcb95-d3b9-4eee-9041-783062c0f8e7", - "fileName": "stuff.jpg" -} diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index dd2792406..273a5bb58 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -61,76 +61,6 @@ services: # jobs-nginx: # No Nginx for jobs, because it does not take requests - integration-evaluations: - build: - context: . - args: - - PACKAGE=integration-evaluations - container_name: integration-evaluations - env_file: ./.env.docker-compose - environment: - - SENTRY_AUTH_TOKEN=omitted - - - OTEL_SERVICE_NAME=integration-evaluations.integration-evaluations - - PUBPUB_URL=http://localhost:8080 - depends_on: - - core - networks: - - app-network - ports: - - "30001:3000" - - integration-evaluations-nginx: - build: ./infrastructure/nginx - container_name: integration-evaluations-nginx - environment: - - NGINX_LISTEN_PORT=8080 - - NGINX_PREFIX=/ - - NGINX_UPSTREAM_HOST=integration-evaluations - - NGINX_UPSTREAM_PORT=3000 - - OTEL_SERVICE_NAME=integration-evaluations.nginx - depends_on: - - integration-evaluations - networks: - - app-network - ports: - - "3001:8080" - - integration-submissions: - build: - context: . - args: - - PACKAGE=integration-submissions - container_name: integration-submissions - env_file: ./.env.docker-compose - environment: - - SENTRY_AUTH_TOKEN=omitted - - - OTEL_SERVICE_NAME=integration-submissions.integration-submissions - - PUBPUB_URL=http://localhost:8080 - depends_on: - - core - networks: - - app-network - ports: - - "30002:3000" - - integration-submissions-nginx: - build: ./infrastructure/nginx - container_name: integration-submissions-nginx - environment: - - NGINX_LISTEN_PORT=8080 - - NGINX_PREFIX=/ - - NGINX_UPSTREAM_HOST=integration-submissions - - NGINX_UPSTREAM_PORT=3000 - - OTEL_SERVICE_NAME=integration-submissions.nginx - depends_on: - - integration-submissions - networks: - - app-network - ports: - - "3002:8080" - db: extends: file: docker-compose.base.yml diff --git a/infrastructure/terraform/environments/stevie/main.tf b/infrastructure/terraform/environments/stevie/main.tf index 1333220b7..102901e8e 100644 --- a/infrastructure/terraform/environments/stevie/main.tf +++ b/infrastructure/terraform/environments/stevie/main.tf @@ -43,8 +43,6 @@ locals { route53_zone_id = "Z00255803PJ09HVWNKPVY" ecr_repository_urls = { core = "246372085946.dkr.ecr.us-east-1.amazonaws.com/pubpub-v7-core" - intg_evaluations = "246372085946.dkr.ecr.us-east-1.amazonaws.com/pubpub-v7-integration-evaluations" - intg_submissions = "246372085946.dkr.ecr.us-east-1.amazonaws.com/pubpub-v7-integration-submissions" jobs = "246372085946.dkr.ecr.us-east-1.amazonaws.com/pubpub-v7-jobs" nginx = "246372085946.dkr.ecr.us-east-1.amazonaws.com/nginx" root = "246372085946.dkr.ecr.us-east-1.amazonaws.com/pubpub-v7" diff --git a/infrastructure/terraform/modules/deployment/main.tf b/infrastructure/terraform/modules/deployment/main.tf index 26c048168..a9a1b298f 100644 --- a/infrastructure/terraform/modules/deployment/main.tf +++ b/infrastructure/terraform/modules/deployment/main.tf @@ -145,74 +145,6 @@ module "service_flock" { } } -module "service_intg_submissions" { - source = "../container-generic" - - service_name = "integration-submissions" - cluster_info = module.cluster.cluster_info - - repository_url = var.ecr_repository_urls.intg_submissions - nginx_image = "${var.ecr_repository_urls.nginx}:latest" - - listener = { - service_name = "submissions" - public = true - path_prefix = "/intg/submissions/" - # lower number means this will be evaluated BEFORE the catch-all to core. - rule_priority = 80 - from_port = 3000 - to_port = 3000 - protocol = "tcp" - } - - configuration = { - environment = [ - { name = "PUBPUB_URL", value = local.PUBPUB_URL }, - { name = "HOSTNAME", value = var.HOSTNAME }, - ] - - secrets = [ - { name = "SENTRY_AUTH_TOKEN", valueFrom = module.core_dependency_services.secrets.sentry_auth_token }, - { name = "API_KEY", valueFrom = module.core_dependency_services.secrets.api_key }, - { name = "HONEYCOMB_API_KEY", valueFrom = module.core_dependency_services.secrets.honeycomb_api_key }, - ] - } -} - -module "service_intg_evaluations" { - source = "../container-generic" - - service_name = "integration-evaluations" - cluster_info = module.cluster.cluster_info - - repository_url = var.ecr_repository_urls.intg_evaluations - nginx_image = "${var.ecr_repository_urls.nginx}:latest" - - listener = { - service_name = "evaluations" - public = true - path_prefix = "/intg/evaluations/" - # these may not be equal, so just set it adjacent to non-conflicting rule for submissions - rule_priority = 81 - from_port = 3000 - to_port = 3000 - protocol = "tcp" - } - - configuration = { - environment = [ - { name = "PUBPUB_URL", value = local.PUBPUB_URL }, - { name = "HOSTNAME", value = var.HOSTNAME }, - ] - - secrets = [ - { name = "SENTRY_AUTH_TOKEN", valueFrom = module.core_dependency_services.secrets.sentry_auth_token }, - { name = "API_KEY", valueFrom = module.core_dependency_services.secrets.api_key }, - { name = "HONEYCOMB_API_KEY", valueFrom = module.core_dependency_services.secrets.honeycomb_api_key }, - ] - } -} - module "service_bastion" { source = "../container-generic" diff --git a/infrastructure/terraform/modules/deployment/variables.tf b/infrastructure/terraform/modules/deployment/variables.tf index 2075ead74..718e6e14f 100644 --- a/infrastructure/terraform/modules/deployment/variables.tf +++ b/infrastructure/terraform/modules/deployment/variables.tf @@ -28,8 +28,6 @@ variable "ecr_repository_urls" { description = "URLs for ECR repositories created at a global level" type = object({ core = string - intg_evaluations = string - intg_submissions = string jobs = string nginx = string root = string diff --git a/infrastructure/terraform/modules/ecr-repositories/main.tf b/infrastructure/terraform/modules/ecr-repositories/main.tf index a2f1b390d..862bb992e 100644 --- a/infrastructure/terraform/modules/ecr-repositories/main.tf +++ b/infrastructure/terraform/modules/ecr-repositories/main.tf @@ -30,24 +30,6 @@ resource "aws_ecr_repository" "pubpub_v7_core" { } } -resource "aws_ecr_repository" "pubpub_v7_intg_submissions" { - name = "pubpub-v7-integration-submissions" - image_tag_mutability = "MUTABLE" - - image_scanning_configuration { - scan_on_push = false # can set this to true if we want - } -} - -resource "aws_ecr_repository" "pubpub_v7_intg_evaluations" { - name = "pubpub-v7-integration-evaluations" - image_tag_mutability = "MUTABLE" - - image_scanning_configuration { - scan_on_push = false # can set this to true if we want - } -} - resource "aws_ecr_repository" "pubpub_v7_jobs" { name = "pubpub-v7-jobs" image_tag_mutability = "MUTABLE" diff --git a/infrastructure/terraform/modules/ecr-repositories/outputs.tf b/infrastructure/terraform/modules/ecr-repositories/outputs.tf index f09a7f34a..42127d864 100644 --- a/infrastructure/terraform/modules/ecr-repositories/outputs.tf +++ b/infrastructure/terraform/modules/ecr-repositories/outputs.tf @@ -1,8 +1,6 @@ output "ecr_repository_urls" { value = { core = aws_ecr_repository.pubpub_v7_core.repository_url - intg_evaluations = aws_ecr_repository.pubpub_v7_intg_evaluations.repository_url - intg_submissions = aws_ecr_repository.pubpub_v7_intg_submissions.repository_url jobs = aws_ecr_repository.pubpub_v7_jobs.repository_url nginx = aws_ecr_repository.nginx.repository_url root = aws_ecr_repository.pubpub_v7.repository_url diff --git a/integrations/evaluations-proxy/Dockerfile b/integrations/evaluations-proxy/Dockerfile deleted file mode 100644 index 01bad77c4..000000000 --- a/integrations/evaluations-proxy/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM nginx -COPY nginx.conf /etc/nginx/nginx.conf diff --git a/integrations/evaluations-proxy/nginx.conf b/integrations/evaluations-proxy/nginx.conf deleted file mode 100644 index e2d61d2fe..000000000 --- a/integrations/evaluations-proxy/nginx.conf +++ /dev/null @@ -1,32 +0,0 @@ -worker_processes auto; - -error_log /var/log/nginx/error.log notice; -pid /var/run/nginx.pid; - -events { - worker_connections 1024; -} - -http { - upstream backend { - server app.pubpub.org:443; - } - - server { - listen 80; - rewrite_log on; - - location / { - rewrite /intg/evaluations/(.*) /$1 break; - - proxy_pass https://backend/intg/evaluations$uri$is_args$args; - - proxy_set_header Host $host; - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Real-IP $remote_addr; - - add_header Access-Control-Allow-Origin *; - } - } -} diff --git a/integrations/evaluations-proxy/package.json b/integrations/evaluations-proxy/package.json deleted file mode 100644 index 7fdd80e8c..000000000 --- a/integrations/evaluations-proxy/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "evaluations-proxy", - "type": "module", - "version": "0.0.0", - "private": true -} diff --git a/integrations/submissions-proxy/Dockerfile b/integrations/submissions-proxy/Dockerfile deleted file mode 100644 index 01bad77c4..000000000 --- a/integrations/submissions-proxy/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM nginx -COPY nginx.conf /etc/nginx/nginx.conf diff --git a/integrations/submissions-proxy/nginx.conf b/integrations/submissions-proxy/nginx.conf deleted file mode 100644 index 25e923416..000000000 --- a/integrations/submissions-proxy/nginx.conf +++ /dev/null @@ -1,32 +0,0 @@ -worker_processes auto; - -error_log /var/log/nginx/error.log notice; -pid /var/run/nginx.pid; - -events { - worker_connections 1024; -} - -http { - upstream backend { - server app.pubpub.org:443; - } - - server { - listen 80; - rewrite_log on; - - location / { - rewrite /intg/submissions/(.*) /$1 break; - - proxy_pass https://backend/intg/submissions$uri$is_args$args; - - proxy_set_header Host $host; - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Real-IP $remote_addr; - - add_header Access-Control-Allow-Origin *; - } - } -} diff --git a/integrations/submissions-proxy/package.json b/integrations/submissions-proxy/package.json deleted file mode 100644 index 1d56fdac8..000000000 --- a/integrations/submissions-proxy/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "submissions-proxy", - "type": "module", - "version": "0.0.0", - "private": true -} diff --git a/render.yaml b/render.yaml deleted file mode 100644 index 438909656..000000000 --- a/render.yaml +++ /dev/null @@ -1,14 +0,0 @@ -previewsEnabled: false -services: - # integration-submissions - - type: web - name: integration-submissions - env: docker - rootDir: ./integrations/submissions-proxy - dockerfilePath: ./Dockerfile - # integration-evaluations - - type: web - name: integration-evaluations - env: docker - rootDir: ./integrations/evaluations-proxy - dockerfilePath: ./Dockerfile