opened
mapuri
username_0
**Background:**
At some point when we decided to use ansible for provisioning all our projects we started off with the ansible playbooks used by our packer builds. At that point `base` role was added to download and install multiple binaries. It was pretty much everything that packer builds were installing like backed in go, docker, etcd, ovs and so on.

**Fast Forward to requirements:**
Overtime as we have gained some more experience adding ansible plays for our own services, the existing organization of `base` role has gotten a bit unaligned with the general organization of other plays like:
1. not all service specific dependencies are always installed together. Just to state one instance, docker binary get's installed in base but the service is setup as part of `docker` role; same is true with etcd and ovs.
2. also overtime we have realized there are two broad environments that we are going to have a need to support with our ansible scripts for deploying Contiv services viz. **production** and **development**. A **production** environment would be a **stock** Ubuntu15.04 or Cento7.1 or in future a RHEL OS image loaded by the customer and then provisioned using our ansible playbooks according to their deployment. A **development** environment is similar to customer environment but we want some packages to be pre-installed in order to save time when bringing up the development environment. An example of **development** environment will be a vagrant box that we use for testing in our projects or the host machines that we use for development.

Resolving the above will hopefully help us get more clarity on how we can use our playbooks in customer/demo environments and development environments.

**Proposal:**

To achieve the above two requirements, I propose the following:

- move the service specific dependencies to respective roles that take care of provisioning the service. This shall address **1.** above.

- introduce a new role called `dev` that shall take care of pre-installing the requirements needed for the **development** environment but it shall reuse the tasks from underlying services. This shall address **2.** above.

Also see the associated patch of something in works in my fork here: https://github.com/username_0/ansible/tree/devrole

This shall give a more concrete idea of what I have in mind. I will create a formal PR once I have it more polished and tested. Feel free to take a look and suggest other cleanups as well that you might have had in mind.

cc @jainvipin @erikh
Proposal: reorganize/cleanup the base role
issue
closed
mapuri
username_0
issue
created
mapuri
username_0
closed by #14
comment