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

Adding support for Vermeer functionality and removing invalid repositories #316

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ The [project homepage](https://hugegraph.apache.org/docs/) contains more informa
And here are links of other repositories:
1. [hugegraph-server](https://github.com/apache/hugegraph) (graph's core component - OLTP server)
2. [hugegraph-toolchain](https://github.com/apache/hugegraph-toolchain) (include loader/dashboard/tool/client)
3. [hugegraph-commons](https://github.com/apache/hugegraph-commons) (include common & rpc module)
4. [hugegraph-website](https://github.com/apache/hugegraph-doc) (include doc & website code)
3. [hugegraph-website](https://github.com/apache/hugegraph-doc) (include doc & website code)

## Note

Expand Down
19 changes: 19 additions & 0 deletions vermeer/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# 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.
#
*data*
*test*
*.git*
85 changes: 85 additions & 0 deletions vermeer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Golang #
######################
# `go test -c` 生成的二进制文件
*.test

# go coverage 工具
*.out
*.prof
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*

# 编译文件 #
###################
*.com
*.class
#*.dll
*.exe
#*.o
#*.so
main
vermeer

# 压缩包 #
############
# Git 自带压缩,如果这些压缩包里有代码,建议解压后 commit
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# 日志文件和数据库 #
######################
*.log
*.sqlite
*.db

# 临时文件 #
######################
tmp/
.tmp/
data/
result/
vermeer_data/

# 系统生成文件 #
######################
.DS_Store
.DS_Store?
.AppleDouble
.LSOverride
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
.TemporaryItems
.fseventsd
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# IDE 和编辑器 #
######################
.idea/
/go_build_*
out/
#.vscode/
.vscode/settings.json
*.sublime*
__debug_bin
.project

# 前端工具链 #
######################
.sass-cache/*
node_modules/
/output/
/bin/*
!/bin/*.sh
32 changes: 32 additions & 0 deletions vermeer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# 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.
#
FROM golang:1.18-alpine AS builder
COPY ./ /src/
WORKDIR /src/
ENV CGO_ENABLED="0"
RUN go build -o /go/bin/app

FROM alpine
EXPOSE 8080
COPY --from=builder /go/bin/app /go/bin/app
COPY --from=builder /src/config/ /go/bin/config/
COPY --from=builder /usr/local/go/lib/time/zoneinfo.zip /
ENV TZ=Asia/Shanghai
ENV ZONEINFO=/zoneinfo.zip

WORKDIR /go/bin/
ENTRYPOINT ["/go/bin/app"]
57 changes: 57 additions & 0 deletions vermeer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 图计算平台

### grpc protobuf 依赖项安装

````
go install google.golang.org/protobuf/cmd/[email protected] \
go install google.golang.org/grpc/cmd/[email protected]
````

---

### protobuf build

````
../../tools/protoc/osxm1/protoc *.proto --go-grpc_out=. --go_out=.
````

---

### 交叉编译

````
linux: GOARCH=amd64 GOOS=linux go build
CC=x86_64-linux-musl-gcc CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -buildmode=plugin
````

---

### 运行

```
master: ./vermeer --env=master
worker: ./vermeer --env=worker01
# 参数env是指定使用config文件夹下的配置文件名
or
./vermeer.sh start master
./vermeer.sh start worker
# 配置项在vermeer.sh中指定
```

---

## supervisord

配置文件参考 config/supervisor.conf

````
# 启动 run as daemon
./supervisord -c supervisor.conf -d
````

# 使用hubble平台
有三种搭建方式,参考https://hugegraph.apache.org/docs/quickstart/hugegraph-hubble/

Use Docker (Convenient for Test/Dev)
Download the Toolchain binary package
Source code compilation
22 changes: 22 additions & 0 deletions vermeer/algorithms/algorithms.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
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.
*/

package algorithms

import "vermeer/apps/compute"

var Algorithms []compute.AlgorithmMaker
Loading
Loading