github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/docs/commands/job/scale.mdx (about) 1 --- 2 layout: docs 3 page_title: 'Commands: job scale' 4 sidebar_title: scale 5 description: | 6 The job scale command is used to change the count of a Nomad job group. 7 --- 8 9 # Command: job scale 10 11 The `job scale` command is used to alter the number of running allocations within 12 a Nomad task group. 13 14 ## Usage 15 16 ```plaintext 17 nomad job scale [options] <job> <group> <count> 18 ``` 19 20 The `job scale` commands requires at least two arguments and potentially three 21 depending on the job specification. The first argument will be the job ID of the 22 job you wish to scale. If the job contains a single task group, you can omit 23 including the task group name as the second argument and the command will perform 24 the required lookup. The final argument is the count that you wish the job task 25 group to be changed to. The count is the absolute value that will be reflected in 26 the job specification. 27 28 Scale will issue a request to update the matched job and then invoke an interactive 29 monitor that exits automatically once the scheduler has processed the request. 30 It is safe to exit the monitor early using ctrl+c. 31 32 When ACLs are enabled, this command requires a token with the `scale-job` 33 capability for the job's namespace. 34 35 ## General Options 36 37 @include 'general_options.mdx' 38 39 ## Scale Options 40 41 - `-detach`: Return immediately instead of entering monitor mode. After the 42 scale command is submitted, a new evaluation ID is printed to the screen, 43 which can be used to examine the evaluation using the [eval status] command. 44 45 - `-verbose`: Show full information. 46 47 ## Examples 48 49 Scale the job with ID "job1" which contains a single task group to a count of 8: 50 51 ```shell-session 52 $ nomad job scale job1 8 53 ==> Monitoring evaluation "529cc88e" 54 Evaluation triggered by job "job1" 55 Evaluation within deployment: "28a3378f" 56 Allocation "2a4df8ca" created: node "2f0a2f93", group "group1" 57 Allocation "b7eefe49" created: node "2f0a2f93", group "group1" 58 Allocation "bd54a83d" created: node "2f0a2f93", group "group1" 59 Allocation "fadeaea8" created: node "2f0a2f93", group "group1" 60 Allocation "4bd1397b" modified: node "2f0a2f93", group "group1" 61 Allocation "93684511" modified: node "2f0a2f93", group "group1" 62 Allocation "b409f0a2" modified: node "2f0a2f93", group "group1" 63 Allocation "18f50054" created: node "2f0a2f93", group "group1" 64 Evaluation status changed: "pending" -> "complete" 65 ==> Evaluation "529cc88e" finished with status "complete" 66 ``` 67 68 Scale the job with ID "job1" which contains a single task group to a count of 8 69 and return immediately: 70 71 ```shell-session 72 $ nomad job scale -detach job1 8 73 Evaluation ID: b754d6b3-8960-5652-60d8-d47df6eaed13 74 ``` 75 76 Scale the job with ID "job1" and the task group "group1" to a count of 8: 77 78 ```shell-session 79 $ nomad job scale job1 group1 8 80 ==> Monitoring evaluation "529cc88e" 81 Evaluation triggered by job "job1" 82 Evaluation within deployment: "28a3378f" 83 Allocation "2a4df8ca" created: node "2f0a2f93", group "group1" 84 Allocation "b7eefe49" created: node "2f0a2f93", group "group1" 85 Allocation "bd54a83d" created: node "2f0a2f93", group "group1" 86 Allocation "fadeaea8" created: node "2f0a2f93", group "group1" 87 Allocation "4bd1397b" modified: node "2f0a2f93", group "group1" 88 Allocation "93684511" modified: node "2f0a2f93", group "group1" 89 Allocation "b409f0a2" modified: node "2f0a2f93", group "group1" 90 Allocation "18f50054" created: node "2f0a2f93", group "group1" 91 Evaluation status changed: "pending" -> "complete" 92 ==> Evaluation "529cc88e" finished with status "complete" 93 ``` 94 95 [eval status]: /docs/commands/eval-status