Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
8e60d7f5
Commit
8e60d7f5
authored
15 years ago
by
tpylak
Browse files
Options
Downloads
Patches
Plain Diff
SE-104 make server installation script configurable by defining constants
SVN: 10980
parent
0b43fe4e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis_all/source/bash/sprint_install.sh
+28
-16
28 additions, 16 deletions
openbis_all/source/bash/sprint_install.sh
with
28 additions
and
16 deletions
openbis_all/source/bash/sprint_install.sh
+
28
−
16
View file @
8e60d7f5
...
@@ -11,33 +11,45 @@ VER=SNAPSHOT
...
@@ -11,33 +11,45 @@ VER=SNAPSHOT
if
[
$1
]
;
then
if
[
$1
]
;
then
VER
=
$1
VER
=
$1
fi
fi
cd
sprint-
*
SERVERS_DIR_ALIAS
=
sprint
PREV_VER
=
${
PWD
#*-
}
SERVERS_VER
=
$SERVERS_DIR_ALIAS
-
$VER
cd
-
if
[
-d
$SERVERS_DIR_ALIAS
-
*
]
;
then
cd
$SERVERS_DIR_ALIAS
-
*
PREV_VER
=
${
PWD
#*-
}
SERVERS_PREV_VER
=
$SERVERS_DIR_ALIAS
-
$PREV_VER
cd
..
else
echo
Warning: no previous servers instalation found.
SERVERS_PREV_VER
=
unknown
fi
DB_SNAPSHOT
=
db_snapshots/sprint
$PREV_VER
-lims_productive
.sql
KEYSTORE
=
~/.keystore
KEYSTORE
=
~/.keystore
# Unalias rm and cp commands
# Unalias rm and cp commands
unalias rm
unalias rm
unalias cp
unalias cp
echo
Stopping the components...
if
[
-e
$SERVERS_PREV_VER
]
;
then
./sprint/openBIS-server/apache-tomcat/bin/shutdown.sh
echo
Stopping the components...
./sprint/datastore_server/datastore_server.sh stop
./
$SERVERS_PREV_VER
/openBIS-server/apache-tomcat/bin/shutdown.sh
./
$SERVERS_PREV_VER
/datastore_server/datastore_server.sh stop
fi
echo
Making a database dump...
echo
Making a database dump...
pg_dump
-U
postgres
-O
lims_productive
>
$DB_SNAPSHOT
DB_NAME
=
lims_productive
tar
-cf
-
$DB_SNAPSHOT
| bzip2
>
db_snapshots/sprint
$PREV_VER
-lims_productive
.tar.bz2
DB_SNAPSHOT
=
db_snapshots/
$SERVERS_PREV_VER
-
$DB_NAME
.sql
pg_dump
-U
postgres
-O
$DB_NAME
>
$DB_SNAPSHOT
tar
-cf
-
$DB_SNAPSHOT
| bzip2
>
$DB_SNAPSHOT
.tar.bz2
rm
-f
$DB_SNAPSHOT
rm
-f
$DB_SNAPSHOT
echo
Installing openBIS server...
echo
Installing openBIS server...
rm
-rf
old/
sprint-
$
PREV_VER
rm
-rf
old/
$SERVERS_
PREV_VER
mv
sprint-
$
PREV_VER
old
mv
$SERVERS_
PREV_VER
old
rm
-f
sprint
rm
-f
$SERVERS_DIR_ALIAS
mkdir
sprint-
$
VER
mkdir
$SERVERS_
VER
ln
-s
sprint-
$VER
sprint
ln
-s
$SERVERS_VER
$SERVERS_DIR_ALIAS
cd
sprint
cd
$SERVERS_DIR_ALIAS
unzip ../openBIS-server
*
$VER
*
unzip ../openBIS-server
*
$VER
*
cd
openBIS-server
cd
openBIS-server
./install.sh
--nostartup
$PWD
../../service.properties
./install.sh
--nostartup
$PWD
../../service.properties
...
@@ -56,7 +68,7 @@ cd datastore_server
...
@@ -56,7 +68,7 @@ cd datastore_server
cp
-p
~/datastore_server-service.properties etc/service.properties
cp
-p
~/datastore_server-service.properties etc/service.properties
if
[
-f
$KEYSTORE
]
;
then
if
[
-f
$KEYSTORE
]
;
then
cp
-p
$KEYSTORE
etc/openBIS.keystore
cp
-p
$KEYSTORE
etc/openBIS.keystore
cp
-Rf
~/old/
sprint-
$
PREV_VER
/datastore_server/data/store/
*
data/store
cp
-Rf
~/old/
$SERVERS_
PREV_VER
/datastore_server/data/store/
*
data/store
sed
's/-Djavax.net.ssl.trustStore=etc\/openBIS.keystore //g'
datastore_server.sh
>
xxx
sed
's/-Djavax.net.ssl.trustStore=etc\/openBIS.keystore //g'
datastore_server.sh
>
xxx
mv
-f
xxx datastore_server.sh
mv
-f
xxx datastore_server.sh
fi
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment