forked from hazelcast/hazelcast-python-client
-
Notifications
You must be signed in to change notification settings - Fork 1
/
start-rc.sh
97 lines (84 loc) · 4.53 KB
/
start-rc.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
#!/bin/bash
if [ "$1" = "--local" ] ; then
USER="--user"
else
USER=""
fi
HZ_VERSION="3.12.5"
HAZELCAST_TEST_VERSION=${HZ_VERSION}
HAZELCAST_ENTERPRISE_TEST_VERSION=${HZ_VERSION}
HAZELCAST_VERSION=${HZ_VERSION}
HAZELCAST_ENTERPRISE_VERSION=${HZ_VERSION}
HAZELCAST_RC_VERSION="0.3-SNAPSHOT"
SNAPSHOT_REPO="https://oss.sonatype.org/content/repositories/snapshots"
RELEASE_REPO="http://repo1.maven.apache.org/maven2"
ENTERPRISE_RELEASE_REPO="https://repository.hazelcast.com/release/"
ENTERPRISE_SNAPSHOT_REPO="https://repository.hazelcast.com/snapshot/"
if [[ ${HZ_VERSION} == *-SNAPSHOT ]]
then
REPO=${SNAPSHOT_REPO}
ENTERPRISE_REPO=${ENTERPRISE_SNAPSHOT_REPO}
else
REPO=${RELEASE_REPO}
ENTERPRISE_REPO=${ENTERPRISE_RELEASE_REPO}
fi
if [ -f "hazelcast-remote-controller-${HAZELCAST_RC_VERSION}.jar" ]; then
echo "remote controller already exist, not downloading from maven."
else
echo "Downloading: remote-controller jar com.hazelcast:hazelcast-remote-controller:${HAZELCAST_RC_VERSION}"
mvn -q dependency:get -DrepoUrl=${SNAPSHOT_REPO} -Dartifact=com.hazelcast:hazelcast-remote-controller:${HAZELCAST_RC_VERSION} -Ddest=hazelcast-remote-controller-${HAZELCAST_RC_VERSION}.jar
if [ $? -ne 0 ]; then
echo "Failed download remote-controller jar com.hazelcast:hazelcast-remote-controller:${HAZELCAST_RC_VERSION}"
exit 1
fi
fi
if [ -f "hazelcast-${HAZELCAST_TEST_VERSION}-tests.jar" ]; then
echo "hazelcast-test.jar already exists, not downloading from maven."
else
echo "Downloading: hazelcast test jar com.hazelcast:hazelcast:${HAZELCAST_TEST_VERSION}:jar:tests"
mvn -q dependency:get -DrepoUrl=${REPO} -Dartifact=com.hazelcast:hazelcast:${HAZELCAST_TEST_VERSION}:jar:tests -Ddest=hazelcast-${HAZELCAST_TEST_VERSION}-tests.jar
if [ $? -ne 0 ]; then
echo "Failed download hazelcast test jar com.hazelcast:hazelcast:${HAZELCAST_TEST_VERSION}:jar:tests"
exit 1
fi
fi
CLASSPATH="hazelcast-remote-controller-${HAZELCAST_RC_VERSION}.jar:hazelcast-${HAZELCAST_TEST_VERSION}-tests.jar:test/javaclasses"
if [ -n "${HAZELCAST_ENTERPRISE_KEY}" ]; then
if [ -f "hazelcast-enterprise-${HAZELCAST_ENTERPRISE_VERSION}.jar" ]; then
echo "hazelcast-enterprise.jar already exists, not downloading from maven."
else
echo "Downloading: hazelcast enterprise jar com.hazelcast:hazelcast-enterprise:${HAZELCAST_ENTERPRISE_VERSION}"
mvn -q dependency:get -DrepoUrl=${ENTERPRISE_REPO} -Dartifact=com.hazelcast:hazelcast-enterprise:${HAZELCAST_ENTERPRISE_VERSION} -Ddest=hazelcast-enterprise-${HAZELCAST_ENTERPRISE_VERSION}.jar
if [ $? -ne 0 ]; then
echo "Failed download hazelcast enterprise jar com.hazelcast:hazelcast-enterprise:${HAZELCAST_ENTERPRISE_VERSION}"
exit 1
fi
fi
if [ -f "hazelcast-enterprise-${HAZELCAST_ENTERPRISE_TEST_VERSION}-tests.jar" ]; then
echo "hazelcast-enterprise-test.jar already exists, not downloading from maven."
else
echo "Downloading: hazelcast enterprise test jar com.hazelcast:hazelcast-enterprise:${HAZELCAST_ENTERPRISE_TEST_VERSION}:jar:tests"
mvn -q dependency:get -DrepoUrl=${ENTERPRISE_REPO} -Dartifact=com.hazelcast:hazelcast-enterprise:${HAZELCAST_ENTERPRISE_TEST_VERSION}:jar:tests -Ddest=hazelcast-enterprise-${HAZELCAST_ENTERPRISE_TEST_VERSION}-tests.jar
if [ $? -ne 0 ]; then
echo "Failed download hazelcast enterprise test jar com.hazelcast:hazelcast-enterprise:${HAZELCAST_ENTERPRISE_TEST_VERSION}:jar:tests"
exit 1
fi
fi
CLASSPATH="hazelcast-enterprise-${HAZELCAST_ENTERPRISE_VERSION}.jar:hazelcast-enterprise-${HAZELCAST_ENTERPRISE_TEST_VERSION}-tests.jar:"${CLASSPATH}
echo "Starting Remote Controller ... enterprise ..."
else
if [ -f "hazelcast-${HAZELCAST_VERSION}.jar" ]; then
echo "hazelcast.jar already exists, not downloading from maven."
else
echo "Downloading: hazelcast jar com.hazelcast:hazelcast:${HAZELCAST_VERSION}"
mvn -q dependency:get -DrepoUrl=${REPO} -Dartifact=com.hazelcast:hazelcast:${HAZELCAST_VERSION} -Ddest=hazelcast-${HAZELCAST_VERSION}.jar
if [ $? -ne 0 ]; then
echo "Failed download hazelcast jar com.hazelcast:hazelcast:${HAZELCAST_VERSION}"
exit 1
fi
fi
CLASSPATH="hazelcast-${HAZELCAST_VERSION}.jar:"${CLASSPATH}
echo "Starting Remote Controller ... oss ..."
fi
pip install -r test-requirements.txt ${USER} --no-cache-dir
java -Dhazelcast.enterprise.license.key=${HAZELCAST_ENTERPRISE_KEY} -cp ${CLASSPATH} com.hazelcast.remotecontroller.Main