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

fixed github-pages doc #148

Merged
merged 1 commit into from
Sep 1, 2022
Merged
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
26 changes: 17 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,22 @@ nebula-storaged-0 1/1 Running 0 1m
nebula-storaged-1 1/1 Running 0 1m
nebula-storaged-2 1/1 Running 0 1m
```

See [client service](doc/user/client_service.md) for how to access nebula clusters created by the operator.
If you are working with [kubeadm locally](https://kubernetes.io/docs/reference/setup-tools/kubeadm/), create a nodePort service and test that nebula is responding:
```shell script

```bash
$ kubectl create -f config/samples/graphd-nodeport-service.yaml

# nebula-console -u user -p password --address=192.168.8.26 --port=32236
$ nebula-console -u user -p password --address=192.168.8.26 --port=32236
2021/04/15 16:50:23 [INFO] connection pool is initialized successfully

Welcome to NebulaGraph!
(user@nebula) [(none)]>
(user@nebula) [(none)]>
```

Destroy the nebula cluster:
Destroy the nebula cluster:

```bash
$ kubectl delete -f config/samples/apps_v1alpha1_nebulacluster.yaml
```
Expand All @@ -53,6 +56,7 @@ $ kubectl create -f config/samples/apps_v1alpha1_nebulacluster.yaml

In `config/samples/apps_v1alpha1_nebulacluster.yaml` the initial storaged replicas is 3.
Modify the file and change `replicas` from 3 to 5.

```yaml
storaged:
resources:
Expand All @@ -73,11 +77,13 @@ Modify the file and change `replicas` from 3 to 5.
```

Apply the replicas change to the cluster CR:
```

```bash
$ kubectl apply -f config/samples/apps_v1alpha1_nebulacluster.yaml
```

The storaged cluster will scale to 5 members (5 pods):

```bash
$ kubectl get pods -l app.kubernetes.io/cluster=nebula
NAME READY STATUS RESTARTS AGE
Expand All @@ -91,6 +97,7 @@ nebula-storaged-4 1/1 Running 0 5m
```

Similarly we can decrease the size of the cluster from 5 back to 3 by changing the replicas field again and reapplying the change.

```yaml
storaged:
resources:
Expand Down Expand Up @@ -140,7 +147,7 @@ nebula-storaged-2 1/1 Running 0 25m

The container image version should be v3.0.0:

```
```bash
$ kubectl get pods -l app.kubernetes.io/cluster=nebula -o jsonpath="{.items[*].spec.containers[*].image}" |tr -s '[[:space:]]' '\n' |sort |uniq -c
1 vesoft/nebula-graphd:v3.0.0
1 vesoft/nebula-metad:v3.0.0
Expand All @@ -151,23 +158,24 @@ Now modify the file `apps_v1alpha1_nebulacluster.yaml` and change the `version`

Apply the version change to the cluster CR:

```
```bash
$ kubectl apply -f config/samples/apps_v1alpha1_nebulacluster.yaml
```

Wait 2 minutes. The container image version should be updated to v3.1.0:

```
```bash
$ kubectl get pods -l app.kubernetes.io/cluster=nebula -o jsonpath="{.items[*].spec.containers[*].image}" |tr -s '[[:space:]]' '\n' |sort |uniq -c
1 vesoft/nebula-graphd:v3.1.0
1 vesoft/nebula-metad:v3.1.0
3 vesoft/nebula-storaged:v3.1.0
```

### Failover
If the minority of nebula components crash, the nebula operator will automatically recover the failure. Let's walk through this in the following steps.
If the minority of nebula components crash, the nebula operator will automatically recover the failure. Let's walk through this in the following steps.

Create a nebula cluster:

```bash
$ kubectl create -f config/samples/apps_v1alpha1_nebulacluster.yaml
```
Expand Down