[Groonga-commit] droonga/chef-cookbooks at 361249c [master] Add template to run the daemon of droonga-http-server

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Apr 21 14:17:35 JST 2014


YUKI Hiroshi	2014-04-21 14:17:35 +0900 (Mon, 21 Apr 2014)

  New Revision: 361249c4e66a50ad0294b5d65fbd17bdfad626ce
  https://github.com/droonga/chef-cookbooks/commit/361249c4e66a50ad0294b5d65fbd17bdfad626ce

  Message:
    Add template to run the daemon of droonga-http-server

  Added files:
    droonga/templates/default/sv-droonga-http-server-run.erb
  Modified files:
    droonga/attributes/default.rb

  Modified: droonga/attributes/default.rb (+6 -0)
===================================================================
--- droonga/attributes/default.rb    2014-04-21 14:09:06 +0900 (c617ad5)
+++ droonga/attributes/default.rb    2014-04-21 14:17:35 +0900 (4b36221)
@@ -10,3 +10,9 @@ default.droonga.engine.template.cookbooks = {}
 default.droonga.http_server.user_name  = "droonga-http-server"
 default.droonga.http_server.group_name = "droonga-http-server"
 default.droonga.http_server.home       = "/home/droonga-http-server"
+default.droonga.http_server.node       = "node"
+default.droonga.http_server.host       = node.name
+default.droonga.http_server.port       = 13000
+default.droonga.http_server.tag        = "droonga"
+default.droonga.http_server.default_dataset = "Droonga"
+default.droonga.http_server.cache_size = 100

  Added: droonga/templates/default/sv-droonga-http-server-run.erb (+26 -0) 100755
===================================================================
--- /dev/null
+++ droonga/templates/default/sv-droonga-http-server-run.erb    2014-04-21 14:17:35 +0900 (a6d2f06)
@@ -0,0 +1,26 @@
+#!/bin/bash
+<% engine      = node.droonga.engine %>
+<% http_server = node.droonga.http_server %>
+
+exec 2>&1
+
+set -e
+set -u
+
+ulimit -n 20480
+
+user="<%= http_server.user_name %>"
+group="<%= http_server.group_name %>"
+work_dir="$(eval "echo ~${user}")/droonga-http-server/current"
+
+cd "$work_dir"
+exec chpst -u "$user:$group" \
+  "${work_dir}/bin/droonga-http-server" \
+    --host "<%= http_server.host %>" \
+    --port <%= http_server.port %> \
+    --tag "<%= http_server.tag %>" \
+    --receive-host-name <%= http_server.port %> \
+    --droonga-engine-host-name <%= engine.host %> \
+    --droonga-engine-port <%= engine.port %> \
+    --droonga-default-dataset <%= http_server.default_dataset %> \
+    --cache-size <%= http_server.cache_size %>
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index