openboxes / openboxes-devops

Infrastracture as Code artifacts for OpenBoxes.
3 stars 0 forks source link

OBS-1401 Install bamboo remote agents on dev/stg hosts #23

Closed mdpearson closed 1 year ago

mdpearson commented 1 year ago

The old bamboo fell over, and the new bamboo doesn't really like local agents.

This PR contains a playbook that installs and configures the bamboo remote agent on a host.

It's a little tricky for a few reasons.

  1. You can't build OpenBoxes without the Grails SDK installed, so we need to do that, and advertise to Bamboo where it is. Similarly, Grails 1 needs Node installed to build, and Bamboo needs to know about it
  2. For some reason remote agents don't automatically match up with available tasks unless they are dedicated to them. That takes some RESTful manipulation
  3. At the end of our deploys, we ssh from the building host to the target host and run a script that restarts Tomcat. To do that, the building host requires an SSH private key, as well as a zerotier connection (at least, to hit our Azure hosts)
  4. Bamboo agents don't run themselves as a service by default, so we need to roll up a service by hand