From dace5672e4982c81db129b6e06367a1ebdd13fa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Fri, 27 Sep 2019 10:50:56 +0200 Subject: [PATCH] Move the java heap size to an attribute --- site-cookbooks/kosmos-mastodon/attributes/default.rb | 2 ++ site-cookbooks/kosmos-mastodon/recipes/default.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/site-cookbooks/kosmos-mastodon/attributes/default.rb b/site-cookbooks/kosmos-mastodon/attributes/default.rb index 9d99cea..eb91556 100644 --- a/site-cookbooks/kosmos-mastodon/attributes/default.rb +++ b/site-cookbooks/kosmos-mastodon/attributes/default.rb @@ -4,6 +4,8 @@ node.default["kosmos-mastodon"]["streaming_port"] = 4000 node.default["kosmos-mastodon"]["server_name"] = "kosmos.social" node.default["kosmos-mastodon"]["redis_url"] = "redis://localhost:6379/1" node.default["kosmos-mastodon"]["sidekiq_threads"] = 25 +# Allocate this amount of RAM to the Java heap for Elasticsearch +node.default["kosmos-mastodon"]["elasticsearch"]["allocated_memory"] = "1536m" node.override["tor"]["HiddenServices"]["mastodon"] = { "HiddenServicePorts" => ["80 127.0.0.1:80"] diff --git a/site-cookbooks/kosmos-mastodon/recipes/default.rb b/site-cookbooks/kosmos-mastodon/recipes/default.rb index 0e4dba9..a752a50 100644 --- a/site-cookbooks/kosmos-mastodon/recipes/default.rb +++ b/site-cookbooks/kosmos-mastodon/recipes/default.rb @@ -36,7 +36,7 @@ elasticsearch_install 'elasticsearch' do end elasticsearch_configure 'elasticsearch' do - allocated_memory '1536m' + allocated_memory node["kosmos-mastodon"]["elasticsearch"]["allocated_memory"] end elasticsearch_service 'elasticsearch'