This is a Rails app that will eventually power my tiny DIY content distribution network. Follow along if you'd like.
- create proxy in cdn app
- create dns entry
- create vps
curl -H 'Authorization: Bearer <proxy api key>' https://cdn.hostname/setup | sudo bash
setup
install nginx, create update cronupdate
one-minute cron, update certificates and config with last-updated-at. if there are updates, extract new certificates file, restart nginx
- Add log shipping to papertrail
- Add S3 sync sites
- Made the cache last forever
- added rudiumentary "push" zones but not using it yet because the deploy story isn't ready
- can now deactiate proxies and have them automatically taken out of the pool
Switched to production LE and set up corastreetpress.com. Everything seems to be working as expected.
App can now set up latency-based A and AAAA records for sites
Next steps:
- Use the
last_seen_at
Proxy attribute to pull proxies out of rotation that don't check in - Switch to production LE & set up a real site
These things are now working:
- creating or updating a site's domain list will generate a LetsEncrypt certificate
- nginx config generation
- setup script (install nginx, create update
curl | bash
shim, set up cron) - update script (download certificates and nginx config, restart nginx)
- update script is a server-controlled noop unless a site or proxy has updated since the certificates zipfile was last downloaded
Next steps:
- Switch to production LetsEncrypt
- Teach app how to set up proxies as geo-latency A and AAAA records for labels in domain_list for each site
- Set up a real site
- log rotate + remote_syslog2
- coordinate proxy admin with capistrano
- investigate SSH certificate authority