GraphScope cluster deployment

GraphScope cluster deployment

1 k8s cluster construction

The general steps are as follows:

  1. Install docker. On ubuntu, you can simply install it with the command sudo apt install docker.io.
  2. Install kubelet, kubedm, kubectl. Since foreign sources cannot be accessed, you may need to add images, such as:
tee /etc/apt/sources.list <<-'EOF'
deb https://mirrors.aliyun.com/kubernetes/apt kubernetes-xenial main
EOF
  1. Install the network plug-in. Such as Calico.

The above process can be referred to http://docs.tianshu.org.cn/docs/setup/deploy-kubernetes-cluster . One click script rapid deployment (applicable to Ubuntu 16.04 and Ubuntu 18.04) is provided in the document https://pan.baidu.com/s/1c89VAq_1qPBf_5URqSkBdw Extraction code wpwb acquisition.
After acquisition

unzip dubheDeployScriptfile.zip
cd dubheDeployScriptfile/k8s1.16.2-ubuntu/

Configure base.config

# IP address of master node
masterip="172.16.123.1"

# Filter IP segment, which is used to filter the IP address of the server
ip_segment="172.16.123"

# k8s version
k8s_version="v1.16.2"

# Root user password, please set k8s the root user password of all servers in the cluster as the unified password
root_passwd="abcdefghijklmn"

# ip addresses of all nodes in the cluster. How many are there
hostip=(
172.16.123.1
172.16.123.2
172.16.123.3
)
#The following two items will be generated automatically without filling in!
tocken=
sha_value=

Then run

bash k8s1.16.2.sh

The operation mode is basically as described in the document, and there are two points to note:

  1. Open the root access permission of SSH on non primary nodes and configure the password in base.config. This step mainly copies apt-key.gpg base.config node_install_k8s.sh del_kube.sh ssh_trust_init.exp ssh_trust_add.exp to the worker node. If there are other ways to copy, it can also be ignored. In this step, the cluster of the master node is basically deployed successfully. B The token and sha_value of the master node are saved in ase.config. These two values are very important for the worker node to join the cluster. The value examples are as follows:
token=s52vwv.gdx1qymhrdx8v5uq
sha_value=88c78df7457c1f74e065fbedd9ddee967cc4a4e4dd003e69f9d64374e3e5d903
  1. If the script is run multiple times, the token and sha_value in base.config will be concatenated repeatedly. At this time, the master node cannot be joined when running in the worker node. Each time the script is re run, the token and sha_value in base.config should be cleared. Even if the script is concatenated, it can be recognized. It is only necessary to join manually. The token and sha_value of the current master node should be the first 23 digits respectively (separated by a dot) And the first 64 bits.

If a new machine is added and the environment has been configured (just run the script nodenode_install_k8s.sh), you can simply join the cluster with the following command:

kubeadm join 172.16.125.100:6443 --token 8urlva.75zrerl6uctfenec \
    --discovery-token-ca-cert-hash sha256:c462c05da6c3685a334b1b1743d4d9b30a38b78208c338f03f5e7d67befaf8bb

Note that both token and sha256 should be replaced with the corresponding token and sha256 of the master node.

2. Pull the graphscope image

The official installation tutorial provided by graphscope is not explained, but it is reflected in its one click installation script (this script is not easy to use, and the installation has not been successful in the personal test). This mainly affects the time when graphscope creates a session, such as

import graphscope
graphscope.set_option(show_log=True)
sess = graphscope.session()

If you do not pull the image in advance, you will get stuck or make an error when creating a session, because by default, you will pull the docker image, which is large (8.39GB) and difficult to pull successfully under poor network conditions. Therefore, it is best to pull in advance:

docker pull registry.cn-hongkong.aliyuncs.com/graphscope/graphscope:0.8.0
docker pull quay.io/coreos/etcd:v3.4.13

0.8.0 is the installed version number of graphscope, which can be obtained by the command Python - C "import graphscope; print (graphscope. _version_).

If you are creating a virtual cluster with kind, run the following command:

kind load docker-image registry.cn-hongkong.aliyuncs.com/graphscope/graphscope:0.8.0
kind load docker-image quay.io/coreos/etcd:v3.4.13

Added by elangsru on Tue, 07 Dec 2021 01:54:55 +0200