Ansible in a micro-services architecture supporting independent development teams

Hi All,

I’m new to the group (& Ansible) so was hoping someone could give some advice on the best way to use Ansible in a micro-services env.

I’ve been tasked with using Ansible to manage a micro-services architecture on AWS using a pull model. I plan to use Ansible to configure instances from a vanilla AMI all the way to deploying the final PHP app.

My question is, how should you split this up in terms of Ansible code? I want to manage some of the playbooks/roles centrally (common software, monitoring etc.) but then leave some roles in the hands of each micro-services team (app config & deployment processes).

Is it normal to split my Ansible code across multiple Github repo’s? i.e. 1 central repo & then have a playbook section in each of the micro service repo’s? I’d then use CI deployment scripts to merge this all together before pushing to S3 for the instances to download & execute.

If anyone has tackled this kind of problem before & has any advice / battle scars I’d love to know.

Using ansible-galaxy and requirements.yml you can have each project
point to the repos of the roles they depend on to install before
running your playbooks

SCM submodules are another approach as would be fine grained ACL on a
central repo.