{"id":330230,"date":"2022-03-01T15:01:41","date_gmt":"2022-03-01T15:01:41","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=330230"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=330230","title":{"rendered":"<span>HowTo: \u0434\u0435\u043f\u043b\u043e\u0439 Apache Cassandra DB \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0435\u0451 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0421\u0435\u0440\u0433\u0435\u0439 \u0422\u0435\u0442\u0435\u0440\u044e\u043a\u043e\u0432, \u0438 \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u043c \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 X5 Tech. \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0434\u043b\u044f \u043a\u043e\u043b\u043b\u0435\u0433 \u043e\u0431\u0437\u043e\u0440\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043e \u0411\u0414 Apache Cassandra DB \u0438 \u0435\u0451 \u0434\u0435\u043f\u043b\u043e\u0435, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0435\u0439 \u0441 \u0432\u0430\u043c\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/c65\/38c\/d27\/c6538cd278ec413c42dcf2de285c6861.jpg\" width=\"870\" height=\"580\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c65\/38c\/d27\/c6538cd278ec413c42dcf2de285c6861.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u0438 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 Cassandra DB   <\/h2>\n<p>Apache Cassandra \u2014 \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f, \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0430\u044f \u043d\u0435 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f (NoSQL) \u0411\u0414, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>Cassandra \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u044f\u0437\u044b\u043a CQL, \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d SQL. <\/p>\n<p>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b cassandra db:<\/p>\n<ul>\n<li>\n<p>\u041d\u043e\u0434\u0430(Node) \u0438\u043b\u0438 \u0443\u0437\u0435\u043b \u2013 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 cassandra db.\u00a0 <\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440 (Data-center) \u2013 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043d\u043e\u0434, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0438\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c. <\/p>\n<p>\u0414\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 reliability \u0438 fault tolerance.  <\/p>\n<p>\u0412 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440 \u043e\u0431\u044b\u0447\u043d\u043e \u0432\u0445\u043e\u0434\u044f\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0434, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u043d\u0430 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0440\u043e\u043b\u044c \u0440\u0430\u0437\u0434\u0430\u044e\u0449\u0435\u0439 (Seed); \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0439 seed-\u043d\u043e\u0434\u044b \u043d\u0430 \u043e\u0434\u0438\u043d \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043b\u0430\u0441\u0442\u0435\u0440 (Cluster) \u2013 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0438 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Cassandra \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u043c\u0438 \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/cassandra.apache.org\/doc\/latest\/cassandra\/architecture\/index.html\">\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 Cassandra DB<\/a>. <\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/cassandra.apache.org\/doc\/4.0\/cassandra\/cql\/index.html\">Cassandra Query Language (CQL)<\/a>. <\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/cassandra.apache.org\/doc\/4.0\/cassandra\/configuration\/index.html\">\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/a>.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443<\/h2>\n<ol>\n<li>\n<p>\u0417\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Apache Cassandra DB \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, dev, stage, \u0438 prod).<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 Cassandra DB (\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u043c\u0435\u0442\u0440\u0438\u043a \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b \u043d\u043e\u0434\u044b \u0411\u0414 \u043a\u0430\u0441\u0441\u0430\u043d\u0434\u0440\u044b, \u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u0435\u0442\u0440\u0438\u043a \u0441\u0430\u043c\u043e\u0439 \u0411\u0414).<\/p>\n<\/li>\n<\/ol>\n<h3>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0435\u043f\u043b\u043e\u044f<\/h3>\n<ol>\n<li>\n<p><strong>\u0412 \u0434\u043e\u043a\u0435\u0440-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445<\/strong>.<br \/><strong>\u041f\u043b\u044e\u0441\u044b:<\/strong><br \/>\u2014 \u0415\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0434\u043e\u043a\u0435\u0440-\u043e\u0431\u0440\u0430\u0437\u044b, \u043a\u0430\u043a \u0434\u043b\u044f Cassandra DB, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f node-exporter, cassandra-exporter => \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a.<\/p>\n<p><strong>\u041c\u0438\u043d\u0443\u0441\u044b (\u0432\u044b\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043f\u0440\u043e\u0431 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0430 \u043b\u0438\u0447\u043d\u043e\u043c \u043e\u043f\u044b\u0442\u0435):<\/strong><br \/>\u2014 \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0445\u043e\u0441\u0442\u043e\u0432 \u2014 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 docker \u0438 \u0441\u043e\u043f\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432.<br \/>\u2014 \u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432.<br \/>\u2014 \u0414\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u043e\u0434 Cassandra DB \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0430\u043d\u0446\u044b \u0441 \u0431\u0443\u0431\u043d\u043e\u043c: \u0442\u0430\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043c\u0435\u043d\u044f \u043f\u0440\u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043d\u043e\u0434\u044b \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u043e\u0434 \u043d\u0435 \u043c\u043e\u0433\u043b\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b, \u0438 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u0430 UN (Up, Normal). \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0441 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 seed-\u043d\u043e\u0434\u044b.<br \/>\u2014 \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, node-exporter \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e <a href=\"https:\/\/github.com\/prometheus\/node_exporter#docker\">\u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f<\/a> \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0432 \u0434\u043e\u043a\u0435\u0440-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435, \u0442.\u043a. \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0435\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0445\u043e\u0441\u0442\u0430).<br \/>\u2014 \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0411\u0414 \u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439. \u0423 \u043c\u0435\u043d\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a \u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 cassandra-exporter \u0441 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u0441\u0430\u043c\u043e\u0439 cassandra-db.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412 k8s-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435.<\/strong><br \/> <strong>\u041f\u043b\u044e\u0441\u044b:<\/strong><br \/>\u2014 \u041a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 docker: \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0434\u043e\u043a\u0435\u0440-\u043e\u0431\u0440\u0430\u0437\u044b \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.<br \/>\u2014 \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<br \/>\u2014 \u0412\u044b\u0441\u043e\u043a\u0430\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0438 \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c.<br \/>\u2014 GAP-\u0441\u0442\u0435\u043a \u0445\u043e\u0440\u043e\u0448\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 kubernetes, \u0432 \u0442.\u0447. \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 helm-chart&#8217;\u043e\u0432.<\/p>\n<p><strong>\u041c\u0438\u043d\u0443\u0441\u044b:<\/strong><br \/>\u2014 \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0434\u0435\u043f\u043b\u043e\u044f stateful-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<br \/>\u2014 \u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432.<br \/>\u2014 \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0448\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435\u043c cassandra-\u0443\u0437\u043b\u043e\u0432 \u0432 \u0435\u0434\u0438\u043d\u044b\u0439 cassandra-\u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u0438\u0445 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 (\u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f ip-\u0430\u0434\u0440\u0435\u0441\u0430 \u0443\u0437\u043b\u043e\u0432).<br \/>\u2014 \u041c\u0430\u0441\u0441\u0430 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 (\u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u043e\u0432 \u0441\u0435\u0442\u0438) \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 cassandra-exporter&#8217;\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043c\u043e\u0433 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438.<\/p>\n<p>\u0412 \u0441\u0435\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u0445 helm-chart&#8217;\u043e\u0432 \u0434\u043b\u044f cassandra-db, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <a href=\"https:\/\/github.com\/bitnami\/charts\/tree\/master\/bitnami\/cassandra\">\u043e\u0434\u0438\u043d<\/a>, <a href=\"https:\/\/github.com\/helm\/charts\/tree\/master\/incubator\/cassandra\">\u0432\u0442\u043e\u0440\u043e\u0439<\/a> (\u0431\u043e\u043b\u0435\u0435 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438). \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e kubernetes-\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0440\u0430\u0437\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438, \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u043f\u043b\u044e\u0441\u0430\u043c\u0438 \u0438 \u043c\u0438\u043d\u0443\u0441\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043d\u0430 \u0445\u043e\u0441\u0442\u0430\u0445.<br \/>\u041f\u043b\u044e\u0441\u044b:<\/strong><br \/>\u2014 \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u0434\u043e\u043a\u0435\u0440-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445.<br \/>\u2014 \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p><strong>\u041c\u0438\u043d\u0443\u0441\u044b:<\/strong><br \/>\u2014\u0422\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b cassandra \u043a\u0430\u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0441 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u0445\u043e\u0441\u0442\u0430.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0414\u043b\u044f production \u0441\u0440\u0435\u0434\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0434\u0435\u043f\u043b\u043e\u0439 \u0411\u0414 \u043d\u0430 \u0445\u043e\u0441\u0442\u0430\u0445, \u044d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u0434\u0430\u043b\u0435\u0435.<\/strong><\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d ansible. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 (\u0411\u0414 \u0438 2 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u0430) \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u043e\u044f ansible-role.<\/p>\n<p>\u041e\u0431\u0449\u0438\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430:<\/p>\n<ul>\n<li>\n<p>ansible.cfg:<\/p>\n<\/li>\n<\/ul>\n<pre><code>[defaults] host_key_checking = False deprecation_warnings = False interpreter_python = \/usr\/bin\/python3 vault_password_file = vault_secret.sh stdout_callback = yaml<\/code><\/pre>\n<p><em>\u041f\u0430\u0440\u0430 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439:<\/em><\/p>\n<ol>\n<li>\n<p>[stdout_callback = yaml] \u2014 \u0432\u044b\u0432\u043e\u0434 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0440\u043e\u043b\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c;<\/p>\n<\/li>\n<li>\n<p>[vault_password_file = vault_secret.sh] \u2014 \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 ansible-vault \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0440\u043e\u043b\u0438. <\/p>\n<\/li>\n<\/ol>\n<p>\u0412 \u0441\u043a\u0440\u0438\u043f\u0442-\u0444\u0430\u0439\u043b\u0435 vault_secret.sh:<\/p>\n<pre><code class=\"bash\">#!\/bin\/bash echo $ANSIBLE_VAULT_PASS<\/code><\/pre>\n<ul>\n<li>\n<p>\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 group_vars:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">group_vars \u251c\u2500\u2500 all \u2502   \u2514\u2500\u2500 var.yml \u251c\u2500\u2500 dev \u2502   \u251c\u2500\u2500 var.yml \u2502   \u2514\u2500\u2500 vault.yml \u251c\u2500\u2500 prod \u2502   \u251c\u2500\u2500 var.yml \u2502   \u2514\u2500\u2500 vault.yml \u2514\u2500\u2500 stage     \u251c\u2500\u2500 var.yml     \u2514\u2500\u2500 vault.yml<\/code><\/pre>\n<p>\u0412\u0441\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0445\u0440\u0430\u043d\u0438\u043c \u0432 group_vars\/<em>&lt;environment><\/em>\/vault.yml, \u0448\u0438\u0444\u0440\u0443\u0435\u043c\u044b\u0435 c \u043f\u043e\u043c\u043e\u0449\u044c\u044e ansible-vault. <\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c\u0441\u044f ssh-\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0445\u043e\u0441\u0442\u0430\u043c \u2014 \u0432 group_vars\/all\/var.yml:<\/p>\n<pre><code class=\"yaml\">ansible_password: \"{{ vault_ansible_password }}\"<\/code><\/pre>\n<p>\u0412 group_vars\/&lt;environment>\/vault.yml:<\/p>\n<pre><code class=\"yaml\">ansible__vault_password: \"MySecr3tP@s$w0rd!\"<\/code><\/pre>\n<p>\u0418 \u0448\u0438\u0444\u0440\u0443\u0435\u043c:<\/p>\n<pre><code class=\"bash\">$ ansible-vault encrypt group_vars\/test\/vault.yml<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0444\u0430\u0439\u043b \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"yaml\">$ANSIBLE_VAULT;1.1;AES256 64613635303233376461643834326339343535303763353731643762383136656566666336646636 3866666162383666656137346365663631333532633762610a373733353863666230383630643661 61613262366138373537663866303434643565313262366133383732313062393531636431653862 3263653434313938320a386638653734376330646136303231323966393837333934373764306230 32306266366237393137303961633232666636643062306264633633623930666339326637643835 61396237386263613761626439303831313939366365303431616432656563366261633065636261 32623861653736386266343866386135373866636632316533363531356561643833326636303632 65613230323333383364323938376539303432656538353564383735373237306231366561383637 6338<\/code><\/pre>\n<ul>\n<li>\n<p>\u0424\u0430\u0439\u043b hosts(inventory):<\/p>\n<\/li>\n<\/ul>\n<pre><code>[seeds]     csnd1 ansible_host=10.10.10.10     csnd2 ansible_host=10.10.10.11 [workers]       csnd3 ansible_host=10.10.10.12     [prod:children]     seeds     workers [dc1:children]     seeds     workers [all:vars]     ansible_connection=ssh     ansible_become=yes     ansible_become_user=root<\/code><\/pre>\n<ul>\n<li>\n<p>\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u044b &#8216;seeds&#8217; \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f seed-\u043d\u043e\u0434 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0433\u0440\u0443\u043f\u043f \u2014 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0439 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u043e\u043b\u0438 \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430<\/h3>\n<ol>\n<li>\n<p>Ansible-role \u0434\u043b\u044f Cassandra DB:<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u044b \u0431\u044b\u043b\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 <a href=\"https:\/\/github.com\/locp\/ansible-role-cassandra\">\u0433\u043e\u0442\u043e\u0432\u0430\u044f \u0440\u043e\u043b\u044c \u043e\u0442 LoCP<\/a> (League of Crafty Programmers Ltd). \u0411\u044b\u043b\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043d\u043e \u0440\u043e\u043b\u044c LoCP, \u043d\u0430 \u043c\u043e\u0439 \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u0430\u044f \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f.<\/p>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u043e\u043b\u0438:<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"bash\">roles\/cassandra-db \u251c\u2500\u2500 defaults \u2502   \u2514\u2500\u2500 main.yml \u251c\u2500\u2500 handlers \u2502   \u2514\u2500\u2500 main.yml \u251c\u2500\u2500 tasks \u2502   \u251c\u2500\u2500 assertions.yml \u2502   \u251c\u2500\u2500 configure.yml \u2502   \u251c\u2500\u2500 hotfixes.yml \u2502   \u251c\u2500\u2500 install \u2502   \u2502   \u251c\u2500\u2500 Debian.yml \u2502   \u2502   \u2514\u2500\u2500 RedHat.yml \u2502   \u251c\u2500\u2500 join_cluster.yml \u2502   \u251c\u2500\u2500 main.yml \u2502   \u251c\u2500\u2500 service.yml \u2502   \u2514\u2500\u2500 variables.yml \u251c\u2500\u2500 templates \u2502   \u251c\u2500\u2500 cassandra.yaml.j2 \u2502   \u2514\u2500\u2500 etc \u2502       \u2514\u2500\u2500 systemd \u2502           \u2514\u2500\u2500 system \u2502               \u2514\u2500\u2500 cassandra.service.j2 \u2514\u2500\u2500 vars     \u251c\u2500\u2500 Debian.yml     \u251c\u2500\u2500 RedHat.yml     \u2514\u2500\u2500 main.yml<\/code><\/pre>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c \u0440\u043e\u043b\u044c \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0430\u044f:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 cassandra \u043a\u0430\u043a \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 RedHat, \u0442\u0430\u043a \u0438 Debian.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0448\u0430\u0433\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f cassandra \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u0442\u044c \u0442\u0430\u0441\u043a\u0438 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043d\u043e\u0434 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u0432\u0435\u0442\u044b:<\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 cassandra \u2014 cassandra.yaml \u2014 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 defaults\/main.yml \u043b\u0438\u0431\u043e \u0432 yaml-\u043a\u043e\u043d\u0444\u0438\u0433, \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0440\u043e\u043b\u044c (\u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0438\u0437 README.md \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u043e\u043b\u0438), \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b cassandra_configuration \u0438 cassandra_regex_replacements:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"yaml\">cassandra_datacenter1_name: \"dc1\" cassandra_rack_name: \"rack1\" seeds: \"{{ seeds_list | join(',') }}\"     cassandra_regex_replacements:     - path: cassandra-env.sh       line: MAX_HEAP_SIZE=\"{{ cassandra_max_heapsize_mb }}M\"       regexp: ^#MAX_HEAP_SIZE=\"4G\"     - path: cassandra-env.sh       line: HEAP_NEWSIZE=\"{{ cassandra_heap_new_size_mb }}M\"       regexp: ^#HEAP_NEWSIZE=\"800M\"     - path: cassandra-rackdc.properties       line: 'dc={{ cassandra_datacenter1_name }}'       regexp: '^dc='     - path: cassandra-rackdc.properties       line: 'rack={{ cassandra_rack_name }}'       regexp: '^rack='     \u0441assandra_configuration:     authenticator: PasswordAuthenticator     cluster_name: \"{{ envname }}-cluster\"     commitlog_directory: \/data\/cassandra\/commitlog     commitlog_sync: periodic     commitlog_sync_period_in_ms: 10000     data_file_directories:         - \/data\/cassandra\/data     endpoint_snitch: GossipingPropertyFileSnitch     hints_directory: \"\/data\/cassandra\/hints\"     listen_address: \"{{ ansible_default_ipv4.address }}\"     rpc_address: \"{{ ansible_default_ipv4.address }}\"     partitioner: org.apache.cassandra.dht.Murmur3Partitioner     num_tokens: 256     saved_caches_directory: \/data\/cassandra\/saved_caches     seed_provider:         - class_name: \"org.apache.cassandra.locator.SimpleSeedProvider\"           parameters:               - seeds: \"{{ seeds }}\"     start_native_transport: true<\/code><\/pre>\n<ul>\n<li>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f cassandra_max_heapsize_mb \u0438 cassandra_heap_new_size_mb \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 (\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432) \u0432 \u0442\u0430\u0441\u043a\u0430\u0445, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432 tasks\/variables.yml<\/p>\n<\/li>\n<li>\n<p>seeds<em>list \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 \u0432 group<\/em>vars\/all.yml:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"yaml\">seeds_list: \"{{ groups['seeds'] | map('extract',hostvars,'ansible_host') | list }}\"<\/code><\/pre>\n<p>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 hosts(inventory) \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0430 seeds, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438 \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0438\u0434\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<ul>\n<li>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u043e\u043d\u0443\u0441\u0430, \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0411\u0414, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043a\u043b\u044e\u0447\u0435\u0439 (keyspace) \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (user):<\/p>\n<p>\u0430. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0434\u043e \u0434\u043e\u0436\u0434\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043f\u043e\u0434\u043d\u044f\u043b\u0441\u044f \u0438 \u0441\u043b\u0443\u0448\u0430\u0435\u0442 \u043f\u043e\u0440\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043d\u0435\u043c\u0443 (9042) \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u043e\u0434 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 (7000). \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0442\u0430\u0441\u043a\u0443 \u043f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u0437\u0430\u0434\u0430\u0447 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"yaml\">- name: Wait for the Cassandra Listener   wait_for:     timeout: 120     host: \"{{ ansible_default_ipv4.address }}\"     port: \"{{ item }}\"   loop:     - 9042     - 7000<\/code><\/pre>\n<p>b. \u0412 templates\/ \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d cqlsh-\u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u043e\u0433\u043e:<\/p>\n<pre><code>ALTER KEYSPACE system_auth     WITH replication = {         'class': 'NetworkTopologyStrategy',         '{{ cassandra_datacenter1_name }}': {{ cass_dc1_nodes_number }}     }; CREATE ROLE IF NOT EXISTS {{ cassandra_user }}  WITH PASSWORD = '{{ cassandra_user_password }}' AND LOGIN = true; CREATE KEYSPACE IF NOT EXISTS {{ cassandra_keyspace }}      WITH replication = {         'class': 'NetworkTopologyStrategy',         '{{ cassandra_datacenter1_name }}': {{ cass_dc1_nodes_number }}     };<\/code><\/pre>\n<p>\u041d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435:<\/p>\n<pre><code class=\"yaml\">cassandra_user: \"test_user\" cassandra_keyspace: \"test_keyspace\" cassandra_datacenter1_name: \"dc1\" cassandra_rack_name: \"rack1\" cass_dc1_nodes_number: \"{{ groups['dc1'] | length }}\"   cqlsh_script_template: \"cqlsh_script.txt.j2\" cqlsh_script_path: \"\/root\/cqlsh_script.txt\"<\/code><\/pre>\n<p>cassandra_user_password \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 ansible-vault<\/p>\n<p>c.\u00a0\u00a0\u00a0 \u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 \u043e\u0434\u043d\u0443 \u043d\u043e\u0434\u0443 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c:<\/p>\n<pre><code>- block:    - name: Apply cqlsh_script     template:       src: \"{{ cqlsh_script_template }}\"       dest: \"{{ cqlsh_script_path }}\"       owner: root       group: root       mode: '0644'    - name: add DB data (keyspace, user)     shell: \"cqlsh {{ ansible_default_ipv4.address }}  -u cassandra -p cassandra -f  {{ cqlsh_script_path }}\"    - name: Remove cqlsh_script file     file:       path: \"{{ cqlsh_script_path }}\"       state: absent  when: inventory_hostname == groups['seeds'][0]<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p>2.\u00a0\u00a0\u00a0 Ansible-role \u0434\u043b\u044f node-exporter&#8217;\u0430:<\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u0430 \u2014 <a href=\"https:\/\/github.com\/cloudalchemy\/ansible-node-exporter\">\u0433\u043e\u0442\u043e\u0432\u0430\u044f \u0440\u043e\u043b\u044c<\/a> \u043f\u043e\u0434 \u0430\u0432\u0442\u043e\u0440\u0441\u0442\u0432\u043e\u043c cloudalchemy. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u043e\u043b\u0438:<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"bash\">roles\/node-exporter \u251c\u2500\u2500 defaults \u2502   \u2514\u2500\u2500 main.yml \u251c\u2500\u2500 handlers \u2502   \u2514\u2500\u2500 main.yml \u251c\u2500\u2500 tasks \u2502   \u251c\u2500\u2500 configure.yml \u2502   \u251c\u2500\u2500 install.yml \u2502   \u251c\u2500\u2500 main.yml \u2502   \u251c\u2500\u2500 preflight.yml \u2502   \u2514\u2500\u2500 selinux.yml \u251c\u2500\u2500 templates \u2502   \u251c\u2500\u2500 config.yaml.j2 \u2502   \u2514\u2500\u2500 node_exporter.service.j2 \u2514\u2500\u2500 vars     \u2514\u2500\u2500 main.yml<\/code><\/pre>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u043e\u043b\u0438 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0442 (\u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u0438\u0437 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438 \u0432\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438), \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, node_exporter_repo_url), \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0440\u043e\u043b\u0438, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0438\u0441\u0447\u0435\u0440\u043f\u044b\u0432\u0430\u044e\u0449\u0430\u044f.<\/p>\n<p><em>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u0432\u0435\u0442\u044b:<\/em><\/p>\n<ul>\n<li>\n<p>\u0420\u043e\u043b\u044c \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u0434 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u044b \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432 RHEL, Fedora, ClearLinux.<\/p>\n<\/li>\n<li>\n<p>Node-exporter \u0431\u0443\u0434\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 systemd service unit.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u0430:<\/p>\n<p>a.\u00a0\u00a0\u00a0 \u0411\u0438\u043d\u0430\u0440\u043d\u0438\u043a \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0430\u0434\u0440\u0435\u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 node_exporter_repo_url. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043a \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044e, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 \u0441\u0432\u043e\u0435\u0433\u043e, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f.<\/p>\n<p>b.\u00a0\u00a0\u00a0 \u0411\u0438\u043d\u0430\u0440\u043d\u0438\u043a \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0440\u043e\u043b\u0438 (roles\/node-exporter\/files), \u043b\u0438\u0431\u043e \u043f\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0443\u0434\u043e\u0431\u043d\u043e\u043c\u0443 \u0432\u0430\u043c \u043f\u0443\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 node_exporter_binary_local_dir<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0434\u043b\u044f \u0432\u0430\u0441 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u0432 node_exporter_repo_url, \u0438 \u0432 node_exporter_binary_local_dir, \u0442.\u043a. \u043e\u043d\u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438.<\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u0430 \u2014 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 node_exporter_version \u0432 defaults\/main.yml. \u0417\u0434\u0435\u0441\u044c \u0436\u0435 \u043d\u0430\u0439\u0434\u0443\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 (config.yaml) \u2014 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"yaml\">node_exporter_tls_server_config: {} node_exporter_http_server_config: {} node_exporter_basic_auth_users: {}<\/code><\/pre>\n<ul>\n<li>\n<p>\u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u043d\u0435\u0441\u0442\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u0430 (config.yaml) \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 (node_exporter.service): \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 templates\/.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0440\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440 \u2014 \u043c\u0435\u043d\u044f\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e node_exporter_web_listen_address (\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#171;0.0.0.0:9100&#187;). \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0441 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u043c\u0435\u0442\u0440\u0438\u043a \u2014 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f node_exporter_web_telemetry_path (\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#171;\/metrics&#187;).<\/p>\n<\/li>\n<\/ul>\n<p>3.Ansible-role \u0434\u043b\u044f cassandra-exporter&#8217;\u0430:   <\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u044b \u0431\u044b\u043b\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 <a href=\"https:\/\/github.com\/criteo\/cassandra_exporter\/\">\u0440\u043e\u043b\u044c \u043e\u0442 criteo<\/a>. \u0421\u0442\u0440\u0443\u0442\u0443\u0440\u0430:<\/p>\n<pre><code class=\"bash\">roles\/cassandra-exporter \u251c\u2500\u2500 README.md \u251c\u2500\u2500 defaults \u2502   \u2514\u2500\u2500 main.yml \u251c\u2500\u2500 files \u2502   \u2514\u2500\u2500 config.yml \u251c\u2500\u2500 handlers \u2502   \u2514\u2500\u2500 main.yml \u251c\u2500\u2500 tasks \u2502   \u2514\u2500\u2500 main.yml \u2514\u2500\u2500 templates     \u251c\u2500\u2500 cassandra_exporter.sh.j2     \u2514\u2500\u2500 etc         \u2514\u2500\u2500 systemd             \u2514\u2500\u2500 system                 \u2514\u2500\u2500 prometheus-cassandra-exporter.service.j2<\/code><\/pre>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u044d\u0442\u0430 \u0440\u043e\u043b\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e <a href=\"https:\/\/github.com\/prometheus\/jmx_exporter\">JMX exporter<\/a>, \u043d\u043e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043b\u0451\u0433\u043a\u043e\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 Cassandra DB. \u041f\u043e \u0441\u0443\u0442\u0438, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0440\u043e\u043b\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u043c\u0435\u0442\u0435\u0443\u0441\u0430 \u043d\u0430 \u0437\u0430\u0431\u043e\u0440 \u043c\u0435\u0442\u0440\u0438\u043a \u0441 \u044d\u0442\u043e\u0433\u043e \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u0430 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432 \u0433\u0440\u0430\u0444\u0430\u043d\u0435 <a href=\"https:\/\/grafana.com\/grafana\/dashboards\/6400\">\u044d\u0442\u043e\u0433\u043e \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430<\/a> \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0441\u0447\u0435\u0440\u043f\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0430\u0441\u0441\u0430\u043d\u0434\u0440\u0430-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0432 \u0440\u0430\u0437\u0440\u0435\u0437\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0411\u0414. <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0432\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0439 \u0440\u043e\u043b\u0438 \u044d\u043a\u043f\u043e\u0440\u0442\u0435\u0440 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 standalone, \u0442.\u0435. \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 cassandra DB, \u0447\u0442\u043e \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u043f\u043e\u0432\u043b\u0435\u0447\u0451\u0442 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043c\u0435\u0442\u0440\u0438\u043a, \u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u0430\u043c \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 cassandra-exporter \u043a\u0430\u043a java-agent (\u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0441\u0431\u043e\u0440 \u043c\u0435\u0442\u0440\u0438\u043a \u0438 \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0443; \u0438\u0437 \u043c\u0438\u043d\u0443\u0441\u043e\u0432 \u2014 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0430\u0433\u0435\u043d\u0442 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e cassandra DB, \u0438, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c\u044e); \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 <a href=\"https:\/\/github.com\/zegelin\/cassandra-exporter\">\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u0430<\/a>.<\/p>\n<p><em>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u0432\u0435\u0442\u044b:<\/em><\/p>\n<ul>\n<li>\n<p>cassandra-exporter \u0431\u0443\u0434\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 systemd service unit.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0440\u0441\u0438\u044f \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u0430 \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0432 defaults\/main.yml \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 cassandra_exporter_version. \u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/criteo\/cassandra_exporter\/releases\">\u0437\u0434\u0435\u0441\u044c<\/a>. <\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0440\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0441\u0435\u0442\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440 \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0432 defaults\/main.yml \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 cassandra_exporter_listen_port (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 \u0440\u043e\u043b\u0438 \u2014 8080, \u043d\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043f\u043e\u0440\u0442 \u0434\u043b\u044f cassandra-exporter \u2014 9500). \u042d\u0442\u043e\u0442 \u0436\u0435 \u043f\u043e\u0440\u0442 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u043f\u0440\u043e\u043c\u0435\u0442\u0435\u0443\u0441\u0430 \u0434\u043b\u044f \u0441\u0442\u044f\u0433\u0438\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a.<\/p>\n<\/li>\n<li>\n<p>\u0411\u0438\u043d\u0430\u0440\u043d\u0438\u043a \u0438 \u043a\u043e\u043d\u0444\u0438\u0433-\u0444\u0430\u0439\u043b \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 cassandra_exporter_binary_url \u0438 cassandra_exporter_config_url. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0430 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0438\u043c\u0435\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043a \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044e, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u0432\u043e\u0435\u0433\u043e, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a \u0438\/\u0438\u043b\u0438 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0440\u0430\u0437\u0443 \u0431\u044b\u043b\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0445 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0440\u043e\u043b\u0438, \u0442\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0440\u043e\u043b\u0438:<\/p>\n<p>\u2014 \u0417\u0430\u043a\u0438\u043d\u0443\u0442\u044c \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b (\u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 node-exporter&#8217;\u043e\u043c,) \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0440\u043e\u043b\u0438 (roles\/cassandra-exporter\/files) \u043b\u0438\u0431\u043e \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<br \/>\u2014 \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 cassandra_exporter_binary, cassandra_exporter_config, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0443\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043f\u0443\u0442\u0438 \u0434\u043e \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 (\u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043c\u0435\u0449\u0435\u043d\u044b \u0432 roles\/cassandra-exporter\/files, \u0442\u043e \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0435\u043d\u0430 \u044d\u0442\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: &#8216;cassandra_exporter.jar&#8217;, &#8216;config.yml&#8217;).<br \/>\u2014 \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0430\u0441\u043a\u0438:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"yaml\">\uf0a7- name: 'copy cassandra exporter binary'   copy:     src: '{{ cassandra_exporter_binary }}'     dest: '{{ cassandra_exporter_dist_dir }}\/cassandra.jar'     owner: '{{ cassandra_exporter_user }}'     group: '{{ cassandra_exporter_group }}'     mode: '0644'   when: cassandra_exporter_binary is defined<\/code><\/pre>\n<p>\u0410 \u0432 \u0442\u0430\u0441\u043a\u0435 &#8216;download cassandra exporter binary&#8217; \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"yaml\">when: cassandra_exporter_binary is not defined<\/code><\/pre>\n<pre><code class=\"yaml\">\uf0a7- name: '\u0441opy cassandra exporter config'   copy:     src: '{{ cassandra_exporter_config }}'     dest: '{{ cassandra_exporter_config_dir }}\/config.yml'     owner: '{{ cassandra_exporter_user }}'     group: '{{ cassandra_exporter_group }}'     mode: '0644'   when: cassandra_exporter_config is defined<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 cassandra_exporter_dist_dir \u0438 cassandra_exporter_config_dir &#8212; \u0443\u0436\u0435 \u0437\u0430\u0434\u0430\u043d\u044b \u0432 \u0440\u043e\u043b\u0438.<\/p>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433-\u0444\u0430\u0439\u043b \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u0430 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438\/\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0434.<\/p>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>\u0418\u043c\u0435\u0435\u043c \u043d\u0430\u0431\u043e\u0440 \u0440\u043e\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0442\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438:<\/p>\n<pre><code class=\"bash\">$ ansible-playbook -i ansible\/hosts ansible\/install-cassandra-db.yml $ ansible-playbook -i ansible\/hosts ansible\/install-cassandra-exporter.yml $ ansible-playbook -i ansible\/hosts ansible\/install-node-exporter.yml<\/code><\/pre>\n<p>\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u2014 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0411\u0414 cassandra \u0438 \u0435\u0433\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u043a\u0430\u043a \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0442\u0430\u043a \u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0430\u043c\u043e\u0439 \u0411\u0414. \u0412\u0441\u0435 \u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043d\u0430 \u0445\u043e\u0441\u0442\u0430\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 systemd service unit&#8217;\u043e\u0432, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u044b\u0445 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0442\u0430\u043a \u0447\u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0445\u043e\u0441\u0442\u043e\u0432, \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430.<\/p>\n<p>\u041f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438: <\/p>\n<ol>\n<li>\n<p>cassandra-db <\/p>\n<\/li>\n<li>\n<p>cassandra-exporter \u2014 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 cassandra-exporter \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u0439\u0434\u0451\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441; node-exporter \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442, \u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430:<\/p>\n<ol start=\"1\">\n<li>\n<p>\u0411\u0414 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u043d\u043e\u0434 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043d\u0430 \u043f\u043e\u0440\u0442 9042.<\/p>\n<p>\u2014 \u0414\u043b\u044f \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f <a href=\"https:\/\/pypi.org\/project\/cqlsh\/\">\u043a\u043b\u0438\u0435\u043d\u0442 cqlsh<\/a>:<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"bash\">$ cqlsh &lt;cassandra_node1_ip-address>:9042 -u my_cass_user<\/code><\/pre>\n<p><a href=\"https:\/\/cassandra.apache.org\/doc\/latest\/cassandra\/tools\/cqlsh.html\">\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e<\/a> \u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c <em>cqlsh<\/em>.<\/p>\n<p>\u2014 \u0414\u043b\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a \u0445\u043e\u0441\u0442\u0430\u043c-\u043d\u043e\u0434\u0430\u043c cassandra \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u2014 nodetool, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 cassandra-db. <a href=\"https:\/\/cassandra.apache.org\/doc\/latest\/cassandra\/tools\/nodetool\/nodetool.html\">\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e<\/a> \u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 <em>nodetool<\/em>.   <\/p>\n<ol start=\"2\">\n<li>\n<p>\u041c\u0435\u0442\u0440\u0438\u043a\u0438 node-exporter \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0445\u043e\u0441\u0442\u0443-\u043d\u043e\u0434\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043d\u0430 \u043f\u043e\u0440\u0442 9100,<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u0440\u0438\u043a\u0438 cassandra-exporter \u2014 \u043d\u0430 \u043f\u043e\u0440\u0442 9500.<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \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\/X5Group\/blog\/653961\/\"> https:\/\/habr.com\/ru\/company\/X5Group\/blog\/653961\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0421\u0435\u0440\u0433\u0435\u0439 \u0422\u0435\u0442\u0435\u0440\u044e\u043a\u043e\u0432, \u0438 \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u043c \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 X5 Tech. \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0434\u043b\u044f \u043a\u043e\u043b\u043b\u0435\u0433 \u043e\u0431\u0437\u043e\u0440\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043e \u0411\u0414 Apache Cassandra DB \u0438 \u0435\u0451 \u0434\u0435\u043f\u043b\u043e\u0435, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0435\u0439 \u0441 \u0432\u0430\u043c\u0438.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u0438 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 Cassandra DB   <\/h2>\n<p>Apache Cassandra \u2014 \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f, \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0430\u044f \u043d\u0435 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f (NoSQL) \u0411\u0414, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>Cassandra \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u044f\u0437\u044b\u043a CQL, \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d SQL. <\/p>\n<p>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b cassandra db:<\/p>\n<ul>\n<li>\n<p>\u041d\u043e\u0434\u0430(Node) \u0438\u043b\u0438 \u0443\u0437\u0435\u043b \u2013 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 cassandra db.\u00a0 <\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440 (Data-center) \u2013 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043d\u043e\u0434, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0438\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c. <\/p>\n<p>\u0414\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 reliability \u0438 fault tolerance.  <\/p>\n<p>\u0412 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440 \u043e\u0431\u044b\u0447\u043d\u043e \u0432\u0445\u043e\u0434\u044f\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0434, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u043d\u0430 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0440\u043e\u043b\u044c \u0440\u0430\u0437\u0434\u0430\u044e\u0449\u0435\u0439 (Seed); \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0439 seed-\u043d\u043e\u0434\u044b \u043d\u0430 \u043e\u0434\u0438\u043d \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043b\u0430\u0441\u0442\u0435\u0440 (Cluster) \u2013 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0438 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Cassandra \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u043c\u0438 \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/cassandra.apache.org\/doc\/latest\/cassandra\/architecture\/index.html\">\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 Cassandra DB<\/a>. <\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/cassandra.apache.org\/doc\/4.0\/cassandra\/cql\/index.html\">Cassandra Query Language (CQL)<\/a>. <\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/cassandra.apache.org\/doc\/4.0\/cassandra\/configuration\/index.html\">\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/a>.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443<\/h2>\n<ol>\n<li>\n<p>\u0417\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Apache Cassandra DB \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, dev, stage, \u0438 prod).<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 Cassandra DB (\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u043c\u0435\u0442\u0440\u0438\u043a \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b \u043d\u043e\u0434\u044b \u0411\u0414 \u043a\u0430\u0441\u0441\u0430\u043d\u0434\u0440\u044b, \u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u0435\u0442\u0440\u0438\u043a \u0441\u0430\u043c\u043e\u0439 \u0411\u0414).<\/p>\n<\/li>\n<\/ol>\n<h3>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0435\u043f\u043b\u043e\u044f<\/h3>\n<ol>\n<li>\n<p><strong>\u0412 \u0434\u043e\u043a\u0435\u0440-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445<\/strong>.<br \/><strong>\u041f\u043b\u044e\u0441\u044b:<\/strong><br \/>\u2014 \u0415\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0434\u043e\u043a\u0435\u0440-\u043e\u0431\u0440\u0430\u0437\u044b, \u043a\u0430\u043a \u0434\u043b\u044f Cassandra DB, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f node-exporter, cassandra-exporter => \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a.<\/p>\n<p><strong>\u041c\u0438\u043d\u0443\u0441\u044b (\u0432\u044b\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043f\u0440\u043e\u0431 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0430 \u043b\u0438\u0447\u043d\u043e\u043c \u043e\u043f\u044b\u0442\u0435):<\/strong><br \/>\u2014 \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0445\u043e\u0441\u0442\u043e\u0432 \u2014 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 docker \u0438 \u0441\u043e\u043f\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432.<br \/>\u2014 \u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432.<br \/>\u2014 \u0414\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u043e\u0434 Cassandra DB \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0430\u043d\u0446\u044b \u0441 \u0431\u0443\u0431\u043d\u043e\u043c: \u0442\u0430\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043c\u0435\u043d\u044f \u043f\u0440\u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043d\u043e\u0434\u044b \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u043e\u0434 \u043d\u0435 \u043c\u043e\u0433\u043b\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b, \u0438 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u0430 UN (Up, Normal). \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0441 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 seed-\u043d\u043e\u0434\u044b.<br \/>\u2014 \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, node-exporter \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e <a href=\"https:\/\/github.com\/prometheus\/node_exporter#docker\">\u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f<\/a> \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0432 \u0434\u043e\u043a\u0435\u0440-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435, \u0442.\u043a. \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0435\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0445\u043e\u0441\u0442\u0430).<br \/>\u2014 \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0411\u0414 \u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439. \u0423 \u043c\u0435\u043d\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a \u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 cassandra-exporter \u0441 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u0441\u0430\u043c\u043e\u0439 cassandra-db.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412 k8s-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435.<\/strong><br \/> <strong>\u041f\u043b\u044e\u0441\u044b:<\/strong><br \/>\u2014 \u041a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 docker: \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0434\u043e\u043a\u0435\u0440-\u043e\u0431\u0440\u0430\u0437\u044b \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.<br \/>\u2014 \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<br \/>\u2014 \u0412\u044b\u0441\u043e\u043a\u0430\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0438 \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c.<br \/>\u2014 GAP-\u0441\u0442\u0435\u043a \u0445\u043e\u0440\u043e\u0448\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 kubernetes, \u0432 \u0442.\u0447. \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 helm-chart&#8217;\u043e\u0432.<\/p>\n<p><strong>\u041c\u0438\u043d\u0443\u0441\u044b:<\/strong><br \/>\u2014 \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0434\u0435\u043f\u043b\u043e\u044f stateful-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<br \/>\u2014 \u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432.<br \/>\u2014 \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0448\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435\u043c cassandra-\u0443\u0437\u043b\u043e\u0432 \u0432 \u0435\u0434\u0438\u043d\u044b\u0439 cassandra-\u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u0438\u0445 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 (\u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f ip-\u0430\u0434\u0440\u0435\u0441\u0430 \u0443\u0437\u043b\u043e\u0432).<br \/>\u2014 \u041c\u0430\u0441\u0441\u0430 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 (\u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u043e\u0432 \u0441\u0435\u0442\u0438) \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 cassandra-exporter&#8217;\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043c\u043e\u0433 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438.<\/p>\n<p>\u0412 \u0441\u0435\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u0445 helm-chart&#8217;\u043e\u0432 \u0434\u043b\u044f cassandra-db, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <a href=\"https:\/\/github.com\/bitnami\/charts\/tree\/master\/bitnami\/cassandra\">\u043e\u0434\u0438\u043d<\/a>, <a href=\"https:\/\/github.com\/helm\/charts\/tree\/master\/incubator\/cassandra\">\u0432\u0442\u043e\u0440\u043e\u0439<\/a> (\u0431\u043e\u043b\u0435\u0435 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438). \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e kubernetes-\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0440\u0430\u0437\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438, \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u043f\u043b\u044e\u0441\u0430\u043c\u0438 \u0438 \u043c\u0438\u043d\u0443\u0441\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043d\u0430 \u0445\u043e\u0441\u0442\u0430\u0445.<br \/>\u041f\u043b\u044e\u0441\u044b:<\/strong><br \/>\u2014 \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u0434\u043e\u043a\u0435\u0440-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445.<br \/>\u2014 \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p><strong>\u041c\u0438\u043d\u0443\u0441\u044b:<\/strong><br \/>\u2014\u0422\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b cassandra \u043a\u0430\u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0441 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u0445\u043e\u0441\u0442\u0430.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0414\u043b\u044f production \u0441\u0440\u0435\u0434\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0434\u0435\u043f\u043b\u043e\u0439 \u0411\u0414 \u043d\u0430 \u0445\u043e\u0441\u0442\u0430\u0445, \u044d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u0434\u0430\u043b\u0435\u0435.<\/strong><\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d ansible. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 (\u0411\u0414 \u0438 2 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u0430) \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u043e\u044f ansible-role.<\/p>\n<p>\u041e\u0431\u0449\u0438\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430:<\/p>\n<ul>\n<li>\n<p>ansible.cfg:<\/p>\n<\/li>\n<\/ul>\n<pre><code>[defaults] host_key_checking = False deprecation_warnings = False interpreter_python = \/usr\/bin\/python3 vault_password_file = vault_secret.sh stdout_callback = yaml<\/code><\/pre>\n<p><em>\u041f\u0430\u0440\u0430 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439:<\/em><\/p>\n<ol>\n<li>\n<p>[stdout_callback = yaml] \u2014 \u0432\u044b\u0432\u043e\u0434 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0440\u043e\u043b\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c;<\/p>\n<\/li>\n<li>\n<p>[vault_password_file = vault_secret.sh] \u2014 \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 ansible-vault \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0440\u043e\u043b\u0438. <\/p>\n<\/li>\n<\/ol>\n<p>\u0412 \u0441\u043a\u0440\u0438\u043f\u0442-\u0444\u0430\u0439\u043b\u0435 vault_secret.sh:<\/p>\n<pre><code class=\"bash\">#!\/bin\/bash echo $ANSIBLE_VAULT_PASS<\/code><\/pre>\n<ul>\n<li>\n<p>\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 group_vars:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">group_vars \u251c\u2500\u2500 all \u2502   \u2514\u2500\u2500 var.yml \u251c\u2500\u2500 dev \u2502   \u251c\u2500\u2500 var.yml \u2502   \u2514\u2500\u2500 vault.yml \u251c\u2500\u2500 prod \u2502   \u251c\u2500\u2500 var.yml \u2502   \u2514\u2500\u2500 vault.yml \u2514\u2500\u2500 stage     \u251c\u2500\u2500 var.yml     \u2514\u2500\u2500 vault.yml<\/code><\/pre>\n<p>\u0412\u0441\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0445\u0440\u0430\u043d\u0438\u043c \u0432 group_vars\/<em>&lt;environment><\/em>\/vault.yml, \u0448\u0438\u0444\u0440\u0443\u0435\u043c\u044b\u0435 c \u043f\u043e\u043c\u043e\u0449\u044c\u044e ansible-vault. <\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c\u0441\u044f ssh-\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0445\u043e\u0441\u0442\u0430\u043c \u2014 \u0432 group_vars\/all\/var.yml:<\/p>\n<pre><code class=\"yaml\">ansible_password: \"{{ vault_ansible_password }}\"<\/code><\/pre>\n<p>\u0412 group_vars\/&lt;environment>\/vault.yml:<\/p>\n<pre><code class=\"yaml\">ansible__vault_password: \"MySecr3tP@s$w0rd!\"<\/code><\/pre>\n<p>\u0418 \u0448\u0438\u0444\u0440\u0443\u0435\u043c:<\/p>\n<pre><code class=\"bash\">$ ansible-vault encrypt group_vars\/test\/vault.yml<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0444\u0430\u0439\u043b \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"yaml\">$ANSIBLE_VAULT;1.1;AES256 64613635303233376461643834326339343535303763353731643762383136656566666336646636 3866666162383666656137346365663631333532633762610a373733353863666230383630643661 61613262366138373537663866303434643565313262366133383732313062393531636431653862 3263653434313938320a386638653734376330646136303231323966393837333934373764306230 32306266366237393137303961633232666636643062306264633633623930666339326637643835 61396237386263613761626439303831313939366365303431616432656563366261633065636261 32623861653736386266343866386135373866636632316533363531356561643833326636303632 65613230323333383364323938376539303432656538353564383735373237306231366561383637 6338<\/code><\/pre>\n<ul>\n<li>\n<p>\u0424\u0430\u0439\u043b hosts(inventory):<\/p>\n<\/li>\n<\/ul>\n<pre><code>[seeds]     csnd1 ansible_host=10.10.10.10     csnd2 ansible_host=10.10.10.11 [workers]       csnd3 ansible_host=10.10.10.12     [prod:children]     seeds     workers [dc1:children]     seeds     workers [all:vars]     ansible_connection=ssh     ansible_become=yes     ansible_become_user=root<\/code><\/pre>\n<ul>\n<li>\n<p>\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u044b &#8216;seeds&#8217; \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f seed-\u043d\u043e\u0434 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0433\u0440\u0443\u043f\u043f \u2014 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0439 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u043e\u043b\u0438 \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430<\/h3>\n<ol>\n<li>\n<p>Ansible-role \u0434\u043b\u044f Cassandra DB:<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u044b \u0431\u044b\u043b\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 <a href=\"https:\/\/github.com\/locp\/ansible-role-cassandra\">\u0433\u043e\u0442\u043e\u0432\u0430\u044f \u0440\u043e\u043b\u044c \u043e\u0442 LoCP<\/a> (League of Crafty Programmers Ltd). \u0411\u044b\u043b\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043d\u043e \u0440\u043e\u043b\u044c LoCP, \u043d\u0430 \u043c\u043e\u0439 \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u0430\u044f \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f.<\/p>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u043e\u043b\u0438:<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"bash\">roles\/cassandra-db \u251c\u2500\u2500 defaults \u2502   \u2514\u2500\u2500 main.yml \u251c\u2500\u2500 handlers \u2502   \u2514\u2500\u2500 main.yml \u251c\u2500\u2500 tasks \u2502   \u251c\u2500\u2500 assertions.yml \u2502   \u251c\u2500\u2500 configure.yml \u2502   \u251c\u2500\u2500 hotfixes.yml \u2502   \u251c\u2500\u2500 install \u2502   \u2502   \u251c\u2500\u2500 Debian.yml \u2502   \u2502   \u2514\u2500\u2500 RedHat.yml \u2502   \u251c\u2500\u2500 join_cluster.yml \u2502   \u251c\u2500\u2500 main.yml \u2502   \u251c\u2500\u2500 service.yml \u2502   \u2514\u2500\u2500 variables.yml \u251c\u2500\u2500 templates \u2502   \u251c\u2500\u2500 cassandra.yaml.j2 \u2502   \u2514\u2500\u2500 etc \u2502       \u2514\u2500\u2500 systemd \u2502           \u2514\u2500\u2500 system \u2502               \u2514\u2500\u2500 cassandra.service.j2 \u2514\u2500\u2500 vars     \u251c\u2500\u2500 Debian.yml     \u251c\u2500\u2500 RedHat.yml     \u2514\u2500\u2500 main.yml<\/code><\/pre>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c \u0440\u043e\u043b\u044c \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0430\u044f:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 cassandra \u043a\u0430\u043a \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 RedHat, \u0442\u0430\u043a \u0438 Debian.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0448\u0430\u0433\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f cassandra \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u0442\u044c \u0442\u0430\u0441\u043a\u0438 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043d\u043e\u0434 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u0432\u0435\u0442\u044b:<\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 cassandra \u2014 cassandra.yaml \u2014 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 defaults\/main.yml \u043b\u0438\u0431\u043e \u0432 yaml-\u043a\u043e\u043d\u0444\u0438\u0433, \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0440\u043e\u043b\u044c (\u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0438\u0437 README.md \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u043e\u043b\u0438), \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b cassandra_configuration \u0438 cassandra_regex_replacements:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"yaml\">cassandra_datacenter1_name: \"dc1\" cassandra_rack_name: \"rack1\" seeds: \"{{ seeds_list | join(',') }}\"     cassandra_regex_replacements:     - path: cassandra-env.sh       line: MAX_HEAP_SIZE=\"{{ cassandra_max_heapsize_mb }}M\"       regexp: ^#MAX_HEAP_SIZE=\"4G\"     - path: cassandra-env.sh       line: HEAP_NEWSIZE=\"{{ cassandra_heap_new_size_mb }}M\"       regexp: ^#HEAP_NEWSIZE=\"800M\"     - path: cassandra-rackdc.properties       line: 'dc={{ cassandra_datacenter1_name }}'       regexp: '^dc='     - path: cassandra-rackdc.properties       line: 'rack={{ cassandra_rack_name }}'       regexp: '^rack='     \u0441assandra_configuration:     authenticator: PasswordAuthenticator     cluster_name: \"{{ envname }}-cluster\"     commitlog_directory: \/data\/cassandra\/commitlog     commitlog_sync: periodic     commitlog_sync_period_in_ms: 10000     data_file_directories:         - \/data\/cassandra\/data     endpoint_snitch: GossipingPropertyFileSnitch     hints_directory: \"\/data\/cassandra\/hints\"     listen_address: \"{{ ansible_default_ipv4.address }}\"     rpc_address: \"{{ ansible_default_ipv4.address }}\"     partitioner: org.apache.cassandra.dht.Murmur3Partitioner     num_tokens: 256     saved_caches_directory: \/data\/cassandra\/saved_caches     seed_provider:         - class_name: \"org.apache.cassandra.locator.SimpleSeedProvider\"           parameters:               - seeds: \"{{ seeds }}\"     start_native_transport: true<\/code><\/pre>\n<ul>\n<li>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f cassandra_max_heapsize_mb \u0438 cassandra_heap_new_size_mb \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 (\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432) \u0432 \u0442\u0430\u0441\u043a\u0430\u0445, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432 tasks\/variables.yml<\/p>\n<\/li>\n<li>\n<p>seeds<em>list \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 \u0432 group<\/em>vars\/all.yml:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"yaml\">seeds_list: \"{{ groups['seeds'] | map('extract',hostvars,'ansible_host') | list }}\"<\/code><\/pre>\n<p>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 hosts(inventory) \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0430 seeds, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438 \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0438\u0434\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<ul>\n<li>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u043e\u043d\u0443\u0441\u0430, \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-330230","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/330230","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=330230"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/330230\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=330230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=330230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=330230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}