Is Trellis meant for initial setup, or for ongoing maintenance?

Trellis is a wonderful tool to quickly setup the various environments. But I’m wondering: how do you guys use Trellis: as a tool for the initial setup of the various environments and then, months after the project is live, switch to “classic” manual system administration?

Is Trellis the right tool to maintain the production website too?

I’m asking this because I’ve just provisioned and deployed the production server (with a “coming soon” page) but since the production site uses additional domain names (redirects) that are not yet linked to the IP address, I cannot generate the letsencrypt certificates. I’m wondering if I should have waited to have everything before provisioning the server, or if I can update the environment without breaking the deployed site (“re-provision” the environment I believe is the term).
Oh, and to make it even more “simple”: one of the redirects will quickly become the main domain name, so I’ll need to switch around the virtualhosts. Without breaking things.

thank you very much…
Alexandre.

I can answer some of the second part of your question:

Presently Trellis doesn’t allow adding or changing domains in certificates after provisioning.

BUT

Provisioning a server with Trellis is so fast as easy, that I’ve always just (backed up my database and uploads and), added my new domains to wordpress_sites.yml, rebuilt my Digital Ocean droplet and reprovisioned/redeployed (and then imported my database and uploaded my uploads). Re-uploading the uploads takes by far the longest of any step and even then I can usually turn the whole thing around in about 10 minutes.

So typically adding domains and redirects isn’t a huge deal. It’s not something I’d want to do every day, since it does involve downtime, but it’s pretty quick and easy.

2 Likes

hopefully it will be fixed soon: SSL Privacy Error on www Redirect to non-www

Yes. The idea is you never SSH and update/fix things, unless you need to. But the Ansible configs and roles basically act as your version control for your server. The idea is other than any user uploaded files and the database, the code and the server are disposable or rather repeatable, so you can spin up new servers at any point.

This is the point of Trellis, but really it’s the point of all the server provisioners that have come out, Ansible, Chef, Puppet, etc.

3 Likes