Skip to content

Commit

Permalink
fix: add more clear instructions to the armada demo page (#2749)
Browse files Browse the repository at this point in the history
* fix demo instructions

* fix create queue instruction

* Update demo.md

* Update demo.md

* Update demo.md

---------

Co-authored-by: Kevin Hannon <kannon1992@gmail.com>
  • Loading branch information
anshgoyalevil and kannon92 authored Aug 9, 2023
1 parent bfdeeeb commit ad5bcc7
Showing 1 changed file with 39 additions and 5 deletions.
44 changes: 39 additions & 5 deletions docs/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
```
Expand All @@ -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:
Expand All @@ -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

Expand Down

0 comments on commit ad5bcc7

Please sign in to comment.