Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Trying to implement Bamboo Agent running on docker container

Hi,

I'm trying to run bamboo agent on docker container. My server URL is in the format of https://*****.***.com(Which is my application URL).My server is in a windows VM. I downloaded the agent base from https://hub.docker.com/r/atlassian/bamboo-agent-base .

When I try to run docker run command from the overview of bamboo agent base URL (mentioned above), The image got downloaded and my docker container is up.

 

1) When my docker container is up, how to connect this container to bamboo server?

2) I tried installing remote agent using https://*****.*****.com/bamboo/admin/agent/addRemoteAgent.action  inside the docker container.

Result:

Agent process started, shutdown hook registered, proceeding with log pump...
Running Bamboo Agent...
Bamboo Agent is already running.
Waiting for the agent process to finish...
The underlying agent process terminated with a non zero exit code: 1
The underlying agent process terminated with a non zero exit code: 1
Bamboo Agent Installer is shutting down, the underlying agent process has already been shut down.

 

 

From this, How do I connect to the bamboo server. (I provided security token also).

 

3) How to install bamboo agent in docker windows container?

 

Regards

1 answer

0 votes

Hi @shivaram

From what I can understand, the issue you are facing could be caused by networking misconfiguration issues. I'll try to share what I know in the hopes that it will help you move forward with this configuration.

  • The agent is the one trying to connect with the Bamboo Server, not the opposite.
    It will know where to look for the Server based on the last parameter of the docker run command e.g.:
    docker run \
    -v bambooAgentVolume:/home/bamboo/bamboo-agent-home \
    --name="bambooAgent" \
    --init -d atlassian/bamboo-agent-base \
    BAMBOO_SERVER_URL
  • We need to make sure the container is able to resolve the BAMBOO_SERVER_URL otherwise it will not be able to reach the server to follow next needed handshake steps.
    In case the container is not able to resolve the https://*****.***.com address provided, it may be worth trying to use the host.docker.internal as a reference to the Host IP of the server running the docker container (assuming this is the machine running Bamboo).
  • Once the agent is able to reach this server it will be noticed by the Bamboo Server which will answer with the Broker configuration. This configuration will be used to configure another communication channel using the JMS protocol.
  • The broker configuration is available in <Bamboo_Server_Home>/bamboo.cfg.xml. You need to make sure that the address configured in bamboo.jms.broker.client.uri (inside bamboo.cfg.xml file) is resolvable and reachable from the agent container as well, otherwise, your agent will be stuck trying to reach the broker.


In this thread (Solved: The docker images for Bamboo Server and Bamboo ...), you can find a simple example where we have both Bamboo Server and Agent running in different Docker containers. The magic is done by docker in that example which is able to make both containers see the same network and hostnames.

 

It might be the case that your problem is not related to the network config. To confirm we are in the right direction, can you please:

  1. Make sure you stop the docker container running.
  2. Start the docker container again.
  3. check the container logs:
    docker logs CONTAINER_NAME or CONTAINER_ID
  4. Share what are the errors you see.

I'm asking for the logs because I'm not sure if the logs you shared are from the first start or a different attempt from inside the container.

No problem.. everything's sorted. I have to edit the docker file a bit.. mention the bamboo agent.jar and path where i want it in the docker container correctly.

Like Daniel Santos likes this

That is great! I'm glad you sorted it out!

Have a good one!

Could we implement bamboo agent on windows docker container??

I'm assuming you are talking about a Linux remote agent container running on windows. It should work fine.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

223 views 4 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you