• Share
  • Email
  • Embed
  • Like
  • Private Content
Agile Development at GoGrid with Pallet and JClouds
 

Agile Development at GoGrid with Pallet and JClouds

on

  • 2,084 views

This is a presentation to JClouds Meetup @ Twitter's HQ. Presented by Toni Batchelli. It discusses the methodologies that the GoGrid engineering team is employing to quickly and accurately produce ...

This is a presentation to JClouds Meetup @ Twitter's HQ. Presented by Toni Batchelli. It discusses the methodologies that the GoGrid engineering team is employing to quickly and accurately produce timely builds.

Statistics

Views

Total Views
2,084
Views on SlideShare
1,696
Embed Views
388

Actions

Likes
1
Downloads
27
Comments
0

1 Embed 388

http://blog.gogrid.com 388

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Agile Development at GoGrid with Pallet and JClouds Agile Development at GoGrid with Pallet and JClouds Presentation Transcript

    • Complex Infrastructure Made Easy™Agile Development at GoGrid with Pallet and JClouds Presented to JClouds Meetup @ Twitter’s HQ Toni Batchelli, Consultant and Entrepreneur wannabe tbatchelli@gmail.com, @tbatchelli, @disclojure February 2, 2011 02/01/11
    • GoGrid’s Challenges GoGrid is a cloud provider, building their own software Developing and testing their cloud management software is complex. They need to create and maintain realistic environments in order to load them with their latest software builds ~10 different servers types ~20 different services
    • The problem? Current time to setup a development/QA environment is 2 days • Mostly manual work Building the environments manually is very error prone A high level of interconnectivity between services
    • Goal To be able to create development andtesting environments dynamically, in a customizable way, and on cloud infrastructure A Cloud in a Cloud
    • Additional Challenges Environments need to be verified as fully functional before deploying software on them Must support multiple locations Must be able to scale dynamically Must support concurrent development • Different feature branches Must manage/version non-software components in a lockstep with the software: • Network configuration • System-level configurations • Application-level configurations
    • tools 02/01/11
    • Abstraction layer on resource managementIf you code your infrastructure managementcode to the jclouds API, you can port yourcode to all cloud providersJVM-basedProvides access to GoGrid’s infrastructure byabstracting the communication GoGrid’sCloud API
    • Uses JClouds to create and manage nodesProvisions nodes with software andconfigurationVerifies node and service correct operationOperates the services in the nodesNodes are grouped by groups (formerlyknown as ‘tags’). All nodes in a group areequivalent
    • ClojurePallet is built on ClojureClojure is a JVM-based lisp with superbintegration with Java and concurrencyCan use any existing Java library (Tomcat, jdbc,etc...)Provides a high level of abstraction, which iswhat is needed in this caseGrowing community: there are 7 books on Clojureeither published or in preparation
    • how? 02/01/11
    • GoGrid Cloud Infrastructure Service ServiceGoGrid Cloud API Service Service Service Service Service Service Service Service Service
    • GoGrid Cloud Infrastructure Service Service GoGrid Cloud APIjclouds Service Service Service Service Service Service Service Service Service
    • GoGrid Cloud Infrastructuregimme Service Servicenodes! GoGrid Cloud API jclouds Service Service Service Service Service Service Service Service Service
    • GoGrid Cloud Infrastructuregimme Service Servicenodes! GoGrid Cloud API jclouds Service Service Service Service Service Service Service Service Service
    • GoGrid Cloud Infrastructure Service ServiceGoGrid Cloud API Service Service Service Service Service Service Service Service Service
    • GoGrid Cloud Infrastructure Service Service et GoGrid Cloud APIpall Service Service Servicepallet Service Service Service Service Service Service
    • GoGrid Cloud Infrastructuredo stuff! Service Service et GoGrid Cloud API pall Service Service Service pallet Service Service Service Service Service Service
    • GoGrid Cloud Infrastructuredo stuff! Service Service et GoGrid Cloud API pall Service Service Service pallet Service Service Service Service Service Service
    • GoGrid Cloud InfrastructureGoGrid Cloud API
    • GoGrid Cloud Infrastructure GoGrid Cloud APIjclouds
    • GoGrid Cloud Infrastructure make mea dev cloud! GoGrid Cloud API jclouds
    • GoGrid Cloud Infrastructure make me Service Servicea dev cloud! GoGrid Cloud API jclouds Service Service Service Service Service Service Service Service Service
    • GoGrid Cloud Infrastructure Service Service et GoGrid Cloud APIpall Service Service Servicepallet Service Service Service Service Service Service
    • GoGrid Cloud Infrastructure install cloud Service Serviceinfrastructure! et GoGrid Cloud API pall Service Service Service pallet Service Service Service Service Service Service
    • GoGrid Cloud Infrastructure install cloud Service Serviceinfrastructure! et GoGrid Cloud API pall Service Service Service pallet Service Service Service Service Service Service
    • GoGrid Cloud Infrastructure Service Service et GoGrid Cloud APIpall Service Service Servicepallet Service Service Service Service Service Service
    • GoGrid Cloud Infrastructureis all working Service Service fine? et GoGrid Cloud API pall Service Service Service pallet Service Service Service Service Service Service
    • GoGrid Cloud Infrastructureis all working Service Service fine? et GoGrid Cloud API pall Service Service Service pallet Service Service Service OK! Service Service Service
    • GoGrid Cloud Infrastructure Service Service et GoGrid Cloud APIpall Service Service Servicepallet Service Service Service Service Service Service
    • GoGrid Cloud Infrastructure deploy Service Servicenew build! et GoGrid Cloud API pall Service Service Service pallet Service Service Service Service Service Service
    • GoGrid Cloud Infrastructure deploy Service Servicenew build! et GoGrid Cloud API pall Service Service Service pallet Service Service Service Service Service Service
    • GoGrid Cloud Infrastructure deploy GoGrid Cloud Infrastructure Service Servicenew build! et GoGrid Cloud API pall GoGrid Cloud API Service Service Service pallet Service Service Service Service Service Service
    • GoGrid Cloud Infrastructure GoGrid Cloud Infrastructure Service ServiceGoGrid Cloud API GoGrid Cloud API Service Service Service Service Service Service Service Service Service
    • GoGrid Cloud Infrastructureawesome! GoGrid Cloud Infrastructure Service Service GoGrid Cloud API GoGrid Cloud API Service Service Service Service Service Service Service Service Service
    • GoGrid Cloud Infrastructure GoGrid Cloud Infrastructure Service ServiceGoGrid Cloud API GoGrid Cloud API Service Service Service Service Service Service Service Service Service
    • GoGrid Cloud Infrastructure GoGrid Cloud Infrastructure Service Service GoGrid Cloud API GoGrid Cloud API Service Service Servicejclouds Service Service Service Service Service Service
    • GoGrid Cloud Infrastructure let’s test: GoGrid Cloud Infrastructure Service Servicegimme nodes! GoGrid Cloud API GoGrid Cloud API Service Service Service jclouds Service Service Service Service Service Service
    • GoGrid Cloud Infrastructure let’s test: GoGrid Cloud Infrastructure Service Servicegimme nodes! GoGrid Cloud API GoGrid Cloud API Service Service Service jclouds Service Service Service Service Service Service
    • GoGrid Cloud Infrastructure GoGrid Cloud Infrastructure Service ServiceGoGrid Cloud API GoGrid Cloud API Service Service Service Service Service Service Service Service Service
    • GoGrid Cloud Infrastructure GoGrid Cloud Infrastructure Service Service GoGrid Cloud API GoGrid Cloud API Service Service Servicejclouds Service Service Service Service Service Service
    • GoGrid Cloud InfrastructureI’m done, GoGrid Cloud Infrastructure Service Service thanks! GoGrid Cloud API GoGrid Cloud API Service Service Service jclouds Service Service Service Service Service Service
    • GoGrid Cloud InfrastructureI’m done, thanks! GoGrid Cloud API jclouds
    • GoGrid Cloud InfrastructureGoGrid Cloud API
    • environment GoGrid Cloud Infrastructurefor branch A? GoGrid Cloud API
    • environment GoGrid Cloud Infrastructurefor branch A? GoGrid Cloud Infrastructure branch A GoGrid Cloud API GoGrid Cloud API
    • environment GoGrid Cloud Infrastructurefor branch A? GoGrid Cloud Infrastructure branch A environment GoGrid Cloud API GoGrid Cloud APIfor branch B?
    • environment GoGrid Cloud Infrastructurefor branch A? GoGrid Cloud Infrastructure branch A GoGrid Cloud Infrastructure branch B environment GoGrid Cloud API GoGrid Cloud APIfor branch B? GoGrid Cloud API
    • environment GoGrid Cloud Infrastructurefor branch A? GoGrid Cloud Infrastructure branch A GoGrid Cloud Infrastructure branch B environment GoGrid Cloud API GoGrid Cloud APIfor branch B? GoGrid Cloud API environmentfor QA please?
    • environment GoGrid Cloud Infrastructurefor branch A? GoGrid Cloud Infrastructure branch A GoGrid Cloud Infrastructure branch B GoGrid Cloud Infrastructure QA environment GoGrid Cloud API GoGrid Cloud APIfor branch B? GoGrid Cloud API GoGrid Cloud API environmentfor QA please?
    • development 02/01/11
    • GoGrid’s Development Process Create a feature branch Create an environment (cloud infrastructure) for this branch Verify new environment (end-to-end tests) Automatically build and deploy the new software every time new code is committed to the branch. Destroy environment and free resources when done
    • An Environment Usually one environment for active development branch Each environment is specified by: • The development branch it tracks • Service types and node count for each service type • Network configuration • External services/DB provisioning
    • Development Environments Each development environment tracks a development feature branch Each environment has a node with Hudson CI, configured to track the environment’s branch When new code is pushed to the development branch, the environment’s Hudson server builds the software and updates the environment with it.
    • more on pallet 02/01/11
    • Why Pallet? There are well known solutions for node provisioning in the cloud, why pallet? • It integrates with infrastructure management • Service interconnections are first class entities in the framework • Scalable programming model • Integrates well with SCM and with other OPS tools • Comprehensive support for all development cycles
    • ✓ No central server✓ No agents on nodes✓ Works with standard and custom images✓ First-class support for complex multi-service configurations✓ All node configuration done remotely via generated scripts over SSH✓ DSL for generating scripts, resources✓ Testable
    • crates Pallet’s basic configuration unit A crate is a grouping of functions around a service Functions usually: • manipulate/create internal representations • result in resources deployed or scripts being run in the target nodes
    • proxiedCustom Crates tomcat reverse bootstrap tomcat deploy proxyStandard Crates automated haproxy admin user java tomcat
    • A Node(core/defnode  proxied    "Basic  web  app,  served  by  tomcat"    {:os-­‐family  :ubuntu        :os-­‐description-­‐matches  "10.04"      :inbound-­‐ports  [8080  22]}      :bootstrap  (resource/phase  (crates/bootstrap))    :configure  (resource/phase  (crates/tomcat))    :deploy  (resource/phase   (crates/tomcat-­‐deploy  "webapp.war"))    :restart-­‐tomcat  (resource/phase                                      (service/service   "tomcat6" :action  :restart)))
    • jclouds section of a node(core/defnode  proxied    "Basic  web  app,  served  by  tomcat"    {:os-­‐family  :ubuntu        :os-­‐description-­‐matches  "10.04"      :inbound-­‐ports  [8080  22]}      :bootstrap  (resource/phase  (crates/bootstrap))    :configure  (resource/phase  (crates/tomcat))    :deploy  (resource/phase   (crates/tomcat-­‐deploy  "webapp.war"))    :restart-­‐tomcat  (resource/phase                                      (service/service   "tomcat6" :action  :restart)))
    • Execution Phases(core/defnode  proxied    "Basic  web  app,  served  by  tomcat"    {:os-­‐family  :ubuntu        :os-­‐description-­‐matches  "10.04"      :inbound-­‐ports  [8080  22]}      :bootstrap  (resource/phase  (crates/bootstrap))    :configure  (resource/phase  (crates/tomcat))    :deploy  (resource/phase   (crates/tomcat-­‐deploy  "webapp.war"))    :restart-­‐tomcat  (resource/phase                                      (service/service "tomcat6"   :action  :restart)))
    • Cloud Infrastructure Crates proxy proxy Cloud API Pallet webapp webapp webapp Nodedefinitions DB DB
    • Cloud Infrastructure Crates proxy proxy Cloud API Pallet webapp webapp webapp Nodedefinitions DB DB
    • Cloud Infrastructure Crates proxy proxy Cloud API Pallet webapp webapp webapp Nodedefinitions DB DB
    • Cloud Infrastructure Crates proxy proxy jclouds Cloud API Pallet webapp webapp webapp Nodedefinitions DB DB
    • Cloud Infrastructure proxy proxy proxy proxy Crates jclouds Cloud API Pallet webapp webapp webapp Nodedefinitions DB DB
    • Cloud Infrastructure proxy proxy proxy proxy Crates jclouds Cloud API webapp webapp webapp Pallet webapp webapp webapp Nodedefinitions DB DB
    • Cloud Infrastructure proxy proxy proxy proxy Crates jclouds Cloud API webapp webapp webapp Pallet webapp webapp webapp Node DB DB DB DBdefinitions
    • Cloud Infrastructure proxy proxy proxy proxy Crates Cloud API webapp webapp webapp Pallet webapp webapp webapp Node DB DB DB DBdefinitions
    • Cloud Infrastructure proxy proxy proxy proxy Crates squid squid Cloud API webapp webapp webapp Pallet webapp webapp webapp Node DB DB DB DBdefinitions
    • Cloud Infrastructure proxy proxy proxy proxy Crates squid squid Cloud API webapp webapp webapp Pallet webapp webapp webapp Node DB DB DB DBdefinitions
    • Cloud Infrastructure proxy proxy proxy proxy Crates squid squid Cloud API webapp webapp webapp Pallet webapp webapp webapp tomcat tomcat tomcat Node DB DB DB DBdefinitions
    • Cloud Infrastructure proxy proxy proxy proxy Crates squid squid Cloud API webapp webapp webapp Pallet webapp webapp webapp tomcat tomcat tomcat Node DB DB DB DBdefinitions
    • Cloud Infrastructure proxy proxy proxy proxy Crates squid squid Cloud API webapp webapp webapp Pallet webapp webapp webapp tomcat tomcat tomcat Node DB DB DB DBdefinitions mysql mysql
    • How are systems interconnected? Phase 1 • Retrieve and/or create needed nodes • For each node in each group: run phases for crates and a) Collect configuration info b) Schedule configuration actions to be performed on node Phase 2 • Generate and execute scripts and resources
    • how does this look today? 02/01/11
    • Environment Definition(def branch-1-environment {:branch "http://svn....../branches/branch-1" :compute-service {:provider "gogrid" :identity "<username>" :credential "<password>" :endpoint "http://10...:8080/api/"} :db-name "branch-1-db" :db-properties env-network-properties :pre-bootstrap-fn #setup-environment-db :bootstrap-tags {com.gogrid.nodes.services/LDAP 1 com.gogrid.nodes.services/Cache 1} :bootstrap-phases [:restart-cache :restart-LDAP] :verify-phases [:verify]})
    • Operation user => (start branch-1-environment) user => (verify branch-1-environment) user => (destroy branch-1-environment)
    • Challenge with Pallet It’s a newcomer in the field. • Documentation needs work • Untested support for some combinations of flavors and versions of Linux Steep learning curve, a new language OMG! It’s A Lisp!
    • Some pointers... http://jclouds.org Adrian Cole et al. http://palletops.com Hugo Duncan et al. http://gogrid.com For more info on GoGrid services please contact: Paul Lappas VP Engineering & Co-Founder of GoGrid paul@gogrid.com GoGrid is hiring devops and SW engineers for their SF office (contact Paul too)
    • Questions? Toni Batchelli tbatchelli@gmail.com @tbatchelli @disclojure 02/01/11