-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinit_dcp.sh
executable file
·52 lines (40 loc) · 1.48 KB
/
init_dcp.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
#!/bin/bash
## This script uses Searchisko REST API to init DCP configurations only (no ES indices, no rivers)
##
## You can use first commandline parameter to change base URL for Searchisko API call (/v2/rest/... is appended automatically to this base URL). If not present then OPENSHIFT_APP_DNS system property is be used. Default is http://localhost:8080
## You can use second commandline parameter to change Searchisko admin username
## You can use third commandline parameter to change Searchisko admin password
clear
searchiskourl=http://localhost:8080
if [ -n "${OPENSHIFT_APP_DNS}" ]; then
searchiskourl=http://${OPENSHIFT_APP_DNS}
fi
if [ -n "$1" ]; then
searchiskourl=$1
fi
searchiskousername=jbossorg
if [ -n "$2" ]; then
searchiskousername=$2
fi
searchiskopassword=jbossorgjbossorg
if [ -n "$3" ]; then
searchiskopassword=$3
fi
echo ========== Initializing Searchisko ===========
echo Using Searchisko REST API URL base: ${searchiskourl}
pushd data/provider/
./init-providers.sh ${searchiskourl} ${searchiskousername} ${searchiskopassword}
popd
pushd data/config/
./init-config.sh ${searchiskourl} ${searchiskousername} ${searchiskopassword}
popd
pushd data/project/
./init-projects.sh ${searchiskourl} ${searchiskousername} ${searchiskopassword}
popd
pushd data/contributor/
./init-contributors.sh ${searchiskourl} ${searchiskousername} ${searchiskopassword}
popd
pushd data/query/
./init-queries.sh ${searchiskourl} ${searchiskousername} ${searchiskopassword}
popd
echo FINISHED!