- Register a domain name. Buy a cert for it.
- Spin up Ubuntu Trusty 14.04 on AWS & point DNS at the instance. Don't bother making user accounts or anything; only somebody with your key should be able to ssh in. Add security group rules allowing https from anywhere, or maybe http if you want to redirect.
- Make an EBS volume or raid up some instance stores and mount them on
/mnt/mastodon
, owned by ubuntu. - Download all the files in this gist to your local controlling host, e.g., your laptop.
- Make a file named
inventory
with[general]\nyour-host.tld
in it. - Put all of the
*.conf
files in this gist into a subdirectory namedfiles
. - Put your certs somewhere in the directory & make sure the ansible playbook
services.yml
is pointing to them. - Run
ansible-playbook -i inventory host-setup.yml
- Run
ansible-playbook -i inventory mastodon.yml
- you might get ruby 2.3.3 instead of 2.3.1 in which case you should just edit the Gemfile.
- Copy
.env.production.sample
file intofiles/env.production
. Edit. Set up any implied required external services, like S3 buckets & a mailer. This will take you a bit. Have https://github.com/Tootsuite/mastodon/blob/master/docs/Running-Mastodon/Production-guide.md up while you do this. - NOTE that you need to replace
mastodon
withubuntu
in the postgres setup. This still needs to be done by hand. (Sorry!) - Run
ansible-playbook -i inventory services.yml
.
- Not yet in the ansible scripts: cron job setup.
- Postgres is still on the default volume! Argh.
- No backups. Argh.
- Need to write handlers so we stop/start only when the files change.
- Should use rbenv to get ruby 2.3.1 instead of ruby 2.3.3.