{"id":2823,"date":"2018-04-05T23:46:53","date_gmt":"2018-04-05T14:46:53","guid":{"rendered":"https:\/\/tech.akat.info\/?p=2823"},"modified":"2018-04-05T23:46:53","modified_gmt":"2018-04-05T14:46:53","slug":"cesicentralized-supervisor-interface%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%97%e3%81%9f","status":"publish","type":"post","link":"https:\/\/tech.akat.info\/?p=2823","title":{"rendered":"cesi(Centralized Supervisor Interface)\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f"},"content":{"rendered":"<p>\u4eca\u307e\u3067py-supervisord-monitor\u3092\u5229\u7528\u3057\u3066\u3044\u305f\u304c\u3001<br \/>\n\u30fb\u8a8d\u8a3c\u753b\u9762\u304c\u306a\u3044\u3053\u3068<br \/>\n\u30fb\u30b0\u30eb\u30fc\u30d7\u5316\u3057\u3066\u7ba1\u7406\u3067\u304d\u306a\u3044\u3053\u3068<br \/>\n\u304b\u3089\u5909\u66f4\u3057\u305f\u3002\u30dd\u30a4\u30f3\u30c8\u306e\u307f\u8a18\u8f09\u3059\u308b\u3002<\/p>\n<h1>cesi\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# aptitude install sqlite3 python python-flask\r\n# cd \/usr\/local\/src\/\r\n# git clone https:\/\/github.com\/Gamegos\/cesi\r\n# cd cesi\/\r\n# cp -R cesi \/etc\/\r\n# sqlite3 \/etc\/cesi\/userinfo.db &lt; userinfo.sql\r\n# vi \/etc\/cesi.conf\r\n==================================\r\n&#x5B;node:node1]\r\nusername = username\r\npassword = password\r\nhost = x.x.x.x\r\nport = 9001\r\n\r\n&#x5B;environment:production]\r\nmembers = node1\r\n\r\n&#x5B;cesi]\r\ndatabase = \/etc\/cesi\/userinfo.db\r\nactivity_log = \/var\/log\/cesi-activity.log\r\nhost = 127.0.0.1\r\n;port = 5000\r\n;name = what name mean?\r\n==================================\r\n# cd \/etc\/cesi\/\r\n# python web.py\r\n<\/pre>\n<h1>cesi\u306e\u6c38\u7d9a\u8d77\u52d5<\/h1>\n<p>supervisord\u306b\u4ee5\u4e0b\u3092\u8ffd\u52a0\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# vi \/etc\/supervisor\/conf.d\/cesi.conf\r\n==================================\r\n&#x5B;program:cesi]\r\ndirectory=\/etc\/cesi\r\ncommand=python web.py\r\nuser=root\r\ngroup=root\r\nautostart=true\r\nautorestart=true\r\nredirect_stdout=true\r\nredirect_stderr=true\r\nstopasgroup=true\r\nstopsignal=QUIT\r\nstdout_logfile=\/var\/log\/supervisor\/%(program_name)s_%(process_num)s.log\r\nstdout_logfile_maxbytes=10MB\r\nstdout_logfile_backups=5\r\nstderr_logfile=\/var\/log\/supervisor\/%(program_name)s_%(process_num)s_error.log\r\nprocess_name=%(process_num)s\r\nstderr_logfile_maxbytes=10MB\r\nstderr_logfile_backups=5\r\n==================================\r\n<\/pre>\n<h1>cesi\u306e80\u756a\u30dd\u30fc\u30c8\u52d5\u4f5c<\/h1>\n<p>nginx\u3067\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u3057\u305f\u3002config\u306f\u4ee5\u4e0b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nlocation \/ {\r\n    try_files $uri @cesi;\r\n}\r\n\r\n### cesi(supervisor) ###\r\nlocation @cesi {\r\n    proxy_pass http:\/\/127.0.0.1:5000;\r\n    include \/etc\/nginx\/proxy_params;\r\n}\r\n<\/pre>\n<h1>\u53c2\u8003URL<\/h1>\n<p><a href=\"https:\/\/github.com\/gamegos\/cesi\/tree\/v2_api\">GitHub:gamegos\/cesi<\/a><br \/>\n<a href=\"https:\/\/qiita.com\/jkkitakita\/items\/2ecfb3b134b2638ecd55\">consul-template &#038; supervisor\u3067\u30d7\u30ed\u30bb\u30b9\u306e\u53ef\u8996\u5316<\/a><br \/>\n<a href=\"http:\/\/mononofu.hatenablog.com\/entry\/2013\/02\/20\/155954\">nginx\u3067URL\u3067\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u5148\u3092\u632f\u308a\u5206\u3051\u308b\u8a2d\u5b9a<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u307e\u3067py-supervisord-monitor\u3092\u5229\u7528\u3057\u3066\u3044\u305f\u304c\u3001 \u30fb\u8a8d\u8a3c\u753b\u9762\u304c\u306a\u3044\u3053\u3068 \u30fb\u30b0\u30eb\u30fc\u30d7\u5316\u3057\u3066\u7ba1\u7406\u3067\u304d\u306a\u3044\u3053\u3068 \u304b\u3089\u5909\u66f4\u3057\u305f\u3002\u30dd\u30a4\u30f3\u30c8\u306e\u307f\u8a18\u8f09\u3059\u308b\u3002 cesi\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb # aptitude instal [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[73],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/2823"}],"collection":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2823"}],"version-history":[{"count":1,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/2823\/revisions"}],"predecessor-version":[{"id":2824,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/2823\/revisions\/2824"}],"wp:attachment":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}