-
Notifications
You must be signed in to change notification settings - Fork 9
/
_functions.sh
executable file
·2535 lines (2289 loc) · 118 KB
/
_functions.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 -eu
# if the script was started from the base directory, then the
# expansion returns a period
if test "${SCRIPT_DIR}" == "."; then
SCRIPT_DIR="$PWD"
# if the script was not called with an absolute path, then we need to add the
# current working directory to the relative path of the script
elif test "${SCRIPT_DIR:0:1}" != "/"; then
SCRIPT_DIR="$PWD/${SCRIPT_DIR}"
fi
# Load shared functions (they are specific to ADT)
source "${SCRIPT_DIR}/_functions_core.sh"
source "${SCRIPT_DIR}/_functions_aliases.sh"
source "${SCRIPT_DIR}/_functions_string.sh"
source "${SCRIPT_DIR}/_functions_system.sh"
source "${SCRIPT_DIR}/_functions_files.sh"
source "${SCRIPT_DIR}/_functions_download.sh"
source "${SCRIPT_DIR}/_functions_git.sh"
source "${SCRIPT_DIR}/_functions_ufw.sh"
source "${SCRIPT_DIR}/_functions_apache.sh"
source "${SCRIPT_DIR}/_functions_logrotate.sh"
source "${SCRIPT_DIR}/_functions_awstats.sh"
source "${SCRIPT_DIR}/_functions_plf.sh"
source "${SCRIPT_DIR}/_functions_tomcat.sh"
source "${SCRIPT_DIR}/_functions_jbosseap.sh"
source "${SCRIPT_DIR}/_functions_docker.sh"
source "${SCRIPT_DIR}/_functions_database.sh"
source "${SCRIPT_DIR}/_functions_es.sh"
source "${SCRIPT_DIR}/_functions_chat.sh"
source "${SCRIPT_DIR}/_functions_onlyoffice.sh"
source "${SCRIPT_DIR}/_functions_ldap.sh"
source "${SCRIPT_DIR}/_functions_iframely.sh"
source "${SCRIPT_DIR}/_functions_mailhog.sh"
source "${SCRIPT_DIR}/_functions_frontail.sh"
source "${SCRIPT_DIR}/_functions_adminmongo.sh"
source "${SCRIPT_DIR}/_functions_keycloak.sh"
source "${SCRIPT_DIR}/_functions_cloudbeaver.sh"
source "${SCRIPT_DIR}/_functions_phpldapadmin.sh"
source "${SCRIPT_DIR}/_functions_jitsi.sh"
source "${SCRIPT_DIR}/_functions_sftp.sh"
source "${SCRIPT_DIR}/_functions_cmis.sh"
# #################################################################################
#
# All following functions are usable only in ADT context using shared env variables
#
# #################################################################################
#
# Usage message
#
print_usage() {
cat << EOF
usage: $0 <action>
This script manages automated deployment of eXo products for testing purpose.
Action
------
deploy Deploys (Download+Configure) the server
download-dataset Downloads the dataset required by the server
start Starts the server
stop Stops the server
restart Restarts the server
undeploy Undeploys (deletes) the server
start-all Starts all deployed servers
stop-all Stops all deployed servers
restart-all Restarts all deployed servers
undeploy-all Undeploys (deletes) all deployed servers
list Lists all deployed servers
init Initializes the environment
update-repos Update Git repositories used by the web front-end
web-server Starts a local PHP web server to test the front-end (requires PHP >= 5.4). It automatically activates the development mode.
Environment Variables
---------------------
They may be configured in the current shell environment or /etc/default/adt or \$HOME/.adtrc
Global Settings
===============
ADT_DATA : The path where data have to be stored (default: under the script path - ${SCRIPT_DIR})
ACCEPTANCE_SCHEME : The scheme to use to deploy the acceptance server (default: 'http' if ADT_DEV_MODE=true, 'https' otherwise; values : http | https)
ACCEPTANCE_HOST : The hostname (vhost) where is deployed the acceptance server (default: 'localhost' if ADT_DEV_MODE=true, 'acceptance.exoplatform.org' otherwise)
ACCEPTANCE_PORT : The server port on which the acceptance front-end is listening (default: '8080' if ADT_DEV_MODE=true, '80' otherwise)
ACCEPTANCE_SERVERS : A comma separated list of all acceptance front-end URLs to aggregate (default: 'http://localhost:8080' if ADT_DEV_MODE=true, 'https://acceptance.exoplatform.org' otherwise)
CROWD_ACCEPTANCE_APP_NAME : The crowd application used to authenticate the front-end (default: none)
CROWD_ACCEPTANCE_APP_PASSWORD : The crowd application's password used to authenticate the front-end (default: none)
LDAP_ACCEPTANCE_BIND_DN : The LDAP Bind DN used to authenticate the front-end (default: none)
LDAP_ACCEPTANCE_BIND_PASSWORD : The LDAP Bind DN's password used to authenticate the front-end (default: none)
APACHE_SSL_CERTIFICATE_FILE : Apache SSLCertificateFile for HTTPS setup
APACHE_SSL_CERTIFICATE_KEY_FILE : Apache SSLCertificateKeyFile for HTTPS setup
APACHE_SSL_CERTIFICATE_CHAIN_FILE : Apache SSLCertificateChainFile for HTTPS setup
REPOSITORY_SERVER_BASE_URL : The Maven repository URL used to download artifacts (default: https://repository.exoplatform.org)
REPOSITORY_USERNAME : The username to logon on \$REPOSITORY_SERVER_BASE_URL if necessary (default: none)
REPOSITORY_PASSWORD : The password to logon on \$REPOSITORY_SERVER_BASE_URL if necessary (default: none)
ADT_DEBUG : Display debug details (default: false; values : true | false)
ADT_DEV_MODE : Development mode. Apache server, awstats and ufw are deactivated. (default: false; values : true | false)
ADT_OFFLINE : Use only local resources, don''t do any remote operations. (default: false; values : true | false)
Instance Settings
=================
PRODUCT_NAME : The product you want to manage. Possible values are :
gatein GateIn Community edition - Apache Tomcat bundle
exogtn GateIn eXo edition - Apache Tomcat bundle
plf eXo Platform Standard Edition - Apache Tomcat bundle
plfcom eXo Platform Community Edition - Apache Tomcat bundle
meeds Meeds.io - Apache Tomcat bundle
plfent eXo Platform Express/Enterprise Edition - Apache Tomcat bundle
plfenteap eXo Platform Express/Enterprise Edition - JBoss EAP bundle
plftrial eXo Platform Trial Edition - Apache Tomcat bundle
plfdemo eXo Platform Demo Edition - Apache Tomcat bundle
addonchat eXo Platform + eXo Addon Chat - Apache Tomcat bundle
compint eXo Company Intranet - Apache Tomcat bundle
community eXo Community Website - Apache Tomcat bundle
docs eXo Platform Documentations Website - Apache Tomcat bundle
PRODUCT_VERSION : The version of the product. Can be either a release, a snapshot (the latest one) or a timestamped snapshot
INSTANCE_ID : The id of the instance. Use this property to deploy several time the same PRODUCT_NAME and PRODUCT_VERSION couple (default: none)
DEPLOYMENT_LABELS : Comma separated labels for a deployment \" (default: none)
DEPLOYMENT_SKIP_ACCOUNT_SETUP : Do you want to skip the account creation form and use default accounts (default: false; values : true | false)
DEPLOYMENT_SKIP_REGISTER : Do you want to skip the register step (default: false; values : true | false)
DEPLOYMENT_APACHE_SECURITY : Do you want to have a public or a private deployment (default: private; values : private | public)
DEPLOYMENT_APACHE_VHOST_ALIAS : Do you want to add an Apache ServerAlias directive to access the deployed instance through a more userfriendly url (ex: try.exoplatform.com for a public demo)
DEPLOYMENT_APACHE_HTTPS_ENABLED : Do you want to add an HTTPs VirtualHost (default: false; values : true | false)
DEPLOYMENT_APACHE_HTTPSONLY_ENABLED : Do you want to use a HTTPs VirtualHost (default: false; values : true | false)
DEPLOYMENT_PORT_PREFIX : Default prefix for all ports (2 digits will be added after it for each required port)
DEPLOYMENT_JVM_SIZE_MAX : Maximum heap memory size (default: 2g)
DEPLOYMENT_JVM_SIZE_MIN : Minimum heap memory size (default: 512m)
DEPLOYMENT_JVM_PERMSIZE_MAX : Maximum permgem memory size (default: 256m)
DEPLOYMENT_OPTS : Additional JVM parameters to pass to the startup. Take care to escape characters like \" (default: none)
DEPLOYMENT_DOCKER_HOST : The docker host to use to deploy containers (default: unix://)
DEPLOYMENT_DOCKER_CMD : The docker command to execute (default: docker)
DEPLOYMENT_DB_TYPE : Which database do you want to use for your deployment ? (default: HSQLDB; values : HSQLDB | MYSQL | DOCKER_MYSQL | DOCKER_POSTGRES | DOCKER_MARIADB | DOCKER_ORACLE | DOCKER_SQLSERVER)
DEPLOYMENT_DATABASE_VERSION : Which database version do you want to use for your deployment ? (no default)
DEPLOYMENT_MODE : How data are processed during a restart or deployment (default: KEEP_DATA for restart, NO_DATA for deploy; values : NO_DATA - All existing data are removed | KEEP_DATA - Existing data are kept | RESTORE_DATASET | DUMP_DATASET - The latest dataset - if exists - is restored)
DEPLOYMENT_LDAP_URL : LDAP URL to use if the server is using one (default: none)
DEPLOYMENT_LDAP_ADMIN_DN : LDAP DN to use to logon into the LDAP server
DEPLOYMENT_LDAP_ADMIN_PWD : LDAP password to use to logon into the LDAP server
DEPLOYMENT_OAUTH_FACEBOOK_CLIENT_ID : Identifier for Facebook OAuth integration (used by community)
DEPLOYMENT_OAUTH_FACEBOOK_CLIENT_SECRET : Secret for Facebook OAuth integration (used by community)
DEPLOYMENT_OAUTH_GOOGLE_CLIENT_ID : Identifier for Google OAuth integration (used by community)
DEPLOYMENT_OAUTH_GOOGLE_CLIENT_SECRET : Secret for Facebook OAuth integration (used by community)
DEPLOYMENT_OAUTH_LINKEDIN_CLIENT_ID : Identifier for LinkedIn OAuth integration (used by community)
DEPLOYMENT_OAUTH_LINKEDIN_CLIENT_SECRET : Secret for Facebook OAuth integration (used by community)
DEPLOYMENT_EXTENSIONS : Comma separated list of PLF extensions to install. "all" to install all extensions available. Empty string for none. (default: all)
DEPLOYMENT_ES_ENABLED : Do we need to configure elasticsearch (default: true; values : true|false)
DEPLOYMENT_ES_EMBEDDED : Do we use an embedded Elasticsearch deployment or not (default: true; values: true|false)
DEPLOYMENT_ES_IMAGE : Which docker image to use for standalone elasticsearch (default: exoplatform/elasticsearch)
DEPLOYMENT_ES_IMAGE_VERSION : Which version of the ES image to use (default 0.5.0 for PLF 4.4, 1.1.1 for plf 5.0, 1.2.0 for PLF 5.1)
DEPLOYMENT_ES_HEAP : Size of Elasticsearch heap (default: 512m)
DEPLOYMENT_CHAT_ENABLE : Do we need to initiallize chat environment
DEPLOYMENT_CHAT_EMBEDDED : Do we use the embedded Chat Server or not (default: true; values: true|false)
DEPLOYMENT_CHAT_SERVER_IMAGE : Which chat server image to use (default: exoplatform/chat-server)"
DEPLOYMENT_CHAT_SERVER_VERSION : Which version of chat server to use with the chat server
DEPLOYMENT_CHAT_MONGODB_TYPE : Type of mongodb deployment (default: DOCKER if chat embedded is true, HOST otherwise, values: HOST|DOCKER)
DEPLOYMENT_CHAT_MONGODB_IMAGE : Which mongodb image to use (default: mongo)"
DEPLOYMENT_CHAT_MONGODB_VERSION : Which version of mongodb to use with the chat server (default: 3.2)
DEPLOYMENT_CHAT_INTERMEDIATE_MONGODB_UPGRADE_VERSIONS : Which versions of mongodb to use with the chat server during mongo upgrade
DEPLOYMENT_CMISSERVER_ENABLED : Enable the deployment of a dedicated CMIS server, as exo-cloud-drive is not only about CMIS, it can be deloyed without a CMIS server when this param isn't set to true. (default: false; values: true|false)
DEPLOYMENT_CMIS_IMAGE : Which docker image to use for the cmis server (default: exoplatform/cmis-server)
DEPLOYMENT_CMIS_IMAGE_VERSION : Which version of the cmis server image to use (default: 1.0)
DEPLOYMENT_CMIS_USERS_PASSWORD : Which password to use for the cmis users (by default, use the cmis image default)
DEPLOYMENT_SFTP_ENABLED : Do you need to configure exo-lecko addon
DEPLOYMENT_ES_EMBEDDED_MIGRATION_ENABLED : Enable elastic serach migration from embedded to standalone
DEPLOYMENT_ES7_MIGRATION_ENABLED : Enable elastic serach migration to version 7
DEPLOYMENT_GZIP_ENABLED : Enable Gzip Compression on the Tomcat Server
DEPLOYMENT_LOGBACK_LOGGERS : Enable Debug logging for java packages (comma seperated)
DEPLOYMENT_LOGBACK_LOGGERS_LEVEL : Customize Logback logging level (INFO, DEBUG, ERROR): Default: DEBUG
DEPLOYMENT_UPLOAD_MAX_FILE_SIZE : Configure the max size for file upload in eXo (in MB)
DEPLOYMENT_STAGING_ENABLED : Enable Staging nexus repositories deployment
EOF
}
# find_instance_file <VAR> <DIR> <BASENAME> <PRODUCT_NAME>
# Finds which file to use and store its path in <VAR>
# We'll try to find it in the directory <DIR> and we'll select it in this order :
# <PRODUCT_NAME>-${PRODUCT_VERSION}-<BASENAME>
# <PRODUCT_NAME>-${PRODUCT_BRANCH}-<BASENAME>
# <PRODUCT_NAME>-${PRODUCT_MAJOR_BRANCH}-<BASENAME>
# <PRODUCT_NAME>-<BASENAME>
# <BASENAME>.patch
find_instance_file() {
local _variable=$1
local _patchDir=$2
local _basename=$3
local _product=$4
find_file ${_variable} \
"$_patchDir/$_basename" \
"$_patchDir/$_product-$_basename" \
"$_patchDir/$_product-${PRODUCT_MAJOR_BRANCH}-$_basename" \
"$_patchDir/$_product-${PRODUCT_BRANCH}-$_basename" \
"$_patchDir/$_product-${PRODUCT_VERSION}-$_basename"
}
#
# Decode command line parameters
#
initialize_product_settings() {
validate_env_var "ACTION"
# Docker properties
configurable_env_var "DEPLOYMENT_DOCKER_HOST" "unix://"
configurable_env_var "DEPLOYMENT_DOCKER_CMD" "docker"
configurable_env_var "DOCKER_CMD" "${DEPLOYMENT_DOCKER_CMD} -H ${DEPLOYMENT_DOCKER_HOST}"
# ${PRODUCT_BRANCH} is computed from ${PRODUCT_VERSION} and is equal to the version up to the latest dot
# and with x added. ex : 3.5.0-M4-SNAPSHOT => 3.5.x, 1.1.6-SNAPSHOT => 1.1.x
env_var PRODUCT_BRANCH `expr "${PRODUCT_VERSION}" : '\([0-9]*\.[0-9]*\).*'`".x"
env_var PRODUCT_MAJOR_BRANCH `expr "${PRODUCT_VERSION}" : '\([0-9]*\).*'`".x"
configurable_env_var "INSTANCE_ID" ""
configurable_env_var "INSTANCE_TOKEN" ""
if [ ! -z "${INSTANCE_TOKEN:-}" ]; then
if [[ ! "${INSTANCE_TOKEN}" =~ ^\{?[A-F0-9a-f]{8}-[A-F0-9a-f]{4}-[A-F0-9a-f]{4}-[A-F0-9a-f]{4}-[A-F0-9a-f]{12}\}?$ ]]; then
echo_error "${INSTANCE_TOKEN} must be a valid UUID Token!"
exit 1
fi
env_var "INSTANCE_KEY" "${PRODUCT_NAME}-${INSTANCE_TOKEN:0:8}"
elif [ -z "${INSTANCE_ID}" ]; then
env_var "INSTANCE_KEY" "${PRODUCT_NAME}-${PRODUCT_VERSION}"
else
env_var "INSTANCE_KEY" "${PRODUCT_NAME}-${PRODUCT_VERSION}-${INSTANCE_ID}"
fi
# validate additional parameters
case "${ACTION}" in
start | stop | restart | undeploy | deploy | download-dataset)
# Mandatory env vars. They need to be defined before launching the script
validate_env_var "PRODUCT_NAME"
validate_env_var "PRODUCT_VERSION"
configurable_env_var "INSTANCE_ID" ""
# Defaults values we can override by product/branch/version
configurable_env_var "EXO_PROFILES" "all"
# Comma separated list of PLF extensions to install. all (by default) to install all extensions available. Empty string for none.
configurable_env_var "DEPLOYMENT_EXTENSIONS" "all"
# Comma separated list of PLF add-ons to install using the add-ons manager. Empty string for none. (default: none)
configurable_env_var "DEPLOYMENT_ADDONS" ""
configurable_env_var "DEPLOYMENT_ADDONS_CATALOG" ""
configurable_env_var "DEPLOYMENT_ADDONS_MANAGER_CONFLICT_MODE" "" # used for add-on manager --conflict parameter (default: none) (possible values: fail / skip / overwrite)
configurable_env_var "DEPLOYMENT_ADDONS_MANAGER_NOCOMPAT_MODE" "" # used for add-on manager --no-compat parameter (default: none) (possible values: true / false)
configurable_env_var "DEPLOYMENT_ADDONS_MANAGER_UNSTABLE_MODE" "" # used for add-on manager --unstable parameter (default: none) (possible values: true / false)
configurable_env_var "DEPLOYMENT_ADDONS_MANAGER_PATCHES_NOCOMPAT_MODE" "" # used for add-on manager --no-compat parameter when installing patches (default: none) (possible values: true / false)
# Comma separated list of patches to install using addon-ons manager. Empty string for none. (default: none)
configurable_env_var "DEPLOYMENT_PATCHES" ""
configurable_env_var "DEPLOYMENT_PATCHES_CATALOG" "http://patches.exoplatform.org/catalog.json"
configurable_env_var "DEPLOYMENT_ADDONS_MANAGER_PATCHES_CONFLICT_MODE" "overwrite" # used for add-on manager --conflict parameter (default: overwrite) (possible values: fail / skip / overwrite)
# Comma separated list of addons to remove using addon-ons manager. Empty string for none. (default: none)
configurable_env_var "DEPLOYMENT_ADDONS_TOREMOVE" ""
# Additional command line settings to pass to the startup
configurable_env_var "DEPLOYMENT_OPTS" ""
configurable_env_var "DEPLOYMENT_APPSRV_VERSION" "7.0.75" #Default version used to download additional resources like JMX lib
env_var "DEPLOYMENT_DATABASE_ENABLED" true
env_var "DEPLOYMENT_DATABASE_NAME" ""
env_var "DEPLOYMENT_DATABASE_USER" ""
configurable_env_var "DEPLOYMENT_DB_IDM_DEFAULT_NAME" "idm"
configurable_env_var "DEPLOYMENT_DB_JCR_DEFAULT_NAME" "jcr"
configurable_env_var "DEPLOYMENT_DB_JPA_DEFAULT_NAME" "jpa"
env_var "DEPLOYMENT_GATEIN_CONF_PATH" "gatein/conf/configuration.properties"
env_var "DEPLOYMENT_SERVER_SCRIPT" "bin/gatein.sh"
env_var "DEPLOYMENT_SERVER_LOG_FILE" "catalina.out"
env_var "DEPLOYMENT_APPSRV_TYPE" "tomcat" #Server type
env_var "DEPLOYMENT_BUILD_URL" "$(dirname ${BUILD_URL})"
env_var "DEPLOYMENT_ADDONS_MANAGER_VERSION" "1.0.0-RC4" #Add-ons Manager to use
configurable_env_var "REPOSITORY_SERVER_BASE_URL" "https://repository.exoplatform.org"
configurable_env_var "REPOSITORY_USERNAME" ""
configurable_env_var "REPOSITORY_PASSWORD" ""
env_var "DEPLOYMENT_CRASH_ENABLED" false
configurable_env_var "DEPLOYMENT_ES_ENABLED" true
env_var "DEPLOYMENT_ONLYOFFICE_DOCUMENTSERVER_ENABLED" false
configurable_env_var "DEPLOYMENT_ONLYOFFICE_SECRET" "$(uuidgen | sha256sum | awk '{ print $1 }')"
configurable_env_var "DEPLOYMENT_ONLYOFFICE_LINK_SECRET" "$(uuidgen | sha256sum | awk '{ print $1 }')"
configurable_env_var "DEPLOYMENT_JMX_READONLY_PASSWORD" "$(getrandomstring)"
configurable_env_var "DEPLOYMENT_JMX_READWRITE_PASSWORD" "$(getrandomstring)"
configurable_env_var "DEPLOYMENT_LDAP_ENABLED" false
configurable_env_var "DEPLOYMENT_LDAP_IMAGE" "dinkel/openldap"
configurable_env_var "DEPLOYMENT_LDAP_IMAGE_VERSION" "2.4.44"
# USER_DIRECTORY should have LDAP/MSAD as values
configurable_env_var "USER_DIRECTORY" "LDAP"
configurable_env_var "DEPLOYMENT_AD_HOST" "localhost"
configurable_env_var "DEPLOYMENT_AD_PORT" "389"
configurable_env_var "USER_DIRECTORY_BASE_DN" "dc=exoplatform,dc=com"
configurable_env_var "GROUP_DIRECTORY_BASE_DN" ""
configurable_env_var "USER_DIRECTORY_ADMIN_DN" "cn=admin,dc=exoplatform,dc=com"
configurable_env_var "USER_DIRECTORY_ADMIN_PASSWORD" "exo"
# Iframely
configurable_env_var "DEPLOYMENT_IFRAMELY_ENABLED" false
configurable_env_var "DEPLOYMENT_IFRAMELY_IMAGE" "jolt/iframely"
configurable_env_var "DEPLOYMENT_IFRAMELY_IMAGE_VERSION" "v2.2.1"
configurable_env_var "DEPLOYMENT_MAILHOG_ENABLED" false
configurable_env_var "DEPLOYMENT_MAILHOG_IMAGE" "mailhog/mailhog"
configurable_env_var "DEPLOYMENT_MAILHOG_IMAGE_VERSION" "latest"
configurable_env_var "DEPLOYMENT_FRONTAIL_ENABLED" false
configurable_env_var "DEPLOYMENT_FRONTAIL_IMAGE" "mthenw/frontail"
configurable_env_var "DEPLOYMENT_FRONTAIL_IMAGE_VERSION" "latest"
configurable_env_var "DEPLOYMENT_ADMIN_MONGO_ENABLED" false
configurable_env_var "DEPLOYMENT_ADMIN_MONGO_IMAGE" "mrvautin/adminmongo"
configurable_env_var "DEPLOYMENT_ADMIN_MONGO_IMAGE_VERSION" "latest"
configurable_env_var "DEPLOYMENT_KEYCLOAK_ENABLED" false
configurable_env_var "DEPLOYMENT_KEYCLOAK_IMAGE" "quay.io/keycloak/keycloak"
configurable_env_var "DEPLOYMENT_KEYCLOAK_IMAGE_VERSION" "25.0"
configurable_env_var "DEPLOYMENT_KEYCLOAK_MODE" "SAML"
configurable_env_var "DEPLOYMENT_CLOUDBEAVER_ENABLED" false
configurable_env_var "DEPLOYMENT_CLOUDBEAVER_IMAGE" "exoplatform/cloudbeaver"
configurable_env_var "DEPLOYMENT_CLOUDBEAVER_IMAGE_VERSION" "24.2.0-acc"
configurable_env_var "DEPLOYMENT_CLOUDBEAVER_READONLY" true
configurable_env_var "DEPLOYMENT_PHPLDAPADMIN_ENABLED" false
configurable_env_var "DEPLOYMENT_PHPLDAPADMIN_IMAGE" "rschaeuble/phpldapadmin"
configurable_env_var "DEPLOYMENT_PHPLDAPADMIN_IMAGE_VERSION" "latest"
configurable_env_var "DEPLOYMENT_JITSI_ENABLED" false
configurable_env_var "DEPLOYMENT_JITSI_MEM_LIMIT" 4g
configurable_env_var "DEPLOYMENT_JITSI_JICOFO_XMX" 1g
configurable_env_var "DEPLOYMENT_JITSI_JVB_XMX" 1g
configurable_env_var "DEPLOYMENT_JITSI_IMAGE" "exoplatform/jitsi"
configurable_env_var "DEPLOYMENT_JITSI_EXCALIDRAW_BACKEND_IMAGE_VERSION" "1.0"
configurable_env_var "DEPLOYMENT_PG_UPGRADE_IMAGE" "tianon/postgres-upgrade"
configurable_env_var "DEPLOYMENT_SFTP_ENABLED" false
configurable_env_var "DEPLOYMENT_SFTP_IMAGE" "atmoz/sftp"
configurable_env_var "DEPLOYMENT_SFTP_IMAGE_VERSION" "latest"
configurable_env_var "DEPLOYMENT_DEBUG_ENABLED" false
configurable_env_var "DEPLOYMENT_DEV_ENABLED" false
configurable_env_var "DEPLOYMENT_CONTINUOUS_ENABLED" false
configurable_env_var "DEPLOYMENT_J2CLI_IMAGE" "exoplatform/j2cli"
configurable_env_var "DEPLOYMENT_J2CLI_VERSION" "1.0.0"
configurable_env_var "DEPLOYMENT_CHAT_INTERMEDIATE_MONGODB_UPGRADE_VERSIONS" ""
configurable_env_var "DEPLOYMENT_ES7_MIGRATION_ENABLED" false
configurable_env_var "DEPLOYMENT_GZIP_ENABLED" true
configurable_env_var "DEPLOYMENT_LOGBACK_LOGGERS" ""
configurable_env_var "DEPLOYMENT_LOGBACK_LOGGERS_LEVEL" "DEBUG"
configurable_env_var "DEPLOYMENT_UPLOAD_MAX_FILE_SIZE" "200"
configurable_env_var "DEPLOYMENT_STAGING_ENABLED" false
configurable_env_var "DEPLOYMENT_SELFSIGNEDCERTS_HOSTS" ""
configurable_env_var "DS_FILENAME" "${PRODUCT_NAME}-${PRODUCT_BRANCH}"
configurable_env_var "DS_TARGET_SERVER" ""
if [[ "$DEPLOYMENT_ADDONS" =~ "exo-onlyoffice" ]]; then
env_var "DEPLOYMENT_ONLYOFFICE_DOCUMENTSERVER_ENABLED" true
fi
if [ "${DS_FILENAME:-}" = "CURRENT" ]; then
env_var "DS_FILENAME" "${INSTANCE_KEY}"
fi
configurable_env_var "INSTANCE_SSL_CERTIFICATE_FILE" "${APACHE_SSL_CERTIFICATE_FILE}"
configurable_env_var "INSTANCE_SSL_CERTIFICATE_KEY_FILE" "${APACHE_SSL_CERTIFICATE_KEY_FILE}"
configurable_env_var "INSTANCE_SSL_CERTIFICATE_CHAIN_FILE" "${APACHE_SSL_CERTIFICATE_CHAIN_FILE}"
configurable_env_var "INSTANCE_DOMAIN" "" # Default one
configurable_env_var "DEPLOYMENT_CMIS_IMAGE" "exoplatform/cmis-server"
configurable_env_var "DEPLOYMENT_CMIS_IMAGE_VERSION" "1.0"
configurable_env_var "DEPLOYMENT_CMIS_USERS_PASSWORD" ""
# exo-cloud-drive can be used for gdrive, box, dropbox integration without the need for a cmis server.
configurable_env_var "DEPLOYMENT_CMISSERVER_ENABLED" false
if [[ "$DEPLOYMENT_ADDONS" =~ "exo-cloud-drive" ]] && "$DEPLOYMENT_CMISSERVER_ENABLED" ; then
echo_info "DEPLOYMENT_CMISSERVER_ENABLED is $DEPLOYMENT_CMISSERVER_ENABLED and exo-cloud-drive is installed: CMIS server will be deployed for CMIS integration."
elif ! [[ "$DEPLOYMENT_ADDONS" =~ "exo-cloud-drive" ]] && "$DEPLOYMENT_CMISSERVER_ENABLED" ; then
echo_warn "DEPLOYMENT_CMISSERVER_ENABLED is $DEPLOYMENT_CMISSERVER_ENABLED and exo-cloud-drive not installed: No CMIS server will be deployed. Forcing DEPLOYMENT_CMISSERVER_ENABLED to false"
configurable_env_var "DEPLOYMENT_CMISSERVER_ENABLED" false
fi
configurable_env_var "DEPLOYMENT_APACHE_HTTPS_ENABLED" false
configurable_env_var "DEPLOYMENT_APACHE_HTTPSONLY_ENABLED" false
configurable_env_var "DEPLOYMENT_APACHE_WEBSOCKET_ENABLED" true
configurable_env_var "DEPLOYMENT_CHAT_ENABLED" false
configurable_env_var "DEPLOYMENT_CHAT_EMBEDDED" true
configurable_env_var "DEPLOYMENT_CHAT_MONGODB_HOSTNAME" "localhost"
configurable_env_var "DEPLOYMENT_CHAT_SERVER_IMAGE" "exoplatform/chat-server"
configurable_env_var "DEPLOYMENT_CHAT_SERVER_VERSION" "latest"
if ${DEPLOYMENT_CHAT_EMBEDDED}; then
configurable_env_var "DEPLOYMENT_CHAT_MONGODB_TYPE" "HOST"
configurable_env_var "DEPLOYMENT_CHAT_MONGODB_PORT" "27017"
else
# For standalone we force docker mongodb
configurable_env_var "DEPLOYMENT_CHAT_MONGODB_TYPE" "DOCKER"
fi
configurable_env_var "DEPLOYMENT_CHAT_MONGODB_IMAGE" "mongo"
configurable_env_var "DEPLOYMENT_SKIP_ACCOUNT_SETUP" false
configurable_env_var "DEPLOYMENT_DEPLOYMENT_SKIP_REGISTER" false
configurable_env_var "DEPLOYMENT_LABELS" ""
# Push notifications configuration
# Enabled by default for
# - trial and enterprise editions
# - if the exo-push-notifications addon is present on the deployed addons
if [[ "$DEPLOYMENT_ADDONS" =~ "exo-push-notifications" ]]; then
env_var "DEPLOYMENT_PUSH_NOTIFICATIONS_ENABLED" true
fi
configurable_env_var "DEPLOYMENT_PUSH_NOTIFICATIONS_CONFIGURATION_FILE" ""
env_var "ARTIFACT_GROUPID" ""
env_var "ARTIFACT_ARTIFACTID" ""
env_var "ARTIFACT_TIMESTAMP" ""
env_var "ARTIFACT_CLASSIFIER" ""
env_var "ARTIFACT_PACKAGING" "zip"
if ${DEPLOYMENT_STAGING_ENABLED}; then
env_var ARTIFACT_REPO_GROUP "staging"
else
env_var ARTIFACT_REPO_GROUP "public"
fi
# They are set by the script
env_var "ARTIFACT_DATE" ""
env_var "ARTIFACT_REPO_URL" ""
env_var "ARTIFACT_DL_URL" ""
env_var "DEPLOYMENT_DATE" ""
env_var "DEPLOYMENT_DIR" ""
env_var "DEPLOYMENT_LOG_URL" ""
env_var "DEPLOYMENT_LIVE_LOG_URL" ""
env_var "DEPLOYMENT_LOG_PATH" ""
env_var "DEPLOYMENT_JMX_URL" ""
env_var "DEPLOYMENT_PID_FILE" ""
env_var "DEPLOYMENT_LDAP_LINK" ""
env_var "DEPLOYMENT_IFRAMELY_LINK" ""
env_var "DEPLOYMENT_SFTP_LINK" ""
# Classifier to group together projects in the UI
env_var PLF_BRANCH "UNKNOWN" # 3.0.x, 3.5.x, 4.0.x
# More user friendly description
env_var "PRODUCT_DESCRIPTION" "${PRODUCT_NAME}"
# Datasets remote location
env_var "DATASET_DATA_VALUES_ARCHIVE" ""
env_var "DATASET_DATA_INDEX_ARCHIVE" ""
env_var "DATASET_DB_ARCHIVE" ""
# To reuse patches between products
env_var "TOMCAT_SETENV_SCRIPT_PRODUCT_NAME" "${PRODUCT_NAME}"
env_var "PORTS_SERVER_PATCH_PRODUCT_NAME" "${PRODUCT_NAME}"
env_var "JMX_SERVER_PATCH_PRODUCT_NAME" "${PRODUCT_NAME}"
env_var "DB_SERVER_PATCH_PRODUCT_NAME" "${PRODUCT_NAME}"
env_var "DB_GATEIN_PATCH_PRODUCT_NAME" "${PRODUCT_NAME}"
env_var "EMAIL_GATEIN_PATCH_PRODUCT_NAME" "${PRODUCT_NAME}"
env_var "JOD_GATEIN_PATCH_PRODUCT_NAME" "${PRODUCT_NAME}"
env_var "LDAP_GATEIN_PATCH_PRODUCT_NAME" "${PRODUCT_NAME}"
env_var "SET_ENV_PRODUCT_NAME" "${PRODUCT_NAME}"
env_var "STANDALONE_PRODUCT_NAME" "${PRODUCT_NAME}"
# Validate product and load artifact details
# Be careful, this id should be no longer than 10 (because of mysql user name limit)
case "${PRODUCT_NAME}" in
gatein)
env_var PRODUCT_DESCRIPTION "GateIn Community edition"
case "${PRODUCT_BRANCH}" in
"3.0.x" | "3.1.x" | "3.2.x" | "3.3.x" | "3.4.x")
env_var ARTIFACT_GROUPID "org.exoplatform.portal"
env_var ARTIFACT_ARTIFACTID "exo.portal.packaging.tomcat.pkg.tc6"
env_var ARTIFACT_CLASSIFIER "bundle"
env_var DEPLOYMENT_APPSRV_VERSION "6.0.35"
;;
"4.0.x")
env_var ARTIFACT_GROUPID "org.gatein.portal"
env_var ARTIFACT_ARTIFACTID "portal.packaging"
env_var ARTIFACT_CLASSIFIER "tomcat-distrib"
env_var ARTIFACT_PACKAGING "tar.gz"
env_var DEPLOYMENT_SERVER_SCRIPT "bin/catalina.sh"
env_var DEPLOYMENT_DATABASE_ENABLED false
;;
*)
# 3.5.x and +
env_var ARTIFACT_GROUPID "org.gatein.portal"
env_var ARTIFACT_ARTIFACTID "exo.portal.packaging.tomcat.tomcat7"
env_var ARTIFACT_CLASSIFIER "bundle"
;;
esac
case "${PRODUCT_BRANCH}" in
"3.5.x")
env_var PLF_BRANCH "4.1.x"
;;
"3.6.x"|"3.7.x")
env_var PLF_BRANCH "4.3.x"
;;
"3.8.x"|"4.0.x")
env_var PLF_BRANCH "4.x"
;;
esac
;;
exogtn)
env_var PRODUCT_DESCRIPTION "GateIn eXo edition"
case "${PRODUCT_BRANCH}" in
"3.2.x")
env_var PLF_BRANCH "3.5.x"
env_var ARTIFACT_GROUPID "org.exoplatform.portal"
env_var ARTIFACT_ARTIFACTID "exo.portal.packaging.assembly"
env_var ARTIFACT_CLASSIFIER "tomcat"
;;
"3.5.x")
# for PLF 4.0.x and 4.1.x
env_var PLF_BRANCH "4.0.x"
env_var ARTIFACT_GROUPID "org.gatein.portal"
env_var ARTIFACT_ARTIFACTID "exo.portal.packaging.tomcat.tomcat7"
env_var ARTIFACT_CLASSIFIER "bundle"
;;
"3.7.x")
env_var PLF_BRANCH "4.x"
env_var ARTIFACT_GROUPID "org.gatein.portal"
env_var ARTIFACT_ARTIFACTID "exo.portal.packaging.tomcat.tomcat7"
env_var ARTIFACT_CLASSIFIER "bundle"
;;
"4.2.x")
env_var PLF_BRANCH "4.2.x"
env_var ARTIFACT_GROUPID "org.gatein.portal"
env_var ARTIFACT_ARTIFACTID "exo.portal.packaging.tomcat.tomcat7"
env_var ARTIFACT_CLASSIFIER "bundle"
;;
*)
echo_error "Product 'exogtn' not supported for versions != 3.2.x / 3.5.x / 3.7.x / 4.2.x Please create a SWF to modify acceptance."
print_usage
exit 1
;;
esac
;;
plf)
env_var PRODUCT_DESCRIPTION "Platform SE"
env_var ARTIFACT_GROUPID "org.exoplatform.platform"
case "${PRODUCT_BRANCH}" in
"3.0.x")
env_var ARTIFACT_ARTIFACTID "exo.platform.packaging.assembly"
env_var ARTIFACT_CLASSIFIER "tomcat"
;;
"3.5.x")
env_var ARTIFACT_ARTIFACTID "exo.platform.packaging.tomcat"
env_var DEPLOYMENT_SERVER_SCRIPT "bin/catalina.sh"
;;
*)
# 4.0.x and +
echo_error "Product 'plf' not supported for versions > 3.x. Please use plfcom or plfent."
print_usage
exit 1
;;
esac
env_var PLF_BRANCH "${PRODUCT_BRANCH}"
;;
plftrial)
case "${PRODUCT_BRANCH}" in
"3.5.x")
env_var PRODUCT_DESCRIPTION "Platform TE"
env_var ARTIFACT_GROUPID "org.exoplatform.platform"
env_var ARTIFACT_ARTIFACTID "exo.platform.packaging.trial"
env_var DEPLOYMENT_SERVER_SCRIPT "bin/catalina.sh"
env_var PORTS_SERVER_PATCH_PRODUCT_NAME "plf"
env_var JMX_SERVER_PATCH_PRODUCT_NAME "plf"
env_var DB_SERVER_PATCH_PRODUCT_NAME "plf"
env_var DB_GATEIN_PATCH_PRODUCT_NAME "plf"
env_var PLF_BRANCH "${PRODUCT_BRANCH}"
;;
*)
# 4.0.x and +
echo_error "Product 'plftrial' not supported for versions > 3.x. Please use plfcom or plfent."
print_usage
exit 1
;;
esac
;;
meeds)
env_var PRODUCT_DESCRIPTION "Meeds.io"
env_var ARTIFACT_GROUPID "io.meeds.distribution"
env_var ARTIFACT_ARTIFACTID "plf-community-tomcat-standalone"
env_var DEPLOYMENT_SERVER_SCRIPT "bin/catalina.sh"
env_var PLF_BRANCH "${PRODUCT_BRANCH}"
env_var DEPLOYMENT_FORCE_JDBC_DRIVER_ADDON "false"
if [[ "${PRODUCT_VERSION}" =~ ^(1.0|1.1|1.2) ]]; then
env_var DEPLOYMENT_APPSRV_VERSION "8.5"
elif [[ "${PRODUCT_VERSION}" =~ ^(1.3|1.4|1.5) ]]; then
env_var "DEPLOYMENT_APPSRV_VERSION" "9.0"
elif [[ "${PRODUCT_VERSION}" =~ ^(7.0) ]]; then
env_var "DEPLOYMENT_APPSRV_VERSION" "10.0"
else
echo_error "Product version \"${PRODUCT_VERSION}\" not yet managed (Tomcat version)"
exit 1
fi
;;
plfcom)
env_var PRODUCT_DESCRIPTION "Platform CE"
env_var DEPLOYMENT_SERVER_SCRIPT "bin/catalina.sh"
env_var PLF_BRANCH "${PRODUCT_BRANCH}"
case "${PRODUCT_BRANCH}" in
"3.5.x")
env_var ARTIFACT_GROUPID "org.exoplatform.platform"
env_var ARTIFACT_ARTIFACTID "exo.platform.packaging.community"
env_var PORTS_SERVER_PATCH_PRODUCT_NAME "plf"
env_var JMX_SERVER_PATCH_PRODUCT_NAME "plf"
env_var DB_SERVER_PATCH_PRODUCT_NAME "plf"
env_var DB_GATEIN_PATCH_PRODUCT_NAME "plf"
env_var DEPLOYMENT_APPSRV_VERSION "6.0.35"
;;
*)
# 4.0.x and +
env_var ARTIFACT_GROUPID "org.exoplatform.platform.distributions"
env_var ARTIFACT_ARTIFACTID "plf-community-tomcat-standalone"
env_var PLF_BRANCH "${PRODUCT_BRANCH}"
;;
esac
;;
codefest)
env_var PRODUCT_DESCRIPTION "Platform CE"
env_var DEPLOYMENT_SERVER_SCRIPT "bin/catalina.sh"
env_var PLF_BRANCH "CODEFEST"
env_var ARTIFACT_GROUPID "org.exoplatform.platform.distributions"
env_var ARTIFACT_ARTIFACTID "plf-community-tomcat-standalone"
;;
plfdemo)
env_var PRODUCT_DESCRIPTION "Platform 4.0 EE Public Demo"
env_var ARTIFACT_REPO_GROUP "private"
env_var ARTIFACT_GROUPID "com.exoplatform.demo"
env_var ARTIFACT_ARTIFACTID "demo-login-enterprise-tomcat-standalone"
env_var DEPLOYMENT_SERVER_SCRIPT "bin/catalina.sh"
env_var PLF_BRANCH "${PRODUCT_BRANCH} Demo"
env_var DEPLOYMENT_EXTENSIONS "acme,cmis,crash,ide,wai"
env_var DEPLOYMENT_SKIP_ACCOUNT_SETUP true
;;
plfent|plfentdemo)
env_var PRODUCT_DESCRIPTION "Platform EE"
if ${DEPLOYMENT_STAGING_ENABLED}; then
env_var ARTIFACT_REPO_GROUP "staging"
else
env_var ARTIFACT_REPO_GROUP "private"
fi
env_var ARTIFACT_GROUPID "com.exoplatform.platform.distributions"
env_var ARTIFACT_ARTIFACTID "plf-enterprise-tomcat-standalone"
env_var DEPLOYMENT_SERVER_SCRIPT "bin/catalina.sh"
if [ "${PRODUCT_NAME}" = "plfentdemo" ]; then
env_var PLF_BRANCH "${PRODUCT_BRANCH} Demo"
else
env_var PLF_BRANCH "${PRODUCT_BRANCH}"
fi
;;
plfenteap)
env_var PRODUCT_DESCRIPTION "Platform EE"
env_var ARTIFACT_REPO_GROUP "private"
env_var ARTIFACT_GROUPID "com.exoplatform.platform.distributions"
env_var ARTIFACT_ARTIFACTID "plf-enterprise-jbosseap-standalone"
env_var DEPLOYMENT_SERVER_SCRIPT "bin/standalone.sh"
env_var DEPLOYMENT_APPSRV_TYPE "jbosseap"
env_var DEPLOYMENT_SERVER_LOG_FILE "server.log"
env_var PLF_BRANCH "${PRODUCT_BRANCH}"
;;
# ID should be no longer than 10 (plfenttrial is too long)
plfentrial)
# Platform EE + chat, remote-edit, site-template, task, video
env_var PRODUCT_DESCRIPTION "Platform EE Trial"
env_var ARTIFACT_REPO_GROUP "private"
env_var ARTIFACT_GROUPID "com.exoplatform.platform.distributions"
env_var ARTIFACT_ARTIFACTID "plf-enterprise-trial-tomcat-standalone"
env_var ARTIFACT_CLASSIFIER "trial"
env_var DEPLOYMENT_SERVER_SCRIPT "bin/catalina.sh"
env_var PLF_BRANCH "${PRODUCT_BRANCH}"
env_var DEPLOYMENT_CHAT_ENABLED true
;;
plfsales)
env_var ARTIFACT_REPO_GROUP "private"
env_var ARTIFACT_GROUPID "com.exoplatform.platform.distributions"
env_var DEPLOYMENT_SERVER_SCRIPT "bin/catalina.sh"
env_var PLF_BRANCH "${PRODUCT_BRANCH}"
env_var DEPLOYMENT_SKIP_REGISTER true
case "${PRODUCT_BRANCH}" in
"4.4.x")
env_var PRODUCT_DESCRIPTION "Platform EE Trial"
env_var ARTIFACT_ARTIFACTID "plf-enterprise-trial-tomcat-standalone"
env_var ARTIFACT_CLASSIFIER "trial"
env_var DEPLOYMENT_CHAT_ENABLED true
;;
"5.0.x")
env_var PRODUCT_DESCRIPTION "Platform EE Trial"
env_var ARTIFACT_ARTIFACTID "plf-enterprise-trial-tomcat-standalone"
env_var ARTIFACT_CLASSIFIER "trial"
env_var DEPLOYMENT_CHAT_ENABLED true
;;
"5.1.x")
env_var PRODUCT_DESCRIPTION "Platform EE Trial"
env_var ARTIFACT_ARTIFACTID "plf-enterprise-trial-tomcat-standalone"
env_var ARTIFACT_CLASSIFIER "trial"
env_var DEPLOYMENT_CHAT_ENABLED true
;;
"5.2.x")
env_var PRODUCT_DESCRIPTION "Platform EE Trial"
env_var ARTIFACT_ARTIFACTID "plf-enterprise-trial-tomcat-standalone"
env_var DEPLOYMENT_CHAT_ENABLED true
;;
*)
# 5.3.x and +
env_var PRODUCT_DESCRIPTION "Platform EE"
env_var ARTIFACT_ARTIFACTID "plf-enterprise-tomcat-standalone"
;;
esac
;;
addonchat)
env_var PRODUCT_DESCRIPTION "Platform 4.0 EE + Chat eXo Addon"
env_var ARTIFACT_REPO_GROUP "private"
env_var ARTIFACT_GROUPID "com.exoplatform.addons.chat.distribution"
env_var ARTIFACT_ARTIFACTID "plf-enterprise-chat-tomcat-standalone"
env_var DEPLOYMENT_SERVER_SCRIPT "bin/catalina.sh"
env_var PLF_BRANCH "${PRODUCT_BRANCH} Demo"
env_var DEPLOYMENT_EXTENSIONS "crash,ide,chat"
env_var DEPLOYMENT_CHAT_ENABLED true
;;
compint)
env_var PRODUCT_DESCRIPTION "eXo Company Intranet"
env_var ARTIFACT_REPO_GROUP "cp"
env_var ARTIFACT_GROUPID "com.exoplatform.intranet"
# 4.0.x and +
env_var ARTIFACT_ARTIFACTID "company-intranet-package"
env_var PLF_BRANCH "COMPANY"
env_var DEPLOYMENT_SERVER_SCRIPT "bin/catalina.sh"
env_var DEPLOYMENT_EXTENSIONS "crash,ide,chat,newrelic"
env_var DEPLOYMENT_DB_TYPE "MYSQL"
env_var DEPLOYMENT_JVM_SIZE_MAX "3g"
env_var DEPLOYMENT_JVM_SIZE_MIN "2g"
env_var DEPLOYMENT_JVM_PERMSIZE_MAX "512m"
# Datasets remote location
env_var DATASET_DATA_VALUES_ARCHIVE "[email protected]:/home/bckintranet/intranet-data-values-latest.tar.bz2"
env_var DATASET_DATA_INDEX_ARCHIVE "[email protected]:/home/bckintranet/intranet-data-index-latest.tar.bz2"
env_var DATASET_DB_ARCHIVE "[email protected]:/home/bckintranet/intranet-db-latest.tar.bz2"
;;
community)
env_var PRODUCT_DESCRIPTION "eXo Community Website"
env_var ARTIFACT_REPO_GROUP "cp"
env_var ARTIFACT_GROUPID "org.exoplatform.community"
# 4.0.x and +
env_var ARTIFACT_ARTIFACTID "exo-community-package"
env_var PLF_BRANCH "COMPANY"
env_var DEPLOYMENT_SERVER_SCRIPT "bin/catalina.sh"
env_var DEPLOYMENT_EXTENSIONS "crash,ide,chat,newrelic"
env_var DEPLOYMENT_DB_TYPE "MYSQL"
# Datasets remote location
env_var DATASET_DATA_VALUES_ARCHIVE "[email protected]:/home/bckcommunity_pro05/community-data-values-latest.tar.bz2"
env_var DATASET_DATA_INDEX_ARCHIVE "[email protected]:/home/bckcommunity_pro05/community-data-index-latest.tar.bz2"
env_var DATASET_DB_ARCHIVE "[email protected]:/home/bckcommunity_pro05/community-db-latest.tar.bz2"
;;
buypage)
env_var PRODUCT_DESCRIPTION "eXo Buy Page"
env_var PLF_BRANCH "COMPANY"
env_var ARTIFACT_REPO_GROUP "private"
env_var ARTIFACT_GROUPID "com.exoplatform.buypage"
env_var ARTIFACT_ARTIFACTID "buy-page-package"
env_var ARTIFACT_CLASSIFIER "tomcat"
env_var DEPLOYMENT_SERVER_SCRIPT "bin/catalina.sh"
env_var DEPLOYMENT_DATABASE_ENABLED false
;;
docs)
env_var ARTIFACT_REPO_GROUP "private"
env_var PRODUCT_DESCRIPTION "eXo Platform Documentations Website"
env_var ARTIFACT_GROUPID "com.exoplatform.platform.documentation"
env_var DEPLOYMENT_SERVER_SCRIPT "bin/catalina.sh"
env_var DEPLOYMENT_DATABASE_ENABLED false
case "${PRODUCT_BRANCH}" in
"3.5.x")
env_var PLF_BRANCH "3.5.x"
env_var ARTIFACT_ARTIFACTID "platform-documentation-website-packaging"
;;
"4.0.x")
env_var PLF_BRANCH "4.0.x"
env_var ARTIFACT_ARTIFACTID "platform-documentation-packaging"
;;
"4.1.x")
env_var PLF_BRANCH "4.1.x"
env_var ARTIFACT_ARTIFACTID "platform-documentation-packaging"
;;
"4.2.x")
env_var PLF_BRANCH "4.2.x"
env_var ARTIFACT_ARTIFACTID "platform-documentation-packaging"
;;
"4.3.x")
env_var PLF_BRANCH "4.3.x"
env_var ARTIFACT_ARTIFACTID "platform-documentation-packaging"
;;
*)
env_var PLF_BRANCH "4.x"
env_var ARTIFACT_ARTIFACTID "platform-documentation-packaging"
;;
esac
;;
*)
echo_error "Invalid product \"${PRODUCT_NAME}\""
print_usage
exit 1
;;
esac
if [ -z "${INSTANCE_ID}" ]; then
env_var "INSTANCE_DESCRIPTION" "${PRODUCT_DESCRIPTION} ${PRODUCT_VERSION}"
else
env_var "INSTANCE_DESCRIPTION" "${PRODUCT_DESCRIPTION} ${PRODUCT_VERSION} (${INSTANCE_ID})"
fi
# Elasticsearch Embedded default, Starting from PLF 6.2 / Meeds 1.2 ES Embedded is removed
if [[ "${PRODUCT_VERSION}" =~ ^(6.2|6.3|6.4|6.5|1.2|1.3|1.4|1.5|7.0) ]]; then
configurable_env_var "DEPLOYMENT_ES_EMBEDDED" false
if ${DEPLOYMENT_ES_EMBEDDED}; then
echo_error "Product version \"${PRODUCT_VERSION}\" does not support Elasticsearch embedded mode!"
exit 1
fi
else
configurable_env_var "DEPLOYMENT_ES_EMBEDDED" true
fi
if [[ "${PRODUCT_NAME}" =~ ^(meeds) ]]; then
# specific configuration for meeds deployments
# - Database drivers
# - Default version for each supported database type
if [[ "${PRODUCT_VERSION}" =~ ^(7.0) ]]; then
env_var "DEPLOYMENT_FORCE_JDBC_DRIVER_ADDON" "true"
env_var "DEPLOYMENT_ES_IMAGE" "elasticsearch"
env_var "DEPLOYMENT_ES_IMAGE_VERSION" "8.14.3"
env_var "DEPLOYMENT_MYSQL_DEFAULT_VERSION" "8.0.33" # Default version of the mysql server to use
env_var "DEPLOYMENT_POSTGRESQL_DEFAULT_VERSION" "15" # Default version of the postgresql server to use
env_var "DEPLOYMENT_MYSQL_ADDON_VERSION" "2.0.4" # Default version of the mysql driver addon to use
env_var "DEPLOYMENT_POSTGRESQL_ADDON_VERSION" "2.3.0" # Default version of the jdbc postgresql driver addon to use
elif [[ "${PRODUCT_VERSION}" =~ ^(1.5) ]]; then
env_var "DEPLOYMENT_FORCE_JDBC_DRIVER_ADDON" "true"
env_var "DEPLOYMENT_ES_IMAGE" "exoplatform/elasticsearch"
env_var "DEPLOYMENT_ES_IMAGE_VERSION" "2.0.3"
env_var "DEPLOYMENT_MYSQL_DEFAULT_VERSION" "8.0.32" # Default version of the mysql server to use
env_var "DEPLOYMENT_POSTGRESQL_DEFAULT_VERSION" "15" # Default version of the postgresql server to use
env_var "DEPLOYMENT_MYSQL_ADDON_VERSION" "2.0.4" # Default version of the mysql driver addon to use
env_var "DEPLOYMENT_POSTGRESQL_ADDON_VERSION" "2.3.0" # Default version of the jdbc postgresql driver addon to use
elif [[ "${PRODUCT_VERSION}" =~ ^(1.4) ]]; then
env_var "DEPLOYMENT_FORCE_JDBC_DRIVER_ADDON" "true"
env_var "DEPLOYMENT_ES_IMAGE" "exoplatform/elasticsearch"
env_var "DEPLOYMENT_ES_IMAGE_VERSION" "2.0.3"
env_var "DEPLOYMENT_MYSQL_DEFAULT_VERSION" "8.0.31" # Default version of the mysql server to use
env_var "DEPLOYMENT_POSTGRESQL_DEFAULT_VERSION" "15" # Default version of the postgresql server to use
env_var "DEPLOYMENT_MYSQL_ADDON_VERSION" "2.0.4" # Default version of the mysql driver addon to use
env_var "DEPLOYMENT_POSTGRESQL_ADDON_VERSION" "2.3.0" # Default version of the jdbc postgresql driver addon to use
elif [[ "${PRODUCT_VERSION}" =~ ^(1.3) ]]; then
env_var "DEPLOYMENT_FORCE_JDBC_DRIVER_ADDON" "false"
env_var "DEPLOYMENT_ES_IMAGE" "exoplatform/elasticsearch"
env_var "DEPLOYMENT_ES_IMAGE_VERSION" "2.0.3"
env_var "DEPLOYMENT_MYSQL_DEFAULT_VERSION" "8.0.28" # Default version of the mysql server to use
env_var "DEPLOYMENT_POSTGRESQL_DEFAULT_VERSION" "14" # Default version of the postgresql server to use
env_var "DEPLOYMENT_POSTGRESQL_DRIVER_VERSION" "42.3.3"
env_var "DEPLOYMENT_MYSQL_DRIVER_VERSION" "8.0.28"
elif [[ "${PRODUCT_VERSION}" =~ ^(1.2) ]]; then
env_var "DEPLOYMENT_FORCE_JDBC_DRIVER_ADDON" "false"
env_var "DEPLOYMENT_ES_IMAGE" "exoplatform/elasticsearch"
env_var "DEPLOYMENT_ES_IMAGE_VERSION" "2.0.2"
env_var "DEPLOYMENT_MYSQL_DEFAULT_VERSION" "8.0.28" # Default version of the mysql server to use
env_var "DEPLOYMENT_POSTGRESQL_DEFAULT_VERSION" "13" # Default version of the postgresql server to use
env_var "DEPLOYMENT_POSTGRESQL_DRIVER_VERSION" "42.2.18"
env_var "DEPLOYMENT_MYSQL_DRIVER_VERSION" "8.0.21"
elif [[ "${PRODUCT_VERSION}" =~ ^(1.1) ]]; then
env_var "DEPLOYMENT_FORCE_JDBC_DRIVER_ADDON" "false"
env_var "DEPLOYMENT_ES_IMAGE" "exoplatform/elasticsearch"
env_var "DEPLOYMENT_ES_IMAGE_VERSION" "1.2.3"
env_var "DEPLOYMENT_MYSQL_DEFAULT_VERSION" "8.0.28" # Default version of the mysql server to use
env_var "DEPLOYMENT_POSTGRESQL_DEFAULT_VERSION" "13" # Default version of the postgresql server to use
env_var "DEPLOYMENT_POSTGRESQL_DRIVER_VERSION" "42.2.18"
env_var "DEPLOYMENT_MYSQL_DRIVER_VERSION" "8.0.28"
elif [[ "${PRODUCT_VERSION}" =~ ^(1.0) ]]; then
env_var "DEPLOYMENT_FORCE_JDBC_DRIVER_ADDON" "false"
env_var "DEPLOYMENT_ES_IMAGE" "exoplatform/elasticsearch"
env_var "DEPLOYMENT_ES_IMAGE_VERSION" "1.2.3"
env_var "DEPLOYMENT_MYSQL_DEFAULT_VERSION" "8.0.28" # Default version of the mysql server to use
env_var "DEPLOYMENT_POSTGRESQL_DEFAULT_VERSION" "11" # Default version of the postgresql server to use
env_var "DEPLOYMENT_POSTGRESQL_DRIVER_VERSION" "42.2.10"
env_var "DEPLOYMENT_MYSQL_DRIVER_VERSION" "8.0.28"
else
echo_error "Product version \"${PRODUCT_VERSION}\" not yet managed"
exit 1
fi
fi
if [[ "${PRODUCT_NAME}" =~ ^(plf) ]]; then
# specific configuration for plf deployments
# - Database drivers
# - DEPLOYMENT_APPSRV_VERSION for JBoss & Tomcat
# - Default version for each supported database type
if [[ "${PRODUCT_BRANCH}" =~ ^(5.0|5.1|5.2|5.3|6.0|6.1|6.2|6.3|6.4|6.5|7.0) ]]; then
env_var "DEPLOYMENT_FORCE_JDBC_DRIVER_ADDON" "true"
env_var "DEPLOYMENT_SQLSERVER_DRIVER_GROUPID" "com.microsoft.sqlserver"
env_var "DEPLOYMENT_SQLSERVER_DRIVER_ARTIFACTID" "mssql-jdbc"
env_var "DEPLOYMENT_SQLSERVER_DRIVER_REPO" "public"
# Oracle driver is the same for 5.0 / 5.1 / 5.2
env_var "DEPLOYMENT_ORACLE_ADDON_VERSION" "1.1.0" # Default version of the oracle jdbc driver addon to use
env_var "DEPLOYMENT_ORACLE_DRIVER_VERSION" "12.2.0.1"
# for differences between 5.0 / 5.1 / 5.2 / 5.3 (tomcat and jboss)
if [[ "${PRODUCT_VERSION}" =~ ^(5.0) ]]; then
env_var "DEPLOYMENT_ES_IMAGE" "exoplatform/elasticsearch"
env_var "DEPLOYMENT_ES_IMAGE_VERSION" "1.1.0"
env_var "DEPLOYMENT_CHAT_MONGODB_VERSION" "3.4"
env_var "DEPLOYMENT_MYSQL_ADDON_VERSION" "1.1.0" # Default version of the mysql driver addon to use
env_var "DEPLOYMENT_MYSQL_DRIVER_VERSION" "5.1.44" #Default version used to download additional mysql driver
env_var "DEPLOYMENT_POSTGRESQL_ADDON_VERSION" "1.1.0" # Default version of the jdbc postgresql driver addon to use
env_var "DEPLOYMENT_POSTGRESQL_DRIVER_VERSION" "42.1.4" #Default version used to download additional postgresql driver
env_var "DEPLOYMENT_SQLSERVER_ADDON_VERSION" "1.1.0" # Default version of the sqlserver jdbc driver addon to use
env_var "DEPLOYMENT_SQLSERVER_DRIVER_VERSION" "6.2.2.jre8"
env_var "DEPLOYMENT_MYSQL_DEFAULT_VERSION" "5.7" # Default version of the mysql server to use
env_var "DEPLOYMENT_POSTGRESQL_DEFAULT_VERSION" "9.6" # Default version of the postgresql server to use
env_var "DEPLOYMENT_ORACLE_DEFAULT_VERSION" "12cR2_plf" # Default version of the oracle server to use
env_var "DEPLOYMENT_SQLSERVER_DEFAULT_VERSION" "2014express" # Default version of the sqlserver server to use
elif [[ "${PRODUCT_VERSION}" =~ ^(5.1) ]]; then
env_var "DEPLOYMENT_ES_IMAGE" "exoplatform/elasticsearch"
env_var "DEPLOYMENT_ES_IMAGE_VERSION" "1.2.0"
env_var "DEPLOYMENT_CHAT_MONGODB_VERSION" "3.6"
env_var "DEPLOYMENT_MYSQL_ADDON_VERSION" "1.2.0" # Default version of the mysql driver addon to use
env_var "DEPLOYMENT_MYSQL_DRIVER_VERSION" "5.1.46" #Default version used to download additional mysql driver
env_var "DEPLOYMENT_POSTGRESQL_ADDON_VERSION" "1.2.0" # Default version of the jdbc postgresql driver addon to use
env_var "DEPLOYMENT_POSTGRESQL_DRIVER_VERSION" "42.2.2" #Default version used to download additional postgresql driver
env_var "DEPLOYMENT_SQLSERVER_ADDON_VERSION" "1.2.0" # Default version of the sqlserver jdbc driver addon to use
env_var "DEPLOYMENT_SQLSERVER_DRIVER_VERSION" "6.4.0.jre8"
env_var "DEPLOYMENT_MYSQL_DEFAULT_VERSION" "5.7" # Default version of the mysql server to use
env_var "DEPLOYMENT_POSTGRESQL_DEFAULT_VERSION" "10" # Default version of the postgresql server to use
env_var "DEPLOYMENT_ORACLE_DEFAULT_VERSION" "12cR2_plf" # Default version of the oracle server to use
env_var "DEPLOYMENT_SQLSERVER_DEFAULT_VERSION" "2017-CU2" # Default version of the sqlserver server to use
elif [[ "${PRODUCT_VERSION}" =~ ^(5.2) ]]; then
env_var "DEPLOYMENT_ES_IMAGE" "exoplatform/elasticsearch"
env_var "DEPLOYMENT_ES_IMAGE_VERSION" "1.2.1"
env_var "DEPLOYMENT_CHAT_MONGODB_VERSION" "4.0"
env_var "DEPLOYMENT_MYSQL_ADDON_VERSION" "1.3.0" # Default version of the mysql driver addon to use
env_var "DEPLOYMENT_MYSQL_DRIVER_VERSION" "5.1.47" #Default version used to download additional mysql driver
env_var "DEPLOYMENT_POSTGRESQL_ADDON_VERSION" "1.3.0" # Default version of the jdbc postgresql driver addon to use
env_var "DEPLOYMENT_POSTGRESQL_DRIVER_VERSION" "42.2.5" #Default version used to download additional postgresql driver
env_var "DEPLOYMENT_SQLSERVER_ADDON_VERSION" "1.2.0" # Default version of the sqlserver jdbc driver addon to use
env_var "DEPLOYMENT_SQLSERVER_DRIVER_VERSION" "6.4.0.jre8"
env_var "DEPLOYMENT_MYSQL_DEFAULT_VERSION" "5.7" # Default version of the mysql server to use
env_var "DEPLOYMENT_POSTGRESQL_DEFAULT_VERSION" "10" # Default version of the postgresql server to use
env_var "DEPLOYMENT_ORACLE_DEFAULT_VERSION" "12cR2_plf" # Default version of the oracle server to use
env_var "DEPLOYMENT_SQLSERVER_DEFAULT_VERSION" "2017-CU2" # Default version of the sqlserver server to use
configurable_env_var "DEPLOYMENT_ONLYOFFICE_IMAGE" "onlyoffice/documentserver-ie"
configurable_env_var "DEPLOYMENT_ONLYOFFICE_IMAGE_VERSION" "5.3.0.243" # Default version for Only Office docker image to use
elif [[ "${PRODUCT_VERSION}" =~ ^(5.3) ]]; then
env_var "DEPLOYMENT_ES_IMAGE" "exoplatform/elasticsearch"
env_var "DEPLOYMENT_ES_IMAGE_VERSION" "1.2.3"
env_var "DEPLOYMENT_CHAT_MONGODB_VERSION" "4.0"
env_var "DEPLOYMENT_MYSQL_ADDON_VERSION" "1.4.1" # Default version of the mysql driver addon to use
env_var "DEPLOYMENT_POSTGRESQL_ADDON_VERSION" "1.3.0" # Default version of the jdbc postgresql driver addon to use
env_var "DEPLOYMENT_MYSQL_DEFAULT_VERSION" "5.7" # Default version of the mysql server to use
env_var "DEPLOYMENT_POSTGRESQL_DEFAULT_VERSION" "10" # Default version of the postgresql server to use