Switch Mastodon cookbook to new Redis cookbook
Also add new node config. refs #349 Co-authored-by Greg Karékinian <greg@karekinian.com>
This commit is contained in:
parent
341806ec8a
commit
b823ad5e59
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "mastodon-2",
|
||||
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA27a8h17CCQLP8JY59n+M\nURsrbeVvRi3yIUe1IklOlRSTy0L3Z37rFuSNC3dC9rKl/pHDKtorgeukxbFADXQx\nkta2LNX8gf09jCWsUdga5lWIbfOdtlCLRDG1MVEUSA0f6Sxdqr8RbjM2ch31T6Me\n5Z6DYdggwBujcPHwZC1AugI1wJ0T5XHY9f2MDs/XjNEdw3ThYbAdbl1e09ql6Gtg\nSVCa4RlLg/KICdLJtVOLkX6049/XRxi41I6xvu9tXsqgV3+bs8dYbeGLsTWmpPIv\naAUMcf/A5t4B2DVpnlXDytPqfvZQPD3aBVyfEJRGI1yD6Vi9zL3RyIhDQ/I7PMNI\naQIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
{
|
||||
"name": "mastodon-2",
|
||||
"normal": {
|
||||
"knife_zero": {
|
||||
"host": "10.1.1.114"
|
||||
}
|
||||
},
|
||||
"automatic": {
|
||||
"fqdn": "mastodon-2",
|
||||
"os": "linux",
|
||||
"os_version": "5.4.0-1049-kvm",
|
||||
"hostname": "mastodon-2",
|
||||
"ipaddress": "192.168.122.33",
|
||||
"roles": [
|
||||
"mastodon",
|
||||
"postgresql_client"
|
||||
],
|
||||
"recipes": [
|
||||
"kosmos-base",
|
||||
"kosmos-base::default",
|
||||
"kosmos_postgresql::hostsfile",
|
||||
"kosmos-mastodon",
|
||||
"kosmos-mastodon::default",
|
||||
"kosmos-mastodon::nginx",
|
||||
"apt::default",
|
||||
"timezone_iii::default",
|
||||
"timezone_iii::debian",
|
||||
"ntp::default",
|
||||
"ntp::apparmor",
|
||||
"kosmos-base::systemd_emails",
|
||||
"apt::unattended-upgrades",
|
||||
"kosmos-base::firewall",
|
||||
"kosmos-postfix::default",
|
||||
"postfix::default",
|
||||
"postfix::_common",
|
||||
"postfix::_attributes",
|
||||
"postfix::sasl_auth",
|
||||
"hostname::default",
|
||||
"kosmos-nodejs::default",
|
||||
"nodejs::nodejs_from_package",
|
||||
"nodejs::repo",
|
||||
"java::default",
|
||||
"java::set_attributes_from_version",
|
||||
"java::openjdk",
|
||||
"java::notify",
|
||||
"java::default_java_symlink",
|
||||
"java::set_java_home",
|
||||
"redisio::default",
|
||||
"redisio::_install_prereqs",
|
||||
"redisio::install",
|
||||
"ulimit::default",
|
||||
"redisio::disable_os_default",
|
||||
"redisio::configure",
|
||||
"redisio::enable",
|
||||
"nodejs::npm",
|
||||
"nodejs::install",
|
||||
"kosmos-nginx::default",
|
||||
"nginx::default",
|
||||
"nginx::package",
|
||||
"nginx::ohai_plugin",
|
||||
"nginx::repo",
|
||||
"nginx::commons",
|
||||
"nginx::commons_dir",
|
||||
"nginx::commons_script",
|
||||
"nginx::commons_conf",
|
||||
"kosmos-nginx::firewall",
|
||||
"tor-full::default",
|
||||
"git::default",
|
||||
"git::package",
|
||||
"kosmos-base::letsencrypt"
|
||||
],
|
||||
"platform": "ubuntu",
|
||||
"platform_version": "20.04",
|
||||
"cloud": null,
|
||||
"chef_packages": {
|
||||
"ohai": {
|
||||
"version": "15.12.0",
|
||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/ohai-15.12.0/lib/ohai"
|
||||
},
|
||||
"chef": {
|
||||
"version": "15.17.4",
|
||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.17.4/lib"
|
||||
}
|
||||
}
|
||||
},
|
||||
"run_list": [
|
||||
"recipe[kosmos-base]",
|
||||
"role[mastodon]"
|
||||
]
|
||||
}
|
|
@ -9,6 +9,8 @@ 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["redisio"]["version"] = "6.2.6"
|
||||
|
||||
node.override["tor"]["HiddenServices"]["mastodon"] = {
|
||||
"HiddenServicePorts" => ["80 127.0.0.1:80", "443 127.0.0.1:443"]
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ version '0.2.1'
|
|||
|
||||
depends "kosmos-nginx"
|
||||
depends "kosmos-nodejs"
|
||||
depends "kosmos-redis"
|
||||
depends 'redisio'
|
||||
depends "poise-ruby-build"
|
||||
depends "application"
|
||||
depends "application_git"
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
#
|
||||
|
||||
include_recipe "kosmos-nodejs"
|
||||
include_recipe "kosmos-redis"
|
||||
include_recipe "java"
|
||||
include_recipe 'redisio::default'
|
||||
include_recipe 'redisio::enable'
|
||||
|
||||
elasticsearch_user 'elasticsearch'
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
[Unit]
|
||||
Description=mastodon-sidekiq-scheduler
|
||||
Requires=redis-server.service
|
||||
After=redis-server.service
|
||||
Requires=redis@6379.service
|
||||
After=redis@6379.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=<%= @user %>
|
||||
WorkingDirectory=<%= @app_dir %>
|
||||
Environment="RAILS_ENV=production"
|
||||
Environment="LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1"
|
||||
Environment="LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2"
|
||||
ExecStart=<%= @bundle_path %> exec sidekiq -c <%= @sidekiq_threads %> -q scheduler
|
||||
TimeoutSec=15
|
||||
Restart=always
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[Unit]
|
||||
Description=mastodon-sidekiq
|
||||
Requires=redis-server.service
|
||||
After=redis-server.service
|
||||
Requires=redis@6379.service
|
||||
After=redis@6379.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[Unit]
|
||||
Description=mastodon-web
|
||||
Requires=redis-server.service
|
||||
After=redis-server.service
|
||||
Requires=redis@6379.service
|
||||
After=redis@6379.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
|
|
Loading…
Reference in New Issue