Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: intro install-dist module in root #2552

Merged
merged 12 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
env:
USE_STAGE: 'true' # Whether to include the stage repository.
SCRIPT_DEPENDENCY: hugegraph-server/hugegraph-dist/scripts/dependency
SCRIPT_DEPENDENCY: install-dist/scripts/dependency
steps:
- name: Checkout source
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions hugegraph-pd/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Exclude the generated PB files
hg-pd-grpc/src/main/java/

# Exclude data files
**/pd_data/
4 changes: 2 additions & 2 deletions hugegraph-pd/hg-pd-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
<artifactId>hg-pd-dist</artifactId>

<properties>
<dist.dir>${project.parent.basedir}/dist</dist.dir>
<dist.dir>${project.parent.basedir}</dist.dir>
<shell-executable>bash</shell-executable>
<assembly.dir>${project.basedir}/src/assembly</assembly.dir>
<assembly.descriptor.dir>${assembly.dir}/descriptor</assembly.descriptor.dir>
<assembly.static.dir>${assembly.dir}/static</assembly.static.dir>
<final.name>hugegraph-pd-${project.parent.version}</final.name>
<final.name>apache-hugegraph-incubating-pd-${project.parent.version}</final.name>
<executable.jar.name>hg-pd-service</executable.jar.name>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions hugegraph-pd/hg-pd-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ pd:
# If the minimum number of nodes is less than this number, the cluster will stop being stored
initial-store-count: 1
# The initial store list is automatically activated in the store
initial-store-list: 127.0.0.1:8502
initial-store-list: 127.0.0.1:8500

raft:
# The address of the local raft service
address: 127.0.0.1:8610
# The service address of the PD cluster
peers-list: 127.0.0.1:8610,127.0.0.1:8611,127.0.0.1:8612
peers-list: 127.0.0.1:8610
Comment on lines -55 to +61
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any potential impact?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, no side effects have been found. The modification is intended to use org.apache.hugegraph.pd.boot.HugePDServer to quickly start a single node PD.

# The read and write timeout period of the raft rpc, in milliseconds
rpc-timeout: 10000
# The interval between snapshot generation, in seconds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ REPORT_FILE=$REPORT_DIR/jacoco-api-test.xml

TRAVIS_DIR=$(dirname $0)
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
SERVER_DIR=hugegraph-server/apache-hugegraph-incubating-$VERSION
SERVER_DIR=hugegraph-server/apache-hugegraph-incubating-server-$VERSION
RAFT1_DIR=hugegraph-raft1
RAFT2_DIR=hugegraph-raft2
RAFT3_DIR=hugegraph-raft3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ REPORT_FILE=$REPORT_DIR/jacoco-api-test-for-raft.xml

TRAVIS_DIR=$(dirname $0)
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
SERVER_DIR=hugegraph-server/apache-hugegraph-incubating-$VERSION/
SERVER_DIR=hugegraph-server/apache-hugegraph-incubating-server-$VERSION/
CONF=$SERVER_DIR/conf/graphs/hugegraph.properties
REST_SERVER_CONF=$SERVER_DIR/conf/rest-server.properties
GREMLIN_SERVER_CONF=$SERVER_DIR/conf/gremlin-server.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
set -ev

HOME_DIR=$(pwd)
PD_DIR=$HOME_DIR/hugegraph-pd/dist/hugegraph-pd-1.3.0
PD_DIR=$HOME_DIR/hugegraph-pd/apache-hugegraph-incubating-pd-1.3.0

pushd $PD_DIR
. bin/start-hugegraph-pd.sh
Expand Down
2 changes: 1 addition & 1 deletion hugegraph-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<top.level.dir>${project.basedir}/..</top.level.dir>
<release.name>hugegraph</release.name>
<final.name>apache-${release.name}-incubating-${project.version}</final.name>
<final.name>apache-${release.name}-incubating-server-${project.version}</final.name>
<final.destfile>${top.level.dir}/${final.name}.tar.gz</final.destfile>
<compiler.source>1.8</compiler.source>
<compiler.target>1.8</compiler.target>
Expand Down
30 changes: 30 additions & 0 deletions install-dist/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.hugegraph</groupId>
<artifactId>hugegraph</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<!-- TODO: rename to hugegraph-dist later -->
<artifactId>install-dist</artifactId>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,17 @@ echo "Current work dir: $(pwd)"
rm -rf dist && mkdir -p dist/apache-${REPO}

# step1: package the source code
cd ../../../ && echo "Package source in: $(pwd)"
cd ../../ && echo "Package source in: $(pwd)"
git archive --format=tar.gz \
--output="hugegraph-server/hugegraph-dist/scripts/dist/apache-${REPO}/apache-${REPO}-incubating-${RELEASE_VERSION}-src.tar.gz" \
--output="install-dist/scripts/dist/apache-${REPO}/apache-${REPO}-incubating-${RELEASE_VERSION}-src.tar.gz" \
--prefix=apache-${REPO}-incubating-"${RELEASE_VERSION}"-src/ "${GIT_BRANCH}" || exit
cd - || exit

# step2: copy the binary file (Optional)
# Note: it's optional for project to generate binary package (skip this step if not need)
cp -v ../../apache-${REPO}-incubating-"${RELEASE_VERSION}".tar.gz \
cp -v ../../hugegraph-server/apache-${REPO}-incubating-server-"${RELEASE_VERSION}".tar.gz \
dist/apache-${REPO} || exit
# TODO: pd & store

# step3: sign + hash
##### 3.1 sign in source & binary package
Expand Down
Loading
Loading