63 Commits

Author SHA1 Message Date
Greg Karékinian
0b579b1fea Remove the redirection from HTTP to HTTPS from the mastodon vhost
This is already done in the certbot vhost
(https://gitea.kosmos.org/kosmos/chef/src/branch/master/site-cookbooks/kosmos-nginx/templates/default/nginx_conf_certbot.erb)
and it redirects every request to HTTPS, breaking Let's Encrypt
validation

Fixes #110
2019-10-28 11:18:31 +01:00
c7d91f68f9
Fix Mastodon Web systemd service
Removes a legacy property from the config, which made the service fail
to start after having upgraded systemd on Andromeda.
2019-10-16 08:29:34 +02:00
66782f1f05
Update installed Ruby version for Mastodon 3.x 2019-10-13 20:16:54 +02:00
Greg Karékinian
3be9b2fb44 Update yarn to the latest version 2019-09-27 10:57:58 +02:00
Greg Karékinian
438c5ff72d Fix the services restarting every time the recipe is executed
* Manually send a restart action from the application_git resource
* Do not depend on application_ruby anymore
2019-09-27 10:57:35 +02:00
Greg Karékinian
4b39ea60dd Set the NODE_ENV variable when running yarn
The assets precompilation task runs yarn with NODE_ENV=production,
before this change yarn would install a different set of packages, with
this change the run from the assets precompilation is idempotent
2019-09-27 10:55:32 +02:00
Greg Karékinian
b1cfa6f6f7 Install Java for Elasticsearch
It was missing from the recipe
2019-09-27 10:51:26 +02:00
Greg Karékinian
dace5672e4 Move the java heap size to an attribute 2019-09-27 10:50:56 +02:00
0ca002c67c Merge branch 'bugfix/tor_attributes' of kosmos/chef into master 2019-09-11 12:53:50 +00:00
Greg Karékinian
2ecc128abd Move the hidden service attributes to the attributes file
When it is set in the recipe the hidden service dir doesn't get set
correctly (nil), resulting in a broken torrc file
2019-09-11 13:47:42 +02:00
Greg Karékinian
fdb4353ac0 Raise the memory limit for Elasticsearch 2019-09-11 11:21:10 +02:00
Greg Karékinian
245392c4ad Install Elasticsearch 6.8.2
Version 7 isn't compatible with Mastodon yet
2019-09-10 12:29:24 +02:00
Greg Karékinian
efa958a374 Merge branch 'master' into feature/96-elasticsearch_mastodon 2019-09-09 16:20:46 +02:00
40eb94f091
Move Tor attributes to recipe files 2019-09-09 13:36:49 +02:00
Greg Karékinian
039da3d35a Install Elasticsearch and enable it in Mastodon
Refs #96
2019-09-06 17:26:06 +02:00
10b6f6370e
Configure Mastodon to use its Tor hidden service 2019-09-02 14:39:25 +02:00
0d20cddbf5
Prep cookbooks for Tor hidden services for Mastodon 2019-08-31 15:37:50 +02:00
Greg Karékinian
d398c167ca Allow to pass extra attributes to backup PostgreSQL databases 2019-05-14 16:39:21 +02:00
Greg Karékinian
90815bb274 Fix the postgresql credentials for the backup attributes 2019-05-08 16:58:47 +02:00
Greg Karékinian
7271065c5b Add names to the execute resources 2019-05-08 16:58:31 +02:00
89027f1f32
Fix maintenance page paths 2019-05-07 16:10:23 +02:00
99a677ec47
Configure maintenance error page for 503 2019-05-07 15:52:58 +02:00
1ee2b5ad41
Add maintenance page feature to Mastodon nginx site 2019-05-07 15:49:01 +02:00
2def42b744
Update Ruby version for Mastodon 2019-04-16 12:56:37 +01:00
Greg Karékinian
57d0885d26 Change the licenses of hte kosmos cookbooks to MIT 2019-04-12 11:41:20 +02:00
Greg Karékinian
e65374c893 Add TODO prefix 2019-04-12 11:21:37 +02:00
Greg Karékinian
67a2c1ea55 Fix the mastodon user variable 2019-04-10 16:38:57 +02:00
Greg Karékinian
39744f517f Fix an undefined variable on older Ubuntu versions 2019-04-10 16:19:05 +02:00
Greg Karékinian
919f5db431 Fix the application resources to work on Chef 14 2019-04-10 11:49:26 +02:00
Greg Karékinian
126b5f8dd5 Update the kosmos-mastodon cookbook to use the new postgresql cookbook
Don't depend on the deprecated database cookbook to create the database
2019-04-10 11:49:26 +02:00
Greg Karékinian
1ef24a2091 Install bundler 1.17.3 since we're still on Ruby 2.5 for now
Bundler 2.0 needs Ruby 2.6 or RubyGems 3.0
2019-04-03 11:02:51 +02:00
Greg Karékinian
58b5e5ac22 Move the creation of the SystemD service files outside of the application
This prevents a crash on the initial Chef run due to the service files
not being there yet before the services gets notified to restart
2019-04-03 11:02:25 +02:00
Greg Karékinian
17f1b2a20a Create a nginx_certbot_site resource to remove duplication
It creates a folder, the nginx vhost for certbot and HTTP redirects, and
also runs certbot and recreates the nginx vhost that includes the TLS
cert
2019-03-15 19:03:28 +01:00
Greg Karékinian
36e046ea73 Run certbot using the binary provided by the Ubuntu PPA 2019-03-14 10:52:44 +01:00
f082269e66
Use Gitea repo, new branch, new Ruby 2019-01-27 12:46:21 +08:00
90851fb7de Update Mastodon's Ruby 2018-11-01 12:19:30 +01:00
4bccf4dd88 Fix missing Mastodon/PosgreSQL backups
The backup cookbook was incomplete, and also there was no database
configured to be backed up.
2018-09-08 12:54:51 +08:00
Greg Karékinian
e6a3460a2c Make the number of sidekiq threads configurable, bump to 25 2018-09-03 19:11:42 +02:00
adbfc14765 Update Mastodon deps 2018-05-24 21:29:54 +02:00
Greg Karékinian
c3933012dd We install nodejs from package, update paths 2018-04-17 13:19:23 +02:00
Greg Karékinian
8653a8fa97 Use jemalloc1 on Puma and Sidekiq to lower the memory usage
More details:
https://www.speedshop.co/2017/12/04/malloc-doubles-ruby-memory.html
2018-03-20 16:07:55 +01:00
Greg Karékinian
6ae27293ce Set the number of ActiveRecord DB pools to 50 in the Sidekiq service 2018-02-28 15:11:22 +01:00
206e807ac7 Use custom version of poise-javascript
Fixes npm-outdated breaking chef runs all the time.

See https://github.com/poise/poise-javascript/pull/8
2017-11-05 00:37:20 +01:00
5b1c583313 Update node and yarn 2017-10-29 17:24:29 +01:00
08330e8749 Update Ruby and Yarn for Mastodon 2017-10-28 23:36:13 +02:00
0a3763fe5d Fix accidental error in Mastodon nginx config
The well-known folder wasn't served properly anymore.
2017-09-04 10:06:41 +02:00
8afa5ef106 Add vapid keys to template; don't cache SW 2017-07-31 13:55:27 +02:00
69b38552c6 Add vapid keys 2017-07-31 13:00:20 +02:00
2f6ab1e0b1 Add new apt deps, missing yarn install 2017-07-27 12:07:56 +02:00
e39792ea36 Update Mastodon Redis config
They introduced Redis URLs for the config, so I removed our own
additions and added the URL.
2017-06-16 12:09:22 -07:00