Hi all

This is my first post of (hopefully) many.  I'm James, I'm an IT 
contractor, and I'm currently working in an infrastructure team that 
heavily uses Ansible, my background is mainly Java, so I'm less 
infrastructure and more apps/automation/aws.

So heres my problem.

My client has a load of Ansible playbooks that they use to deploy various 
microservices in AWS.

At the moment, the playbooks do the following:


   - find a "base" AMI
   - apply base config - AV, SSHD, yum updates [for the particular 
   environment you are working with, dev, qa, sit etc]
   - copy across a java application
   - set up the relevant configuration on the java application [for the 
   particular environment you are working with, dev, qa, sit etc, database 
   URLs etc]
   - create a launch config
   - apply the new AMI to the launch config replacing existing instances


This works fine, *but*, I am looking to refactor this stuff in to a BUILD 
state and a DEPLOY state, which would go something like this:

*BUILD*


   - find a "base" AMI
   - apply AV, SSHD, yum updates WITHOUT any specific configuration
   - copy across a java application


*DEPLOY*


   - find the AMI that was created in the BUILD phase
   - create a launch configuration for it
   - launch the instance and let it pull in its environment specific config 
   (dev, qa etc, database connection config, satellite service URLs etc)


On previous projects (albeit without the use of Ansible) I have achieved 
the DEPLOY phase using the UserData config in the AWS LaunchConfiguration.

Can anyone advise whether they have done anything similar using Ansible?

I thought I could pull the Ansible code on to the instance at boot and run 
Ansible to configure its specific settings, but this does sound a little 
messy.  It would also mean trying to work out BUILD and DEPLOY steps in the 
current Ansible tasks, which could be a pain.

Anyway - all thoughts and assistance gratefully received.

Thanks

James.


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7b055117-8031-4986-8905-885d896bbd26%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to