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 note down below concerning WordPress. For now, our app marketing strategy calls for us to 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.

  • Pingback: Bookmarks for 15th November 2012 | Lednor.Com()

  • Pingback: Nitin Khanna's Blog – Why tent.io will flop and what we should learn from it()

  • Le Tung Lam

    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?

    • Perhaps you’d like to try again. There are times when the AppFog servers reset themselves. This could be one of those times…

  • Felix

    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?

  • Pingback: Nitin Khanna's Blog – Auto-refresh for Fever on AppFog()

  • Wow, thank you so much for this guide!

  • FY

    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.

  • Quella

    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

  • Quella

    Quick Screenshot if this helps others…

  • Pingback: Usar tu propio lector de feeds gratis desde AppFog()

  • Pingback: Nitin Khanna's Blog – Feedafever for ~Free()

  • I can’t seem to add a custom domain to AppFog now. I guess the jig is up.

    • @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…

      • Here’s what I see.

        • 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…

        • In fact, AppFog disabled this functionality unilateraly and almost secretly… You can’t map any domain name on free plans anymore…

          • 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. 🙂

  • Pingback: Nitin Khanna's Blog – Feedafever for ~Free()

  • Pingback: Google Reader Alternatives | Greg Stephens Blog()

  • 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.

  • Pingback: ?????????RSS?????Fever°??Nginx????????Google ????? | POPOLOG()