Initiate Bamboo build from agent location
Asked by Christian Palacios:

**\*\*Can someone please look at this request\*\***   

We have our Bamboo instance in the Azure cloud environment. We have agents deployed on a couple of VMs in that environment. We connect to the VMs up in Azure through a VPN that we set up between our on-premise office and the Azure environment.

I have been asked to find out if we are able to set up this scenario:

* Set up a new VM in our on-premise office and configure it with the Bamboo agent.
* Get the Bamboo agent on the on-premise VM to constantly check for updates to any of the Git projects we have available.
* If the agent detects a change, then it initiate the Bamboo build plan on the on-premise office.

From what we understand, the Bamboo server initiate the communication with the Bamboo agent on the server that hosts the agent. But because our VPN set up is a one-way connection, the Bamboo server in Azure can't initiate the build. That's why we're hoping there is a way for the agent to communicate up to the Bamboo server in Azure when it detects a change in code and then initiate the build plan. Please ask any questions that may help understand this question better.

Thanks,

-Christian


Answers:
author: Andy Heinzer
body: I believe I understand what you are wanting to do here. However the Agent's in Bamboo do not have the ability to track changes. The Agent can only build. You still need the server to be the one to detect such changes.   

Remote Agents in Bamboo are not meant to be used as a means to get around this networking/vpn environment. I'd recommend checking out the [Difference between Local agents and Remote Agents](https://confluence.atlassian.com/bamkb/difference-between-local-agents-and-remote-agents-457703602.html)  
Instead remote agents are helpful either when the server doesn't have the [capabilities](https://confluence.atlassian.com/bamboo/capability-289277445.html) needed, or the Server JVM resources are limited.  

If I understand your request, you are looking for the Agent to handle the detection, then communicate that back to the server. This just isn't something the Agent is designed to do. I wish I could offer you some clear alternative here. But given the parameters you have listed, I can't see a clear way to make it do what you want.

comments: author: Christian Palacios
body: Hi Andrew,

Thanks for your reply! That's what I thought, I didn't think there was an option for our situation since it's unique. No matter what, ports would have to be open between the cloud and on-premise environment right? In both directions right? Which would defeat the purpose of trying to have it just one way. If there are no options for our situation, then that's what I'll have to report my the team that wants this done.

Thanks!  
Christian


author: Andy Heinzer
body: Yes, the connection between agent and bamboo needs to be bi-directional. Check out [Troubleshooting Remote Agents](https://confluence.atlassian.com/bamkb/troubleshooting-remote-agents-216957427.html) for more details in regards to ports and protocols being used by remote agents.


Tags: agent

azure

bamboo-administration

build

server

vpn