From 8c1957ec1e2305e1ba8206f84d71addc4fe20bb8 Mon Sep 17 00:00:00 2001 From: VIVEK K B Date: Wed, 28 Dec 2022 12:57:55 +0530 Subject: [PATCH 01/22] ZBIO-4000 Changes for adding loadbalancers info --- ballot/ballot.yaml | 2 +- ecserver/ecserver.yaml | 4 ++-- election-commission/ec.yaml | 10 +++++----- loadbalancersexec.sh | 26 ++++++++++++++++++++++++++ voter/voter.yaml | 6 +++--- 5 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 loadbalancersexec.sh diff --git a/ballot/ballot.yaml b/ballot/ballot.yaml index 759a6345..14ba72ca 100644 --- a/ballot/ballot.yaml +++ b/ballot/ballot.yaml @@ -29,6 +29,6 @@ spec: spec: containers: - name: ballot - image: local-registry:5002/ballot:latest + image: vivekklp/ballot:latest ports: - containerPort: 8080 diff --git a/ecserver/ecserver.yaml b/ecserver/ecserver.yaml index f443a498..fc29cb99 100644 --- a/ecserver/ecserver.yaml +++ b/ecserver/ecserver.yaml @@ -12,7 +12,7 @@ spec: - name: ecserver port: 80 targetPort: 8081 - nodePort: 30081 + # nodePort: 30081 --- apiVersion: apps/v1 @@ -31,6 +31,6 @@ spec: spec: containers: - name: ecserver - image: local-registry:5002/ecserver:latest + image: vivekklp/ecserver:latest ports: - containerPort: 8081 diff --git a/election-commission/ec.yaml b/election-commission/ec.yaml index 3ed3cdc8..72d78cc5 100644 --- a/election-commission/ec.yaml +++ b/election-commission/ec.yaml @@ -11,8 +11,8 @@ spec: type: "roost-example" ports: - name: election-commission - port: 80 - targetPort: 80 + port: 8082 + targetPort: 8082 --- apiVersion: apps/v1 @@ -33,11 +33,11 @@ spec: spec: containers: - name: election-commission - image: local-registry:5002/election-commission:latest + image: vivekklp/election-commission:latest stdin: true tty: true env: - name: EC_SERVER_ENDPOINT - value: ecserver.10.10.0.10.nip.io + value: EC_SERVER_ENDPOINT_VALUE ports: - - containerPort: 80 + - containerPort: 8082 diff --git a/loadbalancersexec.sh b/loadbalancersexec.sh new file mode 100644 index 00000000..c1d7804b --- /dev/null +++ b/loadbalancersexec.sh @@ -0,0 +1,26 @@ +#!/bin/bash +kubectl apply -f ballot/ballot.yaml -n $ROOST_NAMESPACE +kubectl expose deployment ballot --type=LoadBalancer --name=my-ballot -n $ROOST_NAMESPACE + +sleep 5 + +ballot_loadbalancer=$(kubectl get svc -n $ROOST_NAMESPACE | grep my-ballot | awk '{print $4}') + +kubectl apply -f ecserver/ecserver.yaml -n $ROOST_NAMESPACE +kubectl expose deployment ecserver --type=LoadBalancer --name=my-ecserver -n $ROOST_NAMESPACE + +sleep 5 + +ecserver_loadbalancer=$(kubectl get svc -n $ROOST_NAMESPACE | grep my-ecserver | awk '{print $4}') + +sed -i -e "s#REACT_APP_BALLOT_ENDPOINT_VALUE#${ballot_loadbalancer}#" -e "s#REACT_APP_EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}#" voter/voter.yaml + +kubectl apply -f voter/voter.yaml -n $ROOST_NAMESPACE +kubectl expose deployment voter --type=LoadBalancer --name=my-voter -n $ROOST_NAMESPACE + +sleep 5 + +sed -i -e "s#EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}#" election-commission/ec.yaml + +kubectl apply -f election-commission/ec.yaml -n $ROOST_NAMESPACE +kubectl expose deployment election-commission --type=LoadBalancer --name=my-ec -n $ROOST_NAMESPACE diff --git a/voter/voter.yaml b/voter/voter.yaml index 41a81943..9c082fa7 100644 --- a/voter/voter.yaml +++ b/voter/voter.yaml @@ -33,13 +33,13 @@ spec: spec: containers: - name: voter - image: local-registry:5002/voter:latest + image: vivekklp/voter:latest stdin: true tty: true env: - name: REACT_APP_BALLOT_ENDPOINT - value: ballot.10.10.0.10.nip.io + value: REACT_APP_BALLOT_ENDPOINT_VALUE - name: REACT_APP_EC_SERVER_ENDPOINT - value: ecserver.10.10.0.10.nip.io + value: REACT_APP_EC_SERVER_ENDPOINT_VALUE ports: - containerPort: 80 From 1dc8d5f5b1c9bf4382949fef7a91a424d210354b Mon Sep 17 00:00:00 2001 From: VivekKB1410 Date: Wed, 28 Dec 2022 13:01:25 +0530 Subject: [PATCH 02/22] Roost Commit --- .roost/roost.vivekloadbalancers.config | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .roost/roost.vivekloadbalancers.config diff --git a/.roost/roost.vivekloadbalancers.config b/.roost/roost.vivekloadbalancers.config new file mode 100644 index 00000000..6fa495bf --- /dev/null +++ b/.roost/roost.vivekloadbalancers.config @@ -0,0 +1,12 @@ +build: + type: None + content: '' +deploy: + type: path + content: loadbalancersexec.sh +test: [] +uninstall: + type: None + content: '' +lastUpdatedBy: Vivek K B +lastUpdatedOn: 2022-12-28T07:31:24.399Z From 5a4c6b12601badf6c8aa525ee7a17bf6ecb0e8d4 Mon Sep 17 00:00:00 2001 From: VivekKB1410 Date: Wed, 28 Dec 2022 13:46:55 +0530 Subject: [PATCH 03/22] Roost Update Commit --- .roost/roost.vivekloadbalancers.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.roost/roost.vivekloadbalancers.config b/.roost/roost.vivekloadbalancers.config index 6fa495bf..19f779f6 100644 --- a/.roost/roost.vivekloadbalancers.config +++ b/.roost/roost.vivekloadbalancers.config @@ -9,4 +9,4 @@ uninstall: type: None content: '' lastUpdatedBy: Vivek K B -lastUpdatedOn: 2022-12-28T07:31:24.399Z +lastUpdatedOn: 2022-12-28T08:16:54.711Z From 7db7739298266e568ea6a3191abd2ffa57e09322 Mon Sep 17 00:00:00 2001 From: VivekKB1410 Date: Wed, 28 Dec 2022 13:47:55 +0530 Subject: [PATCH 04/22] Roost Update Commit --- .roost/roost.vivekloadbalancers.config | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.roost/roost.vivekloadbalancers.config b/.roost/roost.vivekloadbalancers.config index 19f779f6..f1ad8a28 100644 --- a/.roost/roost.vivekloadbalancers.config +++ b/.roost/roost.vivekloadbalancers.config @@ -2,11 +2,14 @@ build: type: None content: '' deploy: - type: path - content: loadbalancersexec.sh + type: text + content: |- + #/bin/sh + + sh VivekKB1410/voting_app/loadbalancersexec.sh test: [] uninstall: type: None content: '' lastUpdatedBy: Vivek K B -lastUpdatedOn: 2022-12-28T08:16:54.711Z +lastUpdatedOn: 2022-12-28T08:17:54.340Z From d29ea5d5dc0bca24772fd0a6934f6bfece2a0491 Mon Sep 17 00:00:00 2001 From: VivekKB1410 Date: Wed, 28 Dec 2022 13:56:47 +0530 Subject: [PATCH 05/22] Roost Update Commit --- .roost/roost.vivekloadbalancers.config | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.roost/roost.vivekloadbalancers.config b/.roost/roost.vivekloadbalancers.config index f1ad8a28..636e7457 100644 --- a/.roost/roost.vivekloadbalancers.config +++ b/.roost/roost.vivekloadbalancers.config @@ -3,13 +3,15 @@ build: content: '' deploy: type: text - content: |- + content: | #/bin/sh - - sh VivekKB1410/voting_app/loadbalancersexec.sh + ls + cd ../git/VivekKB1410/voting_app + ls + sh loadbalancersexec.sh test: [] uninstall: type: None content: '' lastUpdatedBy: Vivek K B -lastUpdatedOn: 2022-12-28T08:17:54.340Z +lastUpdatedOn: 2022-12-28T08:26:46.869Z From 8e783200ac7ff46dbb74ec6d7287c5ed75d95730 Mon Sep 17 00:00:00 2001 From: VivekKB1410 Date: Wed, 28 Dec 2022 14:14:37 +0530 Subject: [PATCH 06/22] Roost Update Commit --- .roost/roost.vivekloadbalancers.config | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.roost/roost.vivekloadbalancers.config b/.roost/roost.vivekloadbalancers.config index 636e7457..4627487c 100644 --- a/.roost/roost.vivekloadbalancers.config +++ b/.roost/roost.vivekloadbalancers.config @@ -6,12 +6,10 @@ deploy: content: | #/bin/sh ls - cd ../git/VivekKB1410/voting_app - ls sh loadbalancersexec.sh test: [] uninstall: type: None content: '' lastUpdatedBy: Vivek K B -lastUpdatedOn: 2022-12-28T08:26:46.869Z +lastUpdatedOn: 2022-12-28T08:44:36.865Z From 12c8df566d233a044d9709d41eee2720c4ad3b06 Mon Sep 17 00:00:00 2001 From: VIVEK K B Date: Wed, 28 Dec 2022 14:16:33 +0530 Subject: [PATCH 07/22] ZBIO-4000 Small fixes --- election-commission/ec.yaml | 2 +- loadbalancersexec.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/election-commission/ec.yaml b/election-commission/ec.yaml index 72d78cc5..8598f1a8 100644 --- a/election-commission/ec.yaml +++ b/election-commission/ec.yaml @@ -11,7 +11,7 @@ spec: type: "roost-example" ports: - name: election-commission - port: 8082 + port: 80 targetPort: 8082 --- diff --git a/loadbalancersexec.sh b/loadbalancersexec.sh index c1d7804b..c466b2fb 100644 --- a/loadbalancersexec.sh +++ b/loadbalancersexec.sh @@ -13,14 +13,14 @@ sleep 5 ecserver_loadbalancer=$(kubectl get svc -n $ROOST_NAMESPACE | grep my-ecserver | awk '{print $4}') -sed -i -e "s#REACT_APP_BALLOT_ENDPOINT_VALUE#${ballot_loadbalancer}#" -e "s#REACT_APP_EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}#" voter/voter.yaml +sed -i -e "s#REACT_APP_BALLOT_ENDPOINT_VALUE#${ballot_loadbalancer}8080#" -e "s#REACT_APP_EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}8081#" voter/voter.yaml kubectl apply -f voter/voter.yaml -n $ROOST_NAMESPACE kubectl expose deployment voter --type=LoadBalancer --name=my-voter -n $ROOST_NAMESPACE sleep 5 -sed -i -e "s#EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}#" election-commission/ec.yaml +sed -i -e "s#EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}8081#" election-commission/ec.yaml kubectl apply -f election-commission/ec.yaml -n $ROOST_NAMESPACE kubectl expose deployment election-commission --type=LoadBalancer --name=my-ec -n $ROOST_NAMESPACE From d124bacf9c0d47dcba30c138a48603aec7f1be63 Mon Sep 17 00:00:00 2001 From: VIVEK K B Date: Wed, 28 Dec 2022 14:29:43 +0530 Subject: [PATCH 08/22] ZBIO-4000 Small fixes --- loadbalancersexec.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loadbalancersexec.sh b/loadbalancersexec.sh index c466b2fb..d2612f94 100644 --- a/loadbalancersexec.sh +++ b/loadbalancersexec.sh @@ -13,14 +13,14 @@ sleep 5 ecserver_loadbalancer=$(kubectl get svc -n $ROOST_NAMESPACE | grep my-ecserver | awk '{print $4}') -sed -i -e "s#REACT_APP_BALLOT_ENDPOINT_VALUE#${ballot_loadbalancer}8080#" -e "s#REACT_APP_EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}8081#" voter/voter.yaml +sed -i -e "s#REACT_APP_BALLOT_ENDPOINT_VALUE#${ballot_loadbalancer}:8080#" -e "s#REACT_APP_EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}:8081#" voter/voter.yaml kubectl apply -f voter/voter.yaml -n $ROOST_NAMESPACE kubectl expose deployment voter --type=LoadBalancer --name=my-voter -n $ROOST_NAMESPACE sleep 5 -sed -i -e "s#EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}8081#" election-commission/ec.yaml +sed -i -e "s#EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}:8081#" election-commission/ec.yaml kubectl apply -f election-commission/ec.yaml -n $ROOST_NAMESPACE kubectl expose deployment election-commission --type=LoadBalancer --name=my-ec -n $ROOST_NAMESPACE From 75a05515c2de46fc74b9b4c1f1394d5e95a89906 Mon Sep 17 00:00:00 2001 From: VivekKB1410 Date: Tue, 3 Jan 2023 12:06:26 +0530 Subject: [PATCH 09/22] Roost Update Commit --- .roost/roost.vivekloadbalancers.config | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.roost/roost.vivekloadbalancers.config b/.roost/roost.vivekloadbalancers.config index 4627487c..40573c75 100644 --- a/.roost/roost.vivekloadbalancers.config +++ b/.roost/roost.vivekloadbalancers.config @@ -2,14 +2,11 @@ build: type: None content: '' deploy: - type: text - content: | - #/bin/sh - ls - sh loadbalancersexec.sh + type: path + content: loadbalancersexec.sh test: [] uninstall: type: None content: '' lastUpdatedBy: Vivek K B -lastUpdatedOn: 2022-12-28T08:44:36.865Z +lastUpdatedOn: 2023-01-03T06:36:25.186Z From 622cfa530c71f408e64476eeb0d583ab24601e32 Mon Sep 17 00:00:00 2001 From: VIVEK K B Date: Fri, 6 Jan 2023 14:53:16 +0530 Subject: [PATCH 10/22] ZBIO-4000 Exposed service using loadbalancers instead of nodeports --- ballot/ballot.yaml | 1 + ecserver/ecserver.yaml | 1 + election-commission/ec.yaml | 1 + voter/voter.yaml | 1 + 4 files changed, 4 insertions(+) diff --git a/ballot/ballot.yaml b/ballot/ballot.yaml index 14ba72ca..90cbc11c 100644 --- a/ballot/ballot.yaml +++ b/ballot/ballot.yaml @@ -11,6 +11,7 @@ spec: - name: ballot port: 80 targetPort: 8080 + type: LoadBalancer --- apiVersion: apps/v1 diff --git a/ecserver/ecserver.yaml b/ecserver/ecserver.yaml index fc29cb99..c03bd527 100644 --- a/ecserver/ecserver.yaml +++ b/ecserver/ecserver.yaml @@ -13,6 +13,7 @@ spec: port: 80 targetPort: 8081 # nodePort: 30081 + type: LoadBalancer --- apiVersion: apps/v1 diff --git a/election-commission/ec.yaml b/election-commission/ec.yaml index 8598f1a8..24fa2397 100644 --- a/election-commission/ec.yaml +++ b/election-commission/ec.yaml @@ -13,6 +13,7 @@ spec: - name: election-commission port: 80 targetPort: 8082 + type: LoadBalancer --- apiVersion: apps/v1 diff --git a/voter/voter.yaml b/voter/voter.yaml index 9c082fa7..e6ad2eae 100644 --- a/voter/voter.yaml +++ b/voter/voter.yaml @@ -13,6 +13,7 @@ spec: - name: voter port: 80 targetPort: 80 + type: LoadBalancer --- apiVersion: apps/v1 From 984b4130ad29ffa3b0844b2a468e5125104274cc Mon Sep 17 00:00:00 2001 From: VivekKB1410 Date: Fri, 6 Jan 2023 15:01:54 +0530 Subject: [PATCH 11/22] Roost Update Commit --- .roost/roost.vivekloadbalancers.config | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.roost/roost.vivekloadbalancers.config b/.roost/roost.vivekloadbalancers.config index 40573c75..3abac485 100644 --- a/.roost/roost.vivekloadbalancers.config +++ b/.roost/roost.vivekloadbalancers.config @@ -2,11 +2,13 @@ build: type: None content: '' deploy: - type: path - content: loadbalancersexec.sh + type: text + content: | + #/bin/sh + kubectl apply -n $ROOST_NAMESPACE -f ballot/ballot.yaml test: [] uninstall: type: None content: '' lastUpdatedBy: Vivek K B -lastUpdatedOn: 2023-01-03T06:36:25.186Z +lastUpdatedOn: 2023-01-06T09:31:54.766Z From 24e6ea78079f0f30e5b0e45b8b9e645a502b56ff Mon Sep 17 00:00:00 2001 From: VIVEK K B Date: Fri, 6 Jan 2023 15:34:22 +0530 Subject: [PATCH 12/22] ZBIO-4000 Removed load balancers file --- loadbalancersexec.sh | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 loadbalancersexec.sh diff --git a/loadbalancersexec.sh b/loadbalancersexec.sh deleted file mode 100644 index d2612f94..00000000 --- a/loadbalancersexec.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -kubectl apply -f ballot/ballot.yaml -n $ROOST_NAMESPACE -kubectl expose deployment ballot --type=LoadBalancer --name=my-ballot -n $ROOST_NAMESPACE - -sleep 5 - -ballot_loadbalancer=$(kubectl get svc -n $ROOST_NAMESPACE | grep my-ballot | awk '{print $4}') - -kubectl apply -f ecserver/ecserver.yaml -n $ROOST_NAMESPACE -kubectl expose deployment ecserver --type=LoadBalancer --name=my-ecserver -n $ROOST_NAMESPACE - -sleep 5 - -ecserver_loadbalancer=$(kubectl get svc -n $ROOST_NAMESPACE | grep my-ecserver | awk '{print $4}') - -sed -i -e "s#REACT_APP_BALLOT_ENDPOINT_VALUE#${ballot_loadbalancer}:8080#" -e "s#REACT_APP_EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}:8081#" voter/voter.yaml - -kubectl apply -f voter/voter.yaml -n $ROOST_NAMESPACE -kubectl expose deployment voter --type=LoadBalancer --name=my-voter -n $ROOST_NAMESPACE - -sleep 5 - -sed -i -e "s#EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}:8081#" election-commission/ec.yaml - -kubectl apply -f election-commission/ec.yaml -n $ROOST_NAMESPACE -kubectl expose deployment election-commission --type=LoadBalancer --name=my-ec -n $ROOST_NAMESPACE From 160fe5aeb319c07acfdda64eb89d2c751e3d9a51 Mon Sep 17 00:00:00 2001 From: VIVEK K B Date: Fri, 6 Jan 2023 15:35:13 +0530 Subject: [PATCH 13/22] Small changes --- .roost/roost.vivekloadbalancers.config | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 .roost/roost.vivekloadbalancers.config diff --git a/.roost/roost.vivekloadbalancers.config b/.roost/roost.vivekloadbalancers.config deleted file mode 100644 index 6fa495bf..00000000 --- a/.roost/roost.vivekloadbalancers.config +++ /dev/null @@ -1,12 +0,0 @@ -build: - type: None - content: '' -deploy: - type: path - content: loadbalancersexec.sh -test: [] -uninstall: - type: None - content: '' -lastUpdatedBy: Vivek K B -lastUpdatedOn: 2022-12-28T07:31:24.399Z From 5cb15606cd0c86ef95166f5eb835a9ff7921f2b6 Mon Sep 17 00:00:00 2001 From: VIVEK K B Date: Mon, 9 Jan 2023 16:59:01 +0530 Subject: [PATCH 14/22] ZBIO-4000 Changes to getting loadbalancer id --- .roost/roost.vivekloadbalancers.config | 14 -------------- voter/loadbalancersexec.sh | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 14 deletions(-) delete mode 100644 .roost/roost.vivekloadbalancers.config create mode 100644 voter/loadbalancersexec.sh diff --git a/.roost/roost.vivekloadbalancers.config b/.roost/roost.vivekloadbalancers.config deleted file mode 100644 index 3abac485..00000000 --- a/.roost/roost.vivekloadbalancers.config +++ /dev/null @@ -1,14 +0,0 @@ -build: - type: None - content: '' -deploy: - type: text - content: | - #/bin/sh - kubectl apply -n $ROOST_NAMESPACE -f ballot/ballot.yaml -test: [] -uninstall: - type: None - content: '' -lastUpdatedBy: Vivek K B -lastUpdatedOn: 2023-01-06T09:31:54.766Z diff --git a/voter/loadbalancersexec.sh b/voter/loadbalancersexec.sh new file mode 100644 index 00000000..ea36b9eb --- /dev/null +++ b/voter/loadbalancersexec.sh @@ -0,0 +1,22 @@ +#!/bin/bash +kubectl apply -f ballot/ballot.yaml -n $ROOST_NAMESPACE + +sleep 5 + +ballot_loadbalancer=$(kubectl get svc -n $ROOST_NAMESPACE | grep ballot | awk '{print $4}') + +kubectl apply -f ecserver/ecserver.yaml -n $ROOST_NAMESPACE + +sleep 5 + +ecserver_loadbalancer=$(kubectl get svc -n $ROOST_NAMESPACE | grep ecserver | awk '{print $4}') + +sed -i -e "s#REACT_APP_BALLOT_ENDPOINT_VALUE#${ballot_loadbalancer}8080#" -e "s#REACT_APP_EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}8081#" voter/voter.yaml + +kubectl apply -f voter/voter.yaml -n $ROOST_NAMESPACE + +sleep 5 + +sed -i -e "s#EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}8081#" election-commission/ec.yaml + +kubectl apply -f election-commission/ec.yaml -n $ROOST_NAMESPACE From 307a45360af9764ea8be92dddff9e177cd69398f Mon Sep 17 00:00:00 2001 From: VIVEK K B Date: Wed, 11 Jan 2023 11:55:25 +0530 Subject: [PATCH 15/22] ZBIO-4000 Small changes --- voter/loadbalancersexec.sh => loadbalancersexec.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename voter/loadbalancersexec.sh => loadbalancersexec.sh (100%) diff --git a/voter/loadbalancersexec.sh b/loadbalancersexec.sh similarity index 100% rename from voter/loadbalancersexec.sh rename to loadbalancersexec.sh From 58b98137292ad73a1370a8b1cac42aaceadf4cb7 Mon Sep 17 00:00:00 2001 From: VivekKB1410 Date: Wed, 11 Jan 2023 11:57:33 +0530 Subject: [PATCH 16/22] Roost Commit --- .roost/roost.vivekloadbalancers.config | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .roost/roost.vivekloadbalancers.config diff --git a/.roost/roost.vivekloadbalancers.config b/.roost/roost.vivekloadbalancers.config new file mode 100644 index 00000000..8acc008c --- /dev/null +++ b/.roost/roost.vivekloadbalancers.config @@ -0,0 +1,12 @@ +build: + type: None + content: '' +deploy: + type: path + content: loadbalancersexec.sh +test: [] +uninstall: + type: None + content: '' +lastUpdatedBy: Vivek K B +lastUpdatedOn: 2023-01-11T06:27:32.669Z From 867cffbf460b3da794d4d97eea191b05a7b4c1f7 Mon Sep 17 00:00:00 2001 From: VivekKB1410 Date: Wed, 11 Jan 2023 11:57:45 +0530 Subject: [PATCH 17/22] Roost Update Commit --- .roost/roost.vivekloadbalancers.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.roost/roost.vivekloadbalancers.config b/.roost/roost.vivekloadbalancers.config index 8acc008c..9fe04aab 100644 --- a/.roost/roost.vivekloadbalancers.config +++ b/.roost/roost.vivekloadbalancers.config @@ -9,4 +9,4 @@ uninstall: type: None content: '' lastUpdatedBy: Vivek K B -lastUpdatedOn: 2023-01-11T06:27:32.669Z +lastUpdatedOn: 2023-01-11T06:27:43.829Z From d90a7e78d478b26c0bd16b6fb585822bfba95c87 Mon Sep 17 00:00:00 2001 From: VIVEK K B Date: Fri, 13 Jan 2023 16:10:52 +0530 Subject: [PATCH 18/22] Small fixes --- loadbalancersexec.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loadbalancersexec.sh b/loadbalancersexec.sh index ea36b9eb..b8d28ac5 100644 --- a/loadbalancersexec.sh +++ b/loadbalancersexec.sh @@ -11,12 +11,12 @@ sleep 5 ecserver_loadbalancer=$(kubectl get svc -n $ROOST_NAMESPACE | grep ecserver | awk '{print $4}') -sed -i -e "s#REACT_APP_BALLOT_ENDPOINT_VALUE#${ballot_loadbalancer}8080#" -e "s#REACT_APP_EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}8081#" voter/voter.yaml +sed -i -e "s#REACT_APP_BALLOT_ENDPOINT_VALUE#${ballot_loadbalancer}:8080#" -e "s#REACT_APP_EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}:8081#" voter/voter.yaml kubectl apply -f voter/voter.yaml -n $ROOST_NAMESPACE sleep 5 -sed -i -e "s#EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}8081#" election-commission/ec.yaml +sed -i -e "s#EC_SERVER_ENDPOINT_VALUE#${ecserver_loadbalancer}:8081#" election-commission/ec.yaml kubectl apply -f election-commission/ec.yaml -n $ROOST_NAMESPACE From bcbc4d9c65d077fbdbee3bace3274f3fab5c8354 Mon Sep 17 00:00:00 2001 From: VIVEK K B Date: Fri, 13 Jan 2023 17:21:24 +0530 Subject: [PATCH 19/22] Small fixes --- ballot/ballot.yaml | 2 +- ecserver/ecserver.yaml | 2 +- election-commission/ec.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ballot/ballot.yaml b/ballot/ballot.yaml index 90cbc11c..f78cca57 100644 --- a/ballot/ballot.yaml +++ b/ballot/ballot.yaml @@ -9,7 +9,7 @@ spec: app: ballot ports: - name: ballot - port: 80 + port: 8080 targetPort: 8080 type: LoadBalancer diff --git a/ecserver/ecserver.yaml b/ecserver/ecserver.yaml index c03bd527..5a5ab89c 100644 --- a/ecserver/ecserver.yaml +++ b/ecserver/ecserver.yaml @@ -10,7 +10,7 @@ spec: app: ecserver ports: - name: ecserver - port: 80 + port: 8082 targetPort: 8081 # nodePort: 30081 type: LoadBalancer diff --git a/election-commission/ec.yaml b/election-commission/ec.yaml index 24fa2397..a24dddee 100644 --- a/election-commission/ec.yaml +++ b/election-commission/ec.yaml @@ -11,7 +11,7 @@ spec: type: "roost-example" ports: - name: election-commission - port: 80 + port: 8082 targetPort: 8082 type: LoadBalancer From e20ae3d7c5d3d8f363e88f8a3ef454cce78b46ff Mon Sep 17 00:00:00 2001 From: VIVEK K B Date: Fri, 13 Jan 2023 17:22:20 +0530 Subject: [PATCH 20/22] Small fix --- ecserver/ecserver.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecserver/ecserver.yaml b/ecserver/ecserver.yaml index 5a5ab89c..e5aa7043 100644 --- a/ecserver/ecserver.yaml +++ b/ecserver/ecserver.yaml @@ -10,7 +10,7 @@ spec: app: ecserver ports: - name: ecserver - port: 8082 + port: 8081 targetPort: 8081 # nodePort: 30081 type: LoadBalancer From 6b9418c0278ff5f24018138da72ef8b644cdc8b0 Mon Sep 17 00:00:00 2001 From: VIVEK K B Date: Fri, 13 Jan 2023 17:56:24 +0530 Subject: [PATCH 21/22] Small fixes --- ballot/ballot.yaml | 4 ++-- ecserver/ecserver.yaml | 7 ++----- election-commission/ec.yaml | 4 ++-- voter/voter.yaml | 4 ++-- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/ballot/ballot.yaml b/ballot/ballot.yaml index f78cca57..e0188b49 100644 --- a/ballot/ballot.yaml +++ b/ballot/ballot.yaml @@ -8,9 +8,9 @@ spec: selector: app: ballot ports: - - name: ballot - port: 8080 + - port: 8080 targetPort: 8080 + externalTrafficPolicy: Local type: LoadBalancer --- diff --git a/ecserver/ecserver.yaml b/ecserver/ecserver.yaml index e5aa7043..89ae19c2 100644 --- a/ecserver/ecserver.yaml +++ b/ecserver/ecserver.yaml @@ -1,18 +1,15 @@ apiVersion: v1 kind: Service metadata: - labels: - apps: ecserver name: ecserver spec: - type: NodePort selector: app: ecserver ports: - - name: ecserver - port: 8081 + - port: 8081 targetPort: 8081 # nodePort: 30081 + externalTrafficPolicy: Local type: LoadBalancer --- diff --git a/election-commission/ec.yaml b/election-commission/ec.yaml index a24dddee..36f8fc1d 100644 --- a/election-commission/ec.yaml +++ b/election-commission/ec.yaml @@ -10,9 +10,9 @@ spec: app: election-commission type: "roost-example" ports: - - name: election-commission - port: 8082 + - port: 8082 targetPort: 8082 + externalTrafficPolicy: Local type: LoadBalancer --- diff --git a/voter/voter.yaml b/voter/voter.yaml index e6ad2eae..b55006cc 100644 --- a/voter/voter.yaml +++ b/voter/voter.yaml @@ -10,9 +10,9 @@ spec: app: voter type: "roost-example" ports: - - name: voter - port: 80 + - port: 80 targetPort: 80 + externalTrafficPolicy: Local type: LoadBalancer --- From 66a7d1c0b7831ae46e3597b44da60d3d892343c7 Mon Sep 17 00:00:00 2001 From: VivekKB1410 Date: Thu, 6 Apr 2023 15:04:58 +0530 Subject: [PATCH 22/22] Roost Update Commit --- .roost/roost.vivekloadbalancers.config | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.roost/roost.vivekloadbalancers.config b/.roost/roost.vivekloadbalancers.config index 9fe04aab..b84bca18 100644 --- a/.roost/roost.vivekloadbalancers.config +++ b/.roost/roost.vivekloadbalancers.config @@ -2,11 +2,21 @@ build: type: None content: '' deploy: - type: path - content: loadbalancersexec.sh + type: text + content: | + #/bin/sh + kubectl apply -n $ROOST_NAMESPACE -f ballot/ballot.yaml + + kubectl apply -n $ROOST_NAMESPACE -f ecserver/ecserver.yaml test: [] uninstall: - type: None - content: '' + type: text + content: |- + #/bin/sh + + kubectl delete -n $ROOST_NAMESPACE -f ballot/ballot.yaml + + kubectl delete -n $ROOST_NAMESPACE -f ecserver/ecserver.yaml +dockerCompose: '' lastUpdatedBy: Vivek K B -lastUpdatedOn: 2023-01-11T06:27:43.829Z +lastUpdatedOn: 2023-04-06T09:34:57.083Z