Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A Devops Journey - Setting up a CI Stack

Steve Teo
October 02, 2014

A Devops Journey - Setting up a CI Stack

Continuous integration and continuous delivery/deployment capabilities is a godsend for every software development team. Due to a tight delivery timeline for a project, we had no choice but to implement this critical release engineering capability to enable faster time-to-market.

We will be talking about
• A brief introduction to the concepts of CI/CD
• About our journey and how we landed up with a stack based on Git/Atlassian Stash, Jenkins, Gradle, Nexus
• The challenges and pain points in the DBS environment and what is the preparatory and redtape work required
• Our setup and how we managed to install, configure and test our stack up and running in 3 solid nights
• Brief Demos on
o How to manage POCs through Virtualbox/Vagrant
o The stack and a sample build workflow
• Where we are now in the area of release engineering and our future plans towards Devops nirvana
• How your team can go about go about starting your own devops efforts and how it can align to the DBS ITSS Enterprise Devops efforts

Steve Teo

October 02, 2014
Tweet

More Decks by Steve Teo

Other Decks in Technology

Transcript

  1. A Devops Journey: Setting up a CI Stack By Steve

    Teo/DBS ITT Processing Systems
  2. Continous Integration (CI) The practice, in software engineering, of merging

    all developer working copies with a shared mainline several times a day.
  3. CI Best Practices Maintain a code repository Automate the build

    Make the build self-testing Everyone commits to the baseline every day Every commit (to baseline) should be built Keep the build fast Test in a clone of the production environment Make it easy to get the latest deliverables Everyone can see the results of the latest build Automate deployment
  4. Proposed CI Stack– Why? Project timeline too tight, any deviation

    from Vendor’s requirements might have affected delivery timeline Can tap on Vendor’s expertise Aligned mostly to upcoming enterprise standards Prior experience and proven model Easier transition to enterprise stack as we would have acquired the necessary knowhow by then
  5. Challenges Non-standard software (in DBS Context) Infrastructure not owned by

    us Servers not ready Firewall Issues Lack of knowledge Lack of precedence Uncertain abt. Enterprise Direction
  6. Challenges Non-standard software (in DBS Context) •  Uncertain who can

    approve •  Uncertain whether it will be approved -> Solution: DBS Non-Standard Technology Approval Website
  7. Challenges Infrastructure not owned by us •  No root access

    to install stuff Servers not ready (then) •  Uncertain delivery timeline •  Uncertain server configuration •  Tighter timeline with every delay -> Solution: Run a POC using virtual machine to familiarize
  8. Challenges Firewall Issues •  Uncertain about connectivity between servers in

    different network zones •  No internet access for build server means having to be manual in so many ways -> No solution so far, manual workarounds needed (but will be optimized)
  9. Challenges Lack of knowledge Lack of precedence Uncertain abt. Enterprise

    Direction -> Solution: Ask ITSS for guidance and updates
  10. Demo Time •  Using Vagrant and Virtual Box to create

    reproducible Proof of Concept/ development environments
  11. Proposed CI Stack Architecture #2 DBS Developers Build Machine (On

    SIT VM) Stash Jenkins Nexus One Way SSL Apache HTTP Server (Reverse Proxy) Unencrypted
  12. Final Architecture DBS Developers Build Machine (On SIT VM) Stash

    Jenkins Nexus One Way SSL Apache HTTP Server (Reverse Proxy) One Way SSL
  13. Mission Impossible •  Infrastructure delays left us with only 3

    days to set up •  Due to go for reservist the following week – Do or die mission •  POC and a solid understanding of SSL really helped us a lot
  14. How it is being used today DBS Developers Build Machine

    (On SIT VM) Stash Jenkins Nexus One Way SSL Apache HTTP Server (Reverse Proxy) One Way SSL Vendor Developers
  15. Build-deploy workflow h"p://akquinetblog.files.wordpress.com/2012/01/big_picture1.png   1.  We  use  event  hooks  to

     inform   CI  server  that  a  commit  has  been   commi"ed   2.  Transfer  and  execute  a  gradle  deploy  script  
  16. Environments/Pipelines DEV   SIT   UAT   Staging   1.

     SSH  Gradle   Deployment  Script   and  executes  it   2.  Gradle  script   retrieves  ar<facts  
  17. Demo Time •  A walkthrough of our CI stack and

    a sample commit-build workflow
  18. Where we are now ✔ Codebase under SCM ✔ CI

    Capability ✔ Remote Deployment
  19. Advice on starting up Learn your way around DBS infrastructure

    and processes Read and experiment (A LOT!) Make small and steady steps – go for the quick wins. Don’t go for overly ambitious stack
  20. It’s not just the tools Setup and installation is just

    the easy part What we can’t change overnight is culture and knowledge Start adopting a devops mindset today!
  21. Enterprise Stack Switch to enterprise stack once it is ready

    and viable for our needs •  Releases can steamroll all the way to production through upcoming release automation •  Shortens time-to-market •  Static analysis capabilities and advanced testing suites Temporary integration to existing RMF for Production rollout in the meantime
  22. Orchestration 21 servers to configure and manage now - painful

    Solution: Orchestration tools such as Chef, Puppet, Ansible or Salt
  23. Before I end Some words of thanks • My team members

    • DBS ITSS Devops • Unnamed Vendor