Skip to content

Commit e1bd708

Browse files
VGalaxiesimbajin
andauthored
feat(dist): support docker deployment for PD and Store (#2529)
Co-authored-by: imbajin <jin@apache.org>
1 parent 4c6eda8 commit e1bd708

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2005
-265
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ published)
1919

2020
## Purpose of the PR
2121

22-
- close #xxx <!-- or use "fix #xxx", "xxx" is the ID-link of related issue, e.g: close #1024 -->
22+
- close #xxx <!-- or use "fix #xxx", "xxx" is the ID-link of related issue, e.g: close #1024 -->
2323

2424
<!--
2525
Please explain more context in this section, clarify why the changes are needed.
@@ -30,7 +30,7 @@ e.g:
3030

3131
## Main Changes
3232

33-
<!-- Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. These change logs are helpful for better ant faster reviews.)
33+
<!-- Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. These change logs are helpful for better and faster reviews.)
3434
3535
For example:
3636

.github/workflows/stale.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
days-before-pr-stale: 30
3030
days-before-pr-close: 180
3131
operations-per-run: 10
32-
start-date: '2017-10-01T00:00:00Z'
32+
start-date: '2016-10-01T00:00:00Z'
3333

3434
exempt-all-assignees: true
3535
remove-stale-when-updated: true

BUILDING.md

+17-20
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,35 @@
1-
Building hugegraph
1+
Building HugeGraph
22
--------------
33

44
Required:
55

6-
* Java 8/11
7-
* Maven
6+
* Java 11
7+
* Maven 3.5+
8+
9+
To build without executing tests: `mvn clean package -DskipTests`
10+
11+
## Building in IDEA
812

913
To build without executing tests:
1014

11-
```
12-
mvn clean
13-
mvn package -DskipTests
14-
```
15+
1. Click on "File" -> "Open", choose your project location.
16+
2. Open maven view by click "View" -> "Tool Windows" -> "Maven Projects".
17+
3. Choose root module "hugegraph: Distributed Graph Database", unfold the menu of "Lifecycle".
18+
4. Click the "Toggle 'Skip Tests' Mode" button which is located on the top navibar of "Maven Projects" window to skip tests.
19+
5. Double click "package" or "install" to build a project.
20+
21+
Could also refer [Dev-In-IDEA](https://hugegraph.apache.org/docs/contribution-guidelines/hugegraph-server-idea-setup/) for more details.
1522

16-
## Building on Eclipse IDE
17-
Note that this has only been tested on Eclipse Neon.2 Release (4.6.2) with m2e (1.7.0.20160603-1933) and m2e-wtp (1.3.1.20160831-1005) plugin.
23+
## Building in Eclipse
1824

25+
> Note: this has only been tested on Eclipse Neon.2 Release (4.6.2) with m2e (1.7.0.20160603-1933) and m2e-wtp (1.3.1.20160831-1005) plugin.
1926
2027
To build without executing tests:
2128

2229
1. Right-click on your project -> "Run As..." -> "Run Configurations..."
2330
2. On "Goals", populate with `install`
2431
3. Select the options `Update Snapshots` and `Skip Tests`
25-
4. Before clicking "Run", make sure that Eclipse knows where `JAVA_HOME` is. On same window, go to "Environment" tab and click "New".
32+
4. Before clicking "Run", make sure that Eclipse knows where `JAVA_HOME` is. In the same window, go to "Environment" tab and click "New".
2633
5. Under "Name:", add `JAVA_HOME`
2734
6. Under "Value:", add the path where `java` is located
2835
7. Click "OK"
@@ -32,13 +39,3 @@ To find the Java binary in your environment, run the appropriate command for you
3239
* Linux/macOS: `which java`
3340
* Windows: `for %i in (java.exe) do @echo. %~$PATH:i`
3441

35-
## Building on IDEA
36-
37-
To build without executing tests:
38-
39-
1. Click on "File" -> "Open", choose your project location.
40-
2. Open maven view by click "View" -> "Tool Windows" -> "Maven Projects".
41-
3. Choose root module "hugegraph: Distributed Graph Database", unfold the menu of "Lifecycle".
42-
4. Click the "Toggle 'Skip Tests' Mode" button which is located on the top
43-
navibar of "Maven Projects" window to skip tests.
44-
5. Double click "package" or "install" to build project.

CONTRIBUTING.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# How to Contribute to HugeGraph
22

3-
Thanks for taking the time to contribute! As an open source project, HugeGraph is looking forward to be contributed from everyone,
4-
and we are also grateful to all the contributors.
3+
> Refer [website-doc](https://hugegraph.apache.org/docs/contribution-guidelines/) for the latest information.
4+
5+
Thanks for taking the time to contribute!
6+
As an open source project, HugeGraph is looking forward to being contributed from everyone, and we are also grateful to all the contributors.
57

68
The following is a contribution guide for HugeGraph:
79

@@ -15,7 +17,7 @@ We can contribute by reporting issues, submitting code patches or any other feed
1517

1618
Before submitting the code, we need to do some preparation:
1719

18-
1. Sign up or login to GitHub: [https://github.com](https://github.com)
20+
1. Sign up or login to GitHub: [https://github.com](https://github.com)
1921

2022
2. Fork HugeGraph repo from GitHub: [https://github.com/apache/incubator-hugegraph/fork](https://github.com/apache/incubator-hugegraph/fork)
2123

@@ -69,21 +71,21 @@ vim hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/HugeFacto
6971
# run test locally (optional)
7072
mvn test -Pcore-test,memory
7173
```
72-
Note: In order to be consistent with the code style easily, if you use [IDEA](https://www.jetbrains.com/idea/) as your IDE, you can directly [import](https://www.jetbrains.com/help/idea/configuring-code-style.html) our code style [configuration file](./hugegraph-style.xml).
74+
Note: To be consistent with the code style easily, if you use [IDEA](https://www.jetbrains.com/idea/) as your IDE, you can directly [import](https://www.jetbrains.com/help/idea/configuring-code-style.html) our code style [configuration file](./hugegraph-style.xml).
7375

7476
##### 3.2.1 Check licenses
7577
If we want to add new third-party dependencies to the `HugeGraph` project, we need to do the following things:
7678
1. Find the third-party dependent repository, put the dependent `license` file into [./hugegraph-dist/release-docs/licenses/](https://github.com/apache/incubator-hugegraph/tree/master/hugegraph-dist/release-docs/licenses) path.
7779
2. Declare the dependency in [./hugegraph-server/hugegraph-dist/release-docs/LICENSE](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/release-docs/LICENSE) `LICENSE` information.
7880
3. Find the NOTICE file in the repository and append it to [./hugegraph-server/hugegraph-dist/release-docs/NOTICE](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/release-docs/NOTICE) file (skip this step if there is no NOTICE file).
79-
4. Execute locally [./hugegraph-server/hugegraph-dist/scripts/dependency/regenerate_known_dependencies.sh](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/scripts/dependency/regenerate_known_dependencies.sh) to update the dependency list [known-dependencies.txt](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/scripts/dependency/known-dependencies.txt) (or manually update) .
81+
4. Execute locally [./hugegraph-server/hugegraph-dist/scripts/dependency/regenerate_known_dependencies.sh](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/scripts/dependency/regenerate_known_dependencies.sh) to update the dependency list [known-dependencies.txt](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/scripts/dependency/known-dependencies.txt) (or manually update).
8082

8183
**Example**: A new third-party dependency is introduced into the project -> `ant-1.9.1.jar`
8284
- The project source code is located at: https://github.com/apache/ant/tree/rel/1.9.1
8385
- LICENSE file: https://github.com/apache/ant/blob/rel/1.9.1/LICENSE
8486
- NOTICE file: https://github.com/apache/ant/blob/rel/1.9.1/NOTICE
8587

86-
The license information of `ant-1.9.1.jar` needs to be specified in the LICENSE file, and the notice information needs to be specified in the NOTICE file. The detailed LICENSE file corresponding to ant-1.9.1.jar needs to be copied to our licenses/ directory. Finally update the known-dependencies.txt file.
88+
The license information of `ant-1.9.1.jar` needs to be specified in the LICENSE file, and the notice information needs to be specified in the NOTICE file. The detailed LICENSE file corresponding to ant-1.9.1.jar needs to be copied to our licenses/ directory. Finally, update the known-dependencies.txt file.
8789

8890
#### 3.3 Commit changes to git repo
8991

@@ -105,7 +107,7 @@ Fix bug: run deploy multiple times
105107
fix #ISSUE_ID
106108
```
107109

108-
> Please remember to fill in the issue id, which was generated by GitHub after issue creation.
110+
> Please remember to fill in the issue id, which GitHub generated after issue creation.
109111
110112
#### 3.4 Push commit to GitHub fork repo
111113

@@ -121,7 +123,7 @@ Note that since GitHub requires submitting code through `username + token` (inst
121123

122124
## 4. Create a Pull Request
123125

124-
Go to the web page of GitHub fork repo, there would be a chance to create a Pull Request after pushing to a new branch, just click button "Compare & pull request" to do it. Then edit the description for proposed changes, which can just be copied from the commit message.
126+
Go to the web page of GitHub fork repo, there would be a chance to create a Pull Request after pushing to a new branch, click the button "Compare & pull request" to do it. Then edit the description for proposed changes, which can just be copied from the commit message.
125127

126128
Note: please make sure the email address you used to submit the code is bound to the GitHub account. For how to bind the email address, please refer to https://github.com/settings/emails:
127129
<img width="1280" alt="image" src="https://user-images.githubusercontent.com/9625821/163522445-2a50a72a-dea2-434f-9868-3a0d40d0d037.png">
@@ -131,7 +133,7 @@ Note: please make sure the email address you used to submit the code is bound to
131133
Maintainers will start the code review after all the **automatic** checks are passed:
132134

133135
- Check: Contributor License Agreement is signed
134-
- Check: Travis CI builds is passed (automatically Test and Deploy)
136+
- Check: Travis CI builds are passed (automatically Test and Deploy)
135137

136138
The commit will be accepted and merged if there is no problem after review.
137139

@@ -171,8 +173,8 @@ And push it to GitHub fork repo again:
171173
git push -f origin bugfix-branch:bugfix-branch
172174
```
173175
174-
GitHub will automatically update the Pull Request after we push it, just wait for code review.
176+
GitHub will automatically update the Pull Request after we push it, wait for code review.
175177

176-
Any question please contact to us through [hugegraph@googlegroups.com](mailto:hugegraph@googlegroups.com) or [other contact information](https://hugegraph.github.io/hugegraph-doc/).
178+
For Any question, please contact us through [dev@hugegraph.apache.org](mailto:dev@hugegraph.apache.org) ([subscriber](https://hugegraph.apache.org/docs/contribution-guidelines/subscribe/) only)
177179

178180

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ achieved through [Gremlin](https://tinkerpop.apache.org/gremlin.html)(a powerful
3737
We can use `docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph` to quickly start an inner
3838
HugeGraph server with `RocksDB` (in backgrounds) for **test/dev**.
3939
You can visit [doc page](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#3-deploy) or
40-
the [README](hugegraph-server/hugegraph-dist/docker/READEME.md) for more details. ([Docker Compose](./hugegraph-server/hugegraph-dist/docker/example))
40+
the [README](hugegraph-server/hugegraph-dist/docker/README.md) for more details. ([Docker Compose](./hugegraph-server/hugegraph-dist/docker/example))
4141

4242
> Note:
4343
>

docker/configs/application-pd0.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
spring:
19+
application:
20+
name: hugegraph-pd
21+
22+
management:
23+
metrics:
24+
export:
25+
prometheus:
26+
enabled: true
27+
endpoints:
28+
web:
29+
exposure:
30+
include: "*"
31+
32+
logging:
33+
config: 'file:./conf/log4j2.xml'
34+
license:
35+
verify-path: ./conf/verify-license.json
36+
license-path: ./conf/hugegraph.license
37+
grpc:
38+
port: 8686
39+
host: 127.0.0.1
40+
41+
server:
42+
port: 8620
43+
44+
pd:
45+
data-path: ./pd_data
46+
patrol-interval: 1800
47+
initial-store-count: 3
48+
initial-store-list: 127.0.0.1:8500,127.0.0.1:8501,127.0.0.1:8502
49+
50+
raft:
51+
address: 127.0.0.1:8610
52+
peers-list: 127.0.0.1:8610,127.0.0.1:8611,127.0.0.1:8612
53+
54+
store:
55+
max-down-time: 172800
56+
monitor_data_enabled: true
57+
monitor_data_interval: 1 minute
58+
monitor_data_retention: 1 day
59+
initial-store-count: 1
60+
61+
partition:
62+
default-shard-count: 1
63+
store-max-shard-count: 12

docker/configs/application-pd1.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
spring:
19+
application:
20+
name: hugegraph-pd
21+
22+
management:
23+
metrics:
24+
export:
25+
prometheus:
26+
enabled: true
27+
endpoints:
28+
web:
29+
exposure:
30+
include: "*"
31+
32+
logging:
33+
config: 'file:./conf/log4j2.xml'
34+
license:
35+
verify-path: ./conf/verify-license.json
36+
license-path: ./conf/hugegraph.license
37+
grpc:
38+
port: 8687
39+
host: 127.0.0.1
40+
41+
server:
42+
port: 8621
43+
44+
pd:
45+
data-path: ./pd_data
46+
patrol-interval: 1800
47+
initial-store-count: 3
48+
initial-store-list: 127.0.0.1:8500,127.0.0.1:8501,127.0.0.1:8502
49+
50+
raft:
51+
address: 127.0.0.1:8611
52+
peers-list: 127.0.0.1:8610,127.0.0.1:8611,127.0.0.1:8612
53+
54+
store:
55+
max-down-time: 172800
56+
monitor_data_enabled: true
57+
monitor_data_interval: 1 minute
58+
monitor_data_retention: 1 day
59+
initial-store-count: 1
60+
61+
partition:
62+
default-shard-count: 1
63+
store-max-shard-count: 12

docker/configs/application-pd2.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
spring:
19+
application:
20+
name: hugegraph-pd
21+
22+
management:
23+
metrics:
24+
export:
25+
prometheus:
26+
enabled: true
27+
endpoints:
28+
web:
29+
exposure:
30+
include: "*"
31+
32+
logging:
33+
config: 'file:./conf/log4j2.xml'
34+
license:
35+
verify-path: ./conf/verify-license.json
36+
license-path: ./conf/hugegraph.license
37+
grpc:
38+
port: 8688
39+
host: 127.0.0.1
40+
41+
server:
42+
port: 8622
43+
44+
pd:
45+
data-path: ./pd_data
46+
patrol-interval: 1800
47+
initial-store-count: 3
48+
initial-store-list: 127.0.0.1:8500,127.0.0.1:8501,127.0.0.1:8502
49+
50+
raft:
51+
address: 127.0.0.1:8612
52+
peers-list: 127.0.0.1:8610,127.0.0.1:8611,127.0.0.1:8612
53+
54+
store:
55+
max-down-time: 172800
56+
monitor_data_enabled: true
57+
monitor_data_interval: 1 minute
58+
monitor_data_retention: 1 day
59+
initial-store-count: 1
60+
61+
partition:
62+
default-shard-count: 1
63+
store-max-shard-count: 12

0 commit comments

Comments
 (0)