Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mmassaviol
MBB_Long_Read_Assembly_Workflow
Commits
c7e10d19
Commit
c7e10d19
authored
Nov 29, 2019
by
Ubuntu
Browse files
update deploy script
parent
6c556971
Changes
1
Hide whitespace changes
Inline
Side-by-side
deploy.sh
View file @
c7e10d19
...
...
@@ -8,20 +8,20 @@
APP_IMG
=
"gitlab-registry.in2p3.fr/ifb-biosphere/apps/long_read_assembly:master"
# Tuning if site proxy or not
CLOUD_SERVICE
=
$(
ss-get cloudservice
)
#
CLOUD_SERVICE = $(ss-get cloudservice)
#CLOUD_SERVICE="ifb-genouest-genostack"
HOST_NAME
=
$(
ss-get
--timeout
=
3
hostname
)
#
HOST_NAME="192.168.100.49"
if
[
"
$CLOUD_SERVICE
"
==
"ifb-genouest-genostack"
]
;
then
#
HOST_NAME=$( ss-get --timeout=3 hostname )
HOST_NAME
=
"192.168.100.49"
#
if [ "$CLOUD_SERVICE" == "ifb-genouest-genostack" ]; then
# Cloud site WITH a site proxy
APP_PORT
=
80
PROXIED_IP
=
$(
echo
$HOST_NAME
|
sed
"s|
\.
|-|g"
)
HOST_NAME
=
"openstack-
${
PROXIED_IP
}
.genouest.org"
HTTP_ENDP
=
"https://
$HOST_NAME
"
#
APP_PORT=80
#
PROXIED_IP=$( echo $HOST_NAME | sed "s|\.|-|g")
#
HOST_NAME="openstack-${PROXIED_IP}.genouest.org"
#
HTTP_ENDP="https://$HOST_NAME"
systemctl stop nginx
else
#
systemctl stop nginx
#
else
# Cloud site WOUT a site proxy
APP_PORT
=
8787
HTTP_ENDP
=
"https://
$HOST_NAME
"
...
...
@@ -48,7 +48,7 @@ else
systemctl restart nginx
systemctl
enable
nginx
fi
#
fi
# Docker volumes
...
...
@@ -66,17 +66,23 @@ while IFS=" :" read VOL_NAME VOL_TYPE VOL_IP VOL_DEV ; do
done
< /etc/auto.ifb_share
IFS
=
$IFS_ORI
# MBB Workflows reads data from /Data and write results to /Results
mkdir
${
VOL_DEV
}
/Data
mkdir
${
VOL_DEV
}
/Results
DOCK_VOL+
=
" --mount type=bind,src=
$VOL_DEV
/Data,dst=/Data"
DOCK_VOL+
=
" --mount type=bind,src=
$VOL_DEV
/Results,dst=/Results"
# Run docker environment
# pull from docker hub or comment following 2 lines if using a local registry
docker pull mmassaviol/long_read_assembly
#
docker pull mmassaviol/long_read_assembly
APP_IMG
=
"long_read_assembly"
CONTAINER_ID
=
$(
docker run
-d
-p
$APP_PORT
:
8787
$APP_IMG
)
CONTAINER_ID
=
$(
docker run
-d
-p
$APP_PORT
:
3838
$DOCK_VOL
$APP_IMG
)
#docker exec --user rstudio $CONTAINER_ID bash -c 'ln -s /ifb/data/ $HOME/data'
#docker exec --user rstudio $CONTAINER_ID bash -c 'rm -r $HOME/kitematic'
# Set service URLs
#echo $HTTP_ENDP
#echo $RST_PASSWORD
ss-set url.service
"
${
HTTP_ENDP
}
"
ss-set ss:url.service
"[HTTPS]
$HTTP_ENDP
"
#
ss-set url.service "${HTTP_ENDP}"
#
ss-set ss:url.service "[HTTPS]$HTTP_ENDP"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment