Right now Trellis is designed to work on single servers. This means MariaDB (database), Nginx (web server), etc all on the same server. It's obviously a good practice to break these apart for scaling.
This requires a lot of manual work as it is. Our hosts files can easily support different groups and servers within them, but server.yml isn't set up to easily take advantage of multiple groups.
The solution is probably to create more playbooks. At least the following:
A unified server.yml can still exist which ties them all together by default.
I was curious if there has been any movement on this? I would LOVE to use trellis to test, provision, and deploy a multi server setup. The setup that I thought would be ideal would include:
I found this tutorial on DreamCompute which uses this LAMP setup. I am no ansible expert, but maybe this is a good starting place to see how some of these things are achieved and could be incorporated into Trellis. For reference, here's another tutorial to achieve this setup manually without using ansible.
No there hasn't been any progress on this.
We're still looking for people to help out with it.
Hey @swalkinshaw , I would love to help take on this project. To be completely honest, I have never used config management until this project, but I'd love to learn and this would be a great task.
How can we start?
@partounian I've done this on a couple projects, actually, but I can't reveal source. First task would be to update the Vagrant file to spin up multiple servers resembling database, cache, and web servers. This would help to enforce the boundary rather than try to guess how interacting with separate servers would behave. After that, set up a playbook that installs common configuration on all the servers (common, ntp, ssh, etc) and then focus on installing the specific roles on each server. From there, you run the playbook, break something, fix it, and repeat!
This would be a great project to get familiar with how everything is set up. Definitely diving into the deep end, but worth it 👍
Thanks for the pointers! I'm excited, but that's also partially the redbull, I'll take a stab at this when I can and report back progress. Also, have you guys considered a Slack?
This would also make containers possible, e.g. with docker-compose because each container/instance can use its own separate playbook (or have it provisioned, e.g. using packer.io with docker - or have the config mounted that is copied otherwise).
I thought for docker it would be best to use docker machine and whatnot. Anyhow, I'm currently in the middle of a big project, but when I finish (July 1st-ish) I will start work on this.
Update: Sorry for not working on this, I just haven't seen a usage yet after using Trellis for over a year.
There is a forked trellis setup for Laravel (https://github.com/ptibbetts/anstead) which I have used once where the playbooks are separated and also a redis role is added. It is a bit outdated now compared to the current version of trellis, but worked properly.
I've done this with a few recent projects, really straightforward actually.
I could write a tutorial or something.
On Mon, Feb 25, 2019, 5:58 AM pepijn-vanvlaanderen notifications@github.com
wrote:
There is a forked setup for Laravel which I have used once where the
playbooks are separated and also a redis role is added. It is a bit
outdated now compared to the current version of trellis, but worked
properly.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/roots/trellis/issues/536#issuecomment-467020595, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACbIG_2pPm3iEHHnoQqkhr0VnnIlV0m0ks5vQ-wWgaJpZM4H7AjN
.>
Thank you,
Patrick Artounian
Should be great to have a tutorial on this in the docs.
Most helpful comment
I've done this with a few recent projects, really straightforward actually.
I could write a tutorial or something.
On Mon, Feb 25, 2019, 5:58 AM pepijn-vanvlaanderen notifications@github.com
wrote:
Thank you,
Patrick Artounian