Heroku for team collaboration

79
Team collaboration in the Cloud John Stevenson Developer Advocate @ Salesforce / Heroku

description

An overview of Heroku and Github for team collaboration when building and deploying apps and services

Transcript of Heroku for team collaboration

Page 1: Heroku for team collaboration

Team collaboration in the Cloud

John StevensonDeveloper Advocate @ Salesforce / Heroku

Page 2: Heroku for team collaboration

Proprietary & Proprietary & ConfidentialConfidential

Safe HarborSafe HarborSafe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of intellectual property and other litigation, risks associated with possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-Q for the most recent fiscal quarter ended April 30, 2011. This documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.

Page 3: Heroku for team collaboration

Why consider Heroku ?Why consider Heroku ?

Page 4: Heroku for team collaboration

Challenging deploymentChallenging deployment

“Ops teams are overwhelmed by developer requests”

“Different environments are not always the same. Patching and internal processes often not

automated”

“There is a divide in many enterprises between the developers & operations teams.”

Page 5: Heroku for team collaboration

Continuous DeliveryContinuous Delivery

“..reducing the cycle time between an idea and usable software”

- Martin Fowler

“Software delivers no revenue until it is in the hands of its users.”

-Jez Humble

“.. leads to deeper relationship between IT, their business customer, and their final customers.”

-Jez Humble

Page 6: Heroku for team collaboration

Cloud Services should be easy

Cloud Services should be easy

“Should have a natural way to use the services that fits into each teams existing workflow”

“Should be easy to see the value & cost benefits”

“Should be as trust worthy as any internal service, if not more so.”

Page 7: Heroku for team collaboration

30 second app - Demo30 second app - Demo

Page 8: Heroku for team collaboration

30 second app30 second app

Page 9: Heroku for team collaboration
Page 10: Heroku for team collaboration

What is Heroku ?What is Heroku ?

Page 11: Heroku for team collaboration

ForgetServers

Run Anything

SeeEverything

Trust &Manage

4 core principles4 core principles

Page 12: Heroku for team collaboration

Forget serversForget serversWhat is Heroku ?What is Heroku ?

Page 13: Heroku for team collaboration

Introducing DynosIntroducing DynosA self contained resource in A self contained resource in which to run your applicationwhich to run your application

A logical abstraction over serversA logical abstraction over servers

scalability is more valuable than # of scalability is more valuable than # of serversservers

Allows a trivial way to scale your Allows a trivial way to scale your appapp

and know how much its costing you!and know how much its costing you!

Page 14: Heroku for team collaboration

For DevelopersFor Developers

Free:Free:

750 hours per month 750 hours per month

per appper app

Have as many apps as you Have as many apps as you requirerequire

Page 15: Heroku for team collaboration

Scaling via web control panel

Scaling via web control panel

Page 16: Heroku for team collaboration

Inside an Heroku DynoInside an Heroku Dyno

Application Dependencie

s

Your Application

code

Embedded Container

• Any application• Any framework (Spring, Play!, django, compojure,etc.)

• Maven, Gradle, SBT, Leiningen, Bundle, etc.

• Jetty, Tomcat, etc

Page 17: Heroku for team collaboration

Forget ServersForget Servers

Focus 100% on codeFocus 100% on code

Fully managed platformFully managed platform

Trust Heroku to be your Trust Heroku to be your DevOps supportDevOps support

Page 18: Heroku for team collaboration

Run AnythingRun AnythingWhat is Heroku ?What is Heroku ?

Page 19: Heroku for team collaboration

An Elastic

“polyglot”

Platform-as-a-Service

pol·y·glot [pol-ee-glot]

adjective1. able to speak or write several languages; multilingual.2. containing, composed of, or written in several languages: a polyglot Bible.

Page 20: Heroku for team collaboration

“Supported” languages“Supported” languages

A Polyglot platform: 6 supported languages and lots of open source build packs

Page 21: Heroku for team collaboration

Additional support through “Build packs”

Additional support through “Build packs”

Control your own build, deploy & run cycleControl your own build, deploy & run cycle

defined using shell script or rubydefined using shell script or ruby

Create your app with a build packCreate your app with a build pack

heroku create myapp heroku create myapp

--buildpack https://github.com/a/buildpack.git--buildpack https://github.com/a/buildpack.git

Page 22: Heroku for team collaboration

Many build packs on Github

Many build packs on Github

Page 23: Heroku for team collaboration

Open Languages

Ruby Clojure Node.JS

Open Databases

Mongo DB Amazon RDS Postgres

Couch DB Redisdatabase.com

Open Frameworks

SinatraRuby on Rails

CompojureRing

Noir

Padrino

HalcyonWaves

Play!

Spring Lift

Java Scala

Polyglot environments Polyglot environments

Page 24: Heroku for team collaboration

No Vendor Lock-inNo Vendor Lock-in

ProcfileProcfile

A simple, declarative way to define appprocess types, so they can be easilymanaged in unison.

A text file in the root of your project containing a startup command & parameters

Page 25: Heroku for team collaboration

Procfile examplesProcfile examples

Simple web serverSimple web server

web: python -m SimpleHTTPServer $PORTweb: python -m SimpleHTTPServer $PORT

ClojureClojure

web: lein with-profile production web: lein with-profile production trampoline run -m my-clojure-website.webtrampoline run -m my-clojure-website.web

Page 26: Heroku for team collaboration

Procfile examplesProcfile examples

Java, Play framework & PostresJava, Play framework & Postres

web: target/start -Dhttp.port=${PORT} web: target/start -Dhttp.port=${PORT}

${JAVA_OPTS} ${JAVA_OPTS}

-DapplyEvolutions.default=true -DapplyEvolutions.default=true

--Ddb.default.driver=org.postgresql.Driver Ddb.default.driver=org.postgresql.Driver

-Ddb.default.url=${DATABASE_URL}-Ddb.default.url=${DATABASE_URL}

Page 27: Heroku for team collaboration

See EverythingSee EverythingWhat is Heroku ?What is Heroku ?

Page 28: Heroku for team collaboration

logplexlogplex

Unified logging

• App operations• Administrative commands• All infrastructure messages

Real time Dyno information

Page 29: Heroku for team collaboration

LogplexLogplex

time-ordered time-ordered events events aggregatedaggregated from the from the output output streams streams of all your app’s of all your app’s running processes, system running processes, system components, and backing components, and backing services.services.

heroku logsheroku logs

Page 30: Heroku for team collaboration

heroku logsheroku logs

heroku logs --source appsheroku logs --source herokuheroku logs --source heroku --ps api

Page 31: Heroku for team collaboration

Example of error in logsExample of error in logs

Page 32: Heroku for team collaboration

Trust & manageTrust & manage

Page 33: Heroku for team collaboration

Effortless ScalingEffortless Scaling

Web Worker

Workload Diversity(Process types)

Page 34: Heroku for team collaboration

$ cat Procfileweb: java $JAVA_OPTS EmbeddedServerworker: java $JAVA_OPTS YourJavaClass

$ heroku scale web=4 worker=10Scaling processes... done

Scaling your appScaling your app

Page 35: Heroku for team collaboration

Control apps via Heroku.com

Control apps via Heroku.com

Page 36: Heroku for team collaboration

Controling Heroku - CLIControling Heroku - CLI

$ heroku psProcess State Command----------- ----------- -----------------------------web.1 up for 6s java $JAVA_OPTS EmbeddedServerworker.1 up for 5s java $JAVA_OPTS YourJavaClass

$ heroku restart worker.1Restarting worker.1 process... Done

$ heroku status=== Heroku StatusDevelopment: No known issues at this time.Production: No known issues at this time.

$ heroku sharing=== enterprise-workshop [email protected]@jobs.com

Page 37: Heroku for team collaboration

Trust & ManageTrust & Manage

24x7 platform

monitoring

Herokai know when there

is trouble before you do!

Page 38: Heroku for team collaboration

status.heroku.comstatus.heroku.com

Page 39: Heroku for team collaboration
Page 40: Heroku for team collaboration
Page 41: Heroku for team collaboration
Page 42: Heroku for team collaboration
Page 43: Heroku for team collaboration

Heroku cost calculatorHeroku cost calculator

Page 44: Heroku for team collaboration

Heroku add-onsHeroku add-onsWhat else is there to Heroku ?What else is there to Heroku ?

Page 45: Heroku for team collaboration

ExtensibilityExtensibility

A range of Relational & A range of Relational & NoSQL databasesNoSQL databases

Monitoring for your appMonitoring for your app

……and too much to cover and too much to cover herehere

https://addons.heroku.com/

Page 46: Heroku for team collaboration

Postgres as a servicePostgres as a service

Powerful data storagePowerful data storage

Irrespective of if you app is deployed Irrespective of if you app is deployed on Herokuon Heroku

Page 47: Heroku for team collaboration

Getting started with HerokuGetting started with HerokuGit Push DeployGit Push Deploy

Page 48: Heroku for team collaboration

Setup your Heroku account

Setup your Heroku account

Create an account on Create an account on Heroku

Download the Download the Heroku Toolbelt

Upload you public key

heroku login

Page 49: Heroku for team collaboration

Whats in the Toolbelt?Whats in the Toolbelt?

Heroku command line toolsHeroku command line tools

create | logs | ps | releases | create | logs | ps | releases | run | addons | configrun | addons | config

A Git clientA Git client

ForemanForeman

run apps locally as they would run on run apps locally as they would run on HerokuHeroku

Page 50: Heroku for team collaboration

5 steps to first deploy5 steps to first deploy

Create you app Create you app (using your build (using your build tool)tool)

Initialise a git repository Initialise a git repository for for your projectyour project

Create your heroku appCreate your heroku app

Commit your files Commit your files to the local to the local repositoryrepository

Push your app to herokuPush your app to heroku

Page 51: Heroku for team collaboration

Simplistic Continuous deployment

Simplistic Continuous deployment

Page 52: Heroku for team collaboration

Continuous deploymentContinuous deployment

Page 53: Heroku for team collaboration

Collaboration in the cloudCollaboration in the cloudGithub and HerokuGithub and Heroku

Page 54: Heroku for team collaboration

Heroku CollaborationHeroku Collaboration

Add multiple developers to an Add multiple developers to an appapp

Page 55: Heroku for team collaboration

Heroku CollaborationHeroku Collaboration

All collaborators can: All collaborators can:

push updates & trigger deploymentpush updates & trigger deployment

view and change app settingsview and change app settings

Only Owners can delete the appOnly Owners can delete the app

or transfer ownership to a different or transfer ownership to a different accountaccount

Page 56: Heroku for team collaboration

Github – Social CodingGithub – Social Coding

Collaborate on public or private projects

Collaborate 24/7 all over the world

Page 57: Heroku for team collaboration

Add Github repo to your app

Add Github repo to your app

Create a new repo on GithubCreate a new repo on Github

Add the repo to your projectAdd the repo to your project

git remote add github git remote add github [email protected]/account/[email protected]/account/my-repo.git

Push you code to githubPush you code to github

git push –u github mastergit push –u github master

Page 58: Heroku for team collaboration

Collaborative coding on Github

Collaborative coding on Github

Add people to your Github repoAdd people to your Github repo

only those that you trust!only those that you trust!

Encourage pull requestsEncourage pull requests

allows collaboration around commitsallows collaboration around commits

Facilitate code reviewsFacilitate code reviews

Page 59: Heroku for team collaboration

Pull request discussionPull request discussion

Page 60: Heroku for team collaboration

Pull request code reviewPull request code review

Page 61: Heroku for team collaboration

Adding more environmentsAdding more environments

Typically there are:Typically there are:

production, staging, uat, testing , production, staging, uat, testing , devdev

Create the environments you wantCreate the environments you want

heroku create my-app-stagingheroku create my-app-staging

heroku create my-app-uatheroku create my-app-uat

heroku create my-app-testingheroku create my-app-testing

Page 62: Heroku for team collaboration

Check your addons firstCheck your addons first

Check which addons used before Check which addons used before creating new environmentscreating new environments

heroku addons --remote herokuheroku addons --remote heroku

heroku addons --remote productionheroku addons --remote production

Page 63: Heroku for team collaboration

More Envs = more reposMore Envs = more repos

Every time you create a new Every time you create a new Heroku environment a remote Heroku environment a remote git repository is addedgit repository is added

git remote –v git remote –v

Page 64: Heroku for team collaboration

Managing multiple reposManaging multiple repos

Learn to love git logLearn to love git log

Configure it to use –graphConfigure it to use –graph

Or get a good visual git toolOr get a good visual git tool

SourceTree for MacOSX is great SourceTree for MacOSX is great (and free)(and free)

Page 65: Heroku for team collaboration

git log --graphgit log --graph

Page 66: Heroku for team collaboration

Heroku behind HEADHeroku behind HEAD

Page 67: Heroku for team collaboration

Continuous Integration serversContinuous Integration servers

Page 68: Heroku for team collaboration

Continuous deploymentContinuous deployment

Page 69: Heroku for team collaboration

Travis-CI for open projects

Travis-CI for open projects

Page 70: Heroku for team collaboration
Page 71: Heroku for team collaboration
Page 72: Heroku for team collaboration

Rolling back your applicationsRolling back your applicationsManaging DeploymentManaging Deployment

Page 73: Heroku for team collaboration

Heroku rollback mechanism

Heroku rollback mechanism

Page 74: Heroku for team collaboration

Release HistoryRelease History

Page 75: Heroku for team collaboration

View info about a releaseView info about a release

Page 76: Heroku for team collaboration

Rollback to a specific version

Rollback to a specific version

Page 77: Heroku for team collaboration

History after rollback & push

History after rollback & push

Page 78: Heroku for team collaboration

Try for yourselfTry for yourself

Page 79: Heroku for team collaboration

Thank you !!!