• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

ceejbot/mastodon-ansible: How I set up a mastodon instance on AWS with ansible o ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

ceejbot/mastodon-ansible

开源软件地址(OpenSource Url):

https://github.com/ceejbot/mastodon-ansible

开源编程语言(OpenSource Language):

Nginx 73.3%

开源软件介绍(OpenSource Introduction):

ansible for mastodon

Install Mastodon on Ubuntu Trusty with upstart instead of anything more recent and [insert muttering here].

A work in progress as I make this more like a typical ansible role instead of a set of one-off playbooks. Seems to work just fine (I'm using this for my own instance, at least).

  1. Clone this repo. Edit the vars.yml file.
  2. Register a domain name. Buy a cert for it.
  3. 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.
  4. Make an EBS volume or raid up some instance stores and mount them on {{install_dir}}, owned by ubuntu.
  5. Clone this repo.
  6. Edit the inventory file to replace the hostname with your name. This is just to make running the playbooks easier.
  7. Edit the vars.yml file.
  8. Note that I have assumed your cert files are named yourhost.tld.pem and yourhost.tld.key, which they might not be. Edit host-setup.yml if not.
  9. Run ansible-playbook -i inventory host-setup.yml. You should now have a host with all required dependencies installed.
  10. you might get ruby 2.3.3 instead of 2.3.1 in which case you should just edit the Gemfile.
  11. Open up templates/env.production. Edit. Set up any implied required external services, like S3 buckets & a mailer. This will take you a bit. Have the Mastodon production readme up while you do this.
  12. NOTE that you need to replace mastodon with ubuntu in the postgres setup. This still needs to be done by hand. (Sorry!)
  13. Run ansible-playbook -i inventory mastodon.yml. This does initial checkout & db creation.
  14. Run ansible-playbook -i inventory services.yml. This sets up upstart services & the nginx config.

The ansible plays set up the required cron jobs for you. They also create a handy script scripts/checkout.sh to pull source, run migrations, and restart all services for updating.

BUGS

  • 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.

LICENCE

ISC. Copy and edit at will!




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap