|
| 1 | +# Tarantool Data Grid |
| 2 | + |
| 3 | +This folder contains example on how to run [Tarantool Data Grid](https://www.tarantool.io/en/datagrid/) |
| 4 | +on Kubernetes. |
| 5 | + |
| 6 | +## Requirements |
| 7 | + |
| 8 | +To run this example you will need: |
| 9 | + |
| 10 | +- [helm](https://helm.sh/docs/intro/install/) |
| 11 | +- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) |
| 12 | +- Tarantool Data Grid docker image |
| 13 | + |
| 14 | +## Running example |
| 15 | + |
| 16 | +1. Install Tarantool Helm repo: |
| 17 | + |
| 18 | + ```shell |
| 19 | + $ helm repo add tarantool https://tarantool.github.io/tarantool-operator |
| 20 | + ``` |
| 21 | + |
| 22 | +2. Install Tarantool Kubernetes Operator: |
| 23 | + |
| 24 | + ```shell |
| 25 | + $ helm install --set namespace=tarantool tarantool-operator tarantool/tarantool-operator --namespace tarantool --create-namespace --version 0.0.6 |
| 26 | + --- |
| 27 | + NAME: tarantool-operator |
| 28 | + NAMESPACE: tarantool |
| 29 | + STATUS: deployed |
| 30 | + TEST SUITE: None |
| 31 | + ``` |
| 32 | + |
| 33 | + wait for Operator to become Running: |
| 34 | + |
| 35 | + ```shell |
| 36 | + $ kubeclt -n tarantool get pods -w |
| 37 | + --- |
| 38 | + NAME READY STATUS RESTARTS AGE |
| 39 | + tarantool-operator-xxx-yyy 1/1 Running 0 3s |
| 40 | + ``` |
| 41 | + |
| 42 | +3. Get Tarantool Data Grid image: |
| 43 | + |
| 44 | + - go to [tarantool.io](https://tarantool.io) |
| 45 | + |
| 46 | + - authorize via "Sign In" |
| 47 | + |
| 48 | + - then go to "Customer zone" > "tdg" |
| 49 | + |
| 50 | + - download archive with docker image, this example tested on tdg-1.6.8-xxxxxxx.docker-image.tar.gz |
| 51 | + |
| 52 | + - import image from archive: |
| 53 | + |
| 54 | + ```shell |
| 55 | + $ docker image load -i tdg-1.6.8-xxxxxxx.docker-image.tar.gz |
| 56 | + --- |
| 57 | + Loaded image ID: sha256:b6206567xxxxxxxxxxxxxx |
| 58 | + ``` |
| 59 | + |
| 60 | + - tag loaded image: |
| 61 | + |
| 62 | + ```shell |
| 63 | + $ docker tag b6206567xxxxxxxxxxxxxx tdg:1.6.8 |
| 64 | + ``` |
| 65 | + |
| 66 | + - make image available to k8s nodes: |
| 67 | + |
| 68 | + - push image to your registry, so k8s will be able to download it |
| 69 | + |
| 70 | + - manually upload image to each node |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | +4. Take ```values.yaml``` from this folder, change `image.repository` and `image.tag` to point to tdg image and install it with helm: |
| 75 | + |
| 76 | + ```shell |
| 77 | + $ helm install -f values.yaml tdg-app tarantool/cartridge --namespace tarantool --version 0.0.6 |
| 78 | + --- |
| 79 | + NAME: tdg-app |
| 80 | + NAMESPACE: tarantool |
| 81 | + STATUS: deployed |
| 82 | + TEST SUITE: None |
| 83 | + ``` |
| 84 | + |
| 85 | +Wait until pods up and cluster is ready. |
| 86 | + |
| 87 | +5. Access TDG web ui: |
| 88 | + |
| 89 | + ```shell |
| 90 | + kubectl -n tarantool port-forward service/routers 8081:8081 |
| 91 | + --- |
| 92 | + Forwarding from 127.0.0.1:8081 -> 8081 |
| 93 | + Forwarding from [::1]:8081 -> 8081 |
| 94 | + ... |
| 95 | + ``` |
| 96 | + |
| 97 | + Now you should be able to navigate to 127.0.0.1:8081 with your browser and access tdg web ui. |
| 98 | + |
| 99 | +Now you should have running Tarantool Data Grid cluster. |
| 100 | + |
| 101 | +Proceed to our [TDG examples](https://github.com/tarantool/examples/tree/master/tdg) repository to start using cluster. |
0 commit comments