Merge branch 'feature/96-elasticsearch_mastodon' of kosmos/chef into master

This commit is contained in:
Râu Cao 2019-09-11 11:44:05 +00:00 committed by Gitea
commit 9c40dcfbf4
5 changed files with 27 additions and 1 deletions

View File

@ -52,3 +52,4 @@ cookbook 'mariadb', '= 0.3.1'
cookbook 'ipfs',
git: 'https://github.com/67P/ipfs-cookbook.git',
ref: 'v0.4.1'
cookbook 'elasticsearch', '= 4.2.0'

View File

@ -11,6 +11,7 @@ DEPENDENCIES
chef_client_updater (= 1.1.1)
compat_resource (= 12.19.0)
composer (~> 2.6.1)
elasticsearch (= 4.2.0)
firewall (~> 2.6.3)
git (= 6.0.0)
homebrew (= 3.0.0)
@ -89,6 +90,11 @@ GRAPH
php (>= 0.0.0)
windows (>= 0.0.0)
dmg (4.1.1)
elasticsearch (4.2.0)
apt (>= 0.0.0)
ark (>= 0.0.0)
chef-sugar (>= 0.0.0)
yum (>= 0.0.0)
firewall (2.6.5)
chef-sugar (>= 0.0.0)
git (6.0.0)

View File

@ -4,7 +4,7 @@ maintainer_email 'mail@kosmos.org'
license 'MIT'
description 'Installs/Configures kosmos-mastodon'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.0'
version '0.2.0'
depends "kosmos-nginx"
depends "kosmos-nodejs"
@ -15,4 +15,5 @@ depends "application_javascript"
depends "postgresql"
depends "kosmos-postgresql"
depends "backup"
depends "elasticsearch"
depends "tor-full"

View File

@ -28,6 +28,19 @@ include_recipe "kosmos-nodejs"
include_recipe "kosmos-redis"
include_recipe "kosmos-postgresql"
elasticsearch_user 'elasticsearch'
elasticsearch_install 'elasticsearch' do
type 'package'
version '6.8.2'
end
elasticsearch_configure 'elasticsearch' do
allocated_memory '1536m'
end
elasticsearch_service 'elasticsearch'
# TODO: Remove the condition once we have migrated mastodon to andromeda
unless platform?('ubuntu') && node[:platform_version].to_f < 18.04
postgresql_data_bag_item = data_bag_item('credentials', 'postgresql')

View File

@ -55,4 +55,9 @@ S3_REGION=<%= @s3_region %>
VAPID_PRIVATE_KEY=<%= @vapid_private_key %>
VAPID_PUBLIC_KEY=<%= @vapid_public_key %>
# Elasticsearch
ES_ENABLED=true
ES_HOST=localhost
ES_PORT=9200
ALLOW_ACCESS_TO_HIDDEN_SERVICE=true