Bedrock-Ansible & RHEL

Our production server is running RHEL 6.5, and so I want to set up a dev environment to match it. I was able to find some instructions online to get RHEL to work with Vagrant, but it requires Bento and Packer.

As I really enjoy the awesome power of Bedrock-Ansible, is there a straightforward way to swap out the default Ubunutu box with a RHEL box?

Obviously just changing out config.vm.box = 'roots/bedrock' with config.vm.box = "rhel65x64" in the Vagrantfile won’t work, and I haven’t seen too many other similar questions with tips that spell it out for devops dilettante like myself.

So any help is appreciated.

The biggest change would be usin yum everywhere instead of apt. It’s harder than that because in a few places we add other Apt repositories which may or may not have an equivalent on Yum.

Filepaths might also be different. So it’s not something trivial and would require a decent amount of work.

Here’s an example role that handles both platforms: https://github.com/PCextreme/ansible-role-mariadb

You can look through to get an idea of how it supports both Ubuntu and CentOS.

I figured as much…

Will report back if I manage to combine the two.

Thanks for your help and great work!

I did this back when Trellis was starting as Bedrock-Ansible and was successful for my needs at the time. But I didn’t treat it like fork or pull request, so there is a LOT of current Trellis that I’m missing out on.

Thinking in the next month or so I will do a fresh clone to start that on a clean path.

Question - Would pull requests for Trellis to support both Ubuntu and CentOS be accepted?

Hey :slightly_smiling:

I’d be hesitant at this point to start supporting both platforms. We need to get better with just Ubuntu first doing some automated tests so we can be more confident in it. Supporting both means more overhead for every single new feature and bugs. Especially since no one on the Roots team has any experience with it.

So in the future we might if we got a commitment from others to help out on it, but not yet at least.

1 Like

Fair enough.

As a starting point, I’ve just forked Trellis to CENTRELLIS :smiley: and will be starting with CentOS 6.6 - https://atlas.hashicorp.com/boxcutter/boxes/centos66-i386 - for the base box of Vagrant. Would be happy to have contributions from any others who want / need / prefer the RHEL stack to Ubuntu.

FYI :

  • Will be keeping all trellis commands identical - repo change in name only.
  • Tried rhellis and trhellis but just sounded weird. Plus if you ever give it a shout-out on the podcast I can’t imagine it not causing confusion on T - enunciation of rhellis vs trellis.
1 Like