Skip to content

Commit cac0108

Browse files
fix(client): fixed wrong ref for AuthAPI && update commit_id
1 parent e0efcd1 commit cac0108

File tree

3 files changed

+49
-43
lines changed

3 files changed

+49
-43
lines changed

hugegraph-client/assembly/travis/install-hugegraph-from-source.sh

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,43 +23,42 @@ fi
2323

2424
COMMIT_ID=$1
2525
HUGEGRAPH_GIT_URL="https://github.com/apache/hugegraph.git"
26-
GIT_DIR=hugegraph
2726

28-
# download code and compile
29-
git clone --depth 150 ${HUGEGRAPH_GIT_URL} $GIT_DIR
30-
cd "${GIT_DIR}"
27+
git clone --depth 150 ${HUGEGRAPH_GIT_URL} hugegraph
28+
cd hugegraph
3129
git checkout "${COMMIT_ID}"
3230
mvn package -DskipTests -Dmaven.javadoc.skip=true -ntp
33-
3431
# TODO: lack incubator after apache package release (update it later)
3532
cd hugegraph-server
36-
TAR=$(echo apache-hugegraph-*.tar.gz)
37-
tar zxf "${TAR}" -C ../../
33+
mv apache-hugegraph-*.tar.gz ../../
3834
cd ../../
39-
rm -rf "${GIT_DIR}"
40-
# TODO: lack incubator after apache package release (update it later)
41-
HTTP_SERVER_DIR=$(echo apache-hugegraph-*.*)
42-
HTTPS_SERVER_DIR="hugegraph_https"
43-
44-
cp -r "${HTTP_SERVER_DIR}" "${HTTPS_SERVER_DIR}"
45-
46-
# config auth options just for http server (must keep '/.')
47-
cp -rf "${TRAVIS_DIR}"/conf/. "${HTTP_SERVER_DIR}"/conf/
35+
rm -rf hugegraph
36+
tar zxf apache-hugegraph-*.tar.gz
4837

38+
HTTPS_SERVER_DIR="hugegraph_https"
39+
mkdir ${HTTPS_SERVER_DIR}
40+
# TODO: lack incubator after apache package release (update it later)
41+
cp -r apache-hugegraph-*/. ${HTTPS_SERVER_DIR}
42+
cd "$(find apache-hugegraph-* | head -1)"
4943
# start HugeGraphServer with http protocol
50-
cd "${HTTP_SERVER_DIR}"
44+
sed -i 's|gremlin.graph=org.apache.hugegraph.HugeFactory|gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy|' conf/graphs/hugegraph.properties
45+
sed -i 's|#auth.authenticator=.*|auth.authenticator=org.apache.hugegraph.auth.StandardAuthenticator|' conf/rest-server.properties
46+
sed -i 's|#auth.admin_pa=.*|auth.admin_pa=pa|' conf/rest-server.properties
5147
echo -e "pa" | bin/init-store.sh || exit 1
5248
bin/start-hugegraph.sh || exit 1
5349

54-
# config options for https server
55-
cd ../"${HTTPS_SERVER_DIR}"
50+
cd ../${HTTPS_SERVER_DIR}
5651
REST_SERVER_CONFIG="conf/rest-server.properties"
5752
GREMLIN_SERVER_CONFIG="conf/gremlin-server.yaml"
5853
sed -i "s?http://127.0.0.1:8080?https://127.0.0.1:8443?g" "$REST_SERVER_CONFIG"
54+
sed -i "s/rpc.server_port=8091/rpc.server_port=8092/g" "$REST_SERVER_CONFIG"
5955
sed -i "s/#port: 8182/port: 8282/g" "$GREMLIN_SERVER_CONFIG"
6056
echo "gremlinserver.url=http://127.0.0.1:8282" >> ${REST_SERVER_CONFIG}
6157

6258
# start HugeGraphServer with https protocol
63-
bin/init-store.sh
64-
bin/start-hugegraph.sh || (cat logs/hugegraph-server.log && exit 1)
59+
sed -i 's|gremlin.graph=org.apache.hugegraph.HugeFactory|gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy|' conf/graphs/hugegraph.properties
60+
sed -i 's|#auth.authenticator=.*|auth.authenticator=org.apache.hugegraph.auth.StandardAuthenticator|' conf/rest-server.properties
61+
sed -i 's|#auth.admin_pa=.*|auth.admin_pa=pa|' conf/rest-server.properties
62+
echo -e "pa" | bin/init-store.sh || exit 1
63+
bin/start-hugegraph.sh
6564
cd ../

hugegraph-spark-connector/assembly/travis/install-hugegraph-from-source.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ mkdir ${HTTPS_SERVER_DIR}
4141
cp -r apache-hugegraph-*/. ${HTTPS_SERVER_DIR}
4242
cd "$(find apache-hugegraph-* | head -1)"
4343
# start HugeGraphServer with http protocol
44-
bin/init-store.sh || exit 1
44+
sed -i 's|gremlin.graph=org.apache.hugegraph.HugeFactory|gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy|' conf/graphs/hugegraph.properties
45+
sed -i 's|#auth.authenticator=.*|auth.authenticator=org.apache.hugegraph.auth.StandardAuthenticator|' conf/rest-server.properties
46+
sed -i 's|#auth.admin_pa=.*|auth.admin_pa=pa|' conf/rest-server.properties
47+
echo -e "pa" | bin/init-store.sh || exit 1
4548
bin/start-hugegraph.sh || exit 1
4649

4750
cd ../${HTTPS_SERVER_DIR}
@@ -53,6 +56,9 @@ sed -i "s/#port: 8182/port: 8282/g" "$GREMLIN_SERVER_CONFIG"
5356
echo "gremlinserver.url=http://127.0.0.1:8282" >> ${REST_SERVER_CONFIG}
5457

5558
# start HugeGraphServer with https protocol
56-
bin/init-store.sh
59+
sed -i 's|gremlin.graph=org.apache.hugegraph.HugeFactory|gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy|' conf/graphs/hugegraph.properties
60+
sed -i 's|#auth.authenticator=.*|auth.authenticator=org.apache.hugegraph.auth.StandardAuthenticator|' conf/rest-server.properties
61+
sed -i 's|#auth.admin_pa=.*|auth.admin_pa=pa|' conf/rest-server.properties
62+
echo -e "pa" | bin/init-store.sh || exit 1
5763
bin/start-hugegraph.sh
5864
cd ../

hugegraph-tools/assembly/travis/install-hugegraph-from-source.sh

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,48 +16,49 @@
1616
# under the License.
1717
#
1818
set -ev
19+
1920
if [[ $# -ne 1 ]]; then
2021
echo "Must input an existing commit id of hugegraph server" && exit 1
2122
fi
2223

2324
COMMIT_ID=$1
2425
HUGEGRAPH_GIT_URL="https://github.com/apache/hugegraph.git"
25-
GIT_DIR=hugegraph
2626

27-
# download code and compile
28-
git clone --depth 150 $HUGEGRAPH_GIT_URL $GIT_DIR
29-
cd "${GIT_DIR}"
27+
git clone --depth 150 ${HUGEGRAPH_GIT_URL} hugegraph
28+
cd hugegraph
3029
git checkout "${COMMIT_ID}"
3130
mvn package -DskipTests -Dmaven.javadoc.skip=true -ntp
32-
3331
# TODO: lack incubator after apache package release (update it later)
3432
cd hugegraph-server
35-
TAR=$(echo apache-hugegraph-*.tar.gz)
36-
tar zxf "${TAR}" -C ../../
33+
mv apache-hugegraph-*.tar.gz ../../
3734
cd ../../
38-
rm -rf "${GIT_DIR}"
39-
# TODO: lack incubator after apache package release (update it later)
40-
HTTP_SERVER_DIR=$(echo apache-hugegraph-*.*)
41-
HTTPS_SERVER_DIR="hugegraph_https"
42-
43-
cp -r "${HTTP_SERVER_DIR}" "${HTTPS_SERVER_DIR}"
44-
45-
# config auth options just for http server (must keep '/.')
46-
cp -rf "${TRAVIS_DIR}"/conf/. "${HTTP_SERVER_DIR}"/conf/
35+
rm -rf hugegraph
36+
tar zxf apache-hugegraph-*.tar.gz
4737

38+
HTTPS_SERVER_DIR="hugegraph_https"
39+
mkdir ${HTTPS_SERVER_DIR}
40+
# TODO: lack incubator after apache package release (update it later)
41+
cp -r apache-hugegraph-*/. ${HTTPS_SERVER_DIR}
42+
cd "$(find apache-hugegraph-* | head -1)"
4843
# start HugeGraphServer with http protocol
49-
cd "${HTTP_SERVER_DIR}"
44+
sed -i 's|gremlin.graph=org.apache.hugegraph.HugeFactory|gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy|' conf/graphs/hugegraph.properties
45+
sed -i 's|#auth.authenticator=.*|auth.authenticator=org.apache.hugegraph.auth.StandardAuthenticator|' conf/rest-server.properties
46+
sed -i 's|#auth.admin_pa=.*|auth.admin_pa=pa|' conf/rest-server.properties
5047
echo -e "pa" | bin/init-store.sh || exit 1
5148
bin/start-hugegraph.sh || exit 1
5249

53-
# config options for https server
54-
cd ../"${HTTPS_SERVER_DIR}"
50+
cd ../${HTTPS_SERVER_DIR}
5551
REST_SERVER_CONFIG="conf/rest-server.properties"
5652
GREMLIN_SERVER_CONFIG="conf/gremlin-server.yaml"
5753
sed -i "s?http://127.0.0.1:8080?https://127.0.0.1:8443?g" "$REST_SERVER_CONFIG"
54+
sed -i "s/rpc.server_port=8091/rpc.server_port=8092/g" "$REST_SERVER_CONFIG"
5855
sed -i "s/#port: 8182/port: 8282/g" "$GREMLIN_SERVER_CONFIG"
5956
echo "gremlinserver.url=http://127.0.0.1:8282" >> ${REST_SERVER_CONFIG}
57+
6058
# start HugeGraphServer with https protocol
61-
bin/init-store.sh
59+
sed -i 's|gremlin.graph=org.apache.hugegraph.HugeFactory|gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy|' conf/graphs/hugegraph.properties
60+
sed -i 's|#auth.authenticator=.*|auth.authenticator=org.apache.hugegraph.auth.StandardAuthenticator|' conf/rest-server.properties
61+
sed -i 's|#auth.admin_pa=.*|auth.admin_pa=pa|' conf/rest-server.properties
62+
echo -e "pa" | bin/init-store.sh || exit 1
6263
bin/start-hugegraph.sh
6364
cd ../

0 commit comments

Comments
 (0)