Move Mastodon to new VM on fornax #383
4
clients/mastodon-2.json
Normal file
4
clients/mastodon-2.json
Normal file
@ -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"
|
||||||
|
}
|
90
nodes/mastodon-2.json
Normal file
90
nodes/mastodon-2.json
Normal file
@ -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
|
# Allocate this amount of RAM to the Java heap for Elasticsearch
|
||||||
node.default["kosmos-mastodon"]["elasticsearch"]["allocated_memory"] = "1536m"
|
node.default["kosmos-mastodon"]["elasticsearch"]["allocated_memory"] = "1536m"
|
||||||
|
|
||||||
|
node.override["redisio"]["version"] = "6.2.6"
|
||||||
|
|
||||||
node.override["tor"]["HiddenServices"]["mastodon"] = {
|
node.override["tor"]["HiddenServices"]["mastodon"] = {
|
||||||
"HiddenServicePorts" => ["80 127.0.0.1:80", "443 127.0.0.1:443"]
|
"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-nginx"
|
||||||
depends "kosmos-nodejs"
|
depends "kosmos-nodejs"
|
||||||
depends "kosmos-redis"
|
depends 'redisio'
|
||||||
depends "poise-ruby-build"
|
depends "poise-ruby-build"
|
||||||
depends "application"
|
depends "application"
|
||||||
depends "application_git"
|
depends "application_git"
|
||||||
|
@ -4,8 +4,9 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
include_recipe "kosmos-nodejs"
|
include_recipe "kosmos-nodejs"
|
||||||
include_recipe "kosmos-redis"
|
|
||||||
include_recipe "java"
|
include_recipe "java"
|
||||||
|
include_recipe 'redisio::default'
|
||||||
|
include_recipe 'redisio::enable'
|
||||||
|
|
||||||
elasticsearch_user 'elasticsearch'
|
elasticsearch_user 'elasticsearch'
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=mastodon-sidekiq-scheduler
|
Description=mastodon-sidekiq-scheduler
|
||||||
Requires=redis-server.service
|
Requires=redis@6379.service
|
||||||
After=redis-server.service
|
After=redis@6379.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=<%= @user %>
|
User=<%= @user %>
|
||||||
WorkingDirectory=<%= @app_dir %>
|
WorkingDirectory=<%= @app_dir %>
|
||||||
Environment="RAILS_ENV=production"
|
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
|
ExecStart=<%= @bundle_path %> exec sidekiq -c <%= @sidekiq_threads %> -q scheduler
|
||||||
TimeoutSec=15
|
TimeoutSec=15
|
||||||
Restart=always
|
Restart=always
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=mastodon-sidekiq
|
Description=mastodon-sidekiq
|
||||||
Requires=redis-server.service
|
Requires=redis@6379.service
|
||||||
After=redis-server.service
|
After=redis@6379.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
@ -9,7 +9,7 @@ User=<%= @user %>
|
|||||||
WorkingDirectory=<%= @app_dir %>
|
WorkingDirectory=<%= @app_dir %>
|
||||||
Environment="RAILS_ENV=production"
|
Environment="RAILS_ENV=production"
|
||||||
Environment="DB_POOL=50"
|
Environment="DB_POOL=50"
|
||||||
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 default -q mailers -q pull -q push
|
ExecStart=<%= @bundle_path %> exec sidekiq -c <%= @sidekiq_threads %> -q default -q mailers -q pull -q push
|
||||||
TimeoutSec=15
|
TimeoutSec=15
|
||||||
Restart=always
|
Restart=always
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=mastodon-web
|
Description=mastodon-web
|
||||||
Requires=redis-server.service
|
Requires=redis@6379.service
|
||||||
After=redis-server.service
|
After=redis@6379.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
@ -10,7 +10,7 @@ PIDFile=<%= @app_dir %>/tmp/puma.pid
|
|||||||
WorkingDirectory=<%= @app_dir %>
|
WorkingDirectory=<%= @app_dir %>
|
||||||
Environment="RAILS_ENV=production"
|
Environment="RAILS_ENV=production"
|
||||||
Environment="PORT=3000"
|
Environment="PORT=3000"
|
||||||
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 puma -C config/puma.rb --pidfile <%= @app_dir %>/tmp/puma.pid
|
ExecStart=<%= @bundle_path %> exec puma -C config/puma.rb --pidfile <%= @app_dir %>/tmp/puma.pid
|
||||||
ExecStop=<%= @bundle_path %> exec puma -C config/puma.rb --pidfile <%= @app_dir %>/tmp/puma.pid stop
|
ExecStop=<%= @bundle_path %> exec puma -C config/puma.rb --pidfile <%= @app_dir %>/tmp/puma.pid stop
|
||||||
ExecReload=<%= @bundle_path %> exec pumactl -F config/puma.rb --pidfile <%= @app_dir %>/tmp/puma.pid phased-restart
|
ExecReload=<%= @bundle_path %> exec pumactl -F config/puma.rb --pidfile <%= @app_dir %>/tmp/puma.pid phased-restart
|
||||||
|
Loading…
x
Reference in New Issue
Block a user