Heroku Cloud Application Development
eBook - ePub

Heroku Cloud Application Development

  1. 336 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Heroku Cloud Application Development

Book details
Book preview
Table of contents
Citations

About This Book

In Detail

Heroku is one of the leading cloud platform-as-a-service technologies that aims to help you deploy feature-rich web apps with Elan. It supports several widely popular programming languages like Ruby, Java, PHP, and Python to name a few, and also offers support for multiple data sources (sqllite and postgres). Heroku is all about ease of deployment and application management, as it lets you build and run web apps without having to worry about the servers.

This book is about Heroku but more importantly, it is about the ease with which a developer with limited availability or knowledge of deployment infrastructure can run and manage a cloud app 24/7/365. It will show how Heroku is language independent and does not lock the user to a particular operating environment, giving users the flexibility of choosing the right software infrastructure based on the scale of the app hosted.

This books starts by unraveling the basics of the Heroku stack. The book then moves on to teach you simple steps to build and deploy an app on Heroku. You will also experience the ease of running and troubleshooting a Heroku app.

The book illustrates the process of creating a new web application with Heroku. Along the way, you will also learn some advanced topics such as configuring Heroku with web sockets, monitoring your apps, and managing your DNS for Heroku. The book will also detail the process of building custom build packs to support for other languages, how to enable Heroku for mobile apps and much more. This book will demonstrate the security processes in Heroku, enabling you to enforce tighter controls at every layer of the platform.

This book will help you build cloud applications the right awaythe first time and every timeas well as scale Heroku to achieve high availability and fine-tune the Heroku infrastructure.

Approach

An easy-to-follow, hands-on guide that clearly explains the various components of the Heroku platform and provides step-by-step guidance as well as numerous examples on how to build and troubleshoot robust and scalable production-ready web applications on the Heroku platform.

Who this book is for

This book is intended for those who want to learn Heroku the right way. Perhaps you are new to Heroku or are someone who has heard about Heroku but have not built anything significant with it. You should have knowledge or familiarity with cloud computing and basic knowledge of database and network deployment.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Heroku Cloud Application Development by Anubhav Hanjura in PDF and/or ePUB format, as well as other popular books in Computer Science & Systems Architecture. We have over one million books available in our catalogue for you to explore.

Information

Year
2014
ISBN
9781783550975
Edition
1

Heroku Cloud Application Development


Table of Contents

Heroku Cloud Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Hello Heroku
What is cloud computing?
Cloud service models
What is cloud application development?
Key advantages of cloud application development
Introducing Heroku
Walking down the memory lane
An overview of Heroku's architecture
Process management
Logging
HTTP routing
Heroku interfaces
The Heroku feature set
Let's play Heroku
Getting ready for the ride – the prerequisites
Signing up
Installing the Heroku toolbelt
Logging in and generating a new SSH key
Test driving Heroku
Summary
2. Inside Heroku
The Heroku platform stack
The Celadon Cedar stack
Request routing in Heroku
The execution environment - dynos and the dyno manifold
Heroku's logging infrastructure – the Logplex system
The Heroku add-on architecture
Programmatically consuming Heroku services
The Heroku Platform API
Security
Schema
Data
Accessing the API
API clients
Calling the API
Response
Limits on API calls
The Heroku process architecture
Procfile
Declaring process types
The Procfile format
A sample Procfile
Adding Procfile to Heroku
Running applications locally
Setting local environment variables
Process formation
Process scaling
Stopping a process type
Checking on your processes
Process logs
Running a one-off process
Running anything
Summary
3. Building Heroku Applications
Heroku's guiding influence – the Twelve-Factor App methodology
A codebase is always versioned and it can have multiple deploys
Declare and isolate dependencies explicitly (always)
Configuration should be stored in the environment
Backend services should be treated as attached (loosely-coupled) resources
Strict separation of the build, release, and run stages of an app
An app in execution is a process or many processes
Services should be exported through port binding
An app should scale out through its process model
Faster startup and graceful shutdown is the way to app agility and scalability
Development and production (and everything in between) should be as similar as possible
The app should just log the event not manage it
App's administrative or management task should be run as a one-off process
Creating a Heroku application
Configuring your Heroku application
The Heroku application configuration API
Examples of using application configuration
The persistence of configuration variables
Accessing configuration variables at runtime
Limits on configuration data
Using the Heroku config plugin
Introducing buildpacks
Using a custom buildpack
Specifying a custom buildpack at the app creation stage
Third-party buildpacks
The buildpack API
Components of a buildpack API
The bin/detect script
The bin/compile script
The bin/release script
Writing a buildpack
The slug compiler
Optimizing the slug
Size limits
Summary
4. Deploying Heroku Applications
Deployment on Heroku
Getting a Heroku account
Installing the toolbelt client kit
Logging into the Heroku account
Setting up SSH
Writing your application
Pushing your application to Heroku
The Git vocabulary
Getting started with Git
Tracking a new project
Using an existing Git project
The life cycle of an artifact in Git
Tracking files in a Git project
When you don't need Git to track your files
The git diff command – knowing what changed
Committing your changes
Deleting a file
Moving a file
Viewing commit history
Undoing a change
You can use some Git help
The local repository
Remote repositories
Creating a Heroku remote
Renaming an application
Sending code to Heroku
Optimizing slug size
Cloning existing Heroku applications
Forking an application
Side effects of forking an application
Transferring Apps
Optimizing deployments
The choice of a region
Tracking application changes
Setting up Deploy Hooks
Basecamp
Campfire
E-mail
HTTP
IRC
Release management
Checking installed releases
Verifying the new release
Rolling back the release
Summary
5. Running Heroku Applications
The Heroku app lifecycle
The Heroku CLI
How to get the Heroku client tool
Verifying the tool
How to get the latest Heroku client tool
Where is the Heroku client stored?
What if my client installation is corrupted or not working?
The Heroku CLI commands
Heroku CLI commands by function
Extending the Heroku CLI
The Heroku CLI and add-ons
A note on Heroku CLI and security
Running your cloud apps locally
Using Foreman to check Procfiles
Using Foreman to run apps directly
Running one-off commands
Foreman command-line options
The Apps page
The Resources tab
Managing resources
The Activity tab
The Access tab
The Settings tab
The Run Production Check tab
Heroku support
Summary
6. Putting It All Together
Heroku's support for Java
General support for Java
Database support for Java apps
Environment configuration
Integrating Eclipse with Heroku
Prerequisites
Configuring Heroku in Eclipse
Installing the Eclipse plugin for Heroku
Setting up Heroku for development
Setting up SSH support
Creating a new Heroku Java app in Eclipse
Using an existing Heroku appli...

Table of contents

  1. Heroku Cloud Application Development