0

I have a set of recipes that deploy python apps to AWS instances, they work well. I want to deploy two different apps with slight differences, like one needs async worker code installed and the other does not. How should I do this?

My options as, I see them:

  1. Create two Apps in OpsWorks and set env vars for each that the recipes can use to decide whether/how to run certain tasks EnvVars
  2. Create file(s) in the repo detailing app-specific requirements
  3. Add custom JSON th each deployment. customJSON

None of these options seems ideal to me, have I overlooked something? Has

Jake
  • 619
  • 4
  • 7
  • 17

1 Answers1

2

Options 1 and 3 are "effectively" (I say that loosely) the same. You're basically passing differences through JSON. I personally have used and been successful with creating two different Applications in OpsWorks but I was also very keen on the ability of a junior resource being able to modify some elements but not have access to passwords or other sensitive attributes. Direct answer, option 2 makes me twitch the most. Option 1/3 are better but depend on your needs.

J. Lawson
  • 86
  • 10
  • I'd go down the application's environment variables approach. Only because they removed the "custom JSON for deployment" in Chef 12 stacks, and this doesn't help in a situation where an instance is starting up and it needs to run a deploy for every app on the stack. – dannosaur Oct 24 '17 at 20:42