From 2aa3e5ddd1f9e66b31eef430bcabaefd0f155f51 Mon Sep 17 00:00:00 2001 From: Bhanvi Menghani Date: Wed, 9 Aug 2023 13:05:16 +0530 Subject: [PATCH 1/6] Updates README.md --- README.md | 69 +++++++++++++------------------------------------------ 1 file changed, 16 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index 7fb0a71..438c43e 100644 --- a/README.md +++ b/README.md @@ -1,68 +1,31 @@ -# kruize-ui +# Kruize-UI -This repository contains the code for Kruize Autotune user interface. The objective behind creating the UI is to enable newbies to explore and contribute to Autotune and simplify the initial steps of starting an Autotune experiment. The UI significantly reduces the burden on user to understand, operate and work with Autotune. Not only this it also helps better explain and present what remarkable optimizations Autotune can bring to site reliability engineering. +This repository contains the code for Kruize user interface. The objective behind creating the UI is to enable users to explore and contribute to Kruize. The UI significantly reduces the burden on user to understand, operate and work with Kruize. Not only this it also helps better represent the remarkable optimizations Kruize can bring to your optimization usecases. -## Quick Start - -### Clone Repository - -``` -git clone git@github.com:kruize/kruize-ui.git -``` +This application is built using [Patternfly and React](https://www.patternfly.org/v4/get-started/developers) -### Go to the kruize folder +## Before You Start -``` -cd kruize-ui -``` +Kruize UI needs Kruize server running locally in the remote monitoring mode which provides recommendation data to be displayed on UI. You can setup Kruize [from here](https://github.com/kruize/kruize-demos/tree/main/remote_monitoring_demo). +Additionally Kruize UI can directly be accessed from the terminal once remote monitoring demo is setup. -### Switch to mvp_demo branch +In case you want to run UI locally you would need the Cluster IP and Kruize Port number. Make use of the following commands: +1. Cluster IP : In case of a minikube cluster ```minikube ip``` +2. Kruize Port Number : ```kubectl -n monitoring get svc kruize --no-headers -o=custom-columns=PORT:.spec.ports[*].nodePort 2>/dev/null``` -``` -git fetch origin -git checkout -b mvp_demo origin/mvp_demo -``` +Also, make sure you have [`Node.js`](https://nodejs.org/en/) and [`npm`](https://www.npmjs.com/) installed. Check the currently maintained versions at https://nodejs.org/en/about/releases/. -### Install Node Package Manager +## Quick Start ``` +git clone git@github.com:kruize/kruize-ui.git +cd kruize-ui npm install -``` - -### Run the UI - -To run the kruize ui you can select any of the 2 options : - -1. Native way
- If you are starting the UI for the very first time, it is suggested to - Latest Node.js source code can be downloaded from [here](https://nodejs.org/en/download/). - To run the Kruize-ui: clone the repository and then execute the following command to run the launch script locally.
- -``` -./deploy.sh -d -``` - -
- -2. Containerized way
- -We make use of nginx as a default react server for the UI. -Create the image using the following command
+export CLUSTER_IP= && export AUTOTUNE_PORT= +npm run start:dev ``` - docker build -t kruize-ui . - -``` - -Run the application using the following command - -``` -docker run --rm -it -p 8080:8080 kruize-ui -``` - -here ui-demo is the image name.
-Use http://localhost:8080/ to view the UI in Browser. ## Code Origin -This repository uses the patternfly-react-seed base code as copied from [Patternfly Seed](https://github.com/patternfly/patternfly-react-seed). +This repository uses the patternfly-react-seed base code as taken from [Patternfly Seed](https://github.com/patternfly/patternfly-react-seed). From 95a991fdbb1c25b3e9f38d89c0f394d6e33d7d69 Mon Sep 17 00:00:00 2001 From: Bhanvi Menghani Date: Wed, 9 Aug 2023 14:00:30 +0530 Subject: [PATCH 2/6] Updates readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 438c43e..fce18ac 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,9 @@ This application is built using [Patternfly and React](https://www.patternfly.or ## Before You Start -Kruize UI needs Kruize server running locally in the remote monitoring mode which provides recommendation data to be displayed on UI. You can setup Kruize [from here](https://github.com/kruize/kruize-demos/tree/main/remote_monitoring_demo). -Additionally Kruize UI can directly be accessed from the terminal once remote monitoring demo is setup. +Kruize UI needs Kruize server running locally in the remote monitoring mode. You can setup Kruize [from here](https://github.com/kruize/kruize-demos/tree/main/remote_monitoring_demo). + +Additionally Kruize UI can directly be accessed once remote monitoring demo is setup. In case you want to run UI locally you would need the Cluster IP and Kruize Port number. Make use of the following commands: 1. Cluster IP : In case of a minikube cluster ```minikube ip``` @@ -23,7 +24,6 @@ cd kruize-ui npm install export CLUSTER_IP= && export AUTOTUNE_PORT= npm run start:dev - ``` ## Code Origin From 8fd910dadd547cd272a5ad08771f1d8e51f2d98b Mon Sep 17 00:00:00 2001 From: Bhanvi Menghani <42137926+bhanvimenghani@users.noreply.github.com> Date: Thu, 10 Aug 2023 13:11:43 +0530 Subject: [PATCH 3/6] Updates README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fce18ac..3d86648 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Also, make sure you have [`Node.js`](https://nodejs.org/en/) and [`npm`](https:/ git clone git@github.com:kruize/kruize-ui.git cd kruize-ui npm install -export CLUSTER_IP= && export AUTOTUNE_PORT= +export CLUSTER_IP= && export KRUIZE_PORT= npm run start:dev ``` From 3408558ad2763eac2688b3a559b21b755f21d0ba Mon Sep 17 00:00:00 2001 From: bhanvimenghani Date: Fri, 11 Aug 2023 12:54:36 +0530 Subject: [PATCH 4/6] adds copy code --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3d86648..b1923cf 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,14 @@ Kruize UI needs Kruize server running locally in the remote monitoring mode. You Additionally Kruize UI can directly be accessed once remote monitoring demo is setup. In case you want to run UI locally you would need the Cluster IP and Kruize Port number. Make use of the following commands: -1. Cluster IP : In case of a minikube cluster ```minikube ip``` -2. Kruize Port Number : ```kubectl -n monitoring get svc kruize --no-headers -o=custom-columns=PORT:.spec.ports[*].nodePort 2>/dev/null``` +1. Cluster IP : In case of a minikube cluster +``` +minikube ip +``` +2. Kruize Port Number : +``` +kubectl -n monitoring get svc kruize --no-headers -o=custom-columns=PORT:.spec.ports[*].nodePort 2>/dev/null +``` Also, make sure you have [`Node.js`](https://nodejs.org/en/) and [`npm`](https://www.npmjs.com/) installed. Check the currently maintained versions at https://nodejs.org/en/about/releases/. From 7c6847eaf94bd882c82e76c031ab837c2239d560 Mon Sep 17 00:00:00 2001 From: bhanvimenghani Date: Fri, 11 Aug 2023 13:02:16 +0530 Subject: [PATCH 5/6] combines all cmds --- README.md | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b1923cf..10f39d5 100644 --- a/README.md +++ b/README.md @@ -10,16 +10,6 @@ Kruize UI needs Kruize server running locally in the remote monitoring mode. You Additionally Kruize UI can directly be accessed once remote monitoring demo is setup. -In case you want to run UI locally you would need the Cluster IP and Kruize Port number. Make use of the following commands: -1. Cluster IP : In case of a minikube cluster -``` -minikube ip -``` -2. Kruize Port Number : -``` -kubectl -n monitoring get svc kruize --no-headers -o=custom-columns=PORT:.spec.ports[*].nodePort 2>/dev/null -``` - Also, make sure you have [`Node.js`](https://nodejs.org/en/) and [`npm`](https://www.npmjs.com/) installed. Check the currently maintained versions at https://nodejs.org/en/about/releases/. ## Quick Start @@ -28,7 +18,8 @@ Also, make sure you have [`Node.js`](https://nodejs.org/en/) and [`npm`](https:/ git clone git@github.com:kruize/kruize-ui.git cd kruize-ui npm install -export CLUSTER_IP= && export KRUIZE_PORT= +export CLUSTER_IP=$(minikube ip) +export KRUIZE_PORT=$(kubectl -n monitoring get svc kruize --no-headers -o=custom-columns=PORT:.spec.ports[*].nodePort 2>/dev/null) npm run start:dev ``` From 45d4a376e09ae5ecd2bcee11d7efa0598cb0abfd Mon Sep 17 00:00:00 2001 From: bhanvimenghani Date: Fri, 11 Aug 2023 13:31:07 +0530 Subject: [PATCH 6/6] simplifies language --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 10f39d5..7fc4593 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This application is built using [Patternfly and React](https://www.patternfly.or ## Before You Start -Kruize UI needs Kruize server running locally in the remote monitoring mode. You can setup Kruize [from here](https://github.com/kruize/kruize-demos/tree/main/remote_monitoring_demo). +Kruize UI needs Kruize server running locally. You can setup Kruize [from here](https://github.com/kruize/kruize-demos/tree/main/remote_monitoring_demo). Additionally Kruize UI can directly be accessed once remote monitoring demo is setup.