Jugi
Jugi

Reputation: 1254

AWS Code deploy - How to use single deployment to deploy the artifacts for multiple services in multiple machines

I was looking around aws code deploy to perform deployment. My application will have multiple services like apache, tomcat, database, cassandra, kafka and etc..

Each services will run in different machines. As per my knowledge it looks like i need to create different deployment group for each services(because each services running in different instances) and different deployment for each services.

So for example, if i have around 5 different services in my application and each running in different instance, do i need to create 5 deployment group and 5 different deployment in aws code deploy ? Is there any option to perform deployment for all the services using a single deployment/appspec file ? I would like to get some ideas from experts on how we can accomplish this effectively.

Upvotes: 0

Views: 846

Answers (1)

EmptyArsenal
EmptyArsenal

Reputation: 7464

If I understand your use case correctly, you have an application that is made up of 5 different services. Every service runs on a different set of instances. You want to know if you can deploy all 5 services to a different set of instances with one deployment? That's not possible without doing some really hacky things in your appspec.yml, which would not be recommended. A deployment is tied to one deployment group and one revision.

The Recommended Way

If you want to do this with CodeDeploy, you can break it up with applications or deployment groups. There is no way to have a deployment group with a mix of different services for different instances.

Ideally, each service in your application has it's own CodeDeploy application, and each application would have one deployment group. You could use a deployment group for that as well in the same application, but conceptually, a deployment group is intended to break up a fleet with the same service running, though it doesn't really matter.

Installing applications you don't code

If you're talking about installing applications you don't own like a DB or Apache, the EC2 user data is probably the place you want to install that with.

Upvotes: 1

Related Questions