From 03225ae2ba9117f0be26eb85803e5ba84bb06956 Mon Sep 17 00:00:00 2001 From: asimazmi <--global> Date: Mon, 27 Apr 2020 19:06:02 -0400 Subject: [PATCH] #85 #81 ip's changed --- Frontend/.env | 2 +- Usermanagement_API_Gateway/Backend/.env | 2 +- .../Backend/routes/apiGateway.js | 2 +- istiofiles/http-gateway.yaml | 14 +++++++++++ istiofiles/virtualservice-external.yaml | 24 +++++++++++++++++++ 5 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 istiofiles/http-gateway.yaml create mode 100644 istiofiles/virtualservice-external.yaml diff --git a/Frontend/.env b/Frontend/.env index a005f73..4a738eb 100644 --- a/Frontend/.env +++ b/Frontend/.env @@ -1 +1 @@ -REACT_APP_API_URL=http://149.165.169.178:32178 \ No newline at end of file +REACT_APP_API_URL=http://129.114.104.27:32178 \ No newline at end of file diff --git a/Usermanagement_API_Gateway/Backend/.env b/Usermanagement_API_Gateway/Backend/.env index 6bf477c..2fefa71 100644 --- a/Usermanagement_API_Gateway/Backend/.env +++ b/Usermanagement_API_Gateway/Backend/.env @@ -1,4 +1,4 @@ MONGO_URI=mongodb+srv://suyashporedi:suyash1995@cluster0-eo5mq.mongodb.net/test?retryWrites=true&w=majority PORT=32178 JWT_SECRET=KMLDJFW90988F8392JFFAFDGKJ -CLIENT_URL=http://149.165.169.178:32177 \ No newline at end of file +CLIENT_URL=http://129.114.104.27:32177 \ No newline at end of file diff --git a/Usermanagement_API_Gateway/Backend/routes/apiGateway.js b/Usermanagement_API_Gateway/Backend/routes/apiGateway.js index dff3f6a..f219539 100644 --- a/Usermanagement_API_Gateway/Backend/routes/apiGateway.js +++ b/Usermanagement_API_Gateway/Backend/routes/apiGateway.js @@ -11,7 +11,7 @@ const { sendMsg }=require('../controllers/queue'); router.get('/sessionData/:userid',function(req, res){ var userid = req.params.userid; console.log(userid); - res.redirect(307,'http://149.165.169.178:32179/rest/db/'+userid); + res.redirect(307,'http://129.114.104.27:32179/rest/db/'+userid); }); module.exports = router; diff --git a/istiofiles/http-gateway.yaml b/istiofiles/http-gateway.yaml new file mode 100644 index 0000000..5573bce --- /dev/null +++ b/istiofiles/http-gateway.yaml @@ -0,0 +1,14 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: Gateway +metadata: + name: http-gateway +spec: + selector: + istio: ingressgateway + servers: + - port: + number: 80 + name: http + protocol: HTTP + hosts: + - "*" \ No newline at end of file diff --git a/istiofiles/virtualservice-external.yaml b/istiofiles/virtualservice-external.yaml new file mode 100644 index 0000000..1efd0cd --- /dev/null +++ b/istiofiles/virtualservice-external.yaml @@ -0,0 +1,24 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + name: sa-external-services +spec: + hosts: + - "*" + gateways: + - http-gateway # 1 + http: + - match: + - uri: + exact: / + - uri: + exact: /callback + - uri: + prefix: /static + - uri: + regex: '^.*\.(ico|png|jpg)$' + route: + - destination: + host: ui + port: + number: 80 \ No newline at end of file