Skip to content

Commit

Permalink
Upgrade to latest vineyard (v0.16.1)
Browse files Browse the repository at this point in the history
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
  • Loading branch information
sighingnow committed Jul 17, 2023
1 parent bb1ce36 commit 4f39ca6
Show file tree
Hide file tree
Showing 15 changed files with 54 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-graphscope-wheels-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jobs:
run: |
. ~/.graphscope_env
python3 -m pip install libclang
git clone --single-branch -b v0.15.0 --depth=1 https://github.com/v6d-io/v6d.git /tmp/v6d
git clone --single-branch -b v0.16.1 --depth=1 https://github.com/v6d-io/v6d.git /tmp/v6d
cd /tmp/v6d
git submodule update --init
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gae.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-20.04
if: ${{ github.repository == 'alibaba/GraphScope' }}
container:
image: registry.cn-hongkong.aliyuncs.com/graphscope/graphscope-dev:v0.15.0
image: registry.cn-hongkong.aliyuncs.com/graphscope/graphscope-dev:v0.16.1
steps:
- uses: actions/checkout@v3

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/k8s-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ jobs:
fail_ci_if_error: false

- name: HDFS test
if: false # temporarily disabled
env:
JAVA_HOME: /usr/lib/jvm/default-java
GS_TEST_DIR: ${{ github.workspace }}/gstest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/networkx-forward-algo-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
run:
shell: bash --noprofile --norc -eo pipefail {0}
container:
image: registry.cn-hongkong.aliyuncs.com/graphscope/graphscope-dev:v0.15.0
image: registry.cn-hongkong.aliyuncs.com/graphscope/graphscope-dev:v0.16.1
options:
--shm-size 4096m

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
fi
sudo mkdir /opt/graphscope
sudo chown -R $(id -u):$(id -g) /opt/graphscope
./gs install-deps dev --v6d-version v0.15.0
./gs install-deps dev --v6d-version v0.16.1
- name: Setup tmate session
if: false
Expand Down
7 changes: 3 additions & 4 deletions coordinator/gscoordinator/kubernetes_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def __init__(
self._del_retry_time_seconds = del_retry_time_seconds

self._waiting_for_delete = waiting_for_delete
self._serving = False

self._with_analytical = False
self._with_analytical_java = False
Expand Down Expand Up @@ -273,8 +274,6 @@ def __init__(
self._analytical_engine_endpoint = None
self._mars_service_endpoint = None

self._serving = False

self._analytical_engine_process = None
self._random_analytical_engine_rpc_port = random.randint(56001, 57000)
# interactive engine
Expand Down Expand Up @@ -1305,8 +1304,8 @@ def _deploy_vineyard_deployment(self):
kubeconfig=self._k8s_config_file,
name=self._vineyard_deployment,
namespace=self._namespace,
vineyard_replicas=self._num_workers,
vineyard_etcd_replicas=self._num_workers,
replicas=self._num_workers,
etcd_replicas=self._num_workers,
vineyardd_image=self._vineyard_image,
vineyardd_memory=self._vineyard_mem,
vineyardd_cpu=self._vineyard_cpu,
Expand Down
4 changes: 2 additions & 2 deletions coordinator/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ grpcio-tools>=1.49
kubernetes>=24.2.0
protobuf>=4
PyYAML
vineyard==0.15.0;sys_platform!="win32"
vineyard-io==0.15.0;sys_platform!="win32"
vineyard>=0.16.1;sys_platform!="win32"
vineyard-io>=0.16.1;sys_platform!="win32"
prometheus-client>=0.14.1
packaging
tqdm
4 changes: 2 additions & 2 deletions docs/deployment/deploy_with_existing_vineyard_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ python3 -m pip install vineyard
```

By default, the Vineyard cluster consists of three Vineyard instances and three etcd instances.
However, since we only have one node in the Kubernetes cluster, we need to specify the number of Vineyard instances and etcd instances using the `vineyard_replicas` and `vineyard_etcd_replicas` parameters. DON'T set the number of Vineyard instances and etcd instances to be greater than the number of nodes in the Kubernetes cluster. Instead, the number of vineyard replicas and the number of engine pods can be set independently.
However, since we only have one node in the Kubernetes cluster, we need to specify the number of Vineyard instances and etcd instances using the `replicas` and `etcd_replicas` parameters. DON'T set the number of Vineyard instances and etcd instances to be greater than the number of nodes in the Kubernetes cluster. Instead, the number of vineyard replicas and the number of engine pods can be set independently.

Create and check the namespace `vineyard-system` as follows.

Expand All @@ -83,7 +83,7 @@ import vineyard
# https://github.com/v6d-io/v6d/blob/main/k8s/cmd/README.md
# Notice, all character `-` in the parameter of vineyardctl should be replaced with `_` in the python API
vineyard.deploy.vineyardctl.deploy.vineyard_deployment(
vineyard_replicas=1,
replicas=1,
)
```

Expand Down
19 changes: 16 additions & 3 deletions k8s/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ ifeq ($(REGISTRY),)
endif

VERSION ?= latest
VINEYARD_VERSION ?= v0.15.0
VINEYARD_VERSION ?= v0.16.1
# This is the version of builder base image in most cases, except for graphscope-dev
BUILDER_VERSION ?= $(VINEYARD_VERSION)
# This is the version of runtime base image
RUNTIME_VERSION ?= $(VINEYARD_VERSION)
PROFILE ?= release
CI ?= false

BUILD_PROGRESS = auto
BUILD_PROGRESS ?= auto

.PHONY: all graphscope

Expand All @@ -39,7 +39,8 @@ graphscope: all
dev-wheel:
cd $(WORKING_DIR) && \
cp ../gs ./ && \
docker build \
docker build \
--progress=$(BUILD_PROGRESS) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg VINEYARD_VERSION=${VINEYARD_VERSION} \
-t graphscope/graphscope-dev:wheel \
Expand All @@ -50,13 +51,15 @@ manylinux2014-ext:
cd $(WORKING_DIR) && \
cp ../gs ./ && \
docker build \
--progress=$(BUILD_PROGRESS) \
-t graphscope/manylinux2014:20230407-ext \
-f $(DOCKERFILES_DIR)/manylinux2014-ext.Dockerfile .

graphscope-dev:
cd $(WORKING_DIR) && \
cp ../gs ./ && \
docker build \
--progress=$(BUILD_PROGRESS) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg VINEYARD_VERSION=${VINEYARD_VERSION} \
-t graphscope/graphscope-dev:${VINEYARD_VERSION} \
Expand All @@ -66,6 +69,7 @@ vineyard-dev:
cd $(WORKING_DIR) && \
cp ../gs ./ && \
docker build \
--progress=$(BUILD_PROGRESS) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg VINEYARD_VERSION=${VINEYARD_VERSION} \
-t graphscope/vineyard-dev:${VINEYARD_VERSION} \
Expand All @@ -74,6 +78,7 @@ vineyard-dev:
vineyard-runtime:
cd $(WORKING_DIR) && \
docker build \
--progress=$(BUILD_PROGRESS) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
-t graphscope/vineyard-runtime:${VINEYARD_VERSION} \
Expand All @@ -83,6 +88,7 @@ coordinator:
cd $(WORKING_DIR)/.. && \
docker build \
--target coordinator \
--progress=$(BUILD_PROGRESS) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
--build-arg CI=${CI} \
Expand All @@ -93,6 +99,7 @@ analytical:
cd $(WORKING_DIR)/.. && \
docker build \
--target analytical \
--progress=$(BUILD_PROGRESS) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
--build-arg RUNTIME_VERSION=$(RUNTIME_VERSION) \
Expand All @@ -104,6 +111,7 @@ analytical-java:
cd $(WORKING_DIR)/.. && \
docker build \
--target analytical-java \
--progress=$(BUILD_PROGRESS) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
--build-arg RUNTIME_VERSION=$(RUNTIME_VERSION) \
Expand All @@ -115,6 +123,7 @@ interactive-frontend:
cd $(WORKING_DIR)/.. && \
docker build \
--target frontend \
--progress=$(BUILD_PROGRESS) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
--build-arg RUNTIME_VERSION=$(RUNTIME_VERSION) \
Expand All @@ -127,6 +136,7 @@ interactive-executor:
cd $(WORKING_DIR)/.. \
&& docker build \
--target executor \
--progress=$(BUILD_PROGRESS) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
--build-arg RUNTIME_VERSION=$(RUNTIME_VERSION) \
Expand All @@ -140,6 +150,7 @@ interactive-experimental:
cd $(WORKING_DIR)/.. && \
docker build \
--target experimental \
--progress=$(BUILD_PROGRESS) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
-t graphscope/interactive-experimental:${VERSION} \
Expand All @@ -149,6 +160,7 @@ learning:
cd $(WORKING_DIR)/.. && \
docker build \
--target learning \
--progress=$(BUILD_PROGRESS) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
--build-arg RUNTIME_VERSION=$(RUNTIME_VERSION) \
Expand All @@ -159,6 +171,7 @@ learning:
graphscope-store:
cd $(WORKING_DIR)/.. && \
docker build \
--progress=$(BUILD_PROGRESS) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
--build-arg profile=${PROFILE} \
Expand Down
2 changes: 1 addition & 1 deletion k8s/actions-runner-controller/manylinux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ TARGETPLATFORM ?= $(shell arch)
RUNNER_VERSION ?= 2.287.1
DOCKER_VERSION ?= 20.10.12

VINEYARD_VERSION ?= v0.15.0
VINEYARD_VERSION ?= v0.16.1
BUILDER_VERSION ?= $(VINEYARD_VERSION)

# default list of platforms for which multiarch image is built
Expand Down
2 changes: 1 addition & 1 deletion k8s/internal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ GRAPHSCOPE_HOME ?= /usr/local
INSTALL_PREFIX ?= /opt/graphscope

VERSION ?= latest
VINEYARD_VERSION ?= v0.15.0
VINEYARD_VERSION ?= v0.16.1
PROFILE ?= release
CI ?= false

Expand Down
8 changes: 4 additions & 4 deletions python/graphscope/tests/kubernetes/test_demo_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ def create_vineyard_deployment_on_single_node():
# create vineyard deployment on single node
# set the replicas of vineyard and etcd to 1 as there is only one node in the cluster
vineyard.deploy.vineyardctl.deploy.vineyard_deployment(
vineyard_replicas=1,
vineyard_etcd_replicas=1,
replicas=1,
etcd_replicas=1,
namespace="graphscope-system",
create_namespace=True,
)
Expand Down Expand Up @@ -220,8 +220,8 @@ def create_vineyard_deployment_on_multiple_nodes():
# create vineyard deployment on multiple nodes
# set the replicas of vineyard and etcd to 2 as there are 2 nodes in the kubernetes cluster
vineyard.deploy.vineyardctl.deploy.vineyard_deployment(
vineyard_replicas=2,
vineyard_etcd_replicas=2,
replicas=2,
etcd_replicas=2,
namespace="graphscope-system",
create_namespace=True,
)
Expand Down
44 changes: 17 additions & 27 deletions python/graphscope/tests/minitest/test_min.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,19 +276,31 @@ def make_nodes_set(nodes):
def make_edges_set(edges):
return {item.get("eid", [None])[0]: item for item in edges}

def subgraph_roundtrip(num_workers, threads_per_worker):
def subgraph_roundtrip_and_pk_scan(num_workers, threads_per_worker):
logger.info(
"testing subgraph with %d workers and %d threads per worker",
num_workers,
threads_per_worker,
)
session = graphscope.session(cluster_type="hosts", num_workers=num_workers)
g0 = load_modern_graph(session)
interactive0 = session.gremlin(g0)

# test pk scan
query1 = "g.V().hasLabel('person').has('id', 1)"
query2 = "g.V().hasLabel('person','software').has('id', 1)"

query1_res = interactive0.execute(query1).all().result()
query2_res = interactive0.execute(query2).all().result()
logger.info("query1_res = %s", query1_res)
logger.info("query2_res = %s", query2_res)
assert len(query1_res) == 1
assert len(query2_res) == 1

# test subgraph
vquery = "g.V().valueMap()"
equery = "g.E().valueMap()"
session = graphscope.session(cluster_type="hosts", num_workers=num_workers)

g0 = load_modern_graph(session)
interactive0 = session.gremlin(g0)
nodes = interactive0.execute(vquery).all().result()
edges = interactive0.execute(equery).all().result()

Expand All @@ -310,33 +322,11 @@ def subgraph_roundtrip(num_workers, threads_per_worker):
assert make_edges_set(edges) == make_edges_set(subgraph_edges)
session.close()

def pkscan_roundtrip(num_workers, threads_per_worker):
logger.info(
"testing pkscan with %d workers and %d threads per worker",
num_workers,
threads_per_worker,
)

query1 = "g.V().hasLabel('person').has('id', 1)"
query2 = "g.V().hasLabel('person','software').has('id', 1)"
session = graphscope.session(cluster_type="hosts", num_workers=num_workers)

g0 = load_modern_graph(session)
interactive0 = session.gremlin(g0)
query1_res = interactive0.execute(query1).all().result()
query2_res = interactive0.execute(query2).all().result()
logger.info("query1_res = %s", query1_res)
logger.info("query2_res = %s", query2_res)
assert len(query1_res) == 1
assert len(query2_res) == 1
session.close()

with vineyard.envvars(
{
"RUST_LOG": "debug",
"THREADS_PER_WORKER": "%d" % (threads_per_worker,),
"PARALLEL_INTERACTIVE_EXECUTOR_ON_VINEYARD": parallel_executors,
}
):
subgraph_roundtrip(num_workers, threads_per_worker)
pkscan_roundtrip(num_workers, threads_per_worker)
subgraph_roundtrip_and_pk_scan(num_workers, threads_per_worker)
4 changes: 1 addition & 3 deletions python/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@ PyYAML
rich
tqdm
click
vineyard==0.15.0;sys_platform!="win32"
vineyard-io==0.15.0;sys_platform!="win32"

vineyard>=0.16.1;sys_platform!="win32"
4 changes: 2 additions & 2 deletions scripts/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ readonly GREEN="\033[0;32m"
readonly NC="\033[0m" # No Color

readonly GRAPE_BRANCH="master" # libgrape-lite branch
readonly V6D_VERSION="0.15.0" # vineyard version
readonly V6D_BRANCH="v0.15.0" # vineyard branch
readonly V6D_VERSION="0.16.1" # vineyard version
readonly V6D_BRANCH="v0.16.1" # vineyard branch

readonly OUTPUT_ENV_FILE="${HOME}/.graphscope_env"
IS_IN_WSL=false && [[ ! -z "${IS_WSL}" || ! -z "${WSL_DISTRO_NAME}" ]] && IS_IN_WSL=true
Expand Down

0 comments on commit 4f39ca6

Please sign in to comment.