Keep Bamboo Windows Service running 24/7 with Service Protector

How to Keep the Bamboo Windows Service Running 24/7 with Service Protector

Automatically restart Atlassian's Bamboo Continuous Integration Server when it stops for any reason. Keep your well oiled development systems humming!

Atlassian's Bamboo extends the traditional build server with continuous integration, testing and deployment services. It isn't a native Windows Service but uses a java-based wrapper to achieve that functionality.

To protect the Bamboo Windows Service with Service Protector:

  1. Download, install and configure Bamboo, if necessary. Be sure to install the Windows Service component as described in the Bamboo Installation Guide.

  2. Download and install Service Protector, if necessary.

  3. Start Service Protector.

  4. Select Protector > Add to open the Add Protector window:

    Add Protector

  5. On the General tab:

    • In the Service to protect field, choose the Bamboo windows service, called Bamboo build server. You will notice a green circle on the left if the Bamboo service is already running, as was the case on our server.

    • Apparently if Bamboo terminates unexpectedly (for example, due to a crash or power failure), a residual write.lock file may be left in the Bamboo home sub-directories. These should be removed before restarting Bamboo to avoid indexing problems, plan expiration etc.

      To protect yourself against this situation, create a batch file that removes the lock files from the Bamboo server home directory:

      Remove Bamboo write.lock files

      Specify that batch file in the Run this command prior to restarting the service section at the bottom of the Service Protector window. This will ensure that Bamboo comes up "clean" if it ever dies and inadvertently leaves the lock files behind.

      Bamboo Windows Service: General Tab

  6. Click the Save button. In a couple of seconds, an entry for Bamboo will show up in the Service Protector window. Bamboo is probably already running but it is not yet being protected by Service Protector (as pictured below).

    Bamboo Windows Service: Created

  7. To start protection, choose Protector > Start "Bamboo build server". In a couple of seconds the shield icon on the right will go to green to indicate that Bamboo is being monitored by Service Protector:

    Bamboo Windows Service: Protected

  8. That's it! Next time your computer boots, Bamboo will automatically start and Service Protector will babysit the service to promptly restart it if it fails for any reason.

    We encourage you to edit Bamboo in Service Protector and check out the many other settings that may be appropriate for your environment. For example, send an email when the service fails, restart Bamboo at a safe time every day, and much more.



Trouble protecting the Bamboo Windows Service?