Heroku for team collaboration
-
Upload
john-stevenson -
Category
Technology
-
view
1.316 -
download
2
description
Transcript of Heroku for team collaboration
Team collaboration in the Cloud
John StevensonDeveloper Advocate @ Salesforce / Heroku
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.
Why consider Heroku ?Why consider Heroku ?
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.”
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
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.”
30 second app - Demo30 second app - Demo
30 second app30 second app
What is Heroku ?What is Heroku ?
ForgetServers
Run Anything
SeeEverything
Trust &Manage
4 core principles4 core principles
Forget serversForget serversWhat is Heroku ?What is Heroku ?
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!
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
Scaling via web control panel
Scaling via web control panel
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
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
Run AnythingRun AnythingWhat is Heroku ?What is Heroku ?
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.
“Supported” languages“Supported” languages
A Polyglot platform: 6 supported languages and lots of open source build packs
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
Many build packs on Github
Many build packs on Github
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
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
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
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}
See EverythingSee EverythingWhat is Heroku ?What is Heroku ?
logplexlogplex
Unified logging
• App operations• Administrative commands• All infrastructure messages
Real time Dyno information
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
heroku logsheroku logs
heroku logs --source appsheroku logs --source herokuheroku logs --source heroku --ps api
Example of error in logsExample of error in logs
Trust & manageTrust & manage
Effortless ScalingEffortless Scaling
Web Worker
Workload Diversity(Process types)
$ cat Procfileweb: java $JAVA_OPTS EmbeddedServerworker: java $JAVA_OPTS YourJavaClass
$ heroku scale web=4 worker=10Scaling processes... done
Scaling your appScaling your app
Control apps via Heroku.com
Control apps via Heroku.com
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
Trust & ManageTrust & Manage
24x7 platform
monitoring
Herokai know when there
is trouble before you do!
status.heroku.comstatus.heroku.com
Heroku cost calculatorHeroku cost calculator
Heroku add-onsHeroku add-onsWhat else is there to Heroku ?What else is there to Heroku ?
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/
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
Getting started with HerokuGetting started with HerokuGit Push DeployGit Push Deploy
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
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
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
Simplistic Continuous deployment
Simplistic Continuous deployment
Continuous deploymentContinuous deployment
Collaboration in the cloudCollaboration in the cloudGithub and HerokuGithub and Heroku
Heroku CollaborationHeroku Collaboration
Add multiple developers to an Add multiple developers to an appapp
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
Github – Social CodingGithub – Social Coding
Collaborate on public or private projects
Collaborate 24/7 all over the world
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
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
Pull request discussionPull request discussion
Pull request code reviewPull request code review
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
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
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
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)
git log --graphgit log --graph
Heroku behind HEADHeroku behind HEAD
Continuous Integration serversContinuous Integration servers
Continuous deploymentContinuous deployment
Travis-CI for open projects
Travis-CI for open projects
Rolling back your applicationsRolling back your applicationsManaging DeploymentManaging Deployment
Heroku rollback mechanism
Heroku rollback mechanism
Release HistoryRelease History
View info about a releaseView info about a release
Rollback to a specific version
Rollback to a specific version
History after rollback & push
History after rollback & push
Try for yourselfTry for yourself
Thank you !!!