{"id":297398,"date":"2020-01-20T15:00:21","date_gmt":"2020-01-20T15:00:21","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=297398"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-01-20T15:00:21","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=297398","title":{"rendered":"\u041b\u0435\u0433\u043a\u043e \u0438 \u043d\u0435\u043f\u0440\u0438\u043d\u0443\u0436\u0434\u0435\u043d\u043d\u043e \u0434\u0435\u043f\u043b\u043e\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 Tarantool Cartridge (\u0447\u0430\u0441\u0442\u044c 2)"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/mailru\/blog\/484192\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yc\/gm\/xx\/ycgmxxaqlvyslsrzoo6jnv1vmx0.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b <a href=\"https:\/\/habr.com\/ru\/company\/mailru\/blog\/478710\/\">\u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438<\/a> \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 <a href=\"https:\/\/habr.com\/ru\/company\/mailru\/blog\/465503\/\">Tarantool Cartridge<\/a>. \u041d\u043e \u043d\u0430 \u0434\u0435\u043f\u043b\u043e\u0435 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044f \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043e\u0431\u043d\u043e\u0432\u0438\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0435\u0439, \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0440\u043e\u043b\u0435\u0439.<\/p>\n<p>  <\/p>\n<p>\u041b\u044e\u0431\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442!<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"na-chem-my-ostanovilis\">\u041d\u0430 \u0447\u0435\u043c \u043c\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438\u0441\u044c<\/h2>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044e:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sw\/0z\/gm\/sw0zgm53me7ft63db8lxrswcxvw.png\"><\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/dokshina\/deploy-tarantool-cartridge-app\">\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a> \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0443\u0441\u043f\u0435\u043b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f, \u0442\u0430\u043c \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043d\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, <code>getting-started-app-2.0.0-0.rpm<\/code> \u0438 <code>hosts.updated.2.yml<\/code>. \u0412\u0430\u043c \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0443\u043b\u043b\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u043f\u0430\u043a\u0435\u0442 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e <a href=\"https:\/\/github.com\/dokshina\/deploy-tarantool-cartridge-app\/blob\/2.0.0\/getting-started-app-2.0.0-0.rpm\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a>, \u0430 <code>hosts.updated.2.yml<\/code> \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0443\u0434\u0430 \u043f\u0440\u0438 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0435\u043d\u0438\u044f\u0445 \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e inventory.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043b\u0438 \u0432\u0441\u0435 \u0448\u0430\u0433\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u044d\u0442\u043e\u0433\u043e \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430, \u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0443 \u0432\u0430\u0441 \u0432 \u0444\u0430\u0439\u043b\u0438\u043a\u0435 <code>hosts.yml<\/code> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0441 \u0434\u0432\u0443\u043c\u044f <code>storage<\/code>-\u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442\u0430\u043c\u0438 (\u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u044d\u0442\u043e <code>hosts.updated.yml<\/code>).<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u043d\u0430\u0448\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ vagrant up<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Ansible-\u0440\u043e\u043b\u0438 Tarantool Cartridge (\u043e\u043d\u0430 \u0443\u0441\u043f\u0435\u043b\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0432 \u043b\u0443\u0447\u0448\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443):<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ ansible-galaxy install tarantool.cartridge,1.0.2<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">--- all:   vars:     # common cluster variables     cartridge_app_name: getting-started-app     cartridge_package_path: .\/getting-started-app-1.0.0-0.rpm  # path to package      cartridge_cluster_cookie: app-default-cookie  # cluster cookie      # common ssh options     ansible_ssh_private_key_file: ~\/.vagrant.d\/insecure_private_key     ansible_ssh_common_args: '-o IdentitiesOnly=yes -o UserKnownHostsFile=\/dev\/null -o StrictHostKeyChecking=no'    # INSTANCES   hosts:     storage-1:       config:         advertise_uri: '172.19.0.2:3301'         http_port: 8181      app-1:       config:         advertise_uri: '172.19.0.3:3301'         http_port: 8182      storage-1-replica:       config:         advertise_uri: '172.19.0.3:3302'         http_port: 8183      storage-2:       config:         advertise_uri: '172.19.0.3:3303'         http_port: 8184      storage-2-replica:       config:         advertise_uri: '172.19.0.2:3302'         http_port: 8185    children:     # GROUP INSTANCES BY MACHINES     host1:       vars:         # first machine connection options         ansible_host: 172.19.0.2         ansible_user: vagrant        hosts:  # instances to be started on the first machine         storage-1:         storage-2-replica:      host2:       vars:         # second machine connection options         ansible_host: 172.19.0.3         ansible_user: vagrant        hosts:  # instances to be started on the second machine         app-1:         storage-1-replica:         storage-2:      # GROUP INSTANCES BY REPLICA SETS     replicaset_app_1:       vars:  # replica set configuration         replicaset_alias: app-1         failover_priority:           - app-1  # leader         roles:           - 'api'        hosts:  # replica set instances         app-1:      replicaset_storage_1:       vars:  # replica set configuration         replicaset_alias: storage-1         weight: 3         failover_priority:           - storage-1  # leader           - storage-1-replica         roles:           - 'storage'        hosts:   # replica set instances         storage-1:         storage-1-replica:      replicaset_storage_2:       vars:  # replicaset configuration         replicaset_alias: storage-2         weight: 2         failover_priority:           - storage-2           - storage-2-replica         roles:           - 'storage'        hosts:   # replicaset instances         storage-2:         storage-2-replica:<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 <a href=\"http:\/\/localhost:8181\/admin\/cluster\/dashboard\">http:\/\/localhost:8181\/admin\/cluster\/dashboard<\/a> \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u0448 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u043a\u0430\u043a \u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437: \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0437\u0430 \u0442\u0435\u043c, \u043a\u0430\u043a \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440. \u0424\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0432\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <code>hosts.updated.2.yml<\/code><\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c!<\/p>\n<p>  <\/p>\n<h2 id=\"obnovlyaem-prilozhenie\">\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0444\u0430\u0439\u043b <code>getting-started-app-2.0.0-0.rpm<\/code> (\u0435\u0441\u043b\u0438 \u043d\u0435\u0442, <a href=\"https:\/\/github.com\/dokshina\/deploy-tarantool-cartridge-app\/blob\/2.0.0\/getting-started-app-2.0.0-0.rpm\">\u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435<\/a> \u0435\u0433\u043e \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f).<\/p>\n<p>  <\/p>\n<p>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0430\u043a\u0435\u0442\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">--- all:   vars:     cartridge_app_name: getting-started-app     cartridge_package_path: .\/getting-started-app-2.0.0-0.rpm  # &lt;==     cartridge_enable_tarantool_repo: false  # &lt;==<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 <code>cartridge_enable_tarantool_repo: false<\/code>, \u0447\u0442\u043e\u0431\u044b \u0440\u043e\u043b\u044c \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u043b\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043f\u0430\u043a\u0435\u0442\u043e\u043c Tarantool, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437. \u042d\u0442\u043e \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u0435\u043f\u043b\u043e\u044f, \u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u043b\u0435\u0439\u0431\u0443\u043a \u0441 \u0442\u0435\u0433\u043e\u043c <code>cartridge-instances<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ ansible-playbook -i hosts.yml playbook.yml \\                    --tags cartridge-instances<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u043f\u0430\u043a\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0441\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ vagrant ssh vm1 [vagrant@svm1 ~]$ sudo yum list installed | grep getting-started-app<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0432\u0435\u0440\u0441\u0438\u044f \u0441\u0442\u0430\u043b\u0430 <code>2.0.0<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">getting-started-app.x86_64          2.0.0-0            installed<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043b\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<h2 id=\"vklyuchaem-shardirovanie\">\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u043c \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c <code>storage<\/code>-\u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442\u0430\u043c\u0438. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0441\u0435\u043a\u0446\u0438\u044e <code>all.vars<\/code> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>cartridge_bootstrap_vshard<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">--- all:   vars:     ...     cartridge_cluster_cookie: app-default-cookie  # cluster cookie     cartridge_bootstrap_vshard: true  # &lt;==     ...   hosts:     ...   children:     ...<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ ansible-playbook -i hosts.yml playbook.yml \\                    --tags cartridge-config<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0442\u0435\u0433 <code>cartridge-config<\/code>, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<p>  <\/p>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c Web UI <a href=\"http:\/\/localhost:8181\/admin\/cluster\/dashboard\">http:\/\/localhost:8181\/admin\/cluster\/dashboard<\/a> \u0438 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u0448\u0438 \u0431\u0430\u043a\u0435\u0442\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c \u043f\u043e storage-\u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442\u0430\u043c \u0432 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 <code>2:3<\/code> (\u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0442\u0430\u043a\u0438\u0435 \u0432\u0435\u0441\u0430 \u043d\u0430\u0448\u0438\u043c \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442\u0430\u043c, \u043f\u043e\u043c\u043d\u0438\u0442\u0435?):<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/g_\/vd\/78\/g_vd787hpifhrlhk-jfs5sw8iu4.png\"><\/p>\n<p>  <\/p>\n<h2 id=\"vklyuchaem-avtomaticheskiy-failover\">\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 failover<\/h2>\n<p>  <\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u043c \u0440\u0435\u0436\u0438\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e failover-\u0430, \u0447\u0442\u043e\u0431\u044b \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u0438 \u043a\u0430\u043a \u043e\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u043b\u0430\u0433 <code>cartridge_failover<\/code> \u0432 \u043a\u043e\u043d\u0444\u0438\u0433:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">--- all:   vars:     ...     cartridge_cluster_cookie: app-default-cookie  # cluster cookie     cartridge_bootstrap_vshard: true     cartridge_failover: true  # &lt;==     ...   hosts:     ...   children:     ...<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043d\u043e\u0432\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ ansible-playbook -i hosts.yml playbook.yml \\                    --tags cartridge-config<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0439\u0442\u0438 \u0432 Web UI \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0441\u0432\u0438\u0442\u0447\u0435\u0440 <code>Failover<\/code> \u0432 \u043f\u0440\u0430\u0432\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0433\u043b\u0443 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u043b\u0441\u044f. \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e failover-\u0430, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0439\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>cartridge_failover<\/code> \u043d\u0430 <code>false<\/code> \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u043b\u0435\u0439\u0431\u0443\u043a \u0435\u0449\u0435 \u0440\u0430\u0437.<\/p>\n<p>  <\/p>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0436\u0435 \u044d\u0442\u043e \u0437\u0430 \u0440\u0435\u0436\u0438\u043c \u0442\u0430\u043a\u043e\u0439 \u0438 \u0437\u0430\u0447\u0435\u043c \u043c\u044b \u0435\u0433\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438.<\/p>\n<p>  <\/p>\n<h2 id=\"razbiraemsya-s-failover-om\">\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0441 failover-\u043e\u043c<\/h2>\n<p>  <\/p>\n<p>\u0412\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>failover_priority<\/code>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442\u0430. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0435.<\/p>\n<p>  <\/p>\n<p>Tarantool Cartridge \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0435\u0436\u0438\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043a\u0430\u0437\u0430 (failover). \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442\u0430 \u0435\u0441\u0442\u044c \u043b\u0438\u0434\u0435\u0440 \u2014 \u0438\u043d\u0441\u0442\u0430\u043d\u0441, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0435\u0434\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044c. \u0415\u0441\u043b\u0438 \u0441 \u043b\u0438\u0434\u0435\u0440\u043e\u043c \u0447\u0442\u043e-\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u043e\u0434\u043d\u0430 \u0438\u0437 \u0440\u0435\u043f\u043b\u0438\u043a \u0432\u043e\u0437\u044c\u043c\u0435\u0442 \u043d\u0430 \u0441\u0435\u0431\u044f \u0435\u0433\u043e \u0440\u043e\u043b\u044c. \u041a\u0430\u043a\u0430\u044f \u0438\u043c\u0435\u043d\u043d\u043e? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442 <code>storage-2<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">--- all:   ...   children:     ...     replicaset_storage_2:       vars:         ...         failover_priority:           - storage-2           - storage-2-replica<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u043d\u0441\u0442\u0430\u043d\u0441 <code>storage-2<\/code> \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u043c \u0432 <code>failover_priority<\/code>. \u0412 Web UI \u043e\u043d \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u043c \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442\u0430 \u0438 \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u0437\u0435\u043b\u0435\u043d\u043e\u0439 \u043a\u043e\u0440\u043e\u043d\u043e\u0439. \u042d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u043b\u0438\u0434\u0435\u0440 \u2014 \u043f\u0435\u0440\u0432\u044b\u0439 \u0438\u043d\u0441\u0442\u0430\u043d\u0441, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 <code>failover_priority<\/code>:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ge\/om\/bg\/geombgvhy6plfnrwpz0o8jqgnaw.png\"><\/p>\n<p>  <\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0441 \u043b\u0438\u0434\u0435\u0440\u043e\u043c \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442\u0430 \u0447\u0442\u043e-\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f. \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0443 \u0438 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0438\u043d\u0441\u0442\u0430\u043d\u0441 <code>storage-2<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ vagrant ssh vm2 [vagrant@vm2 ~]$ sudo systemctl stop getting-started-app@storage-2<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u0432 Web UI:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/iy\/b2\/ff\/iyb2ff_a6dryhg0nik8p48rhqhm.png\"><\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u0440\u043e\u043d\u0430 \u0443 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 <code>storage-2<\/code> \u0441\u0442\u0430\u043b\u0430 \u043a\u0440\u0430\u0441\u043d\u043e\u0439 \u2014 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u043b\u0438\u0434\u0435\u0440 \u043d\u0435\u0437\u0434\u043e\u0440\u043e\u0432. \u0410 \u0432\u043e\u0442 \u0443 <code>storage-2-replica<\/code> \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0437\u0435\u043b\u0435\u043d\u0430\u044f \u043a\u043e\u0440\u043e\u043d\u0430 \u2014 \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0432\u0437\u044f\u043b \u043d\u0430 \u0441\u0435\u0431\u044f \u043e\u0431\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u043b\u0438\u0434\u0435\u0440\u0430, \u043f\u043e\u043a\u0430 <code>storage-2<\/code> \u043d\u0435 \u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0440\u043e\u0439. \u042d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 failover \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0436\u0438\u0432\u0438\u043c <code>storage-2<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ vagrant ssh vm2 [vagrant@vm2 ~]$ sudo systemctl start getting-started-app@storage-2<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u0432\u0435\u0440\u043d\u0443\u043b\u043e\u0441\u044c \u043d\u0430 \u043a\u0440\u0443\u0433\u0438 \u0441\u0432\u043e\u044f:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ge\/om\/bg\/geombgvhy6plfnrwpz0o8jqgnaw.png\"><\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u0432 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0435 failover-\u0430. \u0418\u043d\u0441\u0442\u0430\u043d\u0441 <code>storage-2-replica<\/code> \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043b\u0438\u0434\u0435\u0440\u043e\u043c, \u0430 <code>storage-2<\/code> \u0443\u0431\u0435\u0440\u0435\u043c \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u043e\u043e\u0431\u0449\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">--- all:   vars:     ...   hosts:     ...   children:     ...     replicaset_storage_2:       vars:  # replicaset configuration         ...         failover_priority:           - storage-2-replica  # &lt;==         ...<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0437\u0430\u0434\u0430\u0447\u0438 <code>cartridge-replicasets<\/code> \u0434\u043b\u044f \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u0438\u0437 \u0433\u0440\u0443\u043f\u043f\u044b <code>replicaset_storage_2<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ ansible-playbook -i hosts.yml playbook.yml \\                    --limit replicaset_storage_2 \\                    --tags cartridge-replicasets<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0430 <a href=\"http:\/\/localhost:8181\/admin\/cluster\/dashboard\">http:\/\/localhost:8181\/admin\/cluster\/dashboard<\/a> \u0438 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043b\u0438\u0434\u0435\u0440 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/r_\/hq\/bm\/r_hqbmgxwbkvcycacj7pnotjhjc.png\"><\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u043c\u044b \u0436\u0435 \u0443\u0431\u0440\u0430\u043b\u0438 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 <code>storage-2<\/code> \u0438\u0437 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d \u0432\u0441\u0435 \u0435\u0449\u0435 \u0437\u0434\u0435\u0441\u044c? \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e Cartridge, \u043f\u043e\u043b\u0443\u0447\u0430\u044f \u043d\u0430 \u0432\u0445\u043e\u0434 \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>failover_priority<\/code> \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u0432\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u043b\u0438\u0434\u0435\u0440\u043e\u043c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u0439 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430, \u0434\u0430\u043b\u044c\u0448\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u044b. \u0418\u043d\u0441\u0442\u0430\u043d\u0441\u044b, \u043d\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0435 \u0432 <code>failover_priority<\/code> \u0431\u0443\u0434\u0443\u0442 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u044b \u043f\u043e UUID \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u043a\u043e\u043d\u0435\u0446.<\/p>\n<p>  <\/p>\n<h2 id=\"izgnanie-instansa\">\u0418\u0437\u0433\u043d\u0430\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430<\/h2>\n<p>  <\/p>\n<p>\u041d\u043e \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0438\u0437 \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0438? \u0412\u0441\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e: \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0435\u043c\u0443 \u0444\u043b\u0430\u0433 <code>expelled<\/code>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u043c \u0438\u043d\u0441\u0442\u0430\u043d\u0441 <code>storage-2-replica<\/code>. \u0421\u0435\u0439\u0447\u0430\u0441 \u043e\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u0434\u0435\u0440\u043e\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 Cartridge \u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442 \u043d\u0430\u043c \u044d\u0442\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u041d\u043e \u043c\u044b \u043d\u0435 \u0431\u043e\u0438\u043c\u0441\u044f \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0435\u0439, \u0438 \u0432\u0441\u0435 \u0436\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">--- all:   vars:     ...   hosts:     storage-2-replica:       config:         advertise_uri: '172.19.0.2:3302'         http_port: 8185       expelled: true  # &lt;==   ...<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u0435\u0433 <code>cartridge-replicasets<\/code>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0437\u0433\u043d\u0430\u043d\u0438\u0435 (expel) \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 \u2014 \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ ansible-playbook -i hosts.yml playbook.yml \\                    --limit replicaset_storage_2 \\                    --tags cartridge-replicasets<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u043b\u0435\u0439\u0431\u0443\u043a \u0438 \u0432\u0438\u0434\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hf\/wf\/tc\/hfwftcua4yyueyi0qgngr2mveia.png\"><\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0443\u0431\u0435\u0434\u0438\u043b\u0438\u0441\u044c, Cartridge \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c \u0438\u0437 \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043b\u0438\u0434\u0435\u0440\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442\u0430. \u042d\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f, \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u0434\u0435\u0440\u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0432\u043b\u0435\u0447\u0435\u0442 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u0442\u0435\u0440\u044e \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043b\u0438\u0434\u0435\u0440\u0430 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0430\u043d\u0441. \u0420\u043e\u043b\u044c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442 \u043d\u043e\u0432\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u0439\u043c\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u0435\u043d\u044f\u0435\u043c <code>failover_priority<\/code> \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u043b\u0435\u0439\u0431\u0443\u043a \u0435\u0449\u0435 \u0440\u0430\u0437:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">--- all:   vars:     ...   hosts:     ...   children:     ...     replicaset_storage_2:       vars:  # replicaset configuration         ...         failover_priority:           - storage-2 # &lt;==         ...<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">$ ansible-playbook -i hosts.yml playbook.yml \\                    --limit replicaset_storage_2 \\                    --tags cartridge-replicasets<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0443\u0430\u043b\u044f, \u0438\u043d\u0441\u0442\u0430\u043d\u0441 <code>storage-2-replica<\/code> \u0438\u0441\u0447\u0435\u0437 \u0438\u0437 \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0438!<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tl\/ao\/ue\/tlaoue_hclprc1i6tdjuil5efyk.png\"><\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0438\u0437\u0433\u043d\u0430\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0438 \u0431\u0435\u0437\u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043d\u043e\u0435. \u041f\u043e\u0441\u043b\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 \u0438\u0437 \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0438, \u043d\u0430\u0448\u0430 ansible-\u0440\u043e\u043b\u044c \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 systemd-\u0441\u0435\u0440\u0432\u0438\u0441 \u0438 \u0443\u0434\u0430\u043b\u0438\u0442 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_7\/bp\/nx\/_7bpnxxuydmfmddneontw1nxexi.png\"><\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u0434\u0440\u0443\u0433 \u043f\u0435\u0440\u0435\u0434\u0443\u043c\u0430\u043b\u0438 \u0438 \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442\u0443 <code>storage-2<\/code> \u0432\u0441\u0435 \u0436\u0435 \u043d\u0443\u0436\u0435\u043d \u0432\u0442\u043e\u0440\u043e\u0439 \u0438\u043d\u0441\u0442\u0430\u043d\u0441, \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f. Cartridge \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 UUID \u0432\u0441\u0435\u0445 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432, \u043f\u043e\u043a\u0438\u043d\u0443\u0432\u0448\u0438\u0445 \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044e, \u0438 \u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442 \u0438\u0437\u0433\u043d\u0430\u043d\u043d\u0438\u043a\u0443 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439, \u043d\u043e UUID \u0443 \u043d\u0435\u0433\u043e, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0431\u0443\u0434\u0435\u0442 \u0434\u0440\u0443\u0433\u043e\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 Cartridge \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442 \u0435\u043c\u0443 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f.<\/p>\n<p>  <\/p>\n<h2 id=\"udalenie-replikaseta\">\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442\u0430<\/h2>\n<p>  <\/p>\n<p>\u041c\u044b \u0443\u0436\u0435 \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u0438, \u0447\u0442\u043e \u0438\u0437\u0433\u043d\u0430\u0442\u044c \u043b\u0438\u0434\u0435\u0440\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442\u0430 \u043d\u0430\u043c \u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0442. \u041d\u043e \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043c\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u043c \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442 <code>storage-2<\/code> \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e? \u0412\u044b\u0445\u043e\u0434, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0435\u0441\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u0431\u0430\u043a\u0435\u0442\u044b \u0432 <code>storage-1<\/code>, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0432\u0435\u0441 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442\u0430 <code>storage-2<\/code> \u0440\u0430\u0432\u043d\u044b\u043c <code>0<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">--- all:   vars:     ...   hosts:     ...   children:     ...     replicaset_storage_2:       vars:  # replicaset configuration         replicaset_alias: storage-2         weight: 0  # &lt;==         ...   ...<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0435\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ ansible-playbook -i hosts.yml playbook.yml \\                    --limit replicaset_storage_2 \\                    --tags cartridge-replicasets<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c Web UI <a href=\"http:\/\/localhost:8181\/admin\/cluster\/dashboard\">http:\/\/localhost:8181\/admin\/cluster\/dashboard<\/a> \u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c, \u043a\u0430\u043a \u0432\u0441\u0435 \u0431\u0430\u043a\u0435\u0442\u044b \u043f\u0435\u0440\u0435\u0442\u0435\u043a\u0430\u044e\u0442 \u0432 <code>storage-1<\/code>:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/nk\/mo\/fq\/nkmofqnvvoccqfqkyz1myryu4-s.png\"><\/p>\n<p>  <\/p>\n<p>\u0412\u044b\u0441\u0442\u0430\u0432\u0438\u043c \u043b\u0438\u0434\u0435\u0440\u0443 <code>storage-2<\/code> \u0444\u043b\u0430\u0433 <code>expelled<\/code> \u0438 \u043f\u043e\u043f\u0440\u043e\u0449\u0430\u0435\u043c\u0441\u044f \u0441 \u044d\u0442\u0438\u043c \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">--- all:   vars:     ...   hosts:     ...     storage-2:       config:         advertise_uri: '172.19.0.3:3303'         http_port: 8184       expelled: true  # &lt;==   ...<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">$ ansible-playbook -i hosts.yml playbook.yml \\                    --tags cartridge-replicasets<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043c\u044b \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u043e\u043f\u0446\u0438\u044e <code>limit<\/code>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0438\u0437 \u0432\u0441\u0435\u0445, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u043f\u043b\u0435\u0439\u0431\u0443\u043a, \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043d\u0435 \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043a\u0430\u043a <code>expelled<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u043c\u044b \u0438 \u0432\u0435\u0440\u043d\u0443\u043b\u0438\u0441\u044c \u043a \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0438:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/70\/zo\/vq\/70zovqqaeiph6v1bjoenzl_hn1w.png\"><\/p>\n<p>  <\/p>\n<h2 id=\"avtorizaciya\">\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043e\u0442\u0432\u043b\u0435\u0447\u044c\u0441\u044f \u043e\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0441\u0435\u0442\u0430\u043c\u0438 \u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u0421\u0435\u0439\u0447\u0430\u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u0447\u0435\u0440\u0435\u0437 Web UI \u043c\u043e\u0436\u0435\u0442 \u043b\u044e\u0431\u043e\u0439 \u043d\u0435\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. \u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0435\u0441\u044c, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a \u0441\u0435\u0431\u0435.<\/p>\n<p>  <\/p>\n<p>Cartridge \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 LDAP (\u0438\u043b\u0438 \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0442\u0430\u043c), \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438 \u0438\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e. \u041d\u043e \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 Cartridge \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u042d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 (\u0443\u0434\u0430\u043b\u044f\u0442\u044c, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c, \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c) \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0430\u0440\u043e\u043b\u044f.<br \/>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043d\u0430\u0448\u0430 ansible-\u0440\u043e\u043b\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0431\u044d\u043a\u0435\u043d\u0434\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043e\u0442 \u0442\u0435\u043e\u0440\u0438\u0438 \u043a \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439, \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0435\u0441\u0441\u0438\u0438 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">--- all:   vars:     ...      # authorization     cartridge_auth:  # &lt;==       enabled: true   # enable authorization       cookie_max_age: 1000       cookie_renew_age: 100        users:  # cartridge users to set up         - username: dokshina           password: cartridge-rullez           fullname: Elizaveta Dokshina           email: dokshina@example.com           # deleted: true  # uncomment to delete user     ...<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0437\u0430\u0434\u0430\u0447 <code>cartridge-config<\/code>, \u0443\u043a\u0430\u0436\u0435\u043c \u044d\u0442\u043e\u0442 \u0442\u0435\u0433:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ ansible-playbook -i hosts.yml playbook.yml \\                    --tags cartridge-config<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430 <a href=\"http:\/\/localhost:8181\/admin\/cluster\/dashboard\">http:\/\/localhost:8181\/admin\/cluster\/dashboard<\/a> \u043d\u0430\u0441 \u0436\u0434\u0435\u0442 \u0441\u044e\u0440\u043f\u0440\u0438\u0437:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/a2\/t8\/pq\/a2t8pqil4sxnosey38i-baf3q1k.png\"><\/p>\n<p>  <\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0441 <code>username<\/code> \u0438 <code>password<\/code> \u043d\u0430\u0448\u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u043b\u0438 \u0432\u043e\u0439\u0442\u0438 \u043a\u0430\u043a <code>admin<\/code> \u2014 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0415\u0433\u043e \u043f\u0430\u0440\u043e\u043b\u044c \u2014 \u044d\u0442\u043e cluster cookie, \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>cartridge_cluster_cookie<\/code> (\u044d\u0442\u043e <code>app-default-cookie<\/code>, \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u043f\u043e\u0434\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c).<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043b\u043e\u0433\u0438\u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <code>Users<\/code>, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u0443\u0434\u0430\u0447\u043d\u043e:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/af\/h_\/9o\/afh_9ofcv7htwplfgomnxejosxo.png\"><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u0427\u0442\u043e\u0431\u044b \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0444\u043b\u0430\u0433 <code>deleted: true<\/code>. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>email<\/code> \u0438 <code>fullname<\/code> \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f Cartridge, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u0445 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430.<\/p>\n<p>  <\/p>\n<h2 id=\"konfiguraciya-prilozheniya\">\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h2>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0441 \u0447\u0435\u0433\u043e \u0432\u0441\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u043e\u0441\u044c.<\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u0441 \u0432\u0430\u043c\u0438 \u0434\u0435\u043f\u043b\u043e\u0438\u043b\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u0445 \u0438 \u0438\u0445 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0445 \u0441\u0447\u0435\u0442\u0430\u0445. \u041a\u0430\u043a \u0432\u044b \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0443 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b 2 \u0440\u043e\u043b\u0438: <code>api<\/code> \u0438 <code>storage<\/code>. \u0420\u043e\u043b\u044c <code>storage<\/code> \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0440\u043e\u043b\u0438 <code>vshard-storage<\/code>. \u0412\u0442\u043e\u0440\u0430\u044f \u0440\u043e\u043b\u044c, <code>api<\/code>, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 HTTP-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 API \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043f\u043b\u044e\u0441 \u0432\u043d\u0443\u0442\u0440\u0438 \u0443 \u043d\u0435\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0440\u043e\u043b\u044c, <code>vshard-router<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a API \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ curl -X POST -H &quot;Content-Type: application\/json&quot; \\                -d '{&quot;customer_id&quot;:1, &quot;name&quot;:&quot;Elizaveta&quot;, &quot;accounts&quot;:[{&quot;account_id&quot;: 1}]}' \\                http:\/\/localhost:8182\/storage\/customers\/create<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043e\u0442\u0432\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u0442\u0430\u043a\u043e\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">{&quot;info&quot;:&quot;Successfully created&quot;}<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 URL \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u043f\u043e\u0440\u0442 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430 <code>app-1<\/code>, <code>8082<\/code>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0439 API.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u043c \u0431\u0430\u043b\u0430\u043d\u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ curl -X POST -H &quot;Content-Type: application\/json&quot; \\                -d '{&quot;account_id&quot;: 1, &quot;amount&quot;: ^_^quot&#1000;quot^_^}' \\                http:\/\/localhost:8182\/storage\/customers\/1\/update_balance<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043e\u0442\u0432\u0435\u0442\u0435 \u0432\u0438\u0434\u0438\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0431\u0430\u043b\u0430\u043d\u0441:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">{&quot;balance&quot;:&quot;1000.00&quot;}<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442! API \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d, \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f Cartridge, failover priority \u043d\u0430 \u044d\u043a\u0441\u0442\u0440\u0435\u043d\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u043c\u044b \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0438 \u0434\u0430\u0436\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438. \u0421\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u0444\u0438\u0433-\u0444\u0430\u0439\u043b\u0435. \u041a\u0430\u0436\u0434\u044b\u0439 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0445\u0440\u0430\u043d\u0438\u0442 \u0443 \u0441\u0435\u0431\u044f \u043a\u043e\u043f\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u0430 Cartridge \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u0440\u0435\u0434\u0438 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0440\u043e\u043b\u0435\u0439 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 Cartridge \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u0442\u0441\u044f \u043e \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043f\u043e \u0432\u0441\u0435\u043c \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430\u043c.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <code>Cofiguration files<\/code> \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 <code>Download<\/code>:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wx\/xw\/vc\/wxxwvcdusefetrgyaxpnnrvxwya.png\"><\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u043a\u0430\u0447\u0435\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0438\u043a\u0435 <code>config.yml<\/code> \u043c\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043c \u043f\u0443\u0441\u0442\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443. \u041d\u0438\u0447\u0435\u0433\u043e \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e, \u0432\u0435\u0434\u044c \u043c\u044b \u0435\u0449\u0435 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">--- [] ...<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043a\u043e\u043d\u0444\u0438\u0433-\u0444\u0430\u0439\u043b \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043d\u0435 \u043f\u0443\u0441\u0442\u043e\u0439, \u0432 \u043d\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044f, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u043e Cartridge \u043d\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439, \u043e\u043d\u0430 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0441\u043a\u0440\u044b\u0442\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0441\u0435\u043a\u0446\u0438\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0441 \u0432\u0430\u043c\u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u0440\u043e\u043b\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0446\u0438\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u043e\u0432\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0434\u0432\u0430 \u044d\u0442\u0430\u043f\u0430: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0441\u0435 \u0440\u043e\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442, \u0447\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u0415\u0441\u043b\u0438 \u0432\u043e\u0437\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0435\u0442, \u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u0442\u0438\u0432, \u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0442\u043a\u0430\u0442.<\/p>\n<p>  <\/p>\n<p>\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e. \u0420\u043e\u043b\u044c <code>api<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0435\u043a\u0446\u0438\u044e <code>max-balance<\/code>, \u0433\u0434\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u0431\u0430\u043b\u0430\u043d\u0441 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u044d\u0442\u0443 \u0441\u0435\u043a\u0446\u0438\u044e, \u043d\u043e, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043d\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u0448\u0435\u0439 Ansible-\u0440\u043e\u043b\u0438.<\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0441\u0435\u0439\u0447\u0430\u0441 \u043a\u043e\u043d\u0444\u0438\u0433 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u0442\u043e\u0447\u043d\u0435\u0435 \u0435\u0433\u043e \u0447\u0430\u0441\u0442\u044c, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f \u043d\u0430\u043c) \u044d\u0442\u043e \u043f\u0443\u0441\u0442\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0435\u0433\u043e \u0441\u0435\u043a\u0446\u0438\u044e <code>max-balance<\/code> \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <code>100000<\/code>. \u041f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>cartridge_app_config<\/code> \u0432 \u043d\u0430\u0448 inventory-\u0444\u0430\u0439\u043b:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">--- all:   vars:     ...     # cluster-wide config     cartridge_app_config:  # &lt;==       max-balance:  # section name         body: 1000000  # section body         # deleted: true  # uncomment to delete section max-balance     ...<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0438\u043c\u044f \u0441\u0435\u043a\u0446\u0438\u0438, <code>max-balance<\/code>, \u0438 \u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, <code>body<\/code>. \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0441\u0435\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0441\u043b\u043e\u043c, \u044d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0438\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0440\u043e\u043b\u044c, \u0438 \u043a\u0430\u043a\u043e\u0439 \u0442\u0438\u043f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ ansible-playbook -i hosts.yml playbook.yml \\                    --tags cartridge-config<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u0431\u0430\u043b\u0430\u043d\u0441 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ curl -X POST -H &quot;Content-Type: application\/json&quot; \\                -d '{&quot;account_id&quot;: 1, &quot;amount&quot;: ^_^quot&#1000001;quot^_^}' \\                http:\/\/localhost:8182\/storage\/customers\/1\/update_balance<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043e\u0442\u0432\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u043a\u0430\u043a \u043c\u044b \u0438 \u0445\u043e\u0442\u0435\u043b\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">{&quot;info&quot;:&quot;Error&quot;,&quot;error&quot;:&quot;Maximum is 1000000&quot;}<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043d\u043e\u0432\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 <code>Configuraion files<\/code>, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0442\u0430\u043c \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043d\u043e\u0432\u0430\u044f \u0441\u0435\u043a\u0446\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">--- max-balance: 1000000 ...<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0435 \u0441\u0435\u043a\u0446\u0438\u0438, \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0438\u043b\u0438 \u0432\u043e\u0432\u0441\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c (\u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 \u0444\u043b\u0430\u0433 <code>deleted: true<\/code>).<\/p>\n<p>  <\/p>\n<p>\u041e \u0442\u043e\u043c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 \u0432 \u0440\u043e\u043b\u044f\u0445, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0432 <a href=\"https:\/\/www.tarantool.io\/ru\/rocks\/cartridge\/1.0\/modules\/cartridge.clusterwide-config\/\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a> Tarantool Cartridge.<\/p>\n<p>  <\/p>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0432\u044b\u0437\u0432\u0430\u0442\u044c <code>vagrant halt<\/code>, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0435 \u0441 \u043d\u0438\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<h2 id=\"v-zaklyuchenie\">\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u043c\u044b \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 Tarantool Cartridge-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 Ansible-\u0440\u043e\u043b\u0438. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0441\u0432\u043e\u0438\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0435\u0439, \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u041d\u0435 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u043e\u043c, \u0438\u0437\u0443\u0447\u0430\u0439\u0442\u0435 <a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/user_guide\/playbooks_best_practices.html\">\u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b<\/a> \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e Ansible-\u043f\u043b\u0435\u0439\u0431\u0443\u043a\u043e\u0432 \u0438 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u0432\u043e\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043e\u043c.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u043b\u0438 \u0435\u0441\u0442\u044c \u0438\u0434\u0435\u0438, \u043a\u0430\u043a \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043d\u0430\u0448\u0443 ansible-\u0440\u043e\u043b\u044c, \u043d\u0435 \u0441\u0442\u0435\u0441\u043d\u044f\u0439\u0442\u0435\u0441\u044c, \u0437\u0430\u0432\u043e\u0434\u0438\u0442\u0435 <a href=\"https:\/\/github.com\/tarantool\/ansible-cartridge\/issues\/new\">\u0442\u0438\u043a\u0435\u0442<\/a>. \u041c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043c\u043e\u0436\u0435\u043c \u0441 \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0432\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0434\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c!<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/mailru\/blog\/484192\/\"> https:\/\/habr.com\/ru\/company\/mailru\/blog\/484192\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/mailru\/blog\/484192\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yc\/gm\/xx\/ycgmxxaqlvyslsrzoo6jnv1vmx0.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b <a href=\"https:\/\/habr.com\/ru\/company\/mailru\/blog\/478710\/\">\u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438<\/a> \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 <a href=\"https:\/\/habr.com\/ru\/company\/mailru\/blog\/465503\/\">Tarantool Cartridge<\/a>. \u041d\u043e \u043d\u0430 \u0434\u0435\u043f\u043b\u043e\u0435 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044f \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043e\u0431\u043d\u043e\u0432\u0438\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0435\u0439, \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0440\u043e\u043b\u0435\u0439.<\/p>\n<p>  <\/p>\n<p>\u041b\u044e\u0431\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442!<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-297398","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/297398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=297398"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/297398\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=297398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=297398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=297398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}