From bece5cb34c66ed96e4f8406216cb1f02e9de278a Mon Sep 17 00:00:00 2001 From: Tay Yi Hsuen Date: Tue, 14 Nov 2023 17:14:21 +0800 Subject: [PATCH] Create release 1.2.1 (#256) Fix some frontend bugs and increase CPU usage --------- Co-authored-by: Ong Jun Xiong Co-authored-by: chunweii <47494777+chunweii@users.noreply.github.com> Co-authored-by: Charisma Kausar --- .../Prod_Node_Specifications.md | 12 ++++ .../admin-service-deployment.yaml | 2 +- .../collaboration-service-deployment.yaml | 2 +- .../frontend-deployment.yaml | 2 +- .../gateway-deployment.yaml | 2 +- .../matching-service-deployment.yaml | 2 +- .../question-service-deployment.yaml | 2 +- .../user-service-deployment.yaml | 2 +- frontend/src/components/common/navbar.tsx | 64 ++++++++++--------- frontend/src/components/room/code-editor.tsx | 13 +--- frontend/src/components/room/description.tsx | 2 +- frontend/src/pages/attempt/[id]/index.tsx | 2 +- frontend/src/pages/questions/_form.tsx | 4 ++ 13 files changed, 59 insertions(+), 52 deletions(-) create mode 100644 deployment/gke-prod-manifests/Prod_Node_Specifications.md diff --git a/deployment/gke-prod-manifests/Prod_Node_Specifications.md b/deployment/gke-prod-manifests/Prod_Node_Specifications.md new file mode 100644 index 00000000..08876180 --- /dev/null +++ b/deployment/gke-prod-manifests/Prod_Node_Specifications.md @@ -0,0 +1,12 @@ +# Specifications for GKE Nodes +The nodes used in GKE are of the machine type e2-standard-4 + +| Key | Value | +|-----|-------| +| vCPUs per node | 4 | +| Memory size | 16 GB | +| Boot disk size | 50 GB | +| Node image type | cos_containerd | + +The GKE cluster is created in asia-southeast1 region across all 3 availability zones. +1 node is created per zone. diff --git a/deployment/gke-prod-manifests/admin-service-deployment.yaml b/deployment/gke-prod-manifests/admin-service-deployment.yaml index d29c52ca..e82736c0 100644 --- a/deployment/gke-prod-manifests/admin-service-deployment.yaml +++ b/deployment/gke-prod-manifests/admin-service-deployment.yaml @@ -37,6 +37,6 @@ spec: # You must specify requests for CPU to autoscale # based on CPU utilization requests: - cpu: "100m" + cpu: "250m" restartPolicy: Always status: {} diff --git a/deployment/gke-prod-manifests/collaboration-service-deployment.yaml b/deployment/gke-prod-manifests/collaboration-service-deployment.yaml index e2925d29..6118b9f4 100644 --- a/deployment/gke-prod-manifests/collaboration-service-deployment.yaml +++ b/deployment/gke-prod-manifests/collaboration-service-deployment.yaml @@ -54,6 +54,6 @@ spec: # You must specify requests for CPU to autoscale # based on CPU utilization requests: - cpu: "100m" + cpu: "250m" restartPolicy: Always status: {} diff --git a/deployment/gke-prod-manifests/frontend-deployment.yaml b/deployment/gke-prod-manifests/frontend-deployment.yaml index af4896cf..9db64d39 100644 --- a/deployment/gke-prod-manifests/frontend-deployment.yaml +++ b/deployment/gke-prod-manifests/frontend-deployment.yaml @@ -29,6 +29,6 @@ spec: # You must specify requests for CPU to autoscale # based on CPU utilization requests: - cpu: "100m" + cpu: "250m" restartPolicy: Always status: {} diff --git a/deployment/gke-prod-manifests/gateway-deployment.yaml b/deployment/gke-prod-manifests/gateway-deployment.yaml index 536d6cc5..3e3cde39 100644 --- a/deployment/gke-prod-manifests/gateway-deployment.yaml +++ b/deployment/gke-prod-manifests/gateway-deployment.yaml @@ -53,6 +53,6 @@ spec: # You must specify requests for CPU to autoscale # based on CPU utilization requests: - cpu: "100m" + cpu: "250m" restartPolicy: Always status: {} diff --git a/deployment/gke-prod-manifests/matching-service-deployment.yaml b/deployment/gke-prod-manifests/matching-service-deployment.yaml index c9ff6b37..0829c048 100644 --- a/deployment/gke-prod-manifests/matching-service-deployment.yaml +++ b/deployment/gke-prod-manifests/matching-service-deployment.yaml @@ -41,6 +41,6 @@ spec: # You must specify requests for CPU to autoscale # based on CPU utilization requests: - cpu: "100m" + cpu: "250m" restartPolicy: Always status: {} diff --git a/deployment/gke-prod-manifests/question-service-deployment.yaml b/deployment/gke-prod-manifests/question-service-deployment.yaml index 1b31e463..c55b717f 100644 --- a/deployment/gke-prod-manifests/question-service-deployment.yaml +++ b/deployment/gke-prod-manifests/question-service-deployment.yaml @@ -37,6 +37,6 @@ spec: # You must specify requests for CPU to autoscale # based on CPU utilization requests: - cpu: "100m" + cpu: "250m" restartPolicy: Always status: {} diff --git a/deployment/gke-prod-manifests/user-service-deployment.yaml b/deployment/gke-prod-manifests/user-service-deployment.yaml index 0803f176..10b726d8 100644 --- a/deployment/gke-prod-manifests/user-service-deployment.yaml +++ b/deployment/gke-prod-manifests/user-service-deployment.yaml @@ -37,6 +37,6 @@ spec: # You must specify requests for CPU to autoscale # based on CPU utilization requests: - cpu: "100m" + cpu: "250m" restartPolicy: Always status: {} diff --git a/frontend/src/components/common/navbar.tsx b/frontend/src/components/common/navbar.tsx index 5581216c..575e879a 100644 --- a/frontend/src/components/common/navbar.tsx +++ b/frontend/src/components/common/navbar.tsx @@ -79,7 +79,6 @@ export default function Navbar() { )} - {isAdmin &&

Admin Page

} {!currentUser && (
)} {currentUser && ( - - - - - - router.push("/profile")} - > - Profile - - router.push("/settings")}> - Settings - - - Log Out - - - +
+ {isAdmin &&

Admin

} + + + + + + router.push("/profile")} + > + Profile + + router.push("/settings")}> + Settings + + + Log Out + + + +
)} diff --git a/frontend/src/components/room/code-editor.tsx b/frontend/src/components/room/code-editor.tsx index 961d708f..68a15770 100644 --- a/frontend/src/components/room/code-editor.tsx +++ b/frontend/src/components/room/code-editor.tsx @@ -175,17 +175,6 @@ export default function CodeEditor({ -
- - - -
handleOnSubmitClick(false)} disabled={isSubmitting} > - Submit as unsolved + Submit as Unsolved