Skip to content

Commit d206e00

Browse files
committed
doc: add description of failover setting in the Cartridge Kubernetes guide
1 parent b326b3b commit d206e00

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
### Added
1111
- Integration test for cluster_controller written with envtest and ginkgo
12+
- Description of failover setting in the Cartridge Kubernetes guide
1213

1314
### Changed
1415
- Requested verbs for a RBAC role Tarantool: remove all * verbs and resources

doc/cartridge_kubernetes_guide/index.rst

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,83 @@ If you need to remove the Tarantool Kubernetes operator, execute:
699699
persistentvolumeclaim "www-routers-1-0" deleted
700700
persistentvolumeclaim "www-storages-0-0" deleted
701701
702+
703+
.. _cartridge_kubernetes_cluster_management_failover:
704+
705+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
706+
Failover
707+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
708+
709+
Failover - replicaset leader selection mechanism. You can read more about it `here <https://www.tarantool.io/en/doc/latest/book/cartridge/topics/failover/>`_.
710+
711+
.. NOTE::
712+
713+
The ability to configure failover via kubernetes manifests will appear later
714+
715+
********************************************************************************
716+
Eventual mode
717+
********************************************************************************
718+
719+
Default mode. Uses SWIM protocol to detect failures.
720+
721+
********************************************************************************
722+
Stateful mode
723+
********************************************************************************
724+
725+
Uses external storage for coordination. To work, you need to enable a ``failover-coordinator`` role on several instances.
726+
727+
To do this, add the role in *values.yml* to the description of the replicasets:
728+
729+
.. code-block:: yaml
730+
731+
RoleConfig:
732+
...
733+
- RoleName: storage
734+
ReplicaCount: 1
735+
ReplicaSetCount: 1
736+
DiskSize: 1Gi
737+
CPUallocation: 0.1
738+
MemtxMemoryMB: 256
739+
RolesToAssign:
740+
- vshard-storage
741+
- metrics
742+
- failover-coordinator # added role
743+
744+
.. NOTE::
745+
746+
Ability to update the roles is available in the Tarantool operator version later than 0.0.8
747+
748+
And run upgrading:
749+
750+
.. code-block:: console
751+
752+
$ helm upgrade -f values.yaml test-app tarantool/cartridge --namespace tarantool
753+
---
754+
Release "test-app" has been upgraded. Happy Helming!
755+
NAME: test-app
756+
LAST DEPLOYED: Wed Feb 3 14:40:34 2021
757+
NAMESPACE: tarantool
758+
STATUS: deployed
759+
REVISION: 2
760+
761+
After we have at least one active role ``failover-coordinator``, we can enable stateful mode. It has two state providers: etcd and stateboard.
762+
763+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
764+
etcd
765+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
766+
767+
The etcd cluster is deployed independently, if you don't have it - the easiest way to install etcd is `etcd-operator <https://github.com/helm/charts/tree/master/stable/etcd-operator>`_ with helm chart.
768+
769+
We'll need a list of available etc cluster IP`s, the prefix for storage keys and credentials (user name and password).
770+
771+
How to set up stateful failover can be found on the documentation `page <https://www.tarantool.io/en/doc/latest/book/cartridge/topics/failover/#failover-configuration>`_.
772+
773+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
774+
Stateboard
775+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
776+
777+
How to install a stateboard can be found on this documentation `page <https://www.tarantool.io/en/doc/latest/book/cartridge/topics/failover/#stateboard-configuration>`_.
778+
702779
.. _cartridge_kubernetes_troubleshooting:
703780

704781
--------------------------------------------------------------------------------

0 commit comments

Comments
 (0)