Giter Site home page Giter Site logo

smithmicro / bamboo-ci-health Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 95 KB

Health reporting tool for Bamboo CI builds

Home Page: https://bamboo.your-company.com

License: The Unlicense

Python 95.19% Dockerfile 4.81%
bamboo-server health reporting

bamboo-ci-health's Introduction

bamboo-ci-health

Health reporting tool for Bamboo CI builds.

What For?

The reports are aimed at helping Developer Experience (DX) and DevOps team members identify where mismanaged build plans are bogging down the Bamboo Master e.g. excessive retention of build results, inefficient use of build artifacts (unspecific or too big/bloated archives), and more.

Getting Started

Compatibility: Verified to work on x86 hardware with latest MacOS or CentOS 7.

Create a local Bamboo-PostgreSQL deployment using Docker (version 20.10 or newer):

cp -v .env-template .env
vi .env  # Fill out with your own license and secrets, don't track it in Git.
docker-compose build
docker-compose up -d
docker-compose ps  # Verify Bamboo is up and healthy.

# Optionally, copy the Bamboo application code to local directory:
docker cp bamboo_server:/opt/atlassian/ ./data/bamboo_opt

Additional tip for Linux, add a host local account for the Bamboo user:

useradd -u 2005 -m -G docker bamboo

Open https://${PROXY_HOSTNAME}/ in your browser and verify that you can login the using credentials specified by BAMBOO_ADMIN_USERNAME and BAMBOO_ADMIN_PASSWORD in your .env file.

If the server is exposed on the internet, please open Bamboo administration > Global permissions and disable access for "Anonymous users" and (any) "Logged in users".

Next, have Python 3.8+ installed on MacOS or Linux and create a virtualenv:

python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
./ci_health.py --help

Live Deployment

In order to deploy the Bamboo stack to a live server, you need a DNS hostname, SSL certificate/key, and a Linux OS with Git and Docker (version 20.10 or newer).

Step 1: Clone the repo to /opt/bamboo-ci-health/:

cd /opt/ && git clone git@.../bamboo-ci-health.git

Step 2: Fill in your config secrets in the environment file:

cd /opt/bamboo-ci-health/
cp -v .env-template .env
vi .env
# Fill out with license and hostname, e.g. `PROXY_HOSTNAME=bamboo.mkdevops.se` and so on
cp -v ~/my-ssl-certificate.crt ./bamboo_nginx/certs/bamboo.mkdevops.se.crt 
cp -v ~/my-ssl-certificate.key ./bamboo_nginx/certs/bamboo.mkdevops.se.key 
docker-compose build
docker-compose up -d
docker-compose ps  # Verify all services are up and healthy.

# Optionally, customize the Bamboo logo by copying it into BAMBOO_HOME:
mkdir -p ./data/bamboo_home/shared/attachments/logos
cp -va ./bamboo_server/attachments/logos/bamboo02.png \
  ./data/bamboo_home/shared/attachments/logos/bamboo-logo.png
chown -vR bamboo:docker ./data/bamboo_home/shared/attachments/

Step 3: Configure Bamboo by opening https://${PROXY_HOSTNAME}/ in your browser and switch to the Bamboo administration view, for example ...

  1. Restrict access under Global permissions
  2. Add a local agent under Agents
  3. Link GitHub/Bitbucket repositories under Linked repositories
  4. Add Git SSH key under Shared credentials
  5. Configure Crowd authentication under User directories
  6. ...

Contact

Do you want to help? Welcome!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.