in tech, webhosting

Installing Fever on AppFog

Those of you who’ve read my blog before might have read the recent post – “Feedafever for ~Free” where I talk about installing an instance of Fever (by Shaun Inman) on AppFog, thus running a database and bandwidth heavy application for absolutely free.

I promised a tutorial for that and here it is –

1. Head over the AppFog and sign up. It’s free, so don’t worry about pulling out your credit card.

2. Once you’ve signed up, the first thing you need to do is go ahead and create a New App. The screen that shows up will give you a lot of options for the “Type of Application”. Notice how you can install WordPress, Drupal, Django, Node and so many others. I have a note down below concerning WordPress. For now, select PHP, as shown in the image.

 

3. Then, you’ll be asked to choose an infrastructure and a sub domain. Pick the one closest to you. I chose Amazon US East. Since I have not used Rackspace, Azure or HP OpenStack, I can’t vouch for those. Besides, Amazon is extremely stable. Also, you will not need to sign up or pay for these services separately. AppFog takes care of all that for you. The last bit shows you your current system usage. AppFog allows you to install up to 10 apps using a total of 2 GB of RAM for free. Anything beyond that and you have to pay.

4. Once you click Go, AppFog sets up the app for you and takes you to your app.

5. Congrats, your set up is half done. Your app is running with 128 MB RAM and you’re ready to set up MySQL and other functions. Head over to Services and create a new database by selecting MySQL and giving it a nice name. Once the database is set up, it’ll show up in the other services section and you just need to click Bind to connect it to your installation.

6. Your Database installed, head over to the “Update Source Code” tab. Here you’ll learn how to upload the Fever code to AppFog. The first thing you need installed is Ruby. If you’re on a Mac, you already have Ruby installed. Just start terminal and run ruby to confirm. On Windows, I recommend you install Ruby from the RubyInstaller website. It installs everything you need to set up AppFog. If you’re on a Linux, well, you probably already know how to install and run ruby and take over the world with a SuDo command. 😛 (in case you don’t, ask in the comments section)

7. AppFog has a nice ruby gem called ‘af’ to handle your account and applications. The Update Source Code tab gives you all the info you need, including how to install the gem and login (which you must do). After you’ve done those steps and before you run the update command, understand the following – AppFog puts some basic stuff into your application at the time of installation. Your job is to upload all the relevant files and replace this default setup. Also, AppFog is a little strange about how it gives you information about your MySQL database.According to the tutorial here, you can install PHPMyAdmin to manage your database. I did not do that. Instead, I uploaded a simple PHP script to get me the relevant info. You can download the file here.

8. Now, to set up your code, make a temporary folder in your computer and cd to it. Place the PHP file you just downloaded here and from within it, run the terminal command “af update”. This’ll upload the file to AppFog. Now, from the AppFog Dashboard, click the “Visit Live Site” button and when it opens, add the filename – “find_info.php”. This will give you the following information –

Hello world! us01-user01.crtks9njytxu.us-east-1.rds.amazonaws.com:3306 uwItlnwCaYkkN pauDL3zd5cmjL d21a9f68185b8464d8575b05efc2d98c6

I’m sorry for the dirty way it presents, but my knowledge of PHP is ghastly limited and this is all I could whip up. Copy all this information onto a file on your computer.

The string starting with “us01…” is your database host. You can skip the 3306 port number at the end. After that, follows your database username, password and Database name.

9. Once you have all this info, you’re ready to install Fever. If you’ve installed it before, you know that you can install a Fever compatibility package from the Feedafever website. This will give you confirmation that Fever works on your server. Download the zip file and extract its files (not the single folder, the files in it) into the same directory where you placed the find_info file. Then, delete the find_info file as it’s work is done and you don’t want anyone to know your database information. Finally, run the “af update” command again. AF will upload the files and restart the app. But you’re not done just yet.

10. When you bought fever (or are planning to buy it), you bought it for a particular domain name. Shaun Inman forbids you from installing it on any other domain. But the domain on which your app is running is not that. So, you need to set up DNS. Head over to the Domain Names tab. If you’re planning to run fever on a sub domain like me (I have fever.nitinkhanna.com), add the entire sub domain as shown. Else, if you’re dedicating a whole domain to your fever install (someone out their own fevr.me), add that. Accordingly, AppFog shows you what A or CNAME record to add to your DNS settings. Go to your domain’s DNS settings and add the correct DNS record. This process takes some time, so to pass the time, I’ll show you another neat thing you can do for Fever to run smoothly.

 

11. Like I said, AppFog gives you a total of 2 GB RAM to run your apps. If you’re not planning to run any other app, you can designate a lot of that RAM to your Fever installation. To do this, go back to Mission Control and check under App Resources. You will see Instances and Memory Quota. Increase the Memory Quota to something like 600 to 640 MB. Do NOT increase the number of instances. Fever does not understand instances and it’ll screw up your installation. Trust me, I tried. Now click Update and when that’s done, hit the restart button. This will restart your app with the new settings.

12. By now, your DNS settings should have made their way through the pipelines of the Internet and you should be able to open your dedicated fever website (fever.nitinkhanna.com for me). If you’re not able to, try cleaning your browser’s cache and wait a little longer. Once you get through, the Fever compatibility Suite will run. It’ll tell you that Browser Flush won’t work on this server (a small price to pay for free service), but move on. Insert the database information you got from the find_info file and then your Fever credentials and Activation Code.

Image Courtesy MacStories’ Fever installation Tutorial

Your Fever setup is ready. Import your favorite blogs and RSS Feeds and enjoy.

Notes, Caveats and Issues –

1. AppFog, though they’re committed to providing world-class facilities for free, have a small problem in their system – they do not have persistent storage. This means that some times, your Fever installation will reset. Since they don’t have proper storage, your Fever compatibility suite will run the next time you open Fever. Never fear. Remember that Fever stores all your feeds in the database. Just enter the database values from the file I made you save and your Activation information and Fever will be back up with all your feeds intact. I faced this problem a couple of times initially, but I haven’t in quite some time, so perhaps AppFog is improving their service.

2. I just mentioned that AppFog doesn’t have persistent storage. This means that any additional, non-database files get flushed in the event that their system resets. Which non-database files can you quickly recall? WordPress Plugins, Themes and templates. That means that if you install WordPress and the AppFog system resets, you’ll have to install the themes and plugins all over again. To test this, I installed a WordPress blog on AppFog and setup a few themes and plugins like BuddyPress on it. (Shameless plug here – I installed BuddyPress to run my own social network as an experiment. Read about it here and join the social network here). Ever since I installed it, I have only had to set it up once more after an AppFog reset. It’s been stable ever since.

What do you think?

Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

16 Comments

  1. After binding to connect mysql to my application I got this error message: name: VmcError, endpoint: PUT:/apps/:name, statusCode: 500, code: 111, description: System Exception Encountered. Could you please help?

  2. Hey, I recently used your instructions to host my own installation of fever on appfog. I´m having a hard time getting autorefresh to work. Were you able to get auto refresh working on appfog? If so, how?

  3. Hello! I’ve followed your instructions and have successfully activated Fever. Much appreciated! Just a quick feedback. You might want to tell your reader that the jumble up strings from find_info.php contains server name (which you did), user name, password and Db name. And in your boot.php screenshot you might want to point out to your reader that they have to enter these jumbled up credentials into the fever suite fields.

  4. Following your instructions was flawless up to the last section. Have you had anyone report the following error back from Fever (boot.php) compatibility? “This server does not push content to the browser as it becomes available.” Not sure if this is something new now that so many people are looking to use the service for Fever, or the instance I’m on, etc. Any thoughts?

    • @0b1455f355f4c97c926b50af9b047258:disqus The push capability depends on the server you’re hosting on. A lot of web hosts have this capability while many don’t. AppFog doesn’t support this feature and all this means is that while you’re browsing the content, new updates will not be added automatically. There’s a simple solution to it and that’s to use a cron job like I’ve detailed here on my blog

    • @facebook-1439010075:disqus I still seem to be able to do that. Maybe they’ve disabled it temporarily. I also noticed that they changed the look of the site, so maybe you should check on a different browser. I hope you’re looking under the Domain Names menu…

        • uh oh… Well, that’s that then. I’m still waiting on an email from Shaun Inman about a certain new type of hosting we could use. Let’s see what happens… Till then, your best bet would be to get a Gandi.net account, pretty cheap at $5/mo… I’ll also look for a solution to this issue, maybe some kind of a DNS/iFrame hack will get us through…

          • Indeed they did. I guess they weren’t too happy with how I was telling everyone about free hosting for fever. I guess we’ll just have to use Gandi or Heroku (still free). There are other options too. Time to explore. 🙂

  5. You don’t have to lose your static config files! If you have something you’d like to stick around in the app image, just put it in the directory before issuing the af update or af push command. For example, if my app needs values stored in /settings.conf, just make sure you have a local copy of settings.conf in the root directory you are pushing the app from, do the af update/push, et voila! The file sticks around from boot to boot.

    The same applies for WordPress plugin and theme directories. Just make sure the respective folder is in the app root when you send up the app and you’re good to go! I scratched my head a bit over this as it’s explained only subtly in the AppFog documentation. Persistent file storage is apparently a “top priority” but it’s been many months since they promised that.

Webmentions

  • ?????????RSS?????Fever°??Nginx????????Google ????? | POPOLOG April 19, 2013

    […] Nitin Khanna’s Blog – Installing Fever on AppFog […]

  • Google Reader Alternatives | Greg Stephens Blog April 19, 2013

    […] API is currently supported by the Reeder app for iOS devices and the Mac. Nitin Khanna has a nice post on how to install Fever on a free account with […]

  • Nitin Khanna's Blog – Feedafever for ~Free April 19, 2013

    […] I’ve added a tutorial to do this here. […]

  • Nitin Khanna's Blog – Feedafever for ~Free April 19, 2013

    […] I’ve added a tutorial to do this here. […]

  • Usar tu propio lector de feeds gratis desde AppFog April 19, 2013

    […] Installing Fever of AppFog por Nitin Khanna → Sitio oficial: AppFog […]

  • Nitin Khanna's Blog – Auto-refresh for Fever on AppFog April 19, 2013

    […] I got asked something about my “Installing Fever on AppFog” tutorial. Fever has an inbuilt module to refresh your RSS feeds periodically but this module […]

  • Nitin Khanna's Blog – Why tent.io will flop and what we should learn from it April 19, 2013

    […] setup a data and processing intensive app called Fever on AppFog for free recently and wrote about how to do it. Next, I’m going to set up tentd there, so that I can learn and teach you all how it’s […]

  • Bookmarks for 15th November 2012 | Lednor.Com April 19, 2013

    […] Nitin Khanna’s Blog – Installing Fever on AppFog – Those of you who’ve read my blog before might have read the recent post – “Feedafever for ~Free” where I talk about installing an instance of Fever (by Shaun Inman) on AppFog, thus running a database and bandwidth heavy application for absolutely free. […]