Closed christopher-hopper closed 7 years ago
Would be a real step forward, however I suspect this may create maintainability issues. For me, I prefer CentOS 7 as the server OS even for web development, all projects I run are CentOS.
@christopher-hopper this has aways been part of the plan however we decided to initially focus on a single OS and version and make it really stable.
The templated packer scripts should make this a lot easier too.
https://github.com/beetboxvm/beetbox/tree/master/provisioning/ansible/roles/beetbox-packer/templates
I even started some work on this a few months ago -- https://github.com/thom8/beetbox/commit/43f28080cf2281887ebfaf5773e7ab6fcc969589
@ivrh @thom8 as a first step, I'd suggest a fork, or parallel branch:
Maintainability issues should be dealt with via the tests. This effort could begin to address any areas that need more adequate coverage. I did look at the packer scripts a while back and thought this could be done quite well using the structure you've already got. Nice work.
As the majority of included Ansible Galaxy roles already have test coverage on both OSs this effort would probably involve pushing some changes to those minority that don't currently support CentOS.
Where an Ansible role maintainer will not or cannot support CentOS, consider :
This post by Jeff Geerling may be a good place to start in setting up multi-platform testing:
Configure CI to run all existing tests against both CentOS and Ubuntu OS.
@christopher-hopper I would start with updating the existing CI config to use docker with ubuntu 14.04 on circle CI. This can be done via a PR, then we can add a CentOS build with parallelism -- https://circleci.com/docs/setting-up-parallelism/
We currently use this feature in the Drupal role -- https://github.com/beetboxvm/ansible-role-beetbox-drupal/blob/master/circle.yml#L15 -&- https://circleci.com/gh/beetboxvm/ansible-role-beetbox-drupal/42
I prefer Circle CI for SSH debugging feature alone.
Sorry, did I suggest something other than CircleCI? If so, I didn't mean to. Whatever the CI platform, use of Docker containers would be the way to go given what I have read.
vendor/bin/robo provision
by default it runs on a ubuntu:14.04
base image but is configurable...
vendor/bin/robo provision centos:7 beet_test
will demonstrate how broken this project is on centos
atm but at least provides a starting point.
When developing and testing code it is essential to have a local environment that matches the intended target as closely as possible. The PHP binaries installed on Debian / Ubuntu are not the same as those you'll get for CentOS / RHEL. Nor are many or all of the other key elements of the web stack.
Many of the Ansible galaxy roles relied upon by Beetbox already support both Debian and RHEL based distributions. So they will work nicely when run on Ubuntu or CentOS without needing a lot of work.
The Ansible playbooks and roles for Beetbox itself all assume Ubuntu as the target. Nothing wrong with that by the way, as this is the target distribution.
We could open Beetbox up to support both Debian and RHEL based distros by adjusting some of the patterns used in the Beetbox Ansible code to be more distro aware.
Imagine this:
Example
package
instead ofapt
Here's some sample Ansible code that installs the Vi Improved text editor. It will work on either Ubuntu or Centos: