-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathtest-partial.sh
executable file
·1505 lines (1384 loc) · 73.1 KB
/
test-partial.sh
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
#!/bin/bash
DESTROY=${3:-yes}
if [[ "x$2" = "" || "x$2" = "xold_tests" ]] ; then
#export VAGRANT_DEFAULT_PROVIDER=lxc
# export VAGRANT_DEFAULT_PROVIDER=lxd
# export LXD_PROFILE=$USER
# use export PROV=lxd for vagrant-lxd
for psver in "5.6.47-rel87.0.1" "5.7.29-32.1" "8.0.18-9.1"; do
PS=$psver vagrant up
vagrant destroy -f || true
done
for pxcver in "5.6.45-28.36.1" "5.7.22-29.26.1" "8.0.18-9.3"; do
PXC=$pxcver vagrant up
vagrant destroy -f || true
done
DB_USER=root DB_PASS=secret PS=5.7.29-32.1 vagrant up
vagrant destroy -f || true
DB_USER=root DB_PASS=secret PS=5.6.20-rel68.0 vagrant up
vagrant destroy -f || true
DB_USER=root DB_PASS=secret PS=8.0.19-10.1 vagrant up
vagrant destroy -f || true
DB_USER=root DB_PASS=secret START=1 PXC=5.6.45-28.36.1 PXB=2.3.9-1 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up
vagrant destroy -f || true
# should produce error: DB_USER=root DB_PASS=secret START=1 PXC=5.6.45-28.36.1 PXB=2.4.20-1 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up
vagrant destroy -f || true
DB_USER=root DB_PASS=secret START=1 PXC=5.6.45-28.36.1 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up
vagrant destroy -f || true
DB_USER=root DB_PASS=secret START=1 PXC=5.7.28-31.41.2 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up
vagrant destroy -f || true
DB_USER=root DB_PASS=secret START=1 PXC=8.0.18-9.3 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up
vagrant destroy -f || true
# start and config files
DB_USER=root DB_PASS=secret START=1 PS=8.0.19-10.1 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up
vagrant destroy -f || true
DB_USER=root DB_PASS=secret START=1 PS=5.7.29-32.1 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up
vagrant destroy -f || true
DB_USER=root DB_PASS=secret START=1 PS=5.6.20-rel68.0 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up
vagrant destroy -f || true
DB_USER=root DB_PASS=secret START=1 PS=5.6.23-rel72.1 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up
vagrant destroy -f || true
# Test separate xtrabackup installation
PXB=2.3.9-1 vagrant up;vagrant destroy -f || true
PXB=2.4.14-1 vagrant up;vagrant destroy -f || true
PXB=8.0.10-1 vagrant up;vagrant destroy -f || true
# Test mongodb
PSMDB=3.6.16-3.6 DB_PASS=secret START=1 DB_OPTS=mongo/enable_wt.conf vagrant up
vagrant destroy -f || true
PSMDB=4.0.17-10 DB_PASS=secret START=1 DB_OPTS=mongo/enable_wt.conf vagrant up
vagrant destroy -f || true
PSMDB=4.2.3-4 DB_PASS=secret START=1 DB_OPTS=mongo/enable_wt.conf vagrant up
vagrant destroy -f || true
PBM=1.1.1-1 vagrant up
vagrant destroy -f || true
# PMM client
PMM_CLIENT=1.17.3-1 vagrant up
vagrant destroy -f || true
PMM_CLIENT=2.5.0-6 vagrant up
vagrant destroy -f || true
# PMM server running inside podman (easier to setup compare to docker)
PMM_SERVER=1.17.3 vagrant up
vagrant destroy -f || true
PMM_SERVER=2.5.0 vagrant up
vagrant destroy -f || true
# Postresql
PPGSQL=11.5-1 DB_PASS=secret START=1 vagrant up
vagrant destroy -f || true
PPGSQL=11.6-2 DB_PASS=secret START=1 vagrant up
vagrant destroy -f || true
PPGSQL=11.7-2 DB_PASS=secret START=1 vagrant up
vagrant destroy -f || true
PPGSQL=12.2-4 DB_PASS=secret START=1 vagrant up
vagrant destroy -f || true
PPGSQL=12.2-4 DB_PASS=secret START=1 DB_OPTS=postgresql/novacuum.conf vagrant up
vagrant destroy -f || true
# percona toolkit
PT=3.2.0-1 vagrant up
vagrant destroy -f || true
# Multi-node setup
PXC=8.0.18-9.3 vagrant up
for i in `seq 1 3` ; do PT=3.2.0-1 PXC=8.0.18-9.3 PMM_CLIENT=2.5.0-6 vagrant up node$i ; done
PMM_SERVER=2.5.0 vagrant up node4
for i in default node1 node2 node3 ; do vagrant ssh $i -- 'hostname;/sbin/ip addr ls|grep "inet "|grep -v "inet 127";rpm -qa|grep -i percona|xargs' ; done
vagrant destroy -f || true
# Percona XtraDB Cluster (PXC) Kubernetes, using k3s one-file distribution
PKO4PXC='1.4.0' vagrant up
# cluster creation requires a few minutes
vagrant destroy -f || true
# MongoDB in Kubernetes, using k3s one-file distribution
PKO4PSMDB='1.4.0' vagrant up
# cluster creation requires a few minutes
vagrant destroy -f || true
# PXC + pmm
K3S=latest vagrant up default
K3S_TOKEN=$(vagrant ssh default -- sudo cat /var/lib/rancher/k3s/server/node-token) K3S_URL="https://$( vagrant ssh default -- hostname -I | cut -d' ' -f1):6443" vagrant up node1 node2 node3
K3S=latest PKO4PXC='1.4.0' K8S_PMM=1 DB_PASS=secret vagrant provision default
vagrant destroy -f || true
# MongoDB replicaset
PSMDB=4.0.17-10 DB_PASS=secret START=1 DB_OPTS=mongo/enable_wt.conf REPLICA_SET=rs0 vagrant up default
PSMDB=4.0.17-10 DB_PASS=secret START=1 DB_OPTS=mongo/enable_wt.conf REPLICA_SET=rs0 DB_IP=$( vagrant ssh default -- hostname -I | cut -d' ' -f1 ) vagrant up node1 node2
vagrant destroy -f || true
PSMDB=4.2.3-4 DB_PASS=secret START=1 DB_OPTS=mongo/enable_wt.conf REPLICA_SET=rs0 vagrant up default
PSMDB=4.2.3-4 DB_PASS=secret START=1 DB_OPTS=mongo/enable_wt.conf REPLICA_SET=rs0 DB_IP=$( vagrant ssh default -- hostname -I | cut -d' ' -f1 ) vagrant up node1 node2
vagrant destroy -f || true
# Ubuntu
OS=ubuntu/bionic64 DB_USER=root DB_PASS=secret START=1 PS=5.6.42-84.2-1 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up
vagrant destroy -f || true
OS=ubuntu/bionic64 DB_USER=root DB_PASS=secret START=1 PS=5.7.25-28-1 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up
vagrant destroy -f || true
OS=ubuntu/bionic64 DB_USER=root DB_PASS=secret START=1 PS=8.0.16-7-1 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up
vagrant destroy -f || true
# OS is not needed for vagrant provision run
OS=ubuntu/bionic64 DB_USER=root DB_PASS=secret START=1 PS=5.6.42-84.2-1 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up default node1 node2
DB_USER=root DB_PASS=secret START=1 PS=5.6.42-84.2-1 DB_IP=$( vagrant ssh default -- hostname -I | cut -d' ' -f1 ) DB_OPTS=mysql/async-repl-gtid.cnf vagrant provision node1 node2
OS=ubuntu/bionic64 DB_USER=root DB_PASS=secret START=1 PS=5.7.25-28-1 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up default node1 node2
DB_USER=root DB_PASS=secret START=1 PS=5.7.25-28-1 DB_IP=$( vagrant ssh default -- hostname -I | cut -d' ' -f1 ) DB_OPTS=mysql/async-repl-gtid.cnf vagrant provision node1 node2
OS=ubuntu/bionic64 DB_USER=root DB_PASS=secret START=1 PS=8.0.16-7-1 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up default node1 node2
DB_USER=root DB_PASS=secret START=1 PS=8.0.16-7-1 DB_IP=$( vagrant ssh default -- hostname -I | cut -d' ' -f1 ) DB_OPTS=mysql/async-repl-gtid.cnf vagrant provision node1 node2
vagrant destroy -f || true
OS=ubuntu/bionic64 DB_USER=root DB_PASS=secret START=1 PXC=8.0.18-9-3 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up default node1 node2
vagrant ssh default -- sudo tar cz /var/lib/mysql/ca.pem /var/lib/mysql/ca-key.pem /var/lib/mysql/client-cert.pem /var/lib/mysql/client-key.pem /var/lib/mysql/server-cert.pem /var/lib/mysql/server-key.pem > secret/pxc-cluster-ssl.tar.gz
DB_USER=root DB_PASS=secret PXC=8.0.18-9-3 REPLICATION_TYPE=galera DB_IP=$( vagrant ssh default -- hostname -I | cut -d' ' -f1 ) DB_OPTS=mysql/async-repl-gtid.cnf vagrant provision node1
DB_USER=root DB_PASS=secret PXC=8.0.18-9-3 REPLICATION_TYPE=galera DB_IP=$( vagrant ssh default -- hostname -I | cut -d' ' -f1 ) DB_OPTS=mysql/async-repl-gtid.cnf vagrant provision node2
vagrant destroy -f || true
# lxdock
PSMDB=4.2.3-4 DB_PASS=secret START=1 DB_OPTS=mongo/enable_wt.conf REPLICA_SET=rs0 lxdock provision default
PSMDB=4.2.3-4 DB_PASS=secret START=1 DB_OPTS=mongo/enable_wt.conf REPLICA_SET=rs0 DB_IP=$( lxdock shell default -c hostname -I | cut -d' ' -f1 ) lxdock provision node1
test $DESTROY = yes && lxdock destroy -f
K3S=latest lxdock provision default
./gen_lxdock.sh anydbver centos/7
PROXYSQL=2.0.12-1 lxdock up default
test $DESTROY = yes && lxdock destroy -f || true
./gen_lxdock.sh anydbver centos/8
PROXYSQL=2.0.12-1 lxdock up default
test $DESTROY = yes && lxdock destroy -f || true
./gen_lxdock.sh anydbver ubuntu/bionic
PROXYSQL=2.0.12 lxdock up default
test $DESTROY = yes && lxdock destroy -f || true
PROXYSQL=2.0.12-1 vagrant up default
vagrant destroy -f || true
OS=centos/8 PROXYSQL=2.0.12-1 vagrant up default
vagrant destroy -f || true
OS=ubuntu/bionic64 PROXYSQL=2.0.12 vagrant provision default
vagrant destroy -f
# MariaDB
MARIADB=10.4.12-1 lxdock provision default
MARIADB=10.4.12-1 DB_USER=root DB_PASS=secret START=1 DB_OPTS=mariadb/async-repl-gtid.cnf lxdock up default
# Vanilla MySQL 8.0
./gen_lxdock.sh anydbver centos/7
MYSQL=8.0.20-1 DB_USER=root DB_PASS=secret START=1 DB_OPTS=mysql/async-repl-gtid.cnf lxdock up default
test $DESTROY = yes && lxdock destroy -f
./gen_lxdock.sh anydbver centos/8
MYSQL=8.0.20-1 DB_USER=root DB_PASS=secret START=1 DB_OPTS=mysql/async-repl-gtid.cnf lxdock up default
test $DESTROY = yes && lxdock destroy -f
./gen_lxdock.sh anydbver centos/7
ROCKSDB=1 DB_USER=root DB_PASS=secret START=1 PS=5.7.29-32.1 DB_OPTS=mysql/async-repl-gtid.cnf lxdock up
test $DESTROY = yes && lxdock destroy -f
./gen_lxdock.sh anydbver centos/7 3
PMM_SERVER=2.5.0 lxdock up node2
PMM_CLIENT=2.5.0-6 PMM_URL="https://admin:admin@$(lxdock shell node2 -c hostname -I |cut -d' ' -f 2):443" lxdock up default
test $DESTROY = yes && lxdock destroy -f
./gen_lxdock.sh anydbver centos/7 1
DB_USER=root DB_PASS=secret START=1 PS=8.0.19-10.1 DB_OPTS=mysql/async-repl-gtid.cnf lxdock up default
test $DESTROY = yes && lxdock destroy -f
for MVER in 5.7.29-32.1 8.0.19-10.1 ; do
./gen_lxdock.sh anydbver centos/7 2
DB_USER=root DB_PASS=secret START=1 PS=$MVER DB_OPTS=mysql/async-repl-gtid.cnf lxdock up default
SYSBENCH=1.0.20-6 lxdock up node1
lxdock shell node1 -c /vagrant/tools/sysbench_oltp_ro.sh $( lxdock shell default -c hostname -I | cut -d' ' -f1 ) root secret sbtest 2 10000 4 100
test $DESTROY = yes && lxdock destroy -f
done
# 5.7.29-32.1 queries: 3281712 (32815.00 per sec.)
# 8.0.19-10.1 queries: 2575440 (25752.72 per sec.)
# PG physical replication
./gen_lxdock.sh anydbver centos/7 2
PPGSQL=12.2-4 DB_PASS=secret START=1 lxdock up default
PPGSQL=12.2-4 DB_PASS=secret START=1 DB_IP=$( lxdock shell default -c hostname -I | cut -d' ' -f1 ) lxdock up node1
# install https://github.com/Percona-Lab/mysql_random_data_load/
MYSQL_RANDOM_DATA=0.1.12 lxdock up default
test $DESTROY = yes && lxdock destroy -f
# K8S PXC cluster with slave server outside
./gen_lxdock.sh anydbver centos/7 5
K3S=latest K8S_MINIO=yes lxdock up default
until [ "x" != "x$IP" ]; do
IP=$(lxdock shell default -c hostname -I | cut -d' ' -f3)
sleep 1
done
echo "K8S master IP: $IP"
K3S_TOKEN=$(lxdock shell default -c cat /var/lib/rancher/k3s/server/node-token) K3S_URL="https://$(lxdock shell default -c hostname -I | cut -d' ' -f3):6443" lxdock up node1 node2 node3
# there are dns resolution issues for "too fast start"
sleep 30
K3S=latest PKO4PXC='1.4.0' K8S_PMM=1 DB_FEATURES="gtid,master,backup,pxc57" lxdock provision default
lxdock shell default -c kubectl apply -f /vagrant/configs/k8s/svc-replication-master.yaml
DB_IP=$( lxdock shell default -c bash -c "kubectl get svc cluster1-pxc-0 -o yaml | yq r - 'status.loadBalancer.ingress[0].ip'" ) \
DB_USER=root DB_PASS=root_password START=1 PS=5.7.29-32.1 DB_OPTS=mysql/async-repl-gtid.cnf lxdock up node4
test $DESTROY = yes && lxdock destroy -f
fi # endif old tests
# MySQL Connector Java test
if [[ "x$2" = "" || "x$2" = "xmysql_connector_java" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 2
DB_USER=root DB_PASS=secret START=1 PS=5.7.29-32.1 DB_OPTS=mysql/async-repl-gtid.cnf lxdock up default
DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) DB_PASS=secret DB_USER=root MYSQL_JAVA=8.0.17-1 lxdock up node1
lxdock shell node1 -c bash -c 'cd /srv/java && sudo javac ConnectorTest.java && java -classpath "./:/usr/share/java/mysql-connector-java.jar:/usr/share/java/" ConnectorTest'
test $DESTROY = yes && lxdock destroy -f
else
DB_USER=root DB_PASS=secret START=1 PS=5.7.29-32.1 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up default
DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) DB_PASS=secret DB_USER=root MYSQL_JAVA=8.0.17-1 vagrant up node1
vagrant ssh node1 -c bash -c 'cd /srv/java && sudo javac ConnectorTest.java && java -classpath "./:/usr/share/java/mysql-connector-java.jar:/usr/share/java/" ConnectorTest'
vagrant destroy -f
fi
fi
# innodb_ruby
if [[ "x$2" = "" || "x$2" = "xinnodb_ruby" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 1
DB_USER=root DB_PASS=root_password START=1 PS=5.7.29-32.1 INNODB_RUBY=1 lxdock up default
lxdock shell default -c innodb_space --help
test $DESTROY = yes && lxdock destroy -f
else
:
fi
fi
# InnoDB Cluster
if [[ "x$2" = "" || "x$2" = "xinnodb_cluster" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 3
DB_USER=root DB_PASS=secret START=1 PS=8.0.19-10.1 REPLICATION_TYPE=group CLUSTER=cluster1 DB_OPTS=mysql/gr.cnf lxdock up default
DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_USER=root DB_PASS=secret START=1 PS=8.0.19-10.1 REPLICATION_TYPE=group CLUSTER=cluster1 DB_OPTS=mysql/gr.cnf lxdock up node1
DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_USER=root DB_PASS=secret START=1 PS=8.0.19-10.1 REPLICATION_TYPE=group CLUSTER=cluster1 DB_OPTS=mysql/gr.cnf lxdock up node2
test $DESTROY = yes && lxdock destroy -f
else
DB_USER=root DB_PASS=secret START=1 PS=8.0.19-10.1 REPLICATION_TYPE=group CLUSTER=cluster1 DB_OPTS=mysql/gr.cnf vagrant up default
DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_USER=root DB_PASS=secret START=1 PS=8.0.19-10.1 REPLICATION_TYPE=group CLUSTER=cluster1 DB_OPTS=mysql/gr.cnf vagrant up node1
DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_USER=root DB_PASS=secret START=1 PS=8.0.19-10.1 REPLICATION_TYPE=group CLUSTER=cluster1 DB_OPTS=mysql/gr.cnf vagrant up node2
vagrant destroy -f || true
fi
fi
# InnoDB cluster MySQL Community
if [[ "x$2" = "" || "x$2" = "xmysql_innodb_cluster" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 3
DB_USER=root DB_PASS=secret START=1 MYSQL=8.0.20-1 REPLICATION_TYPE=group CLUSTER=cluster1 DB_OPTS=mysql/gr.cnf lxdock up default
DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_USER=root DB_PASS=secret START=1 MYSQL=8.0.20-1 REPLICATION_TYPE=group CLUSTER=cluster1 DB_OPTS=mysql/gr.cnf lxdock up node1
DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_USER=root DB_PASS=secret START=1 MYSQL=8.0.20-1 REPLICATION_TYPE=group CLUSTER=cluster1 DB_OPTS=mysql/gr.cnf lxdock up node2
test $DESTROY = yes && lxdock destroy -f
else
DB_USER=root DB_PASS=secret START=1 MYSQL=8.0.20-1 REPLICATION_TYPE=group CLUSTER=cluster1 DB_OPTS=mysql/gr.cnf vagrant up default
DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_USER=root DB_PASS=secret START=1 MYSQL=8.0.20-1 REPLICATION_TYPE=group CLUSTER=cluster1 DB_OPTS=mysql/gr.cnf vagrant up node1
DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_USER=root DB_PASS=secret START=1 MYSQL=8.0.20-1 REPLICATION_TYPE=group CLUSTER=cluster1 DB_OPTS=mysql/gr.cnf vagrant up node2
vagrant destroy -f || true
fi
fi
# PXC
if [[ "x$2" = "" || "x$2" = "xpxc56" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 3
DB_USER=root DB_PASS=secret START=1 PXC=5.6.45-28.36.1 CLUSTER=pxc-cluster DB_OPTS=mysql/pxc5657.cnf lxdock up default node1 node2
DB_USER=root DB_PASS=secret PXC=5.6.45-28.36.1 CLUSTER=pxc-cluster REPLICATION_TYPE=galera DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) DB_OPTS=mysql/pxc5657.cnf lxdock provision node1
DB_USER=root DB_PASS=secret PXC=5.6.45-28.36.1 CLUSTER=pxc-cluster REPLICATION_TYPE=galera DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) DB_OPTS=mysql/pxc5657.cnf lxdock provision node2
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl
DB_USER=root DB_PASS=secret START=1 PXC=5.6.45-28.36.1 CLUSTER=pxc-cluster DB_OPTS=mysql/pxc5657.cnf \
ansible-playbook -i ansible_hosts playbook.yml
DB_USER=root DB_PASS=secret PXC=5.6.45-28.36.1 CLUSTER=pxc-cluster REPLICATION_TYPE=galera \
DB_IP=$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts) \
DB_OPTS=mysql/pxc5657.cnf \
ansible-playbook -i ansible_hosts --limit $USER.node1 playbook.yml
DB_USER=root DB_PASS=secret PXC=5.6.45-28.36.1 CLUSTER=pxc-cluster REPLICATION_TYPE=galera \
DB_IP=$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts) \
DB_OPTS=mysql/pxc5657.cnf \
ansible-playbook -i ansible_hosts --limit $USER.node2 playbook.yml
test $DESTROY = yes && sudo podman rm -f $USER.default $USER.node1 $USER.node2
else
DB_USER=root DB_PASS=secret START=1 PXC=5.6.45-28.36.1 CLUSTER=pxc-cluster DB_OPTS=mysql/pxc5657.cnf \
vagrant up default node1 node2
DB_USER=root DB_PASS=secret PXC=5.6.45-28.36.1 CLUSTER=pxc-cluster REPLICATION_TYPE=galera \
DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) DB_OPTS=mysql/pxc5657.cnf vagrant provision node1
DB_USER=root DB_PASS=secret PXC=5.6.45-28.36.1 CLUSTER=pxc-cluster REPLICATION_TYPE=galera \
DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) DB_OPTS=mysql/pxc5657.cnf vagrant provision node2
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
if [[ "x$2" = "" || "x$2" = "xpxc57" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 3
DB_USER=root DB_PASS=secret START=1 PXC=5.7.28-31.41.2 CLUSTER=pxc-cluster DB_OPTS=mysql/pxc5657.cnf \
lxdock up default node1 node2
DB_USER=root DB_PASS=secret PXC=5.7.28-31.41.2 CLUSTER=pxc-cluster REPLICATION_TYPE=galera \
DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_OPTS=mysql/pxc5657.cnf \
lxdock provision node1
DB_USER=root DB_PASS=secret PXC=5.7.28-31.41.2 CLUSTER=pxc-cluster REPLICATION_TYPE=galera \
DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) DB_OPTS=mysql/pxc5657.cnf lxdock provision node2
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl
DB_USER=root DB_PASS=secret START=1 PXC=5.7.28-31.41.2 CLUSTER=pxc-cluster DB_OPTS=mysql/pxc5657.cnf \
ansible-playbook -i ansible_hosts playbook.yml
DB_USER=root DB_PASS=secret PXC=5.7.28-31.41.2 CLUSTER=pxc-cluster REPLICATION_TYPE=galera \
DB_IP=$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts) \
DB_OPTS=mysql/pxc5657.cnf \
ansible-playbook -i ansible_hosts --limit $USER.node1 playbook.yml
DB_USER=root DB_PASS=secret PXC=5.7.28-31.41.2 CLUSTER=pxc-cluster REPLICATION_TYPE=galera \
DB_IP=$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts) \
DB_OPTS=mysql/pxc5657.cnf \
ansible-playbook -i ansible_hosts --limit $USER.node2 playbook.yml
test $DESTROY = yes && sudo podman rm -f $USER.default $USER.node1 $USER.node2
elif [[ "x$1" = "xlxd" ]] ; then
./lxdctl --nodes 3
DB_USER=root DB_PASS=secret START=1 PXC=5.7.28-31.41.2 CLUSTER=pxc-cluster DB_OPTS=mysql/pxc5657.cnf \
ansible-playbook -i ansible_hosts playbook.yml
DB_USER=root DB_PASS=secret PXC=5.7.28-31.41.2 CLUSTER=pxc-cluster REPLICATION_TYPE=galera \
DB_IP=$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts) \
DB_OPTS=mysql/pxc5657.cnf \
ansible-playbook -i ansible_hosts --limit $USER.node1 playbook.yml
DB_USER=root DB_PASS=secret PXC=5.7.28-31.41.2 CLUSTER=pxc-cluster REPLICATION_TYPE=galera \
DB_IP=$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts) \
DB_OPTS=mysql/pxc5657.cnf \
ansible-playbook -i ansible_hosts --limit $USER.node2 playbook.yml
test $DESTROY = yes && ./lxdctl --destroy
else
DB_USER=root DB_PASS=secret START=1 PXC=5.7.28-31.41.2 CLUSTER=pxc-cluster DB_OPTS=mysql/pxc5657.cnf \
vagrant up default node1 node2
DB_USER=root DB_PASS=secret PXC=5.7.28-31.41.2 CLUSTER=pxc-cluster REPLICATION_TYPE=galera \
DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_OPTS=mysql/pxc5657.cnf \
vagrant provision node1
DB_USER=root DB_PASS=secret PXC=5.7.28-31.41.2 CLUSTER=pxc-cluster REPLICATION_TYPE=galera DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) DB_OPTS=mysql/pxc5657.cnf vagrant provision node2
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
if [[ "x$2" = "" || "x$2" = "xpxc8" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 3
DB_USER=root DB_PASS=secret START=1 PXC=8.0.18-9.3 CLUSTER=pxc-cluster DB_OPTS=mysql/pxc8-repl-gtid.cnf lxdock up default node1 node2
lxdock shell default -c tar cz /var/lib/mysql/ca.pem /var/lib/mysql/ca-key.pem /var/lib/mysql/client-cert.pem /var/lib/mysql/client-key.pem /var/lib/mysql/server-cert.pem /var/lib/mysql/server-key.pem > secret/pxc-cluster-ssl.tar.gz
DB_USER=root DB_PASS=secret PXC=8.0.18-9.3 REPLICATION_TYPE=galera CLUSTER=pxc-cluster \
DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_OPTS=mysql/pxc8-repl-gtid.cnf \
lxdock provision node1
DB_USER=root DB_PASS=secret PXC=8.0.18-9.3 REPLICATION_TYPE=galera CLUSTER=pxc-cluster \
DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_OPTS=mysql/pxc8-repl-gtid.cnf \
lxdock provision node2
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl
DB_USER=root DB_PASS=secret START=1 PXC=8.0.18-9.3 CLUSTER=pxc-cluster DB_OPTS=mysql/pxc8-repl-gtid.cnf \
ansible-playbook -i ansible_hosts playbook.yml
sudo podman exec -i $USER.default tar cz /var/lib/mysql/ca.pem /var/lib/mysql/ca-key.pem /var/lib/mysql/client-cert.pem /var/lib/mysql/client-key.pem /var/lib/mysql/server-cert.pem /var/lib/mysql/server-key.pem > secret/pxc-cluster-ssl.tar.gz
DB_USER=root DB_PASS=secret PXC=8.0.18-9.3 REPLICATION_TYPE=galera CLUSTER=pxc-cluster \
DB_IP=$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts) \
DB_OPTS=mysql/pxc8-repl-gtid.cnf \
SYNC=1 \
ansible-playbook -i ansible_hosts --limit $USER.node1 playbook.yml
DB_USER=root DB_PASS=secret PXC=8.0.18-9.3 REPLICATION_TYPE=galera CLUSTER=pxc-cluster \
DB_IP=$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts) \
DB_OPTS=mysql/pxc8-repl-gtid.cnf \
SYNC=1 \
ansible-playbook -i ansible_hosts --limit $USER.node2 playbook.yml
test $DESTROY = yes && sudo podman rm -f $USER.default $USER.node1 $USER.node2
else
DB_USER=root DB_PASS=secret START=1 PXC=8.0.18-9.3 CLUSTER=pxc-cluster DB_OPTS=mysql/pxc8-repl-gtid.cnf vagrant up default node1 node2
vagrant ssh default -- sudo tar cz /var/lib/mysql/ca.pem /var/lib/mysql/ca-key.pem /var/lib/mysql/client-cert.pem /var/lib/mysql/client-key.pem /var/lib/mysql/server-cert.pem /var/lib/mysql/server-key.pem > secret/pxc-cluster-ssl.tar.gz
DB_USER=root DB_PASS=secret PXC=8.0.18-9.3 REPLICATION_TYPE=galera CLUSTER=pxc-cluster DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) DB_OPTS=mysql/pxc8-repl-gtid.cnf vagrant provision node1
DB_USER=root DB_PASS=secret PXC=8.0.18-9.3 REPLICATION_TYPE=galera CLUSTER=pxc-cluster DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) DB_OPTS=mysql/pxc8-repl-gtid.cnf vagrant provision node2
vagrant destroy -f || true
fi
fi
# Postgresql 12 with PGPool-II
if [[ "x$2" = "" || "x$2" = "xpgpool" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 3
PPGSQL=12.2-4 DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 lxdock up default
PPGSQL=12.2-4 DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) lxdock up node1
PGPOOL=4.1.2-1 PPGSQL=12.2-4 DB_PASS=secret START=1 DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) lxdock up node2
test $DESTROY = yes && lxdock destroy -f
else
PPGSQL=12.2-4 DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 vagrant up default
PPGSQL=12.2-4 DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) vagrant up node1
PGPOOL=4.1.2-1 PPGSQL=12.2-4 DB_PASS=secret START=1 DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) vagrant up node2
fi
fi
# Postgresql 12 with PMM
if [[ "x$2" = "" || "x$2" = "xpgpmm" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 3
PMM_SERVER=2.8.0 DB_PASS=secret lxdock up node2
PPGSQL=12.3-1 DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 PMM_CLIENT=2.8.0-6 PMM_URL="https://admin:secret@$(lxdock shell node2 -c /vagrant/tools/node_ip.sh 2>/dev/null):443" lxdock up default
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl --pmm 2.8.0
PMM_URL="https://admin:admin@"$(sudo podman inspect $USER.pmm-server |grep IPAddress|awk '{print $2}'|sed -e 's/[",]//g')":443" \
PPGSQL=12.3-1 DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 PMM_CLIENT=2.8.0-6 \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
test $DESTROY = yes && sudo podman rm -f $USER.default $USER.node1 $USER.pmm-server
else
PMM_SERVER=2.8.0 DB_PASS=secret vagrant up node2
PPGSQL=12.3-1 DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 PMM_CLIENT=2.8.0-6 PMM_URL="https://admin:secret@$(vagrant ssh node2 -c /vagrant/tools/node_ip.sh 2>/dev/null):443" vagrant up default
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
# LDAP
if [[ "x$2" = "" || "x$2" = "xpgldap" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 3
DB_USER=dba DB_PASS=secret LDAP_SERVER=1 DB_PASS=secret lxdock up node2
LDAP_IP=$(lxdock shell node2 -c /vagrant/tools/node_ip.sh 2>/dev/null) \
PPGSQL=12.3-1 DB_USER=dba DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 \
lxdock up default
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl
LDAP_SERVER=1 DB_USER=dba DB_PASS=secret ansible-playbook -i ansible_hosts --limit $USER.node2 playbook.yml
LDAP_IP=$(grep $USER.node2 ansible_hosts |sed -ne '/node2/ {s/^.*ansible_host=//;s/ .*$//;p}') \
PPGSQL=12.3-1 DB_USER=dba DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
# check: ldapsearch -x cn=dba -b dc=percona,dc=local
test $DESTROY = yes && sudo podman rm -f $USER.default $USER.node1 $USER.node2
else
LDAP_SERVER=1 DB_USER=dba DB_PASS=secret vagrant up node2
LDAP_IP=$(vagrant ssh node2 -c /vagrant/tools/node_ip.sh 2>/dev/null) \
PPGSQL=12.3-1 DB_USER=dba DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 \
vagrant up default
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
if [[ "x$2" = "" || "x$2" = "xmongoldap" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 3
DB_USER=dba DB_PASS=secret LDAP_SERVER=1 DB_PASS=secret \
lxdock up node2
LDAP_IP=$(lxdock shell node2 -c /vagrant/tools/node_ip.sh 2>/dev/null) \
PSMDB=4.2.3-4 DB_USER=dba DB_PASS=secret START=1 DB_OPTS=mongo/enable_wt.conf \
lxdock up default
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl
LDAP_SERVER=1 DB_USER=dba DB_PASS=secret ansible-playbook -i ansible_hosts --limit $USER.node2 playbook.yml
LDAP_IP=$(grep $USER.node2 ansible_hosts |sed -ne '/node2/ {s/^.*ansible_host=//;s/ .*$//;p}') \
PSMDB=4.2.3-4 DB_USER=dba DB_PASS=secret START=1 DB_OPTS=mongo/enable_wt.conf \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
# check: ldapsearch -x cn=dba -b dc=percona,dc=local
test $DESTROY = yes && sudo podman rm -f $USER.default $USER.node1 $USER.node2
elif [[ "x$1" = "xlxd" ]] ; then
./lxdctl --nodes 3
LDAP_SERVER=1 DB_USER=dba DB_PASS=secret \
ansible-playbook -i ansible_hosts --limit $USER.node2 playbook.yml
LDAP_IP=$(grep $USER.node2 ansible_hosts |sed -ne '/node2/ {s/^.*ansible_host=//;s/ .*$//;p}') \
PSMDB=4.2.3-4 DB_USER=dba DB_PASS=secret START=1 DB_OPTS=mongo/enable_wt.conf \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
test $DESTROY = yes && ./lxdctl --destroy
else
LDAP_SERVER=1 DB_USER=dba DB_PASS=secret vagrant up node2
LDAP_IP=$(vagrant ssh node2 -c /vagrant/tools/node_ip.sh 2>/dev/null) \
PSMDB=4.2.3-4 DB_USER=dba DB_PASS=secret START=1 DB_OPTS=mongo/enable_wt.conf \
vagrant up default
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
if [[ "x$2" = "" || "x$2" = "xmongoldap-el8" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 3
DB_USER=dba DB_PASS=secret LDAP_SERVER=1 DB_PASS=secret \
lxdock up node2
LDAP_IP=$(lxdock shell node2 -c /vagrant/tools/node_ip.sh 2>/dev/null) \
PSMDB=4.2.3-4 DB_USER=dba DB_PASS=secret START=1 DB_OPTS=mongo/enable_wt.conf \
lxdock up default
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl
LDAP_SERVER=1 DB_USER=dba DB_PASS=secret ansible-playbook -i ansible_hosts --limit $USER.node2 playbook.yml
LDAP_IP=$(grep $USER.node2 ansible_hosts |sed -ne '/node2/ {s/^.*ansible_host=//;s/ .*$//;p}') \
PSMDB=4.2.3-4 DB_USER=dba DB_PASS=secret START=1 DB_OPTS=mongo/enable_wt.conf \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
# check: ldapsearch -x cn=dba -b dc=percona,dc=local
test $DESTROY = yes && sudo podman rm -f $USER.default $USER.node1 $USER.node2
elif [[ "x$1" = "xlxd" ]] ; then
./lxdctl --nodes 3 --os el8
cat tools/generate_ldap_ssl_certs.sh | ./anydbver ssh node2
./lxdctl scp node2 /root/ldap-certs.tar.gz secret/
LDAP_SERVER=1 DB_USER=dba DB_PASS=secret \
ansible-playbook -i ansible_hosts --limit $USER.node2 playbook.yml
LDAP_IP=$(grep $USER.node2 ansible_hosts |sed -ne '/node2/ {s/^.*ansible_host=//;s/ .*$//;p}') \
PSMDB=4.2.3-4 DB_USER=dba DB_PASS=secret START=1 DB_OPTS=mongo/enable_wt.conf \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
test $DESTROY = yes && ./lxdctl --destroy
else
LDAP_SERVER=1 DB_USER=dba DB_PASS=secret vagrant up node2
LDAP_IP=$(vagrant ssh node2 -c /vagrant/tools/node_ip.sh 2>/dev/null) \
PSMDB=4.2.3-4 DB_USER=dba DB_PASS=secret START=1 DB_OPTS=mongo/enable_wt.conf \
vagrant up default
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
if [[ "x$2" = "" || "x$2" = "xpsldap" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 3
DB_USER=dba DB_PASS=secret LDAP_SERVER=1 DB_PASS=secret lxdock up node2
LDAP_IP=$(lxdock shell node2 -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_USER=root DB_PASS=secret START=1 PS=8.0.19-10.1 DB_OPTS=mysql/async-repl-gtid.cnf \
lxdock up default
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl
LDAP_SERVER=1 DB_USER=dba DB_PASS=secret ansible-playbook -i ansible_hosts --limit $USER.node2 playbook.yml
LDAP_IP=$(grep $USER.node2 ansible_hosts |sed -ne '/node2/ {s/^.*ansible_host=//;s/ .*$//;p}') \
DB_USER=root DB_PASS=secret START=1 PS=8.0.19-10.1 DB_OPTS=mysql/async-repl-gtid.cnf \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
# check: ldapsearch -x cn=dba -b dc=percona,dc=local
test $DESTROY = yes && sudo podman rm -f $USER.default $USER.node1 $USER.node2
else
LDAP_SERVER=1 DB_USER=dba DB_PASS=secret vagrant up node2
LDAP_IP=$(vagrant ssh node2 -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_USER=root DB_PASS=secret START=1 PS=8.0.19-10.1 DB_OPTS=mysql/async-repl-gtid.cnf \
vagrant up default
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
# multi-node k8s cluster
if [[ "x$2" = "" || "x$2" = "xk8spmmminio" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
K3S=latest K8S_MINIO=yes lxdock up default
K3S_TOKEN=$(lxdock shell default -c cat /var/lib/rancher/k3s/server/node-token) K3S_URL="https://$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null):6443" lxdock up node1 node2
K3S=latest PKO4PXC='1.4.0' K8S_PMM=1 DB_FEATURES="gtid,master,backup" lxdock provision default
test $DESTROY = yes && lxdock destroy -f
else
K3S=latest K8S_MINIO=yes vagrant up default
K3S_TOKEN=$(vagrant ssh default -- cat /var/lib/rancher/k3s/server/node-token) K3S_URL="https://$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null):6443" vagrant up node1 node2
K3S=latest PKO4PXC='1.4.0' K8S_PMM=1 DB_FEATURES="gtid,master,backup" vagrant provision default
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
# Standalone MySQL
if [[ "x$2" = "" || "x$2" = "xps57" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 1
DB_USER=root DB_PASS=secret START=1 PS=5.7.30-33.1 \
DB_OPTS=mysql/async-repl-gtid.cnf \
lxdock up default
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl --nodes 1
DB_USER=root DB_PASS=secret START=1 PS=5.7.30-33.1 \
DB_OPTS=mysql/async-repl-gtid.cnf \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
test $DESTROY = yes && ./podmanctl --destroy
else
DB_USER=root DB_PASS=secret START=1 PS=5.7.30-33.1 \
DB_OPTS=mysql/async-repl-gtid.cnf \
vagrant up default
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
if [[ "x$2" = "" || "x$2" = "xps80" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 1
DB_USER=root DB_PASS=secret START=1 PS=8.0.20-11.1 \
DB_OPTS=mysql/async-repl-gtid.cnf \
lxdock up default
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl --nodes 1
DB_USER=root DB_PASS=secret START=1 PS=8.0.20-11.1 \
DB_OPTS=mysql/async-repl-gtid.cnf \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
test $DESTROY = yes && ./podmanctl --destroy
else
DB_USER=root DB_PASS=secret START=1 PS=8.0.20-11.1 \
DB_OPTS=mysql/async-repl-gtid.cnf \
vagrant up default
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
# MySQL Async replication
if [[ "x$2" = "" || "x$2" = "xps56arep" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
DB_USER=root DB_PASS=secret START=1 PS=5.6.23-rel72.1 \
DB_OPTS=mysql/async-repl-gtid.cnf lxdock up default node1 node2
DB_USER=root DB_PASS=secret START=1 PS=5.6.23-rel72.1 \
DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_OPTS=mysql/async-repl-gtid.cnf lxdock provision node1 node2
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl
DB_USER=root DB_PASS=secret START=1 PS=5.6.23-rel72.1 \
DB_OPTS=mysql/async-repl-gtid.cnf \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
DB_USER=root DB_PASS=secret START=1 PS=5.6.23-rel72.1 \
DB_IP=$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts) \
DB_OPTS=mysql/async-repl-gtid.cnf \
ansible-playbook -i ansible_hosts --limit $USER.node1 playbook.yml
test $DESTROY = yes && sudo podman rm -f $USER.default $USER.node1 $USER.node2
else
DB_USER=root DB_PASS=secret START=1 PS=5.6.23-rel72.1 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up default node1 node2
DB_USER=root DB_PASS=secret START=1 PS=5.6.23-rel72.1 \
DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_OPTS=mysql/async-repl-gtid.cnf vagrant provision node1 node2
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
if [[ "x$2" = "" || "x$2" = "xps57arep" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
DB_USER=root DB_PASS=secret START=1 PS=5.7.29-32.1 \
DB_OPTS=mysql/async-repl-gtid.cnf lxdock up default node1 node2
DB_USER=root DB_PASS=secret START=1 PS=5.7.29-32.1 \
DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_OPTS=mysql/async-repl-gtid.cnf lxdock provision node1 node2
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl
DB_USER=root DB_PASS=secret START=1 PS=5.7.29-32.1 \
DB_OPTS=mysql/async-repl-gtid.cnf \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
DB_USER=root DB_PASS=secret START=1 PS=5.7.29-32.1 \
DB_IP=$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts) \
DB_OPTS=mysql/async-repl-gtid.cnf \
ansible-playbook -i ansible_hosts --limit $USER.node1 playbook.yml
test $DESTROY = yes && sudo podman rm -f $USER.default $USER.node1 $USER.node2
else
DB_USER=root DB_PASS=secret START=1 PS=5.7.29-32.1 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up default node1 node2
DB_USER=root DB_PASS=secret START=1 PS=5.7.29-32.1 \
DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_OPTS=mysql/async-repl-gtid.cnf vagrant provision node1 node2
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
if [[ "x$2" = "" || "x$2" = "xps80arep" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 3
DB_USER=root DB_PASS=secret START=1 PS=8.0.19-10.1 \
DB_OPTS=mysql/async-repl-gtid.cnf lxdock up default node1 node2
DB_USER=root DB_PASS=secret START=1 PS=8.0.19-10.1 \
DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_OPTS=mysql/async-repl-gtid.cnf lxdock provision node1 node2
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl
DB_USER=root DB_PASS=secret START=1 PS=8.0.19-10.1 \
DB_OPTS=mysql/async-repl-gtid.cnf \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
DB_USER=root DB_PASS=secret START=1 PS=8.0.19-10.1 \
DB_IP=$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts) \
DB_OPTS=mysql/async-repl-gtid.cnf \
ansible-playbook -i ansible_hosts --limit $USER.node1 playbook.yml
test $DESTROY = yes && sudo podman rm -f $USER.default $USER.node1 $USER.node2
else
DB_USER=root DB_PASS=secret START=1 PS=8.0.19-10.1 DB_OPTS=mysql/async-repl-gtid.cnf vagrant up default node1 node2
DB_USER=root DB_PASS=secret START=1 PS=8.0.19-10.1 \
DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
DB_OPTS=mysql/async-repl-gtid.cnf vagrant provision node1 node2
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
if [[ "x$2" = "" || "x$2" = "xpxc57-focal" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl --os focal --nodes 1
DB_USER=root DB_PASS=secret \
START=1 \
PXC=5.7.28-31.41.2 \
DB_OPTS=mysql/async-repl-gtid.cnf \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
test $DESTROY = yes && ./podmanctl --destroy
else
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
if [[ "x$2" = "" || "x$2" = "xmydumper" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7
MYDUMPER=0.9.5-2 lxdock up default
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl
MYDUMPER=0.9.5-2 \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
test $DESTROY = yes && ./podmanctl --destroy
else
MYDUMPER=0.9.5-2 vagrant up default
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
# Postgresql 12 with PGPool-II and sybench
if [[ "x$2" = "" || "x$2" = "xpgpoolsysbench" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 3
PPGSQL=12.2-4 DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 \
lxdock up default
SYSBENCH=1.0.20-6 lxdock up node1
PGPOOL=4.1.2-1 PPGSQL=12.2-4 DB_PASS=secret START=1 \
DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
lxdock up node2
lxdock shell node1 -c \
/bin/bash /vagrant/tools/sysbench_pg_oltp_ro.sh \
$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
postgres secret postgres 2 10000 4 100
echo "benchmarking with pgpool"
lxdock shell node1 -c \
/bin/bash /vagrant/tools/sysbench_pg_oltp_ro.sh \
$(lxdock shell node2 -c /vagrant/tools/node_ip.sh 2>/dev/null) \
postgres secret postgres 2 10000 4 100
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl
PPGSQL=12.2-4 DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
SYSBENCH=1.0.20-6 \
ansible-playbook -i ansible_hosts --limit $USER.node1 playbook.yml
PGPOOL=4.1.2-1 PPGSQL=12.2-4 DB_PASS=secret START=1 \
DB_IP=$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts) \
ansible-playbook -i ansible_hosts --limit $USER.node2 playbook.yml
ansible -i ansible_hosts $USER.node1 -a "/bin/bash /vagrant/tools/sysbench_pg_oltp_ro.sh "$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts)" postgres secret postgres 2 10000 4 100"
echo "benchmarking with pgpool"
ansible -i ansible_hosts $USER.node1 -a "/bin/bash /vagrant/tools/sysbench_pg_oltp_ro.sh "$(sed -ne '/node2/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts)" postgres secret postgres 2 10000 4 100"
test $DESTROY = yes && ./podmanctl --destroy
else
PPGSQL=12.2-4 DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 \
vagrant up default
SYSBENCH=1.0.20-6 vagrant up node1
PGPOOL=4.1.2-1 PPGSQL=12.2-4 DB_PASS=secret START=1 \
DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
vagrant up node2
vagrant ssh node1 -- \
/bin/bash /vagrant/tools/sysbench_pg_oltp_ro.sh \
$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
postgres secret postgres 2 10000 4 100
echo "benchmarking with pgpool"
vagrant ssh node1 -- \
sudo /bin/bash /vagrant/tools/sysbench_pg_oltp_ro.sh \
$(vagrant ssh node2 -c /vagrant/tools/node_ip.sh 2>/dev/null) \
postgres secret postgres 2 10000 4 100
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
# Postgresql Odyssey + PG
if [[ "x$2" = "" || "x$2" = "xodyssey" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/8 3
PG=12.2 DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 \
lxdock up default
SYSBENCH=1.0.20-6 lxdock up node1
ODYSSEY=1.1 DB_PASS=secret \
DB_IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
lxdock up node2
lxdock shell node1 -c \
/bin/bash /vagrant/tools/sysbench_pg_oltp_ro.sh \
$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
postgres secret postgres 2 10000 4 100 yes
echo "benchmarking with pgpool"
lxdock shell node1 -c \
/bin/bash /vagrant/tools/sysbench_pg_oltp_ro.sh \
$(lxdock shell node2 -c /vagrant/tools/node_ip.sh 2>/dev/null) \
postgres secret postgres 2 10000 4 100 yes
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl --os centos8
PG=12.2 DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
SYSBENCH=1.0.20-6 \
ansible-playbook -i ansible_hosts --limit $USER.node1 playbook.yml
ODYSSEY=1.1 DB_PASS=secret \
DB_IP=$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts) \
ansible-playbook -i ansible_hosts --limit $USER.node2 playbook.yml
ansible -i ansible_hosts $USER.node1 -a "/bin/bash /vagrant/tools/sysbench_pg_oltp_ro.sh "$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts)" postgres secret postgres 2 10000 4 100 yes"
echo "benchmarking with odyssey"
ansible -i ansible_hosts $USER.node1 -a "/bin/bash /vagrant/tools/sysbench_pg_oltp_ro.sh "$(sed -ne '/node2/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts)" postgres secret postgres 2 10000 4 100 yes"
test $DESTROY = yes && ./podmanctl --destroy
else
PG=12.2 DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 \
vagrant up default
SYSBENCH=1.0.20-6 vagrant up node1
OS=centos/8 \
ODYSSEY=1.1 DB_PASS=secret \
DB_IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
vagrant up node2
vagrant ssh node1 -- \
/bin/bash /vagrant/tools/sysbench_pg_oltp_ro.sh \
$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null) \
postgres secret postgres 2 10000 4 100 yes
echo "benchmarking with pgpool"
vagrant ssh node1 -- \
sudo /bin/bash /vagrant/tools/sysbench_pg_oltp_ro.sh \
$(vagrant ssh node2 -c /vagrant/tools/node_ip.sh 2>/dev/null) \
postgres secret postgres 2 10000 4 100 yes
test $DESTROY = yes && vagrant destroy -f
fi
fi
# Community Postgresql 12
if [[ "x$2" = "" || "x$2" = "xpg12" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 3
PG=12.2 DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 \
lxdock up default
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl
PG=12.2 DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
test $DESTROY = yes && ./podmanctl --destroy
else
PG=12.2 DB_PASS=secret DB_OPTS=postgresql/logical.conf START=1 \
vagrant up default
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
# Percona K8S Operator for PXC
if [[ "x$2" = "" || "x$2" = "xpopxc" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/7 4
K3S=latest K8S_MINIO=yes lxdock up default
until [ "x" != "x$IP" ]; do
IP=$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null)
sleep 1
done
echo "K8S master IP: $IP"
K3S_TOKEN=$(lxdock shell default -c cat /var/lib/rancher/k3s/server/node-token) \
K3S_URL="https://$(lxdock shell default -c /vagrant/tools/node_ip.sh 2>/dev/null):6443" \
lxdock up node1 node2 node3
# there are dns resolution issues for "too fast start"
sleep 30
K3S=latest PKO4PXC='1.4.0' K8S_PMM=1 DB_FEATURES="backup" lxdock provision default
lxdock shell default -c kubectl apply -f /vagrant/configs/k8s/svc-replication-master.yaml
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl --k8s
KUBE_CONFIG=kube.config PKO4PXC='1.4.0' K8S_PMM=1 K8S_MINIO=1 \
DB_FEATURES="backup" \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
test $DESTROY = yes && sudo podman rm -f ihanick.node2 ihanick.default ihanick.k8sw1 ihanick.k8sw3 ihanick.k8sm ihanick.node1 ihanick.k8sw2
test $DESTROY = yes && ./podmanctl --destroy
elif [[ "x$1" = "xlxd" ]] ; then
./lxdctl --nodes 4 --privileged
K3S=latest K8S_MINIO=yes ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
K3S_TOKEN="$(ssh -i secret/id_rsa root@$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts) -o StrictHostKeyChecking=no cat /var/lib/rancher/k3s/server/node-token)" \
K3S_URL="https://$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts):6443" \
ansible-playbook -i ansible_hosts --limit "$USER.node1,$USER.node2,$USER.node3" playbook.yml
sleep 30
K3S=latest PKO4PXC='1.4.0' K8S_PMM=1 DB_FEATURES="backup" \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
ssh -i secret/id_rsa \
root@$(sed -ne '/default/ {s/^.*ansible_host=//;s/ .*$//;p}' ansible_hosts) \
-o StrictHostKeyChecking=no \
kubectl apply -f /vagrant/configs/k8s/svc-replication-master.yaml
test $DESTROY = yes && ./lxdctl --destroy
else
K3S=latest K8S_MINIO=yes vagrant up default
until [ "x" != "x$IP" ]; do
IP=$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null)
sleep 1
done
echo "K8S master IP: $IP"
K3S_TOKEN=$(vagrant ssh default -c cat /var/lib/rancher/k3s/server/node-token) \
K3S_URL="https://$(vagrant ssh default -c /vagrant/tools/node_ip.sh 2>/dev/null):6443" \
vagrant up node1 node2 node3
# there are dns resolution issues for "too fast start"
sleep 30
K3S=latest PKO4PXC='1.4.0' K8S_PMM=1 DB_FEATURES="backup" vagrant provision default
vagrant default -c kubectl apply -f /vagrant/configs/k8s/svc-replication-master.yaml
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
if [[ "x$2" = "" || "x$2" = "xc8my8" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/8
MYSQL=8.0.21-1 DB_USER=root DB_PASS=secret START=1 DB_OPTS=mysql/async-repl-gtid.cnf \
lxdock up default
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl --os centos8
MYSQL=8.0.21-1 DB_USER=root DB_PASS=secret START=1 DB_OPTS=mysql/async-repl-gtid.cnf \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
test $DESTROY = yes && ./podmanctl --destroy
else
MYSQL=8.0.21-1 DB_USER=root DB_PASS=secret START=1 DB_OPTS=mysql/async-repl-gtid.cnf \
OS=centos/8 \
vagrant up default
test $DESTROY = yes && vagrant destroy -f || true
fi
fi
if [[ "x$2" = "" || "x$2" = "xc8my8pxb8" ]] ; then
if [[ "x$1" = "xlxdock" ]] ; then
./gen_lxdock.sh anydbver centos/8
MYSQL=8.0.21-1 DB_USER=root DB_PASS=secret START=1 DB_OPTS=mysql/async-repl-gtid.cnf \
PXB=8.0.13-1 \
lxdock up default
test $DESTROY = yes && lxdock destroy -f
elif [[ "x$1" = "xpodman" ]] ; then
./podmanctl --os centos8
MYSQL=8.0.21-1 DB_USER=root DB_PASS=secret START=1 DB_OPTS=mysql/async-repl-gtid.cnf \
PXB=8.0.13-1 \
ansible-playbook -i ansible_hosts --limit $USER.default playbook.yml
test $DESTROY = yes && ./podmanctl --destroy
else
MYSQL=8.0.21-1 DB_USER=root DB_PASS=secret START=1 DB_OPTS=mysql/async-repl-gtid.cnf \
PXB=8.0.13-1 \
OS=centos/8 \
vagrant up default
test $DESTROY = yes && vagrant destroy -f || true
fi