-
Notifications
You must be signed in to change notification settings - Fork 37
/
install_ocp.sh
executable file
·811 lines (690 loc) · 21.7 KB
/
install_ocp.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
#!/bin/bash
# ====================================================
# Standalone script for deploying syndesis on OCP (including imagestreams)
# It is based on https://github.com/syndesisio/syndesis/blob/master/tools/bin/install-syndesis
# except that the TAG is frozen during the release
# ================
# Tag updated by release script
TAG=master
# ================
# Minimal version for OC
OC_MIN_VERSION=3.9.0
# Exit if any error occurs
# Fail on a single failed command in a pipeline (if supported)
set -o pipefail
# Fail on error and undefined vars (please don't use global vars, but evaluation of functions for return values)
set -eu
# Save global script args
ARGS=("$@")
display_usage() {
cat <<EOT
Fuse Online Installation Tool for OCP
Usage: install_ocp.sh [options]
with options:
-s --setup Install CRDs clusterwide. Use --grant if you want a specific user to be
able to install Fuse Online. You have to run this option once as cluster admin.
-u --grant <user> Add permissions for the given user so that user can install the operator
in her projects. You have to run this as cluster-admin
--cluster Add the permission for all projects in the cluster
(only when used together with --grant)
--route Route to use. If not given, the route is trying to be detected from the currently
connected cluster.
--console <console-url> The URL to the openshift console
--force Override an existing installation if present
-p --project <project> Install into this project. The project will be deleted
if it already exists. By default, install into the current project (without deleting)
-w --watch Wait until the installation has completed
-o --open Open Fuse Online after installation (implies --watch)
--camel-k <version> Install camel-k operator version <version>
(version is optional)
--camel-k-options "opts" Options used when installing the camel-k operator.
Use quotes and start with a space before appending the options.
--help This help message
-v --verbose Verbose logging
You have to run `--setup --grant <user>` as a cluster-admin before you can install Fuse Online as a user.
EOT
}
# ============================================================
# Helper functions taken over from "syndesis" CLI:
# Checks if a flag is present in the arguments.
hasflag() {
filters="$@"
if [[ ! -z ${ARGS+x} ]]; then
for var in "${ARGS[@]}"; do
for filter in $filters; do
if [ "$var" = "$filter" ]; then
echo 'true'
return
fi
done
done
fi
}
# Read the value of an option.
readopt() {
filters="$@"
if [[ ! -z ${ARGS+x} ]]; then
next=false
for var in "${ARGS[@]}"; do
if $next; then
echo $var
break;
fi
for filter in $filters; do
if [[ "$var" = ${filter}* ]]; then
local value="${var//${filter}=/}"
if [ "$value" != "$var" ]; then
echo $value
return
fi
next=true
fi
done
done
fi
}
check_error() {
local msg="$*"
if [ "${msg//ERROR/}" != "${msg}" ]; then
if [ -n "${ERROR_FILE:-}" ] && [ -f "$ERROR_FILE" ] && ! grep "$msg" $ERROR_FILE ; then
local tmp=$(mktemp /tmp/error-XXXX)
echo ${msg} >> $tmp
if [ $(wc -c <$ERROR_FILE) -ne 0 ]; then
echo >> $tmp
echo "===============================================================" >> $tmp
echo >> $tmp
cat $ERROR_FILE >> $tmp
fi
mv $tmp $ERROR_FILE
fi
exit 0
fi
}
print_error() {
local error_file="${1:-}"
if [ -f $error_file ]; then
if grep -q "ERROR" $error_file; then
cat $error_file
fi
rm $error_file
fi
}
# Install the Syndesis custom resource definition
install_syndesis_crd() {
set +e
oc get crd >/dev/null 2>&1
local err=$?
set -e
if [ $err -ne 0 ]; then
echo "ERROR: Cannot install CRD 'Syndesis'. You have to be a cluster admin to do this."
return
fi
local crd_installed=$(oc get crd -o name | grep syndesises.syndesis.io)
if [ -z "$crd_installed" ]; then
local result=$(create_openshift_resource "resources/syndesis-crd.yml")
check_error $result
fi
}
add_user_permissions_for_operator() {
local user="$1"
local cluster_wide=${2:-false}
if [ -z "$user" ]; then
echo "ERROR: No user provided to fix permissions for"
return
fi
local extra_role_installed="$(oc get role -o name | grep syndesis-extra-permissions | wc -l | xargs)"
local kind="Role"
local oc_command="policy add-role-to-user --role-namespace=$(oc project -q)"
if $cluster_wide; then
extra_role_installed="$(oc get clusterrole -o name | grep syndesis-extra-permissions | wc -l | xargs)"
kind="ClusterRole"
oc_command="adm policy add-cluster-role-to-user"
fi
set +e
if [ $extra_role_installed -eq 0 ]; then
oc create -f - >/dev/null 2>&1 <<EOT
---
kind: $kind
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: syndesis-extra-permissions
labels:
app: syndesis
syndesis.io/app: syndesis
syndesis.io/type: operator
syndesis.io/component: syndesis-operator
rules:
- apiGroups:
- syndesis.io
resources:
- syndesises
- syndesises/finalizers
verbs: [ get, list, create, update, delete, deletecollection, watch ]
- apiGroups:
- route.openshift.io
resources:
- routes/custom-host
verbs: [ get, list, create, update, delete, deletecollection, watch ]
---
EOT
if [ $? -ne 0 ]; then
echo "ERROR: Can not install role 'syndesis-extra-permissions'. Are you running as cluster-admin ?"
exit 1
fi
fi
oc $oc_command syndesis-extra-permissions $user
if [ $? -ne 0 ]; then
echo "ERROR: Can not add role 'syndesis-extra-permssionns' to user $user. Does the user exist ?"
exit 1
fi
set -e
}
recreate_project() {
local project=$1
local dont_ask=${2:-false}
if [ -z "$project" ]; then
echo "No project given"
exit 1
fi
# Delete project if existing
if oc get project "${project}" >/dev/null 2>&1 ; then
if [ $dont_ask != "true" ]; then
echo =============== WARNING -- Going to delete project ${project}
oc get all -n $project
echo ============================================================
read -p "Do you really want to delete the existing project $project ? yes/[no] : " choice
echo
if [ "$choice" != "yes" ] && [ "$choice" != "y" ]; then
echo "Aborting on user's request"
exit 1
fi
fi
echo "Deleting project ${project}"
oc delete project "${project}"
fi
# Create project afresh
echo "Creating project ${project}"
for i in {1..10}; do
if oc new-project "${project}" >/dev/null 2>&1 ; then
break
fi
echo "Project still exists. Sleeping 10s ..."
sleep 10
done
oc project "${project}"
}
check_oc_version()
{
local minimum=${OC_MIN_VERSION}
local test=$(oc version | grep ^oc | tr -d oc\ v | cut -f1 -d "+")
echo $(compare_oc_version $test $minimum)
}
setup_oc() {
# Check path first if it already exists
set +e
which oc &>/dev/null
if [ $? -eq 0 ]; then
set -e
err=$(check_oc_version)
check_error $err
return
fi
# Check for minishift
which minishift &>/dev/null
if [ $? -eq 0 ]; then
set -e
eval $(minishift oc-env)
err=$(check_oc_version)
check_error $err
return
fi
set -e
# Error, no oc found
echo "ERROR: No 'oc' binary found in path. Please install the client tools from https://github.com/openshift/origin/releases/tag/v3.9.0 (or newer)"
exit 1
}
compare_version_part() {
local test=$1
local min=$2
test=`expr $test`
min=`expr $min`
if [ $test -eq $min ]; then
echo 0;
elif [ $test -gt $min ]; then
echo 1;
else
# $test -lt $min
echo -1
fi
}
compare_oc_version() {
local test=$1
local min=$2
echo -n "Testing oc version '$test' against required minimum '$min' ... "
testparts=( ${test//./ } )
minparts=( ${min//./ } )
local i=0
while [ $i -lt ${#minparts[@]} ]
do
local testpart=${testparts[$i]}
local minpart=${minparts[$i]}
if [ -z "$testpart" ]; then
# test version does not extend as far as minimum
# in parts so append a 0
testpart=0
fi
ret=$(compare_version_part $testpart $minpart)
if [ $ret == -1 ]; then
#
# version part is less than minimum while all preceding
# parts were equal so version does not meet minimum
#
echo "ERROR: oc version ($test) should be at least $min"
return
elif [ $ret == 1 ]; then
#
# version part is greater than minimum so no need to test
# any further parts as version is greater than minimum
#
echo "OK"
return
fi
#
# Only if the version part is equal will the loop continue
# with further parts.
#
i=`expr $i + 1`
done
echo "OK"
}
ensure_image_streams() {
local is_installed=$(oc get imagestream -o name | grep fuse-ignite-server)
if [ -n "$is_installed" ]; then
local result=$(delete_openshift_resource "resources/fuse-online-image-streams.yml")
check_error $result
fi
local result=$(create_openshift_resource "resources/fuse-online-image-streams.yml")
check_error $result
}
# Deploy operator
deploy_syndesis_operator() {
local operator_installed=$(oc get dc -o name | grep syndesis-operator)
if [ -n "$operator_installed" ]; then
local result=$(delete_openshift_resource "resources/fuse-online-operator.yml")
check_error $result
wait_for_deployments 0 syndesis-operator >/dev/null 2>&1
fi
create_openshift_resource "resources/fuse-online-operator.yml"
local result=$(oc secrets link syndesis-operator syndesis-pull-secret --for=pull >$ERROR_FILE 2>&1)
check_error $result
}
create_openshift_resource() {
create_or_delete_openshift_resource "create" "${1:-}"
}
delete_openshift_resource() {
create_or_delete_openshift_resource "delete --ignore-not-found" "${1:-}"
}
create_or_delete_openshift_resource() {
local what=${1}
local resource=${2:-}
local result
set +e
local url="https://raw.githubusercontent.com/syndesisio/fuse-online-install/${TAG}/${resource}"
#local url="./${resource}"
result=$(oc $what -f $url >$ERROR_FILE 2>&1)
if [ $? -ne 0 ]; then
echo "ERROR: Cannot create remote resource $url"
fi
set -e
}
# Create syndesis resource
create_syndesis() {
local route="${1:-}"
local console="${2:-}"
local image_stream_namespace="${3:-}"
local syndesis_installed=$(oc get syndesis -o name | wc -l)
local force=$(hasflag --force)
if [ $syndesis_installed -gt 0 ]; then
if [ -n "${force}" ]; then
oc delete $(oc get syndesis -o name)
fi
fi
local syndesis=$(cat <<EOT
apiVersion: "syndesis.io/v1alpha1"
kind: "Syndesis"
metadata:
name: "app"
spec:
integration:
# No limitations by default on OCP
limit: 0
EOT
)
local extra=""
if [ -n "$console" ]; then
extra=$(cat <<EOT
openShiftConsoleUrl: "$console"
EOT
)
syndesis="${syndesis}${extra}"
fi
if [ -n "$route" ]; then
extra=$(cat <<EOT
routeHostname: "$route"
EOT
)
syndesis="${syndesis}${extra}"
fi
if [ -n "$image_stream_namespace" ]; then
extra=$(cat <<EOT
imageStreamNamespace: "$image_stream_namespace"
EOT
)
syndesis="${syndesis}${extra}"
fi
echo "$syndesis" | cat | oc create -f -
if [ $? -ne 0 ]; then
echo "ERROR: Error while creating resource"
echo "$syndesis"
return
fi
}
wait_for_deployments() {
local replicas_desired=$1
shift
local dcs="$@"
oc get pods -w &
watch_pid=$!
for dc in $dcs; do
echo "Waiting for $dc to be scaled to ${replicas_desired}"
local replicas=$(get_replicas $dc)
while [ -z "$replicas" ] || [ "$replicas" -ne $replicas_desired ]; do
echo "Sleeping 10s ..."
sleep 10
replicas=$(get_replicas $dc)
done
done
kill $watch_pid
}
get_replicas() {
local dc=${1}
local hasDc=$(oc get dc -o name | grep $dc)
if [ -z "$hasDc" ]; then
echo "0"
return
fi
oc get dc $dc -o jsonpath="{.status.availableReplicas}"
}
open_url() {
local url=$1
local cmd="$(probe_commands open xdg-open chrome firefox)"
if [ -z "$cmd" ]; then
echo "Cannot find command for opening URL:"
echo $url
exit 1
fi
exec $cmd $url
}
probe_commands() {
for cmd in $@; do
local ret=$(which $cmd 2>/dev/null)
if [ $? -eq 0 ]; then
echo $ret
return
fi
done
}
get_route_when_ready() {
local name="${1}"
local route=$(get_route $name)
while [ -z "$route" ]; do
sleep 10
route=$(get_route $name)
done
echo $route
}
get_route() {
local name="${1}"
oc get route $name -o jsonpath="{.spec.host}" 2>/dev/null
}
# ==================================================================
# Getting options from config file
eval $(source $(dirname ARGS[0])/fuse_online_config.sh; echo MAVEN_REPOSITORY=$maven_repository)
eval $(source $(dirname ARGS[0])/fuse_online_config.sh; echo CAMEL_K_TAG=$tag_camel_k)
eval $(source $(dirname ARGS[0])/fuse_online_config.sh; echo REPOSITORY=$repository)
eval $(source $(dirname ARGS[0])/fuse_online_config.sh; echo REGISTRY=$registry)
# Deploy Camel-K operator
deploy_camel_k_operator() {
local version=${1:-}
local project=${2:-}
local opts=${3:-}
local extra_opts=""
if [ -n "$project" ]; then
extra_opts="--namespace $project"
fi
if [ -n "$opts" ]; then
extra_opts="$extra_opts $opts"
fi
local kamel=$(get_camel_k_bin "$version")
$kamel install --skip-cluster-setup --repository $MAVEN_REPOSITORY --context jvm $extra_opts
if [ -z "$version" ]; then
# Patching Camel K image
oc patch deployment camel-k-operator --type='json' -p="[{\"op\": \"replace\", \"path\": \"/spec/template/spec/containers/0/image\", \"value\":\"$REGISTRY/$REPOSITORY/fuse-camel-k:$CAMEL_K_TAG\"}]"
fi
local result=$(oc secrets link camel-k-operator syndesis-pull-secret --for=pull >$ERROR_FILE 2>&1)
check_error $result
}
# Install Camel-K CRD
install_camel_k_crds() {
local version=${1:-}
local kamel=$(get_camel_k_bin "$version")
$kamel install --cluster-setup
}
isMacOs() {
if [ -z "${OSTYPE}" ]; then
if [ $(uname) == "Darwin" ]; then
echo "true"
fi
elif [ "${OSTYPE#darwin}" != "${OSTYPE}" ]; then
echo "true"
else
echo "false"
fi
}
isWindows() {
if [ -z "${OSTYPE}" ]; then
if [ $(uname) == "Windows" ]; then
echo "true"
fi
elif [ "${OSTYPE#windows}" != "${OSTYPE}" ]; then
echo "true"
else
echo "false"
fi
}
get_camel_k_bin() {
local version=${1:-}
if [ -n "$version" ]; then
get_upstream_camel_k_bin "$version"
else
get_product_camel_k_bin
fi
}
# Download upstream `kamel` cli
# Currently it just download from GitHub
get_upstream_camel_k_bin() {
local version=${1}
local bin_dir=${2:-/tmp}
local kamel_command="$bin_dir/kamel-${version}"
if [ -e $kamel_command ]; then
echo $kamel_command
return
fi
# Check for proper operating system
local os="linux"
if $(isMacOs); then
os="mac"
elif $(isWindows); then
os="windows"
fi
local download_url="https://github.com/apache/camel-k/releases/download/$version/camel-k-client-$version-$os-64bit.tar.gz"
local archive=$(mktemp $bin_dir/camel-k-${version}.tar-XXXX)
# Download from Camel-K site
curl -sL -o $archive $download_url
local tmp_dir=$(mktemp -d $bin_dir/camel-k-${version}-XXXX)
pushd $tmp_dir >/dev/null
tar xf $archive
mv ./kamel $kamel_command
popd >/dev/null
[ -n "$tmp_dir" ] && [ -d "$tmp_dir" ] && rm -rf $tmp_dir
echo $kamel_command
}
# Get productized `kamel` cli
get_product_camel_k_bin() {
local bin_dir=${2:-/tmp}
local tmp_dir=${bin_dir}/fuse-online-tmp-camel-k-client
mkdir -p $tmp_dir
chmod a+rw $tmp_dir
local image=$REGISTRY/$REPOSITORY/fuse-camel-k:$CAMEL_K_TAG
local image_sha=$(docker inspect $image --format='{{index .RepoDigests 0}}' | sed 's/.*\://')
local kamel_command="$bin_dir/kamel-prod-$image_sha"
if [ -e $kamel_command ]; then
echo $kamel_command
return
fi
# Check for proper operating system
local os="linux"
if $(isMacOs); then
os="mac"
elif $(isWindows); then
os="windows"
fi
docker run -v $tmp_dir/:/client \
--entrypoint bash \
$REGISTRY/$REPOSITORY/fuse-camel-k:$CAMEL_K_TAG\
-c "tar xf /opt/clients/camel-k-client-$os.tar.gz; cp kamel /client/"
mv -f $tmp_dir/kamel $kamel_command
[ -n "$tmp_dir" ] && [ -d "$tmp_dir" ] && rm -rf $tmp_dir
echo $kamel_command
}
# Check if a resource exist in OCP
check_resource() {
local kind=$1
local name=$2
oc get $kind $name -o name >/dev/null 2>&1
if [ $? != 0 ]; then
echo "false"
else
echo "true"
fi
}
# Check whether syndesis-pull-secret secret is present and create
# it otherwise
#
create_secret_if_not_present() {
if $(check_resource secret syndesis-pull-secret) ; then
echo "pull secret 'syndesis-pull-secret' present, skipping creation ..."
else
echo "pull secret 'syndesis-pull-secret' is missing, creating ..."
echo "enter username for registry.redhat.io and press [ENTER]: "
read username
echo "enter password for registry.redhat.io and press [ENTER]: "
read -s password
local result=$(oc create secret docker-registry syndesis-pull-secret --docker-server=registry.redhat.io --docker-username=$username --docker-password=$password)
check_error $result
fi
}
# ==============================================================
if [ $(hasflag --help -h) ]; then
display_usage
exit 0
fi
ERROR_FILE="$(mktemp /tmp/syndesis-output-XXXXX)"
trap "print_error $ERROR_FILE" EXIT
if [ $(hasflag --verbose -v) ]; then
export PS4='+($(basename ${BASH_SOURCE[0]}):${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
set -x
fi
prep_only="false"
if [ $(hasflag -s --setup) ]; then
echo "Installing Syndesis CRD"
result=$(install_syndesis_crd)
check_error "$result"
if [ $(hasflag --camel-k) ]; then
echo "Installing Camel-K CRDs"
result=$(install_camel_k_crds "$(readopt --camel-k)")
check_error "$result"
fi
prep_only="true"
fi
user_to_prepare="$(readopt -u --grant)"
if [ -n "$user_to_prepare" ]; then
echo "Grant permission to create Syndesis to user $user_to_prepare"
result=$(add_user_permissions_for_operator "$user_to_prepare" $(hasflag --cluster))
check_error "$result"
prep_only="true"
fi
if $prep_only; then
exit 0
fi
# ==================================================================
# make sure pull secret is present (required since 7.3)
create_secret_if_not_present
# ==================================================================
# If a project is given, create it new or recreate it
project=$(readopt --project -p)
if [ -n "${project}" ]; then
recreate_project $project
else
project=$(oc project -q)
fi
# Check for OC
setup_oc
# Check for the proper setup
set +e
oc get syndesis >/dev/null 2>&1
if [ $? -ne 0 ]; then
check_error "ERROR: No CRD Syndesis installed or no permissions to read them. Please run --setup and/or --grant as cluster-admin. Please use '--help' for more information."
fi
if [ $(hasflag --camel-k) ]; then
oc get integration >/dev/null 2>&1
if [ $? -ne 0 ]; then
check_error "ERROR: Camel-K installation requested but no Camel-K CRDs accessible. Please run --setup --camel-k to register the proper CRDs."
fi
fi
set -e
echo "Ensuring imagestreams in $project"
ensure_image_streams
# Deploy operator and wait until its up
echo "Deploying Syndesis operator"
result=$(deploy_syndesis_operator)
check_error "$result"
if [ $(hasflag --camel-k) ]; then
echo "Deploying Camel-K operator"
result=$(deploy_camel_k_operator "$(readopt --camel-k)" "$(oc project -q)" "$(readopt --camel-k-options)")
check_error "$result"
fi
# Wait for deployment
wait_for_deployments 1 syndesis-operator
# Create syndesis resource
echo "Creating Syndesis resource"
route=$(readopt --route)
console=$(readopt --console)
result=$(create_syndesis "$route" "$console" "$project")
check_error "$result"
if [ $(hasflag --watch -w) ] || [ $(hasflag --open -o) ]; then
wait_for_deployments 1 syndesis-server syndesis-ui syndesis-meta
fi
# ==========================================================
echo "Getting Syndesis route"
route=$(get_route_when_ready "syndesis")
cat <<EOT
========================================================
Congratulation, Fuse Online $TAG has been installed successfully !
Open now your browser at the following URL:
https://$route
Enjoy !
EOT
if [ $(hasflag --open -o) ]; then
open_url "https://$route"
fi