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.
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.
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.
Go to www.appfog.com and click on Sign Up.
The Create an account form appears. Fill it in and click on Signup.
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.
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.
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.
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.
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:
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:
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.
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:
Go to console.appfog.com. A list of applications appears:
Click on the application name in the left column. The application control panel appears:
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.
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.