How to deal with deployments to a single host with multiple application servers using Fabric?

I have many application servers running on the same host. Every application server is installed in a different directory.

How should I tackle deployments on the servers, using Fabric? I would like to be able to perform deployments on each server separately, and on subsets of servers. Clearly the env.hosts parameter has no use here, since all servers are on the same host. Same goes for the env.roledefs parameter. These come in handy when every server is installed on a different host.

How should I deal with grouping of the servers, and setting separate environment parameters for each one of them which the fab tool can read and apply.

Upvotes: 3

Views: 211

Answers (1)

Morgan
Morgan

Reputation: 4131

It's just python so do what you need to do to keep them seperate. You can define the dir differences in a dictionary or some yaml file that's read into the script. There isn't anything made in fabric to make you do it one way nor provide any specific way to do this.

But essentially just keep in mind that it's not a DSL, it's a full python file, and you'll stumble onto what works best for you and your environment.

Upvotes: 2

Related Questions