You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hugegraph.apache.org by mi...@apache.org on 2023/12/17 07:59:33 UTC

(incubator-hugegraph) branch master updated: doc: adjust docker desc in readme (#2390)

This is an automated email from the ASF dual-hosted git repository.

ming pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph.git


The following commit(s) were added to refs/heads/master by this push:
     new cb4427d9f doc: adjust docker desc in readme (#2390)
cb4427d9f is described below

commit cb4427d9f14a45a6cf329575757db98d9b93ecf6
Author: Dandelion <49...@users.noreply.github.com>
AuthorDate: Sun Dec 17 15:59:28 2023 +0800

    doc: adjust docker desc in readme (#2390)
    
    * fix(dist): update relative path for the 1.2.0
    
    * add docker policy and run server in daemon
    
    * fix: use tail to avoid container exit
    
    * adjuest the order of quick start
    
    * Update hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy
    
    * adjust desc
    
    * Update README.md
    
    * Update pom.xml
    
    ---------
    
    Co-authored-by: imbajin <ji...@apache.org>
---
 README.md                                          | 36 +++++++++++-----------
 hugegraph-server/Dockerfile                        |  1 +
 .../{README.md => docker/READEME.md}               | 12 ++++++--
 .../hugegraph-dist/docker/docker-entrypoint.sh     |  4 ++-
 .../docker/scripts/detect-storage.groovy           |  2 +-
 hugegraph-server/hugegraph-dist/pom.xml            | 16 ----------
 .../hugegraph-dist/scripts/apache-release.sh       |  4 +--
 7 files changed, 34 insertions(+), 41 deletions(-)

diff --git a/README.md b/README.md
index 5e589be60..ef64f1024 100644
--- a/README.md
+++ b/README.md
@@ -8,11 +8,8 @@
 
 [![License](https://img.shields.io/badge/license-Apache%202-0E78BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
 [![HugeGraph-CI](https://github.com/apache/incubator-hugegraph/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/incubator-hugegraph/actions/workflows/ci.yml)
-[![CodeQL](https://github.com/apache/incubator-hugegraph/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/apache/incubator-hugegraph/actions/workflows/codeql-analysis.yml)
 [![License checker](https://github.com/apache/incubator-hugegraph/actions/workflows/licence-checker.yml/badge.svg)](https://github.com/apache/incubator-hugegraph/actions/workflows/licence-checker.yml)
-[![Codecov](https://codecov.io/gh/apache/incubator-hugegraph/branch/master/graph/badge.svg)](https://app.codecov.io/gh/apache/incubator-hugegraph)
 [![GitHub Releases Downloads](https://img.shields.io/github/downloads/apache/hugegraph/total.svg)](https://github.com/apache/hugegraph/releases)
-[![stars](https://img.shields.io/github/stars/apache/hugegraph)](https://github.com/apache/incubator-hugegraph/stargazers)
 
 </div>
 
@@ -27,28 +24,18 @@ Billions of vertices and edges can be easily stored into and queried from HugeGr
 - Compliance to [Apache TinkerPop 3](https://tinkerpop.apache.org/), support [Gremlin](https://tinkerpop.apache.org/gremlin.html) & [Cypher](https://en.wikipedia.org/wiki/Cypher) language
 - Schema Metadata Management, including VertexLabel, EdgeLabel, PropertyKey and IndexLabel
 - Multi-type Indexes, supporting exact query, range query and complex conditions combination query
-- Plug-in Backend Store Driver Framework, support `RocksDB`, `Cassandra`, `HBase`, `ScyllaDB`, and `MySQL/Postgre` now and easy to add other backend store driver if needed
+- Plug-in Backend Store Driver Framework, support `RocksDB`, `Cassandra`, `HBase`, `ScyllaDB`, and `MySQL/Postgre` now and easy to add another backend store driver if needed
 - Integration with `Flink/Spark/HDFS`, and friendly to connect other big data platforms
 
 
 ## Quick Start
 
-### 1. Docker Way
+### 1. Download Way
 
-We can use `docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph` to quickly start an inner 
-HugeGraph server with `RocksDB` in background.
-
-Optional: 
-
-1. use `docker exec -it graph bash` to enter the container to do some operations.
-2. use `docker run -itd --name=graph -p 8080:8080 -e PRELOAD="true" hugegraph/hugegraph` to start with a **built-in** (example) graph.
-
-### 2. Download Way
-
-Visit [Download Page](https://hugegraph.apache.org/docs/download/download/) and refer the [doc](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#33-source-code-compilation) 
+Visit [Download Page](https://hugegraph.apache.org/docs/download/download/) and refer the [doc](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#32-download-the-binary-tar-tarball) 
 to download the latest release package and start the server.
 
-### 3. Source Building Way
+### 2. Source Building Way
 
 Visit [Source Building Page](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#33-source-code-compilation) and follow the 
 steps to build the source code and start the server.
@@ -62,6 +49,18 @@ And here are links of other **HugeGraph** component/repositories:
 3. [hugegraph-commons](https://github.com/apache/incubator-hugegraph-commons) (**common & rpc** libs)
 4. [hugegraph-website](https://github.com/apache/incubator-hugegraph-doc) (**doc & website** code)
 
+### 3. Docker Way (Convenient for Test)
+
+We can use `docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph` to quickly start an inner 
+HugeGraph server with `RocksDB` (in backgrounds) for **test/dev**.
+You can visit [doc page](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#3-deploy) or the [README](hugegraph-server/hugegraph-dist/docker/READEME.md) for more details.
+
+> Note:
+>  
+> 1. The docker image of hugegraph is a convenience release, but not **official distribution** artifacts. You can find more details from [ASF Release Distribution Policy](https://infra.apache.org/release-distribution.html#dockerhub).
+> 
+> 2. Recommand to use `release tag`(like `1.0.0`) for the stable version. Use `latest` tag to experience the newest functions in development.
+
 ## License
 
 HugeGraph is licensed under Apache 2.0 License.
@@ -81,7 +80,8 @@ HugeGraph is licensed under Apache 2.0 License.
 HugeGraph relies on the [TinkerPop](http://tinkerpop.apache.org) framework, we refer to the storage structure of Titan and the schema definition of DataStax. 
 Thanks to TinkerPop, thanks to Titan, thanks to DataStax. Thanks to all other organizations or authors who contributed to the project.
 
-You are welcome to contribute to HugeGraph, and we are looking forward to working with you to build an excellent open source community.
+You are welcome to contribute to HugeGraph, 
+and we are looking forward to working with you to build an excellent open-source community.
 
 
 ## Contact Us
diff --git a/hugegraph-server/Dockerfile b/hugegraph-server/Dockerfile
index 47dc411c6..45a725786 100644
--- a/hugegraph-server/Dockerfile
+++ b/hugegraph-server/Dockerfile
@@ -47,6 +47,7 @@ RUN set -x \
        procps \
        curl \
        lsof \
+       vim \
     && apt-get clean \
     && rm -rf /var/lib/apt/lists/*
 
diff --git a/hugegraph-server/hugegraph-dist/README.md b/hugegraph-server/hugegraph-dist/docker/READEME.md
similarity index 81%
rename from hugegraph-server/hugegraph-dist/README.md
rename to hugegraph-server/hugegraph-dist/docker/READEME.md
index 1aedb37bb..8b5d2efc5 100644
--- a/hugegraph-server/hugegraph-dist/README.md
+++ b/hugegraph-server/hugegraph-dist/docker/READEME.md
@@ -1,5 +1,11 @@
 # Deploy Hugegraph server with docker
 
+> Note:
+> 
+> 1. The docker image of hugegraph is a convenience release, not official distribution artifacts from ASF. You can find more details from [ASF Release Distribution Policy](https://infra.apache.org/release-distribution.html#dockerhub).
+> 
+> 2. Recommand to use `release tag`(like `1.0.0`) for the stable version. Use `latest` tag to experience the newest functions in development.
+
 ## 1. Deploy
 
 We can use docker to quickly start an inner HugeGraph server with RocksDB in background.
@@ -18,7 +24,7 @@ We can use docker to quickly start an inner HugeGraph server with RocksDB in bac
       graph:
         image: hugegraph/hugegraph
         ports:
-          - 18080:8080
+          - 8080:8080
     ```
 
 ## 2. Create Sample Graph on Server Startup
@@ -33,7 +39,7 @@ If you want to customize the pre-loaded data, please mount the the groovy script
     to start hugegraph server.
 
 2. Using docker compose 
-    
+
     We can also use `docker-compose up -d` to quickly start. The `docker-compose.yaml` is below. [example.groovy](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-dist/src/assembly/static/scripts/example.groovy) is a pre-defined script. If needed, we can mount a new `example.groovy` to preload different data:
 
     ```yaml
@@ -46,7 +52,7 @@ If you want to customize the pre-loaded data, please mount the the groovy script
         volumes:
           - /path/to/yourscript:/hugegraph/scripts/example.groovy
         ports:
-          - 18080:8080
+          - 8080:8080
     ```
 
 3. Using start-hugegraph.sh
diff --git a/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh b/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh
index e1fad4a9f..cc1f8a1fc 100644
--- a/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh
+++ b/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh
@@ -21,4 +21,6 @@
 
 ./bin/init-store.sh
 
-./bin/start-hugegraph.sh -d false -j "$JAVA_OPTS" -g zgc
+./bin/start-hugegraph.sh -j "$JAVA_OPTS" -g zgc
+
+tail -f /dev/null
diff --git a/hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy b/hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy
index df57ade98..5dff017b5 100644
--- a/hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy
+++ b/hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy
@@ -18,7 +18,7 @@
 import org.apache.hugegraph.HugeFactory
 import org.apache.hugegraph.dist.RegisterUtil
 
-// register all the backend to avoid changes if docker needs to support othre backend
+// register all the backend to avoid changes if needs to support other backend
 RegisterUtil.registerPlugins()
 RegisterUtil.registerRocksDB()
 RegisterUtil.registerCassandra()
diff --git a/hugegraph-server/hugegraph-dist/pom.xml b/hugegraph-server/hugegraph-dist/pom.xml
index cdec80950..9a58ac767 100644
--- a/hugegraph-server/hugegraph-dist/pom.xml
+++ b/hugegraph-server/hugegraph-dist/pom.xml
@@ -293,22 +293,6 @@
                                                 <include name="${final.name}/**"/>
                                             </tarfileset>
                                         </tar>
-                                        <!-- copy the artifacts to root
-                                             directory for better user experience -->
-                                        <!-- REMOVE ME after revision 1.5.0 -->
-                                        <exec executable="cp"
-                                              dir="${project.basedir}"
-                                              failonerror="false">
-                                            <arg value="-r"/>
-                                            <arg value="../${final.name}"/>
-                                            <arg value="../../${final.name}"/>
-                                        </exec>
-                                        <exec executable="cp"
-                                              dir="${project.basedir}"
-                                              failonerror="false">
-                                            <arg value="../${final.name}.tar.gz"/>
-                                            <arg value="../../${final.name}.tar.gz"/>
-                                        </exec>
                                     </target>
                                 </configuration>
                             </execution>
diff --git a/hugegraph-server/hugegraph-dist/scripts/apache-release.sh b/hugegraph-server/hugegraph-dist/scripts/apache-release.sh
index a92a59b37..277fed8b7 100755
--- a/hugegraph-server/hugegraph-dist/scripts/apache-release.sh
+++ b/hugegraph-server/hugegraph-dist/scripts/apache-release.sh
@@ -33,13 +33,13 @@ WORK_DIR=$(
   pwd
 )
 cd "${WORK_DIR}" || exit
-echo "In the work dir: $(pwd)"
+echo "Current work dir: $(pwd)"
 
 # clean old dir then build a new one
 rm -rf dist && mkdir -p dist/apache-${REPO}
 
 # step1: package the source code
-cd ../../
+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" \
   --prefix=apache-${REPO}-incubating-"${RELEASE_VERSION}"-src/ "${GIT_BRANCH}" || exit