Home Cloud & Networking Implementing AppFog

Implementing AppFog

By Matthew Nohr , Isaac Rabinovitch
books-svg-icon Book
eBook $19.99 $13.98
Print $32.99
Subscription $15.99 $10 p/m for three months
$10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
BUY NOW $10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
eBook $19.99 $13.98
Print $32.99
Subscription $15.99 $10 p/m for three months
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
About this book
AppFog is the leading platform-as-a-service provider of PHP, Ruby, Node.js, and Java solutions. It is used by developers worldwide to deploy tens of thousands of applications. AppFog delivers a reliable, scalable, and fast platform for deploying applications in the cloud.This book is a hands-on guide that will walk you through creating and deploying applications to the cloud using AppFog, which will allow you to get your application deployed without the hassle of setting up servers.This book demonstrates how to use the AppFog service to build an application and have it running in the Cloud. It will walk you through the initial AppFog setup process and explain how to create your first application in minutes.You will also discover how to use services such as databases to make your applications more powerful. You will also learn how to create applications from scratch.You will find out everything you need to know to get an application running in the cloud for the first time.
Publication date:
November 2013
Publisher
Packt
Pages
86
ISBN
9781849698184

 

Chapter 1. Getting Started with AppFog

You can create an AppFog account and have your first application up and running in minutes. This chapter shows you how to perform this, and also demonstrates some of the features of the application control panel.

Note

You can create and deploy several applications using AppFog's free service level, which allows you to use up to 2 GB of RAM. You can use the free service level without supplying a credit card number. Some advanced features, such as use of external domain names, SSL, and team access, are only available to the paid users.

 

About AppFog


AppFog is a platform that you can use to host and deploy your applications to the cloud. You can write applications in Java, Node.js, Ruby, Python, or PHP and it also has built-in support for MySQL, PostgreSQL, MongoDB, Redis, and RabbitMQ. Applications and their services can all be configured from a simple dashboard in a matter of minutes. AppFog also provides scalable architectures with load balancing so as your applications grow, you can easily increase the number of instances you have running.

There are free and paid plans. The paid plans currently start at $20 and go up from there depending on how much memory, storage, and instances you need. There are also enterprise level plans for larger businesses.

One of the main benefits of using AppFog is that it reduces the amount of time you need to spend on configuring servers, installing and configuring firewalls and security, and managing load balancers.

 

Creating an account


Create an AppFog account using the following steps:

  1. Go to www.appfog.com and click on Sign Up.

  2. The Create an account form appears. Fill it in and click on Signup.

  3. After clicking on Signup, you will need to verify your e-mail. Once activated, you will be taken to your profile page.

  4. On your profile page, click on Create App. This will take you to the new apps page. We will cover this page in the next section.

 

Creating and deploying a preconfigured application


The new apps page helps you create and deploy a preconfigured application. Applications can be in one of several programming languages, including Ruby, Python, Java, PHP, and Node.js. These languages can be used with various application frameworks and backend services. In this chapter, you will create and deploy a basic "Hello World" application written in the Ruby programming language and utilizing the Sinatra application framework. No knowledge of Ruby or Sinatra is needed for this initial step.

  1. Go to the New Apps page. If you've just created your account, you will go to the profile page and can then click on New App. Otherwise, go to console.appfog.com and click on create app.

  2. Choose an application platform. The first section of the New Apps page is a list of platforms labeled Step 1: Choose an application. Your first application will run on Ruby and Sinatra, so click that icon.

  3. Choose an infrastructure. This is the cloud hosting provider that will run your application. For this simple application, you can choose any infrastructure that supports Ruby. You will see a red exclamation mark on any infrastructures that do not support your selected application. Have look at the following screenshot for reference:

    Note

    Buttons for infrastructures that support Ruby have RUBY in a white-on-gray rectangle. Infrastructures that do not support Ruby will have a red exclamation mark.

  4. Choose an application name. This name will form part of a URL you can use to access your application in a Web browser. Click on Create App, as in the following screenshot:

    Note

    • The web form refers to the application name as a "domain" or a "subdomain" because it's part of a web site URL. You'll mainly use this name to identity the application to the command-line tool, so this book calls it the "application name".

    • You can assign additional domain names to the application after you deploy it.

  5. After you click on Create App, you go to a page that describes the progress of the application towards creation, staging, and running. Once it is running, you can click on the Your App is ready link to see it:

 

Using the application control panel


After you create an application, its control panel appears automatically. To access it otherwise perform the following steps:

  1. Go to console.appfog.com. A list of applications appears:

  2. Click on the application name in the left column. The application control panel appears:

This console has many features, which we will explore in later chapters. For now, let's focus on just two features, which are listed in the following bullet list:

  • If you click on the Visit Live Site button (upper-right), you go to your application, which is already running.

  • If you click on Domain Names (left-side) you can assign additional domain names for application access. To support external domain names (such as mysite.com), you must upgrade your AppFog account to a paid level. The domain name itself is managed by a registrar, which is separate from AppFog.

Note

To create a domain name, visit the website for a domain name registrar. You will need the A Record and CNAME Record data for the infrastructure you are using. This data is available on AppFog domain names screen. You can read AppFog help guide on custom domain names for more details.

 

Summary


In this chapter we learned how to:

  • Create an AppFog account

  • Create a preconfigured AppFog application

  • Deploy the application and see it running

  • Use AppFog control panel

In Chapter 2, Using the Command-line Tool, we are going to use AppFog command-line tool to download the application we created here, update it, and then redeploy it to AppFog.

About the Authors
  • Matthew Nohr

    Matthew Nohr is a software developer with over ten years of experience in creating large scale applications. He has worked on a range of projects from enterprise Java desktop applications to commercial Java server-based products to cloud-based Groovy/Grails services. Matthew is a certified Scrum Master and has a Masters degree in Software Engineering.

    Browse publications by this author
  • Isaac Rabinovitch

    Isaac Rabinovitch is a freelance technical writer in Portland, Oregon. He's worked with computers since the days they filled whole rooms and had hundreds of blinking lights. He's written documentation for programmers, system administrators, data center personnel, and ordinary people. His former employees include Sun, SGI, Borland, and Zilog. He's the co-author of the Java Tutorial, 4th edition. Read more about him at picknit.com.

    Browse publications by this author
Implementing AppFog
Unlock this book and the full library FREE for 7 days
Start now