drove-cli 0.0.1__tar.gz → 0.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: drove-cli
3
- Version: 0.0.1
3
+ Version: 0.0.3
4
4
  Summary: Drove Command Line Interface
5
- Home-page: https://github.com/PhonePe/drove-cli
6
5
  License: Apache-2.0
7
6
  Keywords: container,docker,podman,distributed-systems,container-orchestrator
8
7
  Author: Santanu Sinha
@@ -21,6 +20,8 @@ Classifier: Programming Language :: Python :: 3.9
21
20
  Classifier: Programming Language :: Python :: 3.10
22
21
  Classifier: Programming Language :: Python :: 3.11
23
22
  Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
24
25
  Classifier: Topic :: System :: Clustering
25
26
  Classifier: Topic :: System :: Distributed Computing
26
27
  Requires-Dist: requests (>=2.31.0,<3.0.0)
@@ -38,20 +39,41 @@ Command line interface for the Drove Container Orchestrator.
38
39
 
39
40
  ## Installation
40
41
 
41
- You can install the cli from from PyPI.
42
+ You can install the CLI from PyPI.
42
43
 
43
44
  ```bash
44
45
  pip install drove-cli
45
46
  ```
46
47
 
47
- Reactivate/deactivate virtual environment based on the need to utilize drove cli.
48
+ ### To install in a virtual env
49
+
50
+ Create virtual environment
51
+ ```bash
52
+ mkdir -p ${HOME}/venvs
53
+ cd ${HOME}/venvs
54
+ python3 -m venv drove_cli
55
+ cd drove_cli
56
+ source bin/activate
57
+ pip install drove-cli
58
+ ```
59
+
60
+ To activate in another shell:
61
+
62
+ ```bash
63
+ source ${HOME}/venvs/drove_cli/bin/activate
64
+ ```
65
+
66
+ To deactivate the venv (run when in activated environment):
67
+ ```bash
68
+ deactivate
69
+ ```
48
70
 
49
71
  ## Running using docker
50
- The cli is pushed as a docker for easy access. This also elimintates the need for having python etc setup on your system.
72
+ The cli is pushed as a docker for easy access. This also eliminates the need for having python etc setup on your system.
51
73
 
52
74
  1) Pull the image:
53
75
  ```shell
54
- docker pull ghcr.io/PhonePe/drove-cli:latest
76
+ docker pull ghcr.io/phonepe/drove-cli:latest
55
77
  ```
56
78
 
57
79
  2) Create a shell script called `drove` with the following content:
@@ -61,7 +83,7 @@ docker pull ghcr.io/PhonePe/drove-cli:latest
61
83
  docker run \
62
84
  --rm --interactive --tty --network host \
63
85
  --name drove-cli -v ${HOME}/.drove:/root/.drove:ro \
64
- ghcr.io/PhonePe/drove-cli:latest "$@"
86
+ ghcr.io/phonepe/drove-cli:latest "$@"
65
87
 
66
88
  ```
67
89
 
@@ -80,7 +102,7 @@ export PATH="${PATH}:/path/to/your/script"
80
102
 
81
103
 
82
104
  6) Run drove cli
83
- ```
105
+ ```shell
84
106
  drove -h
85
107
  ```
86
108
 
@@ -96,17 +118,20 @@ To see basic help:
96
118
 
97
119
  $ drove -h
98
120
 
99
- usage: drove [-h] [--file FILE] [--cluster CLUSTER] [--endpoint ENDPOINT] [--auth-header AUTH_HEADER] [--insecure INSECURE] [--username USERNAME] [--password PASSWORD] [--debug]
100
- {executor,cluster,apps,appinstances,tasks} ...
121
+ usage: drove [-h] [--file FILE] [--cluster CLUSTER] [--endpoint ENDPOINT] [--auth-header AUTH_HEADER] [--insecure] [--username USERNAME] [--password PASSWORD] [--debug]
122
+ {lsinstances,executor,cluster,apps,appinstances,tasks,localservices} ...
123
+
101
124
 
102
125
  positional arguments:
103
- {executor,cluster,apps,appinstances,tasks}
126
+ {lsinstances,executor,cluster,apps,appinstances,tasks,localservices}
104
127
  Available plugins
128
+ lsinstances Drove local service instance related commands
105
129
  executor Drove cluster executor related commands
106
130
  cluster Drove cluster related commands
107
131
  apps Drove application related commands
108
132
  appinstances Drove application instance related commands
109
133
  tasks Drove task related commands
134
+ localservices Drove local service related commands
110
135
 
111
136
  options:
112
137
  -h, --help show this help message and exit
@@ -117,8 +142,7 @@ options:
117
142
  Drove endpoint. (For example: https://drove.test.com)
118
143
  --auth-header AUTH_HEADER, -t AUTH_HEADER
119
144
  Authorization header value for the provided drove endpoint
120
- --insecure INSECURE, -i INSECURE
121
- Do not verify SSL cert for server
145
+ --insecure, -i Do not verify SSL cert for server
122
146
  --username USERNAME, -u USERNAME
123
147
  Drove cluster username
124
148
  --password PASSWORD, -p PASSWORD
@@ -130,18 +154,20 @@ options:
130
154
  To see documentation for a command/section:
131
155
  ```
132
156
  $ drove cluster -h
133
- usage: drove cluster [-h] {ping,summary,leader,endpoints,events} ...
157
+ usage: drove cluster [-h] {ping,summary,leader,endpoints,events,maintenance-on,maintenance-off} ...
134
158
 
135
159
  positional arguments:
136
- {ping,summary,leader,endpoints,events}
160
+ {ping,summary,leader,endpoints,events,maintenance-on,maintenance-off}
137
161
  Available commands for cluster management
138
162
  ping Ping the cluster
139
163
  summary Show cluster summary
140
164
  leader Show leader for cluster
141
165
  endpoints Show all exposed endpoints
142
166
  events Events on the cluster
167
+ maintenance-on Set cluster to maintenance mode
168
+ maintenance-off Removed maintenance mode on cluster
143
169
 
144
- optional arguments:
170
+ options:
145
171
  -h, --help show this help message and exit
146
172
  ```
147
173
 
@@ -194,8 +220,8 @@ auth_header = %(prod_token)s
194
220
  ..
195
221
  ```
196
222
 
197
- The `DEFAULT` section can be used to define common variables like Insecure etc. The `local`, `stage`, `production` etc are names for inidividual clusters and these sections can be used to define configuration for individual clusters. Cluster name is referred to in the command line by using the `-c` command line option.\
198
- *Interpolation* of values is supported and can be acieved by using `%(variable_name)s` references.
223
+ The `DEFAULT` section can be used to define common variables like Insecure etc. The `local`, `stage`, `production` etc are names for individual clusters and these sections can be used to define configuration for individual clusters. Cluster name is referred to in the command line by using the `-c` command line option.\
224
+ *Interpolation* of values is supported and can be achieved by using `%(variable_name)s` references.
199
225
 
200
226
  > * Note: The `DEFAULT` section is mandatory
201
227
  > * Note: The `s` at the end of `%(var)s` is mandatory for interpolation
@@ -245,10 +271,10 @@ $ drove -e http://localhost:10000 -u guest -p guest ...
245
271
  ```
246
272
 
247
273
  ## CLI format
248
- The following cli format is followed:
274
+ The following CLI format is followed:
249
275
 
250
276
  ```
251
- usage: drove [-h] [--file FILE] [--cluster CLUSTER] [--endpoint ENDPOINT] [--auth-header AUTH_HEADER] [--insecure INSECURE] [--username USERNAME] [--password PASSWORD] [--debug]
277
+ usage: drove [-h] [--file FILE] [--cluster CLUSTER] [--endpoint ENDPOINT] [--auth-header AUTH_HEADER] [--insecure] [--username USERNAME] [--password PASSWORD] [--debug]
252
278
  {executor,cluster,apps,appinstances,tasks} ...
253
279
  ```
254
280
  ### Basic Arguments
@@ -261,8 +287,7 @@ usage: drove [-h] [--file FILE] [--cluster CLUSTER] [--endpoint ENDPOINT] [--aut
261
287
  Drove endpoint. (For example: https://drove.test.com)
262
288
  --auth-header AUTH_HEADER, -t AUTH_HEADER
263
289
  Authorization header value for the provided drove endpoint
264
- --insecure INSECURE, -i INSECURE
265
- Do not verify SSL cert for server
290
+ --insecure, -i Do not verify SSL cert for server
266
291
  --username USERNAME, -u USERNAME
267
292
  Drove cluster username
268
293
  --password PASSWORD, -p PASSWORD
@@ -274,17 +299,19 @@ usage: drove [-h] [--file FILE] [--cluster CLUSTER] [--endpoint ENDPOINT] [--aut
274
299
  ## Commands
275
300
  Commands in drove are meant to address specific functionality. They can be summarized as follows:
276
301
  ```
277
- executor Drove cluster executor related commands
278
- cluster Drove cluster related commands
279
- apps Drove application related commands
280
- appinstances Drove application instance related commands
281
- tasks Drove task related commands
302
+ list List all executors
303
+ info Show details about executor
304
+ appinstances Show app instances running on this executor
305
+ tasks Show tasks running on this executor
306
+ lsinstances Show local service instances running on this executor
307
+ blacklist Blacklist executors
308
+ unblacklist Un-blacklist executors
282
309
  ```
283
310
  ### executor
284
311
  ---
285
312
  Drove cluster executor related commands
286
313
 
287
- ```
314
+ ```shell
288
315
  drove executor [-h] {list,info,appinstances,tasks} ...
289
316
  ```
290
317
 
@@ -294,7 +321,7 @@ drove executor [-h] {list,info,appinstances,tasks} ...
294
321
 
295
322
  List all executors
296
323
 
297
- ```
324
+ ```shell
298
325
  drove executor list [-h]
299
326
  ```
300
327
 
@@ -302,7 +329,7 @@ drove executor list [-h]
302
329
 
303
330
  Show details about executor
304
331
 
305
- ```
332
+ ```shell
306
333
  drove executor info [-h] executor-id
307
334
  ```
308
335
 
@@ -314,7 +341,7 @@ drove executor info [-h] executor-id
314
341
 
315
342
  Show app instances running on this executor
316
343
 
317
- ```
344
+ ```shell
318
345
  drove executor appinstances [-h] [--sort {0,1,2,3,4,5}] [--reverse] executor-id
319
346
  ```
320
347
  ###### Positional Arguments
@@ -333,7 +360,7 @@ drove executor appinstances [-h] [--sort {0,1,2,3,4,5}] [--reverse] executor-id
333
360
 
334
361
  Show tasks running on this executor
335
362
 
336
- ```
363
+ ```shell
337
364
  drove executor tasks [-h] [--sort {0,1,2,3,4,5}] [--reverse] executor-id
338
365
  ```
339
366
 
@@ -348,12 +375,54 @@ drove executor tasks [-h] [--sort {0,1,2,3,4,5}] [--reverse] executor-id
348
375
  --reverse, -r Sort in reverse order
349
376
  ```
350
377
 
378
+ ##### lsinstances
379
+
380
+ Show local service instances running on this executor
381
+
382
+ ```shell
383
+ drove executor lsinstances [-h] [--sort {0,1,2,3,4,5}] [--reverse] executor-id
384
+ ```
385
+ ###### Positional Arguments
386
+
387
+ `executor-id` - Executor id for which info is to be shown
388
+
389
+ ###### Arguments
390
+
391
+ ```
392
+ --sort {0,1,2,3,4,5}, -s {0,1,2,3,4,5}
393
+ Sort output by column
394
+ --reverse, -r Sort in reverse order
395
+ ```
396
+
397
+ ##### blacklist
398
+
399
+ Take executors out of rotation.
400
+
401
+ ```shell
402
+ drove executor blacklist executor-id [executor-id ...]
403
+ ```
404
+
405
+ ###### Positional Arguments
406
+
407
+ `executor-id` - List of executor ids to be blacklisted. At least one is mandatory.
408
+
409
+ ##### unblacklist
410
+
411
+ Bring blacklisted executors back into rotation.
412
+
413
+ ```shell
414
+ drove executor unblacklist executor-id [executor-id ...]
415
+ ```
416
+
417
+ ###### Positional Arguments
418
+
419
+ `executor-id` - List of executor ids to be brought in to the rotation. At least one is mandatory.
351
420
 
352
421
  ### cluster
353
422
  ---
354
423
  Drove cluster related commands
355
424
 
356
- ```
425
+ ```shell
357
426
  drove cluster [-h] {ping,summary,leader,endpoints,events} ...
358
427
  ```
359
428
 
@@ -363,7 +432,7 @@ drove cluster [-h] {ping,summary,leader,endpoints,events} ...
363
432
 
364
433
  Ping the cluster
365
434
 
366
- ```
435
+ ```shell
367
436
  drove cluster ping [-h]
368
437
  ```
369
438
 
@@ -371,20 +440,20 @@ drove cluster ping [-h]
371
440
 
372
441
  Show cluster summary
373
442
 
374
- ```
443
+ ```shell
375
444
  drove cluster summary [-h]
376
445
  ```
377
446
 
378
447
  ##### leader
379
448
 
380
449
  Show leader for cluster
381
- ```
450
+ ```shell
382
451
  drove cluster leader [-h]
383
452
  ```
384
453
  ##### endpoints
385
454
 
386
455
  Show all exposed endpoints
387
- ```
456
+ ```shell
388
457
  drove cluster endpoints [-h] [--vhost VHOST]
389
458
  ```
390
459
 
@@ -399,7 +468,7 @@ drove cluster endpoints [-h] [--vhost VHOST]
399
468
 
400
469
  Events on the cluster
401
470
 
402
- ```
471
+ ```shell
403
472
  drove cluster events [-h] [--follow] [--type TYPE] [--count COUNT] [--textfmt TEXTFMT]
404
473
  ```
405
474
 
@@ -414,12 +483,24 @@ drove cluster events [-h] [--follow] [--type TYPE] [--count COUNT] [--textfmt TE
414
483
  Use the format string to print message
415
484
  Default: “{type: <25} | {id: <36} | {time: <20} | {metadata}”
416
485
  ```
486
+ ##### maintenance-on
487
+ Set cluster to maintenance mode.
488
+
489
+ ```shell
490
+ drove cluster maintenance-on
491
+ ```
492
+ ##### maintenance-off
493
+ Set cluster to normal mode.
494
+
495
+ ```shell
496
+ drove cluster maintenance-off
497
+ ```
417
498
 
418
499
  ### apps
419
500
  ---
420
501
  Drove application related commands
421
502
 
422
- ```
503
+ ```shell
423
504
  drove apps [-h] {list,summary,spec,create,destroy,deploy,scale,suspend,restart,cancelop} ...
424
505
  ```
425
506
  #### Sub-commands
@@ -428,7 +509,7 @@ drove apps [-h] {list,summary,spec,create,destroy,deploy,scale,suspend,restart,c
428
509
 
429
510
  List all applications
430
511
 
431
- ```
512
+ ```shell
432
513
  drove apps list [-h] [--sort {0,1,2,3,4,5,6,7,8}] [--reverse]
433
514
  ```
434
515
 
@@ -443,7 +524,7 @@ drove apps list [-h] [--sort {0,1,2,3,4,5,6,7,8}] [--reverse]
443
524
  ##### summary
444
525
 
445
526
  Show a summary for an application
446
- ```
527
+ ```shell
447
528
  drove apps summary [-h] app-id
448
529
  ```
449
530
  ###### Positional Arguments
@@ -453,7 +534,7 @@ drove apps summary [-h] app-id
453
534
  ##### spec
454
535
 
455
536
  Print the raw json spec for an application
456
- ```
537
+ ```shell
457
538
  drove apps spec [-h] app-id
458
539
  ```
459
540
  ###### Positional Arguments
@@ -463,7 +544,7 @@ drove apps spec [-h] app-id
463
544
  ##### create
464
545
 
465
546
  Create application on cluster
466
- ```
547
+ ```shell
467
548
  drove apps create [-h] spec-file
468
549
  ```
469
550
  ###### Positional Arguments
@@ -473,7 +554,7 @@ drove apps create [-h] spec-file
473
554
  ##### destroy
474
555
 
475
556
  Destroy an app with zero instances
476
- ```
557
+ ```shell
477
558
  drove apps destroy [-h] app-id
478
559
  ```
479
560
  ###### Positional Arguments
@@ -483,7 +564,7 @@ drove apps destroy [-h] app-id
483
564
  ##### deploy
484
565
 
485
566
  Deploy new app instances.
486
- ```
567
+ ```shell
487
568
  drove apps deploy [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id instances
488
569
  ```
489
570
  ###### Positional Arguments
@@ -504,7 +585,7 @@ drove apps deploy [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id in
504
585
 
505
586
  Scale app to required instances. Will increase or decrease instances on the cluster to match this number
506
587
 
507
- ```
588
+ ```shell
508
589
  drove apps scale [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id instances
509
590
  ```
510
591
  ###### Positional Arguments
@@ -525,7 +606,7 @@ drove apps scale [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id ins
525
606
  ##### suspend
526
607
 
527
608
  Suspend the app
528
- ```
609
+ ```shell
529
610
  drove apps suspend [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id
530
611
  ```
531
612
  ###### Positional Arguments[¶](#Positional%20Arguments_repeat9 "Link to this heading")
@@ -546,7 +627,7 @@ drove apps suspend [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id
546
627
 
547
628
  Restart am existing app instances.
548
629
 
549
- ```
630
+ ```shell
550
631
  drove apps restart [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id
551
632
  ```
552
633
 
@@ -565,7 +646,7 @@ drove apps restart [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id
565
646
  ##### cancelop
566
647
 
567
648
  Cancel current operation
568
- ```
649
+ ```shell
569
650
  drove apps cancelop [-h] app-id
570
651
  ```
571
652
  ###### Positional Arguments
@@ -574,7 +655,7 @@ drove apps cancelop [-h] app-id
574
655
  ### appinstances
575
656
  ---
576
657
  Drove application instance related commands
577
- ```
658
+ ```shell
578
659
  drove appinstances [-h] {list,info,logs,tail,download,replace,kill} ...
579
660
  ```
580
661
  #### Sub-commands
@@ -582,7 +663,7 @@ drove appinstances [-h] {list,info,logs,tail,download,replace,kill} ...
582
663
  ##### list
583
664
 
584
665
  List all application instances
585
- ```
666
+ ```shell
586
667
  drove appinstances list [-h] [--old] [--sort {0,1,2,3,4,5}] [--reverse] app-id
587
668
  ```
588
669
  ###### Positional Arguments
@@ -599,7 +680,7 @@ drove appinstances list [-h] [--old] [--sort {0,1,2,3,4,5}] [--reverse] app-id
599
680
  ##### info
600
681
 
601
682
  Print details for an application instance
602
- ```
683
+ ```shell
603
684
  drove appinstances info [-h] app-id instance-id
604
685
  ```
605
686
  ###### Positional Arguments
@@ -609,7 +690,7 @@ drove appinstances info [-h] app-id instance-id
609
690
  ##### logs
610
691
 
611
692
  Print list of logs for application instance
612
- ```
693
+ ```shell
613
694
  drove appinstances logs [-h] app-id instance-id
614
695
  ```
615
696
  ###### Positional Arguments
@@ -620,7 +701,7 @@ drove appinstances logs [-h] app-id instance-id
620
701
  ##### tail
621
702
 
622
703
  Tail log for application instance
623
- ```
704
+ ```shell
624
705
  drove appinstances tail [-h] [--file FILE] app-id instance-id
625
706
  ```
626
707
  ###### Positional Arguments
@@ -637,7 +718,7 @@ drove appinstances tail [-h] [--file FILE] app-id instance-id
637
718
  ##### download
638
719
 
639
720
  Download log for application instance
640
- ```
721
+ ```shell
641
722
  drove appinstances download [-h] [--out OUT] app-id instance-id file
642
723
  ```
643
724
  ###### Positional Arguments
@@ -653,7 +734,7 @@ drove appinstances download [-h] [--out OUT] app-id instance-id file
653
734
  ##### replace
654
735
 
655
736
  Replace specific app instances with fresh instances
656
- ```
737
+ ```shell
657
738
  drove appinstances replace [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id instance-id [instance-id ...]
658
739
  ```
659
740
  ###### Positional Arguments
@@ -672,7 +753,7 @@ drove appinstances replace [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT]
672
753
  ##### kill
673
754
 
674
755
  Kill specific app instances
675
- ```
756
+ ```shell
676
757
  drove appinstances kill [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app-id instance-id [instance-id ...]
677
758
  ```
678
759
  ###### Positional Arguments
@@ -691,7 +772,7 @@ drove appinstances kill [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] app
691
772
  ### tasks
692
773
  ---
693
774
  Drove task related commands
694
- ```
775
+ ```shell
695
776
  drove tasks [-h] {create,kill,list,show,logs,tail,download} ...
696
777
  ```
697
778
  #### Sub-commands
@@ -699,7 +780,7 @@ drove tasks [-h] {create,kill,list,show,logs,tail,download} ...
699
780
  ##### create
700
781
 
701
782
  Create a task on cluster
702
- ```
783
+ ```shell
703
784
  drove tasks create [-h] spec-file
704
785
  ```
705
786
  ###### Positional Arguments
@@ -709,7 +790,7 @@ drove tasks create [-h] spec-file
709
790
  ##### kill
710
791
 
711
792
  Kill a running task
712
- ```
793
+ ```shell
713
794
  drove tasks kill [-h] source-app-name task-id
714
795
  ```
715
796
  ###### Positional Arguments
@@ -720,7 +801,7 @@ drove tasks kill [-h] source-app-name task-id
720
801
  ##### list
721
802
 
722
803
  List all active tasks
723
- ```
804
+ ```shell
724
805
  drove tasks list [-h] [--app APP] [--sort {0,1,2,3,4,5,6,7,8}] [--reverse]
725
806
  ```
726
807
  ###### Named Arguments
@@ -733,7 +814,7 @@ drove tasks list [-h] [--app APP] [--sort {0,1,2,3,4,5,6,7,8}] [--reverse]
733
814
  ##### show
734
815
 
735
816
  Shows details about a task
736
- ```
817
+ ```shell
737
818
  drove tasks show [-h] source-app task-id
738
819
  ```
739
820
  ###### Positional Arguments
@@ -743,7 +824,7 @@ drove tasks show [-h] source-app task-id
743
824
  ##### logs
744
825
 
745
826
  Print list of logs for task
746
- ```
827
+ ```shell
747
828
  drove tasks logs [-h] source-app task-id
748
829
  ```
749
830
  ###### Positional Arguments
@@ -753,7 +834,7 @@ drove tasks logs [-h] source-app task-id
753
834
  ##### tail
754
835
 
755
836
  Tail log for task
756
- ```
837
+ ```shell
757
838
  drove tasks tail [-h] [--file FILE] source-app task-id
758
839
  ```
759
840
  ###### Positional Arguments
@@ -769,7 +850,7 @@ drove tasks tail [-h] [--file FILE] source-app task-id
769
850
 
770
851
  Download log for task
771
852
 
772
- ```
853
+ ```shell
773
854
  drove tasks download [-h] [--out OUT] source-app task-id file
774
855
  ```
775
856
  ###### Positional Arguments
@@ -782,6 +863,256 @@ drove tasks download [-h] [--out OUT] source-app task-id file
782
863
  ```
783
864
  --out OUT, -o OUT Filename to download to. Default is the same filename as provided.
784
865
  ```
866
+ ### localservices
867
+ ---
868
+ Drove local service related commands
869
+
870
+ ```shell
871
+ drove localservices [-h] {list,summary,spec,create,destroy,activate,deactivate,restart,cancelop} ...
872
+ ```
873
+ #### Sub-commands
874
+
875
+ ##### list
876
+
877
+ List all local services
878
+
879
+ ```shell
880
+ drove localservices list [-h] [--sort {0,1,2,3,4,5,6,7,8}] [--reverse]
881
+ ```
882
+
883
+ ###### Named Arguments
884
+
885
+ ```
886
+ --sort {0,1,2,3,4,5,6,7,8}, -s {0,1,2,3,4,5,6,7,8}
887
+ Sort output by column
888
+ --reverse, -r Sort in reverse order
889
+ ```
890
+
891
+ ##### summary
892
+
893
+ Show a summary for a local service
894
+ ```shell
895
+ drove localservices summary [-h] service-id
896
+ ```
897
+ ###### Positional Arguments
898
+
899
+ `service-id` - Local Service ID
900
+
901
+ ##### spec
902
+
903
+ Print the raw json spec for a local service
904
+ ```shell
905
+ drove localservices spec [-h] service-id
906
+ ```
907
+ ###### Positional Arguments
908
+
909
+ `service-id` - Local Service ID
910
+
911
+ ##### create
912
+
913
+ Create local service on cluster
914
+ ```shell
915
+ drove localservices create [-h] spec-file
916
+ ```
917
+ ###### Positional Arguments
918
+
919
+ `spec-file` - JSON spec file for the local service
920
+
921
+ ##### destroy
922
+
923
+ Destroy an inactive local service
924
+
925
+ ```shell
926
+ drove localservices destroy [-h] service-id
927
+ ```
928
+ ###### Positional Arguments
929
+
930
+ `service-id` - Local Service ID
931
+
932
+
933
+ ##### activate
934
+
935
+ Activate a local service
936
+
937
+ ```shell
938
+ drove localservices activate [-h] service-id
939
+ ```
940
+ ###### Positional Arguments
941
+
942
+ `service-id` - Local Service ID
943
+
944
+ ##### deactivate
945
+
946
+ Deactivate a local service
947
+
948
+ ```shell
949
+ drove localservices deactivate [-h] service-id
950
+ ```
951
+ ###### Positional Arguments
952
+
953
+ `service-id` - Local Service ID
954
+
955
+ ##### update
956
+
957
+ Deactivate a local service
958
+
959
+ ```shell
960
+ drove localservices update [-h] service-id count
961
+ ```
962
+ ###### Positional Arguments
963
+
964
+ `service-id` - Local Service ID
965
+ `count` - Number of instances per executor
966
+
967
+ ##### restart
968
+
969
+ Restart a local service.
970
+
971
+ ```shell
972
+ drove localservices restart [-h] [--stop] [--parallelism PARALLELISM] [--timeout TIMEOUT] [--wait] service-id
973
+ ```
974
+
975
+ ###### Positional Arguments
976
+
977
+ `service-id` - Local Service ID
978
+
979
+ ###### Named Arguments
980
+ ```
981
+ --stop, -s Stop current instance before spinning up new ones
982
+ --parallelism PARALLELISM, -p PARALLELISM
983
+ Number of parallel threads to be used to execute operation
984
+ --timeout TIMEOUT, -t TIMEOUT
985
+ Timeout for the operation on the cluster
986
+ --wait, -w Wait to ensure all instances are replaced
987
+ ```
988
+ ##### cancelop
989
+
990
+ Cancel current operation
991
+ ```shell
992
+ drove localservices cancelop [-h] service-id
993
+ ```
994
+ ###### Positional Arguments
995
+ `service-id` - Service ID
996
+
997
+ ### lsinstances
998
+ ---
999
+ Drove local service instance related commands
1000
+
1001
+ ```shell
1002
+ drove lsinstances [-h] {list,info,logs,tail,download,replace,kill} ...
1003
+ ```
1004
+ #### Sub-commands
1005
+
1006
+ ##### list
1007
+
1008
+ List all local service instances
1009
+ ```shell
1010
+ drove lsinstances list [-h] [--old] [--sort {0,1,2,3,4,5}] [--reverse] service-id
1011
+ ```
1012
+ ###### Positional Arguments
1013
+ `service-id` - Local Service ID
1014
+
1015
+ ###### Named Arguments
1016
+
1017
+ ```
1018
+ --parallelism PARALLELISM, -p PARALLELISM
1019
+ Number of parallel threads to be used to execute operation (default: 1)
1020
+ --timeout TIMEOUT, -t TIMEOUT
1021
+ Timeout for the operation on the cluster (default: 5 minutes)
1022
+ ```
1023
+ ##### info
1024
+
1025
+ Print details for an local service instance
1026
+ ```shell
1027
+ drove lsinstances info [-h] service-id instance-id
1028
+ ```
1029
+ ###### Positional Arguments
1030
+ `service-id` - Local Service ID\
1031
+ `instance-id` - Local Service Instance ID
1032
+
1033
+ ##### logs
1034
+
1035
+ Print list of logs for local service instance
1036
+ ```shell
1037
+ drove lsinstances logs [-h] service-id instance-id
1038
+ ```
1039
+ ###### Positional Arguments
1040
+
1041
+ `service-id` - Local Service ID\
1042
+ `instance-id` - Local Service Instance ID
1043
+
1044
+ ##### tail
1045
+
1046
+ Tail log for local service instance
1047
+ ```shell
1048
+ drove lsinstances tail [-h] [--file FILE] service-id instance-id
1049
+ ```
1050
+ ###### Positional Arguments
1051
+
1052
+ `service-id` - Local Service ID
1053
+ `instance-id` - Local Service Instance ID
1054
+
1055
+ ###### Named Arguments
1056
+
1057
+ ```
1058
+ --log LOG, -l LOG Log filename to tail. Default is to tail output.log
1059
+ ```
1060
+
1061
+ ##### download
1062
+
1063
+ Download log for local service instance
1064
+ ```shell
1065
+ drove lsinstances download [-h] [--out OUT] service-id instance-id file
1066
+ ```
1067
+ ###### Positional Arguments
1068
+
1069
+ `service-id` - Local Service ID
1070
+ `instance-id` - Local Service Instance ID
1071
+ `file` - Log filename to download
1072
+
1073
+ ###### Named Arguments
1074
+ ```
1075
+ --out, -o Filename to download to. Default is the same filename as provided.
1076
+ ```
1077
+ ##### replace
1078
+
1079
+ Replace specific local service instances with fresh instances
1080
+ ```shell
1081
+ drove lsinstances replace [-h] [--stop] [--parallelism PARALLELISM] [--timeout TIMEOUT] [--wait] service-id instance-id [instance-id ...]
1082
+ ```
1083
+ ###### Positional Arguments
1084
+ `service-id` - Local Service ID
1085
+ `instance-id` - Local Service Instance IDs
1086
+
1087
+ ###### Named Arguments
1088
+ ```
1089
+ --stop, -s Stop the instance before spinning up a new one
1090
+ --parallelism PARALLELISM, -p PARALLELISM
1091
+ Number of parallel threads to be used to execute operation
1092
+ --timeout TIMEOUT, -t TIMEOUT
1093
+ Timeout for the operation on the cluster
1094
+ --wait, -w Wait to ensure all instances are replaced
1095
+ ```
1096
+
1097
+ ##### kill
1098
+
1099
+ Kill specific local service instances
1100
+ ```shell
1101
+ drove lsinstances kill [-h] [--parallelism PARALLELISM] [--timeout TIMEOUT] service-id instance-id [instance-id ...]
1102
+ ```
1103
+ ###### Positional Arguments
1104
+ `service-id` - Local Service ID
1105
+ `instance-id` - Local Service Instance IDs
1106
+
1107
+ ###### Named Arguments
1108
+
1109
+ ```
1110
+ --parallelism PARALLELISM, -p PARALLELISM
1111
+ Number of parallel threads to be used to execute operation
1112
+ --timeout TIMEOUT, -t TIMEOUT
1113
+ Timeout for the operation on the cluster (default: 5 minutes)
1114
+ --wait, -w Wait to ensure all instances are killed
1115
+ ```
785
1116
 
786
1117
  ©2024, Santanu Sinha.
787
1118