From ad5bcc7ad2e13dba9c41b53d9e6b171616b06dd3 Mon Sep 17 00:00:00 2001 From: Ansh Goyal Date: Wed, 9 Aug 2023 21:05:07 +0530 Subject: [PATCH] fix: add more clear instructions to the armada demo page (#2749) * fix demo instructions * fix create queue instruction * Update demo.md * Update demo.md * Update demo.md --------- Co-authored-by: Kevin Hannon --- docs/demo.md | 44 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/docs/demo.md b/docs/demo.md index ddaf5992391..29bc12c0053 100644 --- a/docs/demo.md +++ b/docs/demo.md @@ -25,6 +25,7 @@ cd armada All commands are intended to be run from the root of the repository. ## Setup an easy-to-use alias +If you are on a Windows System, use a linux-supported terminal to run this command, for example [Git Bash](https://git-scm.com/downloads) or [Hyper](https://hyper.is/) ```bash alias armadactl='go run cmd/armadactl/main.go --armadaUrl armada.demo.armadaproject.io:443' ``` @@ -33,9 +34,10 @@ alias armadactl='go run cmd/armadactl/main.go --armadaUrl armada.demo.armadaproj Create queues, submit some jobs, and monitor progress: ### Queue Creation +Use a unique name for the queue. Make sure you remember it for the next steps. ```bash -armadactl create queue queue-a --priorityFactor 1 -armadactl create queue queue-b --priorityFactor 2 +armadactl create queue $QUEUE_NAME --priorityFactor 1 +armadactl create queue $QUEUE_NAME --priorityFactor 2 ``` For queues created in this way, user and group owners of the queue have permissions to: @@ -51,30 +53,62 @@ armadactl create -f ./docs/quickstart/queue-a.yaml armadactl create -f ./docs/quickstart/queue-b.yaml ``` +Make sure to manually edit both of these `yaml` files using a code or text editor before running the commands above. + +``` +name: $QUEUE_NAME +``` + ### Job Submission ``` armadactl submit ./docs/quickstart/job-queue-a.yaml armadactl submit ./docs/quickstart/job-queue-b.yaml ``` +Make sure to manually edit both of these `yaml` files using a code or text editor before running the commands above. +``` +queue: $QUEUE_NAME +``` + ### Monitor Job Progress ```bash -armadactl watch queue-a job-set-1 +armadactl watch $QUEUE_NAME job-set-1 ``` ```bash -armadactl watch queue-b job-set-1 +armadactl watch $QUEUE_NAME job-set-1 ``` Try submitting lots of jobs and see queues get built and processed: -```bash +#### Windows (using Git Bash): + +Use a text editor of your choice. +Copy and paste the following lines into the text editor: +``` +#!/bin/bash + for i in {1..50} do armadactl submit ./docs/quickstart/job-queue-a.yaml armadactl submit ./docs/quickstart/job-queue-b.yaml done ``` +Save the file with a ".sh" extension (e.g., myscript.sh) in the root directory of the project. +Open Git Bash, navigate to the project's directory using the 'cd' command, and then run the script by typing ./myscript.sh and pressing Enter. + +#### Linux: + +Open a text editor (e.g., Nano or Vim) in the terminal and create a new file by running: nano myscript.sh (replace "nano" with your preferred text editor if needed). +Copy and paste the script content from above into the text editor. +Save the file and exit the text editor. +Make the script file executable by running: chmod +x myscript.sh. +Run the script by typing ./myscript.sh in the terminal and pressing Enter. + +#### macOS: + +Follow the same steps as for Linux, as macOS uses the Bash shell by default. +With this approach, you create a shell script file that contains your multi-line script, and you can run it as a whole by executing the script file in the terminal. ## Observing job progress