Giter Site home page Giter Site logo

bamboo-on-aws's Introduction

Setting Up Bamboo Environment On AWS

Table of Content:

  1. What is Bamboo?
  2. Goal
  3. Security Group
  4. System Requirements
  5. PostgreSQL RDS
  6. Bamboo Server Setup
  7. Bamboo Remote Agent
  8. Useful Resources

What is Bamboo?

Bamboo is a continuous integration and deployment tool. Similar to Jenkins, but it is not open source. It is a commercial tool build by Atlassian.


Goal

Implement the below architecture, where all components are hosted on AWS:

bamboo-architecture-on-aws


Security Group

  • BambooSecGrp:

    Create a security-group under the used VPC, to used in all upcoming resources (Security can be much enhanced by adding only required IPs in Source, but it is okay for learning environment).

    • Inbound Rules:

      Type Protocol Port Range Source Description
      HTTP TCP 80 0.0.0.0/0, ::/0 To access bamboo from browser
      PostgreSQL TCP 5432 0.0.0.0/0, ::/0 To access RDS instance
      SSH TCP 22 0.0.0.0/0, ::/0 To access EC2s
      Custom TCP TCP 54663 0.0.0.0/0, ::/0 Used by bamboo in server-agent communication
      Custom TCP TCP 8085 0.0.0.0/0, ::/0 Bamboo-Server listener

    • Outbound Rules:

      Type Protocol Port Range Destination Description
      All Trafic All All 0.0.0.0/0


System Requirements


  • Bamboo Server:

    Specification Value
    AMI Ubuntu Server 18.04 LTS (HVM), SSD Volume Type
    Machine Type t2.xlarge
    vCPUs 4
    Memory 16 GiB
    Name BambooServer
    Security Group BambooSecGrp


  • Bamboo Agent #1:

    Specification Value
    AMI Ubuntu Server 18.04 LTS (HVM), SSD Volume Type
    Machine Type t2.medium
    vCPUs 2
    Memory 4 GiB
    Name Bamboo-Agent-1
    Security Group BambooSecGrp


  • Bamboo Agent #2:

    Specification Value
    AMI Ubuntu Server 18.04 LTS (HVM), SSD Volume Type
    Machine Type t2.medium
    vCPUs 2
    Memory 4 GiB
    Name Bamboo-Agent-2
    Security Group BambooSecGrp

PostgreSQL RDS


Specification Value
Engine Type PostgreSQL
Version PostgreSQL 11.6-R1
Templates Dev/Test
DB instance identifier bamboodb-instance
username postgres
DB instance size db.m5.xlarge (4 vCPUs, 16 GiB RAM, 4750 Mbps EBS)
Public Access YES
Security Group BambooSecGrp
DB Port 5432
DB Name bamboo

Bamboo Server Setup

  • Install Java OpenJDK-8:

        sudo apt-get update;
        sudo apt-get install -y openjdk-8-jdk;
    
  • Make sure of the path where java is installed:

        update-alternatives --config java
    
  • Add JAVA_HOME environment variable in /etc/environment :

        JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
    
        source /etc/environment
    
  • Download and extract Bamboo-Server:

        wget https://www.atlassian.com/software/bamboo/downloads/binary/atlassian-bamboo-7.1.1.tar.gz
    
        tar xzf atlassian-bamboo-7.1.1.tar.gz
    
  • Setup Bamboo's home directory:

        mkdir /home/ubuntu/BambooHome
    

    Uncomment and edit line in atlassian-bamboo-7.1.1/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties :

        bamboo.home=/home/ubuntu/BambooHome
    
  • Start Bamboo-Server:

        ./atlassian-bamboo-7.1.1/bin/start-bamboo.sh
    
  • Open Bamboo-Server in a browser:

        <BambooServer IPv4 Public IP>:8085
    

setup-wizard

  • Generate trial-license from here

  • Choose "Custom Installation" to connect your rds.

  • Choose "External Database"

external-db

  • Replace localhost by your rds endpoint:

endpoint

connect-db

  • Follow this tutorial to complete setup wizard.

Bamboo Remote Agent


  • Go to Agents --> Install remote agent in BambooServer.

  • SSH to "BambooRemoteAgent.

  • Install Java OpenJDK-8:

        sudo apt-get update;
        sudo apt-get install -y openjdk-8-jdk;
    
  • Make sure of the path where java is installed:

        update-alternatives --config java
    
  • Add JAVA_HOME environment variable in /etc/environment :

        JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
    
        source /etc/environment
    
  • Follow the mentioned steps in "Installing a remote agent".

  • Approve the agent in BambooServer.

Follow this tutorial to install remote agents.


Useful Resources

bamboo-on-aws's People

Contributors

mahaamin avatar

Watchers

 avatar  avatar

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.