Time for another episode of “Migrating a service to a dedicated server”. Last time we migrated the Phusion Passenger website to a new server. The Passenger Status Service was next in line. Over time it got so popular that it started to annoy its roommates, so it was time to move out.
Passenger Status Service
The Passenger Status Service is a free service offered by Phusion to make the Passenger status reports work on Heroku. Passenger and Heroku play along nicely1, but it used to be impossible to inspect the output generated by the
passenger-status command line tool. At the time the Passenger Status Service was created, Heroku didn’t offer SSH access to a dyno2.
Enter Passenger Status Service.
By adding a reporting command to your Procfile you can instruct it to gather the info generated by
passenger-status and send it to the Passenger Status Service. You can then inspect the output from the comfort of your own web browser. Today Passenger Status Service is mostly a neat frontend.
The Big Move
Just like for the Passenger website migration, we used Ansible to provision the new server. We were able to use a simplified version of the Passenger Website playbook. The playbook we used is pretty straightforward. Aside from the common stuff it only needs to run a Rails app and a PostgreSQL database.
We followed roughly the same procedure as last time:
- Provision the new server
- Deploy the application
- Copy the database
- Update the dns
The only thing we didn’t do is forwarding traffic from the old server to the new server. In preparation of the migration we had set the TTL of the DNS records to 5 minutes. This way any clients sending data to the Passenger Status Service (which would mostly be Heroku dyno’s anyway) should be able to pick up the DNS change pretty quickly.
We've actually migrated Passenger Status Service twice, and it's now hosted by Hetzner as our previous vendor no longer matched our expectations. Same procedure though.
The hosted version is easy to use, but the disadvantage is that we will have access to your data. We also don’t offer any uptime or availability guarantees. However, you’re in luck: the Passenger Status Service is an open source Rails app. You can set up a self-hosted version, giving you full control over your data and the availability of the service.
As with any and all of our open source projects, we welcome contributions and are happy to help you get your pull request merged. Don’t hesitate to reach out if you have any questions about our (recent) server migrations or Ansible Playbooks: @scarhand.
1. Exemplified by our wide range of Docs on Heroku: https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/heroku/standalone/oss/deploy_app_main.html↩
2. They do now: https://devcenter.heroku.com/articles/exec↩
Photo by Brandi Redd