Do deployment plans run on all agents configured for an environment?
Asked by Doug Hughes:

I configure a deployment plan, add an environment, and setup two remote agents. When I run the deploy to that environment, are the tasks executed on both remote agents or only one?


Answers:
author: Mike Howells
body: If you want to deploy your releases to two hosts, you can configure your "Production" environment in Bamboo with tasks that update both hosts, either in parallel or in sequence. This would give you a logical production environment in Bamboo that deploys releases to multiple physical hosts.

Bamboo doesn't know anything about your multiple hosts, but your deployment tasks can write stuff to the deployment log that shows what happens to each host.

Or you can create two separate deployment environments so that you can choose which ones to deploy to. There are automatic deployment triggers you can add that will start a deployment if another deployment is successful, e.g. deploy to useast if uswest is green.


author: Mike Howells
body: When you run a deployment it's like a single job within a plan. In other words, all the tasks run on the same agent.

You can run more than one deployment in parallel provided they're to different environments. Each deployment will run on a different agent if you have more than one available.

You can define requirements that need to be met by the agent so that it picks the right one.

If you want to do stuff in parallel within one deployment, you need to do that within your tasks, e.g. on a Linux agent you can run multiple background jobs then wait for them to all complete.

comments: author: Doug Hughes
body: To clarify, I wasn't asking if individual tasks run on different agents, but if all of the tasks run on all of the configured agents in the environment. For example, I want two production web servers. A deployment remote agent would be running on both servers. Both remote agents would be associated with a production deployment environment. If I run the production deploy, does it deploy to both servers or only one?


author: Mike Howells
body: I'm not sure but I think maybe you're confusing Bamboo build agents with your own agents running in deployment environments.

Bamboo runs things on *build* agents, and only runs a given sequence of tasks on one build agent. You can configure environments with tasks that tell Bamboo how to deploy your own stuff to your environments, but those tasks are up to you. Bamboo doesn't know anything about your own "agents", it's up to you to configure tasks to handle them.


author: MarkZ
body: This I think is a major flaw in bamboo deploy, the fact that you treat deployments same as builds.

Consider changing design of deployment jobs to run/execute on all agents defined in the environment, in parallel.

Currently if we want to deploy to multiple agents in the same environment, we start only one at a time and re-run the deployment job.

Alternative as you mentioned is to have multiple environments.

Either way deployment needs to be done 3 times.

Am I missing something?

Altassian claims "Bamboo gives deployments the first-class treatment with deployment projects and environments."

Perhaps our definitions of first class vary?

Kind Regards

Mark Z.


Tags: bamboo-administration

bamboo-deployment