Skip to content

Service Bamboo

Burke Mamlin edited this page Sep 14, 2022 · 29 revisions

Setup

Agents are using ansible and puppet. Both are in this repository. Follow the readme in both to update machines.

Bamboo server machine has OpenStack security group configured to only accept the IPs from bamboo agents.

Users are managed in Bamboo Server, with no integration whatoever with OpenMRS ID or crowd.

Bamboo artefacts are stored in S3.

License

Free license renewed every year.

Description of the service

Continuous Integration tool.

How to access it

(Agents are not accessible from any screen. The can be seen connected to Bamboo on https://ci.openmrs.org/admin/agent/configureAgents!default.action).

How to restart it

Server

$ service bamboo restart

If Bamboo Server is down for more than one hour, the agents need to be restarted as well.

Agents

$ service bamboo-agent1 restart

OR:

$ sudo su - bamboo-agent
$ ./bamboo-agent/bin/bamboo-agent.sh restart

Always use 'su -' instead of 'su', otherwise npm based builds will start failing due to https://github.com/npm/npm/issues/7563

Logs location

Server

/data/bamboo_home/logs

Agents

/home/bamboo-agent/bamboo-agent/atlassian-bamboo-agent.log  # wrapper logs
/home/bamboo-agent/bamboo-agent/logs/atlassian-bamboo.log   # agent logs

Increasing agent storage

  • Disable the bamboo agent in bamboo, so it doesn’t run any builds
  • In terraform, change the vm.tf file to temporary allow destroying the data volume
  • Change the size volume for that instance in the variables file
  • Terraform plan/apply should destroy the volume, create a new one, and attach it to the VM
  • Fix your data volume to have the folders you want (e.g., rerunning puppet), and reenable the agent
  • Update VM terraform docs via ./build.rb docs && ./build.rb plan docs && ./build.rb apply docs to ensure Terraform'd VMs - OpenMRS community infrastructure is updated.

Troubleshooting

Agents running out of disk

  • Remove older kernels with apt autoremove
  • Remove older log files in /home/bamboo-agent/bamboo-agent/logs/atlassian-bamboo.log.*
  • Check cache files and delete:
    • du -sh /home/bamboo-agent/.cache
    • du -sh /home/bamboo-agent/.nvm
  • Clean docker space
    • Stop containers running: docker kill $(docker ps -q)
    • Prune docker data docker system prune -a --volumes
Clone this wiki locally