From 959c52a78ee482b665668a64afe8e72da8aa6298 Mon Sep 17 00:00:00 2001 From: Andrey Platov Date: Sun, 29 Aug 2021 09:20:14 +0200 Subject: [PATCH] switch to transactor in kubernetes Signed-off-by: Andrey Platov --- cloud/app/index.ts | 13 ++++++++++++- server/server/kube/ingress.yml | 24 ++++++++++++++++++++++++ server/server/kube/transactor.yml | 5 +++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 server/server/kube/ingress.yml diff --git a/cloud/app/index.ts b/cloud/app/index.ts index d3586c4191..2d9410e188 100644 --- a/cloud/app/index.ts +++ b/cloud/app/index.ts @@ -106,7 +106,8 @@ const api = new awsx.apigateway.API("login", { body = Buffer.from(body as string, 'base64').toString() } - const result = handle(body, 'wss://pacific-refuge-43514.herokuapp.com/') + // const result = handle(body, 'wss://pacific-refuge-43514.herokuapp.com/') + const result = handle(body, 'wss://transactor.hc.engineering/') return { statusCode: result.statusCode, headers: { @@ -285,3 +286,13 @@ new aws.route53.Record("frontRecord", { "8.9.31.18" ] }) + +new aws.route53.Record("transactorRecord", { + name: "transactor.hc.engineering", + zoneId: zoneId, + type: "A", + ttl: 300, + records: [ + "8.9.31.18" + ] +}) diff --git a/server/server/kube/ingress.yml b/server/server/kube/ingress.yml new file mode 100644 index 0000000000..1110c3ba03 --- /dev/null +++ b/server/server/kube/ingress.yml @@ -0,0 +1,24 @@ + +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + kubernetes.io/ingress.class: "nginx" + cert-manager.io/issuer: "letsencrypt-prod" + name: transactor-ingress +spec: + tls: + - hosts: + - transactor.hc.engineering + secretName: transactor-tls + rules: + - host: transactor.hc.engineering + http: + paths: + - backend: + service: + name: transactor + port: + number: 80 + path: / + pathType: Prefix diff --git a/server/server/kube/transactor.yml b/server/server/kube/transactor.yml index 640296ec9b..58b5fb801a 100644 --- a/server/server/kube/transactor.yml +++ b/server/server/kube/transactor.yml @@ -19,6 +19,11 @@ spec: ports: - containerPort: 3333 imagePullPolicy: Always + env: + - name: MONGO_URL + value: mongodb://root:WZCwnHRazX@mng-mongodb:27017/ + - name: ELASTIC_URL + value: http://dev-elasticsearch-coordinating-only:9200/ --- apiVersion: v1 kind: Service