diff --git a/db/elasticsearch/dejavu/Dockerfile b/db/elasticsearch/dejavu/Dockerfile deleted file mode 100644 index b8125500fa..0000000000 --- a/db/elasticsearch/dejavu/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM appbaseio/dejavu:3.6.0 diff --git a/docker-compose.yml b/docker-compose.yml index 1d0b2bdcad..aad28bd7b0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -122,26 +122,6 @@ services: # retries: 3 # start_period: 15s - dejavu: - image: tno:dejavu - profiles: - - all - - utility - - elastic - - service - restart: "no" - container_name: tno-dejavu - build: - context: db/elasticsearch/dejavu - ports: - - ${ELASTIC_DEJAVU_HTTP_PORT:-40005}:1358 - extra_hosts: - - host.docker.internal:host-gateway - links: - - elastic - networks: - - tno - ####################### API ####################### api: image: tno:api diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 78bb31b5ca..daa3ff9b25 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -193,7 +193,6 @@ Nginx provides a reverse proxy, which handles communication with the API. | Kafka API | rest-proxy | [http://localhost:40104](http://localhost:40104) | | Kafka Kowl | kowl | [http://localhost:40180](http://localhost:40180) | | Elasticsearch | elastic | [http://localhost:40003](http://localhost:40003) | -| Dejavu | dejavu | [http://localhost:40005](http://localhost:40005) | Once the core containers are running you can then start up the other services and utilities. Locally you will probably never want everything running at the same time. diff --git a/openshift/kustomize/elastic/base/config-map.yaml b/openshift/kustomize/elastic/base/config-map.yaml index a5f758bc1c..737b7b55fd 100644 --- a/openshift/kustomize/elastic/base/config-map.yaml +++ b/openshift/kustomize/elastic/base/config-map.yaml @@ -78,8 +78,8 @@ data: http: port: 9200 cors: - allow-origin: /https?:\/\/(.*\.gov\.bc\.ca|dejavu\.appbase\.io)/ - # allow-origin: https://tno-dev.apps.silver.devops.gov.bc.ca,https://tno-dev-elastic.apps.silver.devops.gov.bc.ca,https://tno-dejavu.apps.silver.devops.gov.bc.ca,https://dejavu.appbase.io + allow-origin: /https?:\/\/(.*\.gov\.bc\.ca)/ + # allow-origin: https://tno-dev.apps.silver.devops.gov.bc.ca,https://tno-dev-elastic.apps.silver.devops.gov.bc.ca enabled: true allow-headers: X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization,x-search-query,x-search-state,x-search-filters allow-credentials: true diff --git a/openshift/kustomize/elastic/base/route.yaml b/openshift/kustomize/elastic/base/route.yaml index 2a1425e1aa..ca19c2395e 100644 --- a/openshift/kustomize/elastic/base/route.yaml +++ b/openshift/kustomize/elastic/base/route.yaml @@ -26,31 +26,3 @@ spec: # caCertificate: "" # certificate: "" # key: "" -# --- -# kind: Route -# apiVersion: route.openshift.io/v1 -# metadata: -# name: elastic-dejavu -# namespace: default -# annotations: -# haproxy.router.openshift.io/timeout: 60s -# labels: -# name: elastic -# part-of: tno -# version: 1.0.0 -# component: elastic -# managed-by: kustomize -# created-by: jeremy.foster -# spec: -# host: tno-dev-elastic.apps.silver.devops.gov.bc.ca -# path: / -# to: -# kind: Service -# name: elastic -# weight: 100 -# tls: -# insecureEdgeTerminationPolicy: Redirect -# termination: edge -# # caCertificate: "" -# # certificate: "" -# # key: "" diff --git a/openshift/kustomize/elastic/dejavu/base/deploy.yaml b/openshift/kustomize/elastic/dejavu/base/deploy.yaml deleted file mode 100644 index f7e61bdf67..0000000000 --- a/openshift/kustomize/elastic/dejavu/base/deploy.yaml +++ /dev/null @@ -1,58 +0,0 @@ ---- -# How the app will be deployed to the pod. -kind: DeploymentConfig -apiVersion: apps.openshift.io/v1 -metadata: - name: dejavu - namespace: default - annotations: - description: Defines how to deploy dejavu - labels: - name: dejavu - part-of: tno - version: 1.0.0 - component: dejavu - managed-by: kustomize - created-by: jeremy.foster -spec: - replicas: 1 - selector: - name: dejavu - part-of: tno - component: dejavu - strategy: - rollingParams: - intervalSeconds: 1 - maxSurge: 25% - maxUnavailable: 25% - timeoutSeconds: 600 - updatePeriodSeconds: 1 - type: Rolling - triggers: - - type: ConfigChange - template: - metadata: - name: dejavu - labels: - name: dejavu - part-of: tno - component: dejavu - spec: - containers: - - name: dejavu - image: appbaseio/dejavu:3.6.0 - imagePullPolicy: Always - ports: - - containerPort: 1358 - protocol: TCP - resources: - requests: - cpu: 10m - memory: 100Mi - limits: - cpu: 50m - memory: 150Mi - dnsPolicy: ClusterFirst - restartPolicy: Always - securityContext: {} - terminationGracePeriodSeconds: 30 diff --git a/openshift/kustomize/elastic/dejavu/base/kustomization.yaml b/openshift/kustomize/elastic/dejavu/base/kustomization.yaml deleted file mode 100644 index d5b56ee539..0000000000 --- a/openshift/kustomize/elastic/dejavu/base/kustomization.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: - - deploy.yaml - - services.yaml - - route.yaml - -generatorOptions: - disableNameSuffixHash: true diff --git a/openshift/kustomize/elastic/dejavu/base/route.yaml b/openshift/kustomize/elastic/dejavu/base/route.yaml deleted file mode 100644 index 9acbeefc49..0000000000 --- a/openshift/kustomize/elastic/dejavu/base/route.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -kind: Route -apiVersion: route.openshift.io/v1 -metadata: - name: dejavu - namespace: default - labels: - name: dejavu - part-of: tno - version: 1.0.0 - component: dejavu - managed-by: kustomize - created-by: jeremy.foster -spec: - host: tno-dejavu.apps.silver.devops.gov.bc.ca - path: / - port: - targetPort: 1358-tcp - tls: - insecureEdgeTerminationPolicy: Redirect - termination: edge - # caCertificate: "" - # certificate: "" - # key: "" - to: - kind: Service - name: dejavu - weight: 100 diff --git a/openshift/kustomize/elastic/dejavu/base/services.yaml b/openshift/kustomize/elastic/dejavu/base/services.yaml deleted file mode 100644 index fd09bc32ea..0000000000 --- a/openshift/kustomize/elastic/dejavu/base/services.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -kind: Service -apiVersion: v1 -metadata: - name: dejavu - namespace: default - annotations: - description: Exposes and load balances the application pods. - labels: - name: dejavu - part-of: tno - version: 1.0.0 - component: dejavu - managed-by: kustomize - created-by: jeremy.foster -spec: - type: ClusterIP - sessionAffinity: None - ports: - - name: 1358-tcp - port: 1358 - protocol: TCP - targetPort: 1358 - selector: - part-of: tno - component: dejavu diff --git a/openshift/kustomize/elastic/dejavu/overlays/tools/kustomization.yaml b/openshift/kustomize/elastic/dejavu/overlays/tools/kustomization.yaml deleted file mode 100644 index 6522794497..0000000000 --- a/openshift/kustomize/elastic/dejavu/overlays/tools/kustomization.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -namespace: 9b301c-tools - -resources: - - ../../base - -patches: - - target: - kind: Route - name: dejavu - patch: |- - - op: replace - path: /spec/host - value: tno-dejavu.apps.silver.devops.gov.bc.ca - - target: - kind: DeploymentConfig - name: dejavu - patch: |- - - op: replace - path: /spec/replicas - value: 1 - - op: replace - path: /spec/template/spec/containers/0/resources/requests/cpu - value: 10m - - op: replace - path: /spec/template/spec/containers/0/resources/requests/memory - value: 500Mi - - op: replace - path: /spec/template/spec/containers/0/resources/limits/cpu - value: 100m - - op: replace - path: /spec/template/spec/containers/0/resources/limits/memory - value: 2Gi diff --git a/openshift/kustomize/elastic/overlays/dev/kustomization.yaml b/openshift/kustomize/elastic/overlays/dev/kustomization.yaml index 621a720740..46f43b23d4 100644 --- a/openshift/kustomize/elastic/overlays/dev/kustomization.yaml +++ b/openshift/kustomize/elastic/overlays/dev/kustomization.yaml @@ -27,13 +27,6 @@ patches: - op: replace path: /spec/host value: dev.mmi.gov.bc.ca - - target: - kind: Route - name: elastic-dejavu - patch: |- - - op: replace - path: /spec/host - value: tno-dev-elastic.apps.silver.devops.gov.bc.ca - target: kind: StatefulSet name: elastic diff --git a/openshift/kustomize/elastic/overlays/test/kustomization.yaml b/openshift/kustomize/elastic/overlays/test/kustomization.yaml index 1e187f66ff..5e2753640b 100644 --- a/openshift/kustomize/elastic/overlays/test/kustomization.yaml +++ b/openshift/kustomize/elastic/overlays/test/kustomization.yaml @@ -27,13 +27,6 @@ patches: - op: replace path: /spec/host value: mmi.gov.bc.ca - - target: - kind: Route - name: elastic-dejavu - patch: |- - - op: replace - path: /spec/host - value: test.mmi.gov.bc.ca - target: kind: StatefulSet name: elastic diff --git a/tools/scripts/gen-env-files.sh b/tools/scripts/gen-env-files.sh index 2752102452..cdd4f7adf1 100755 --- a/tools/scripts/gen-env-files.sh +++ b/tools/scripts/gen-env-files.sh @@ -35,7 +35,6 @@ KEYCLOAK_HTTPS_PORT=$portKeycloakHttps ELASTIC_HTTP_PORT=$portElastic ELASTIC_COM_PORT=$portElasticCom -ELASTIC_DEJAVU_HTTP_PORT=$portDejavu AZURE_BLOB_PORT=$portAzureBlob AZURE_QUEUE_PORT=$portAzureQueue diff --git a/tools/scripts/variables.sh b/tools/scripts/variables.sh index 3a23155ffd..2c3e4fdc46 100755 --- a/tools/scripts/variables.sh +++ b/tools/scripts/variables.sh @@ -152,7 +152,6 @@ export portKeycloak=40001 export portKeycloakHttps=40002 export portElastic=40003 export portElasticCom=40004 -export portDejavu=40005 export portAzureBlob=40006 export portAzureQueue=40007 export portAzureTable=40008