đź”§

Bamboo CI/CD Setup and Installation Guide

Aug 1, 2024

Notes on Continuous Integration and Bamboo Setup

Introduction to Bamboo

  • Bamboo is a continuous integration (CI) and continuous delivery (CD) tool.
  • There are multiple tools available for CI/CD, including Jenkins, Travis CI, Microsoft TFS, etc.

Understanding CI/CD

  • Continuous Integration (CI)

    • Developers create code and upload it to a version control system (e.g., Git, SVN).
    • Code undergoes a build process, which transforms it into an artifact.
    • Artifacts are not sent directly to clients; they are deployed into a testing environment for QA.
  • Continuous Deployment:

    • The process of deploying artifacts to testing servers automatically.
  • Continuous Testing:

    • Automated tests (e.g., using Selenium) are run to check the application’s functionality.
  • Continuous Delivery:

    • Once testing is complete and everything works fine, the application is delivered to the production environment.

CI/CD Stages via Bamboo

  1. Continuous Download:

    • Bamboo detects code changes and downloads them.
  2. Continuous Build:

    • Bamboo triggers the build process using tools like Maven, Ant, etc.
  3. Continuous Deployment:

    • Artifacts are automatically deployed to the QA environment.
  4. Continuous Testing:

    • Bamboo runs automation tests to validate the application.
  5. Continuous Delivery:

    • The application is deployed to production for the end-users to access it.

Setup Requirements for Bamboo

Preconditions

  • Developers need to have code ready in a version control system.
  • Example used: Java code downloaded from the internet and placed in a version control system.

Server Setup

  • Three Linux servers are required:
    1. Bamboo Server (T2.medium)
    2. QA Server (T2.micro)
    3. Prod Server (T2.micro)

Cloud Platform

  • AWS is recommended for creating virtual machines.
  • Steps to create an AWS account:
    1. Sign up for a free AWS account.
    2. Create the required Linux instances in the chosen region (e.g., North California).

Bamboo Installation Steps

  1. Connect to Bamboo Server:

    • Use SSH via Git Bash in Windows.
  2. Install Prerequisites:

    • Update APT repository: sudo apt-get update
    • Install Software Properties Common: sudo apt-get install software-properties-common
    • Install Java JDK 1.8: sudo apt-get install openjdk-8-jdk
    • Verify Java installation: java -version
    • Install Maven and Git: sudo apt-get install maven git
  3. Set Environment Variables:

    • Create JAVA_HOME variable and set the path.
    • Update the PATH variable to include Java.
  4. Create Folders for Bamboo:

    • bamboo_home (for data storage).
    • bamboo_install (for installation files).
  5. Download Bamboo:

    • Use wget to download the Bamboo installation files.
    • Extract the files using tar -xvf command.
  6. Configure Bamboo:

    • Edit bamboo-init.properties to set the bamboo_home path.
    • Start Bamboo with startup.sh script.
  7. Access Bamboo:

    • Use public IP and port 8085 in a browser to access the Bamboo setup page.
    • Obtain a license key from Atlassian for setup.

Next Steps

  • Tomorrow, the focus will shift to installing Tomcat on the QA and Prod servers.
  • Commands and video recording will be uploaded for reference.
  • Important to understand that setup tasks may not be the responsibility of every DevOps engineer; focus on CI/CD flow is key.