-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy paths9s-cluster.1
1500 lines (1248 loc) · 38.3 KB
/
s9s-cluster.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.TH S9S-CLUSTER 1 "August 29, 2016"
.SH NAME
s9s-cluster \- Command line client for the Severalnines Clustercontrol server.
.SH SYNOPSIS
.B s9s-cluster
.RI [OPTION]...
.RI [CLUSTER_NAME]...
.SH DESCRIPTION
\fBs9s\fP is a command line tool for ClusterControl, which can be used to
deploy and operate MySQL, MariaDB, MongoDB and PostgreSQL.
.SH OPTIONS
.SS "Main Option"
The application should always be started using a main option that sets what
operation should be performed. This "main option" should be one of the
following:
.\"
.\" Main options
.\"
.TP
.B --add-node
Adds a new node (server) to the cluster or to be more precise creates a new
job that will eventually add a new node to the cluster. The name (or IP
address) of the node should be specified using the \fB\-\-nodes\fR command
line option.
.B EXAMPLE
.nf
s9s cluster \\
--add-node \\
--cluster-id=1 \\
--nodes=192.168.0.202 \\
--master-delay=3600
--wait
.fi
.TP
.B --change-config
This option can be used to change the configuration values for the cluster. The
cluster configuration in this context is the Cmon Controller's configuration for
the given cluster.
.B
.nf
mys9s cluster \\
--change-config \\
--cluster-id=1 \\
--cmon-user="system" \\
--password="secret" \\
--opt-name="host_stats_collection_interval" \\
--opt-value="120"
.fi
.TP
.B --check-hosts
This option can be used to check the hosts before creating a new cluster.
.B EXAMPLE
.nf
s9s cluster \\
--check-hosts \\
--nodes=192.168.0.102 \\
--print-json
.fi
.TP
.B \-\^\-collect\-logs
This option will create a job that will collect the log files from the nodes of
the cluster.
.B EXAMPLE
.nf
s9s cluster \\
--collect-logs \\
--cluster-id=1 \\
--log
.fi
.TP
.B --create-account
Create a new account to be used on the cluster to access the database(s).
Creating accounts is also possible using the \fBaccount\fP mode, check
s9s-account(1) for further details.
.B EXAMPLE
.nf
s9s cluster \\
--create-account \\
--cluster-id=1 \\
--account=john_doe:[email protected] \\
--with-database
.fi
.TP
.B \-\-create
Create a new cluster. When this command line option is provided the program
will contact the controller and register a new job that will eventually create
a new cluster.
.B EXAMPLE
.nf
s9s cluster \\
--create \\
--cluster-type=mysqlreplication \\
--nodes="192.168.0.84?master;192.168.0.151?slave" \\
--vendor=percona \\
--cluster-name=ft_replication_11130 \\
--provider-version=5.6 \\
--wait
.fi
.TP
.B \-\-sync
Synchronizes the cluster list with the UI Frontend databases.
.B EXAMPLE
.nf
s9s cluster --sync --wait
.fi
.TP
.B \-\-create-database
Create a new database on the cluster.
.B EXAMPLE
.nf
mys9s cluster \\
--create-database \\
--cluster-id=1 \\
--db-name="testDatabase" \\
--batch
.fi
.TP
.B \-\-check-pkg-upgrades
Check available cluster package upgrades.
.B EXAMPLE
.nf
mys9s cluster \\
--check-pkg-upgrades \\
--cluster-id=1 \\
--nodes="192.168.0.84:5433;192.168.0.85" \\
--wait
.fi
.TP
.B \-\-available-upgrades
Shows the available packages to upgrade the cluster with.
.B EXAMPLE
.nf
mys9s cluster \\
--available-upgrades \\
--cluster-id=1 \\
--nodes="192.168.0.84:5433;192.168.0.85" \\
--wait
.fi
.TP
.B \-\-upgrade-cluster
Upgrade cluster packages while keeping the same major version.
.B EXAMPLE
.nf
s9s cluster \\
--upgrade-cluster \\
--cluster-id=1 \\
--nodes="192.168.0.84:5433;192.168.0.85" \\
--wait
.fi
.TP
.B \-\-upgrade-to-version
The new newer major version to upgrade too. Without this,
only minor upgrade will be done.
.B EXAMPLE
.nf
s9s cluster \\
--upgrade-cluster \\
--upgrade-to-version=12 \\
--cluster-id=1 \\
--log
.fi
.TP
.B --upgrade-method
Strategy for doing major upgrade. For PostgreSql there are two methods
supported: copy and link. The default valuse is 'copy'.
.RS 7
.TP
.B copy
This method will copy all data by doing backup on the old version and
restore on the new version.
.TP
.B link
With link method tha data files won't be copied, instead hard links will be created to the old version's data files.
.TP
.B EXAMPLE
.nf
s9s cluster \\
--upgrade-cluster \\
--upgrade-to-version=12 \\
--upgrade-method=link \\
--cluster-id=1 \\
--log
.fi
.RE
.TP
.B --create-report
When this command line option is provided a new job will be started that will
create an error-report. After the job is executed the error-report will be
available on the controller. If the \fB\-\-output-dir\fP command line option
is provided the report will be created in the given directory on the
controller host.
To mask out all the passwords (with xxxxx) from the generated report, it is
possible to specify \fB\-\-mask-passwords\fP command line option,
or \fBmask_password\fP=true in the s9s configuration file.
.TP
.B --delete-account
Delete an existing account from the cluster. Deleting accounts is also
possible using the \fBaccount\fP mode, check s9s-account(1) for further details.
.B EXAMPLE
.nf
s9s cluster \\
--delete-account \\
--cluster-id=1 \\
.fi
.TP
.B --delete-database
Creates a new job that will delete a database from the cluster.
.B EXAMPLE
.nf
s9s cluster \\
--delete-database \\
--print-request \\
--cluster-name="galera_001" \\
--db-name="my_database" \\
--log
.fi
.TP
.B --disable-recovery
This command line option will create a new job that will disable the
autorecovery for the cluster (both cluster autorecovery and node autorecovery).
The job can optionally be used to also register a maintenance period for the
cluster.
.B EXAMPLE
.nf
s9s cluster \\
--disable-recovery \\
--log \\
--cluster-id="1" \\
--maintenance-minutes="60" \\
--reason="testRecoveryJob"
.fi
.TP
.B --drop
Removes the cluster from the Cmon controller. The cluster remains operational,
but the controller will no longer manage or monitor it.
.B EXAMPLE
.nf
s9s cluster \\
--drop \\
--cluster-id=1 \\
--remove-backups=true \\
--wait
.fi
.TP
.B --enable-recovery
Creates a job that will enable the autorecovery for both the cluster and the
nodes in the cluster.
.B EXAMPLE
.nf
s9s cluster \\
--enable-recovery \\
--log \\
--cluster-id="1"
.fi
.TP
.B --import-config
Creates a job that will import all the logfiles from the nodes of the cluster.
.B EXAMPLE
.nf
s9s cluster \\
--import-config \\
--cluster-id=1 \\
--log
.fi
.TP
.B --list-config
This command line option can be used to print the configuration values for the
cluster. The cluster configuration in this context is the Cmon Controller's
configuration for the given cluster.
.B EXAMPLE
.nf
mys9s cluster \\
--list-config \\
--cluster-id=1 \\
--long \\
'*stats*'
.fi
.TP
.B --list-databases
List the databases found on the cluster. Please note that if the cluster has a
lot of databases this option might not show some of them. Sampling a huge number
of databases would generate high load and so the controller has an upper limit
built into it.
.B EXAMPLE
.nf
s9s cluster \\
--list-database \\
--long \\
--cluster-id=1
.fi
.TP
.B \-L, \-\-list
List the clusters managed by the controller.
.B
.nf
s9s cluster \\
--list \\
--long \\
ft_*
.fi
.TP
.B --ping
Check the connection to the controller. This will send a request to the
controller, the controller will check that he cluster exists and reply a message
with some information about the cluster and the controller. Then the s9s program
will calculate the message turnaround time and print it. The \fB--wait\fP option
can be used to set the pinging into continuous mode.
.B EXAMPLE
.nf
s9s cluster \\
--ping \\
--cluster-id=1 \\
--wait
.fi
.TP
.B \-\-promote\-slave
Promote a slave node to become a master. This main option will of course work
only on clusters where it is meaningful, where there are slaves and masters are
possible.
.B EXAMPLE:
.nf
s9s cluster \\
--promote-slave \\
--nodes=192.168.0.151 \\
--cluster-id=1 \\
--log
.fi
.TP
.B \-\-register
Registers an existing cluster in the controller. This option is very similar to
the \fB\-\^\-create\fR option, but it of course will not install a new cluster,
it just registers one in the controller. Use this to start managing
pre-installed clusters with the Cmon Controller.
.B EXAMPLE
.nf
s9s cluster \\
--register \\
--cluster-type=galera \\
--nodes=192.168.0.196 \\
--vendor=percona \\
--cluster-name=my_cluster_32265 \\
--wait
.fi
.TP
.B \-\-remove\-node
Removes a node from the cluster by creating a job that performs the removal.
The node name or IP address should be specified using the \fB\-\-nodes\fR option.
.B EXAMPLE
.nf
s9s cluster \\
--remove-node \\
--cluster-id=1 \\
--nodes=192.168.0.245:9600 \\
--wait
.fi
The \fB\-\-uninstall\fR option can be used to also remove the software installed
on the node.
.B EXAMPLE
.nf
s9s cluster \\
--remove-node \\
--uninstall \\
--cluster-id=1 \\
--nodes=192.168.0.245:9600 \\
--wait
.fi
The \fB\-\-unregister-only\fR option removes the node from the cluster's node list without
stopping or removing any running services. Removing the node using this option
does not alter the node configuration, thus connections to other nodes in the DB cluster
will remain intact, however it will no longer be managed by the ClusterControl (CC).
Any failover or promotion performed outside of CC may cause CC to lose track of the current
master node, leading to further errors. Be careful when using this option, as it can lead to
potential error-prone scenarios.
.B EXAMPLE
.nf
s9s cluster \\
--remove-node \\
--unregister-only \\
--cluster-id=1 \\
--nodes=192.168.0.245:9600 \\
--wait
.fi
.TP
.B --rolling-restart
Restart all nodes of the cluster by keeping the cluster alive. This command
line option will create a job that will restart all the nodes.
.B EXAMPLE
.nf
s9s cluster \\
--rolling-restart \\
--cluster-id=1 \\
--wait
.fi
.TP
.B --set-read-only
This option will create a job that when executed will set the entire cluster
into read-only mode. Please note that not every cluster type supports the
read-only mode.
.B EXAMPLE
.nf
s9s cluster \\
--set-read-only \\
--cluster-id=1 \\
--debug \\
--log
.fi
.TP
.B \-\-start
Creates a new job to start the cluster.
.B EXAMPLE
.nf
s9s cluster \\
--start \\
--cluster-id=1 \\
--wait
.fi
.TP
.B \-\-stat
Print the details of one or more clusters.
.B EXAMPLE
.nf
s9s cluster \\
--stat \\
cluster_*
.fi
.TP
.B \-\-stop
Creates and registers and a new job that will stop the cluster when executed.
.B EXAMPLE
.nf
s9s cluster \\
--stop \\
--cluster-id=1 \\
--wait
.fi
.TP
.B --import-sql-users
Imports SQL users to the load balancer. Depending on the actual load balancer
this can be only import or complete update of the user authentication information
known by the load balancer. This is only supported by PgBouncer at the moment.
Adds a new node (server) to the cluster or to be more precise creates a new
job that will eventually add a new node to the cluster.
The load balancer nodes where the users are to be imported shall be specified
using the \fB\-\-nodes\fR command line option.
.B EXAMPLE
.nf
s9s cluster \\
--import-sql-user \\
--cluster-id=1 \\
--nodes=PgBouncer://192.168.0.202:6432 \\
--wait
.fi
.TP
.B --enable-ssl
Deploys SSL certificates and enables incoming SSL connections to the database
nodes. You may pass your own certificates (path on controller using the \fB\-\-ssl-ca\fR,
\fB\-\-ssl-cert\fR and \fB\-\-ssl-key\fR options).
By default ClusterControll will attempt to generate a CA certificate and server
& client certificates and deploy them.
.B EXAMPLE
.nf
s9s cluster \\
--enable-ssl \\
--cluster-id=1 \\
--wait
.fi
.TP
.B \-\-reconfigure-node
Reconfigures the existing nodes with the optionaly specified node properties.
At the moment this only works with PBMAgent nodes.
.B EXAMPLE
.nf
s9s cluster \\
--cluster-id=1 \\
--reconfigure-node \\
--nodes=PBMAgent://*?backup_dir=/my_new_shared_backupdir
.fi
.TP
.B \-\-reinstall-node
Reinstalls and reconfigures the existing nodes with the optionaly specified
node properties. At the moment this only works with PBMAgent nodes.
.B EXAMPLE
.nf
s9s cluster \\
--cluster-id=1 \\
--reinstall-node \\
--nodes=PBMAgent://*?backup_dir=/my_new_shared_backupdir
.fi
.\"
.\" Generic options
.\"
.SS Generic Options
.TP
.B \-\-help
Print the help message and exist.
.TP
.B \-\-debug
Print even the debug level messages.
.TP
.B \-v, \-\-verbose
Print more messages than normally.
.TP
.B \-V, \-\-version
Print version information and exit.
.TP
.BR \-c " [\fIPROT\fP://]\fIHOSTNAME\fP[:\fIPORT\fP]" "\fR,\fP \-\^\-controller=" [\fIPROT\fP://]\\fIHOSTNAME\fP[:\fIPORT\fP]
The host name of the Cmon Controller. The protocol and port is also accepted as
part of the hostname (e.g. --controller="https://127.0.0.1:9556").
.TP
.BI \-P " PORT" "\fR,\fP \-\^\-controller-port=" PORT
The port where the Cmon Controller is waiting for connections.
.TP
.BI \-u " USERNAME" "\fR,\fP \-\^\-cmon\-user=" USERNAME
Sets the name of the Cmon user (the name of the account maintained by the Cmon
Controller) to be used to authenticate. Since most of the functionality needs
authentication this command line option should be very frequently used or set in
the configuration file. Please check the documentation of the s9s.conf(5) to see
how the Cmon User can be set using the \fBcmon_user\fP configuration variable.
.TP
.BI \-p " PASSWORD" "\fR,\fP \-\^\-password=" PASSWORD
The password for the Cmon User (whose user name is set using the
\fB\-\^\-cmon\-user\fP command line option or using the \fBcmon_user\fP
configuration value). Providing the password is not mandatory, the user
authentication can also be done using a private/public keypair automatically.
.TP
.BI \-\^\-private\-key\-file= FILE
The path to the private key file that will be used for the authentication. The
default value for the private key is \fB~/.s9s/username.key\fP.
.TP
.B \-l, \-\-long
This option is similar to the -l option for the standard ls UNIX utility
program. If the program creates a list of objects this option will change its
format to show more details.
.TP
.B --print-json
The JSON strings will be printed while communicating with the controller. This
option is for debugging purposes.
.TP
.BR \-\^\-color [ =\fIWHEN\fP "]
Turn on and off the syntax highlighting of the output. The supported values for
.I WHEN
is
.BR never ", " always ", or " auto .
.TP
.B \-\-batch
Print no messages. If the application created a job print only the job ID number
and exit. If the command prints data do not use syntax highlight, headers,
totals, only the pure table to be processed using filters.
.TP
.B \-\-no\-header
Do not print headers for tables.
.TP
.BI \-\^\-output-dir= DIRECTORY
The directory where the output file(s) will be created.
.\"
.\" Options Related to Newly Created Jobs
.\"
.SS Options Related to Newly Created Jobs
Commands that create a new job will also accept command line options related to
the job. Please check the cmon-job(1) man page for information about the options
related to newly created jobs.
.\"
.\"
.\"
.SS Other Options
.TP \-\^\-account= NAME[:PASSWD][@HOST]
An SQL account with optional password and hostname. This command line argument
is used when a new account is created.
.TP
.BI \-\^\-cloud= PROVIDER
This option can be used when new container(s) created. The name of the cloud
provider where the new container will be created.
This command line option can also be used to filter the list of the containers
when used together with one of the \fB\-\-list\fP or \fB\-\-stat\fP options.
.TP
.BI \-\^\-containers= LIST
A list of containers to be created and used by the created job. This command
line option can be used to create container (virtual machines) and then install
clusters on them or just add them to an existing cluster as nodes. Please check
s9s-container(1) for further details.
.TP
.BI \-\^\-credential\-id= ID
The cloud credential ID that should be used when creating a new container. This
is an optional value, if not provided the controller will find the credential to
be used by the cloud name and the chosen region.
.TP
.BI \-\^\-firewalls= LIST
List of firewall (AKA security groups) IDs separated by ',' or ';' to be used
for newly created containers. Please check s9s-container(1) for further
details.
.TP
.BI \-i " INTEGER" "\fR,\fP \-\^\-cluster-id=" INTEGER
If the operation related to an existing cluster this option can be used to
control which cluster will be manipulated. If the operation creates a new
cluster the cluster ID is assigned automatically, so this option can't be used.
.TP
.BI \-n " NAME" "\fR,\fP \-\^\-cluster-name=" NAME
Sets the cluster name. If the operation creates a new cluster this will be the
name of the new cluster. (Usage of this option for selecting an existing cluster
is not yet implemented.)
.TP
.BI \-\^\-image= NAME
The name of the image from which the new container will be created. This option
is not mandatory, when a new container is created the controller can choose an
image if it is needed.
To find out what images are supported by the registered container severs please
issue the \fBs9s server \-\^\-list\-images\fP command.
.TP
.BI \-\^\-image\-os\-user= NAME
The name of the initial OS user defined in the image for the first login. Use
this option to create containers based on custom images.
.TP
.BI --clusters= INTLIST
Coma separated list of cluster identifiers.
.TP
.BI --nodes= NODELIST
The list of nodes or hosts enumerated in a special string using a semicolon as
field separator (e.g. "192.168.1.1;192.168.1.2").
The strings in the node list are urls that can have the following protocols:
.RS 7
.TP
.B mysql://
The protocol for MySql servers. Use this string to specify MySql servers.
.TP
.B ndbd://
Someone has to write this part.
.TP
.B ndb_mgmd://
Someone has to write this part. The mgmd:// notation is also accepted.
.TP
.B haproxy://
Used to create and manipulate HaProxy servers.
.TP
.B pgbouncer://
Used to create and manipulate PgBouncer servers.
.TP
.B pbmagent://
Used to create and manipulate PBMAgent (Percona Backup for MongoDb agent) servers.
.TP
.B proxysql://
Use this to install and handle ProxySql servers.
.TP
.B maxscale://
The protocol to install and handle MaxScale servers.
.TP
.B mongos://
The protocol to install and handle mongo router servers.
.TP
.B mongocfg://
The protocol to install and handle mongo config servers.
.TP
.B mongodb://
The protocol to install and handle mongo data servers.
.RE
.TP
.BI \-\^\-no\-install
Skip the cluster software installation part. Assume all software is installed on
the node(s). This command line option is considered when installing a new
cluster or adding a new node to an existing cluster.
.TP
.BI \-\^\-os\-key\-file= PATH
The path of the SSH key to install on a new container to allow the user to log
in. This command line option can be passed when a new container is created, the
argument of the option should be the path of the \fBprivate\fP key stored on the
controller. Although the path of the private key file is passed only the public
key will be uploaded to the new container.
.TP
.BI \-\^\-os\-password= PASSWORD
This command line option can be passed when creating new containers to set the
password for the user that will be created on the container. Please note that
some virtualization backend might not support passwords, only keys.
.TP
.BI \-\^\-os\-user= USERNAME
This option may be used when creating new containers to pass the name of the
user that will be created on the new container. Please note that this optin is
not mandatory, because the controller will create an account whose name is the
same as the name of the cmon user creating the container. The public key of the
cmon user will also be registered (if the user has an associated public key) so
the user can actually log in.
.TP
.BI \-\^\-subnet\-id= ID
This option can be used when new containers are created to set the subnet ID
for the container.
To find out what subnets are supported by the registered container severs please
issue the \fBs9s server \-\^\-list\-subnets\fP command.
.TP
.BI \-\^\-template= NAME
The name of the container template. Defining a template is an easy way to set a
number of complex propeties without actually enumerating them in the command
line one by one.
The actual interpretation of the template name is up to the virtualization
backend that is the protocol of the container server. The \fBlxc\fP backend for
example considers the template to be an already created container, it simply
creates the new container by copying the template container so the new container
inherits everything.
The template name can also be provided as a property name for the container, so
the command \fBs9s container \-\-create
\-\-containers="node02?template=ubuntu;node03" \-\-log\fP for example will
create two containers, one using a template, the other using the default
settings.
Please note that the \fB\-\-template\fP command line option is not mandatory, if
emitted suitable default values will be chosen, but if the template is provided
and the template is not found the creation of the new container will fail.
.TP
.BI \-\^\-use\-internal\-repos
Use internal repositories when installing software packages. Using this command
line option it is possible to deploy clusters and add nodes off-line, without a
working internet connection. The internal repositories has to be set up in
advance.
This option can also be set in the s9s configuration file using the
\fBuse_internal_repos\fP keyword (check s9s.conf(5) for further details).
.TP
.BI \-\^\-create\-local\-repository
Create a local software (APT/YUM) repository mirror when installing software packages.
Using this command line option it is possible to deploy clusters and add nodes off-line,
without a working internet connection.
.TP
.BI \-\^\-local\-repository= NAME
Use a local repository mirror created by ClusterControl for software deployment.
.TP
.BI \-\^\-keep\-firewall
When not specified the CLI will pass disable firewall option to create cluster
and node addition operations. To keep your firewall settings you may pass this
option.
This option can also be set in the s9s configuration file using the
\fBkeep_firewall\fP keyword (check s9s.conf(5) for further details).
.TP
.BI --volumes= LIST
When a new container is created this command line option can be used to pass a
list of volumes that will be created for the container.
The list can contain one or more volumes separated by the ';' character. Every
volume consists three properties separated by the ':' character, a volume name,
the volume size in gigabytes and a volume type that is either "hdd" or "ssd".
The string \fB"vol1:5:hdd;vol2:10:hdd"\fP for example defines two hard-disk
columes, one 5GByte and one 10GByte.
For convenience the volume name and the type can be omitted, so that
automatically generated volume names are used.
.TP
.BI \-\^\-vpc\-id= ID
This option can be used when new containers are created to set the vpc ID
for the container.
To find out what VPCs are supported by the registered container severs please
issue the \fBs9s server \-\^\-list\-subnets --long\fP command.
.TP
.BI \-\^\-vendor= VENDOR
The name of the DB vendor to be installed.
.TP
.BI \-\^\-enterprise-token= TOKEN
The customer's Repo/Download Token for an Enterprise Database.
.TP
.BI \-\^\-percona-client-id= CLIENTID
The client ID for the Percona Pro repository.
.TP
.BI \-\^\-percona-pro-token= TOKEN
The token for the Percona Pro repository.
.TP
.BI \-\^\-provider-version= VERSION
The version string of the software to be installed.
.TP
.BI \-\^\-remote-cluster-id= ID
The remote cluster ID for the cluster creation when cluster-to-cluster
replication is to be installed. Please note that not all the cluster types
support cluster to cluster replication.
.TP
.BI \-\^\-os-user= USERNAME
The name of the remote user that is used to gain SSH access on the remote nodes.
If this command line option is omitted the name of the local user will be used
on the remote hosts too.
.TP
.BI \-\^\-cluster-type= TYPENAME
The name of the cluster type to be installed. Currently the following types are
supported:
\fBgalera\fP,
\fBmysqlreplication\fP,
\fBgroupreplication\fP (or \fBgroup_replication\fP),
\fBndb\fP (or \fBndbcluster\fP),
\fBpostgresql\fP
and \fBpostgresql_logical\fP.
.TP
.BI --config-template= FILENAME
Use the specified file as configuration template to create the configuration
file for the new cluster. Please note, that the \fB\-\^\-template\fP option is
for the containers (virtual machines) of the nodes and has completely different
meaning.
.TP
.BI --datadir= DIRECTORY
The directory on the node(s) that will hold the data. The primary use for this
command line option is to set the data directory path when a cluster is created.
.TP
.BI --donor= ADDRESS
Currently this option is used when starting a cluster. It can be used to control
which node will be started first and used for the others as donor.
.TP
.BI --generate\-key
Create a new SSH keypair when creating new containers. If this command line
option was provided a new SSH keypair will be created and registered for a new
user account to provide SSH access to the new container(s). If the command
creates more than one containers the same one keypair will be registered for
all.
The username will be the username of the authenticated cmon-user. This can be
overruled by the \fB\-\-os\-user\fP command line option.
When the job creates a new cluster the generated keypair will be registered for
the cluster and the file path will be saved into the cluster's Cmon
configuration file. When adding a node to such a cluster this
\fB\-\-generate\-key\fP option should not be passed, the controller will
automatically re-use the previously created keypair.
.TP
.BR \-\^\-cluster\-format [ =\fIFORMATSTRING\fP "]
The string that controls the format of the printed information about clusters.
When this command line option is used the specified information will be printed
instead of the default columns. The format string uses the '%' character to mark
variable fields and flag characters as they are specified in the standard
printf() C library functions. The '%' specifiers are ended by field name letters
to refer to various properties of the clusters.
The "%+12I" format string for example has the "+12" flag characters in it with
the standard meaning: the field will be 12 character wide and the "+" or "-"
sign will always be printed with the number.
The properties of the message are encoded by letters. The in the "%-5I" for
example the letter "I" encodes the "cluster ID" field, so the numerical ID of
the cluster will be substituted.
Standard '\\' notation is also available, \\n for example encodes a new-line
character.
The s9s-tools support the following fields:
.RS 7
.TP
.B a
The number of active alarms on the cluster.
.TP
.B C
The configuration file for the cluster.
.TP
.B c
The total number of CPU cores in the cluster. Please note that this number may
be affected by hyper-threading. When a computer has 2 identical CPUs, with four
cores each and uses 2x hyperthreading it will count as 2x4x2 = 16.
.TP
.B D
The domain name of the controller of the cluster. This is the string one would
get if executed the "domainname" command on the controller host.