Implementing your Xenforo website on 'The Cloud' (warning - pictures)

Jesepi

Well-known member
Don't ask me what the cloud is. I still can't answer that after doing this. :confused:

I've been running websites for many years now with a mixture of shared hosting and a few VPS's as the platform. I felt like I needed to know how to put something ‘on the cloud’ for anyone that happened to ask me how to do so, and had a new xenforo site to work on so it seemed like a good time to figure things out.

I decided on Rackspace as the expense wasn’t prohibitive for a low resource using site compared to other offerings such as Amazon Web Services. Rackspace offers two products which will be used in this example. Cloud Servers, and Cloud Files.

Cloud Servers are essentially a Xen Based VPS. They can be scaled up and down to fit what memory usage you need, and you are billed at an hourly rate so if your site gets popular somewhere and you need a few days of high performance, you can increase your resource usage and only pay a higher rate for those days.

Cloud Files is basic storage for things like css, images, and javascript. I don’t believe xenforo has a way of uploading your attachments and avatars to an outside source, so I didn’t attempt to do that. I'm not even sure how that could be done with the way the permissions system is designed to limit access to attachments. For now I am just using it to deliver the assets contained in the Xenforo Javascript directory.

I needed to decide the setup that my site would be run on. Since the site was going to be running on a small 256MB instance I needed things to be incredibly lightweight and trimmed down. Here is what I decided on:
  • OS – Debian 6
  • Web Server – nginx
  • PHP – php-fpm
  • MySQL 5.5
Once I had everything squared away the only thing remaining was to actually set everything up.


hoorayclouds.gif

First off, if you are planning on using Rackspace make sure to set up your account ahead of time. After signing up I had to wait for a phonecall from customer services to verify my account, which took around 30 minutes.

After your account is active you can log in. You'll be greeted with an account summary and links to the sections where you deploy servers and file containers.

account-summary.webp

Adding a server is very straightforward. For anyone who has deployed a VPS in the past on a provider like Linode, the below steps should appear very familiar.

You have several screens where you select your desired option and then move onto the next step. First is the server's memory size (which also impacts how much disk space you get) which you can always resize later. After that, you pick an operating system. After those two things you deploy the server and get a popup with your server's root password.

cloudserver-1.webp cloudserver-2.webp cloudserver-3.webp cloudserver-4.webp cloudserver-5.webp

Configuring my server was the same as any other linux system. I actually started typing out all the steps I did for installing packages and whatnot, but I changed my mind. If anyone wants this feel free to ask and I'll add it in an additional post.

So, once my server was configured I went back into the rackspace panel and set up a Cloud Files share to server the javascript files xenforo uses. Once the files were uploaded, I went into the DNS control panel and configured a sub domain to deliver the CloudFiles assets without using a long ugly URL.

cloudfiles-1.webp cloudfiles-2.webp

One thing that was horrible about the control panel was attempting to upload all the files into each CloudFiles directory. I found a utility called CloudBerry explorer that made things much easier. It was pretty much like an FTP program for my rackspace could files account.

After all of this, I was ready to give my server a quick reboot to make sure everything was squared away and reloaded. The next steps were to change things with xenforo itself, which were just a couple of quick and simple steps:
  1. Switch jquery location to something other than local. I don't want to pay for bandwidth google does not mind giving away
  2. Go into my /library/config.php file and add $config['javaScriptUrl'] = 'http://cdn.url.com';
And after that... I was finished. So, now I have a website "on the cloud."

Does it run well? - Yes. It is incredibly snappy and is more than enough for a small website.

Would I use this for a very busy site? - No, probably not.

The cost is much higher than I would like to spend. If I moved my current setup on Linode to Rackspace (minus the CloudFiles) the cost would be sometimes more than double what I am currently paying.
  • November - $34.32
  • December - $48.72
  • January - $46.56
Instead of that, I am paying $20.00 a month for a 512MB Xen VPS and 200GB of bandwidth. Even if I go over my bandwidth limit, it is only $0.10 a GB vs rackspace charging $0.18 a GB out of the gate, with no bundled bandwidth included with a cloud server. Also, Linode's DNS manager is immensely more robust than the one RackSpace currently offers.

In short, 'The Cloud' may work for some people, but you should definitely be sure it is what you need before you move to it.
 
Good article.
Easy to extend memory, processing power but we pay more. I used to think my forum will be on cloud, think again now.
 
Well that's the thing. I get the same functionality with Linode. I can upsize and downsize my machine as I see fit at a much lower price point.
 
Will Linode handle the load balancing/bringing other nodes on line well though? I develop for and run Magento websites for a living, we use the rackspace cloud. And while customers usually just run on 1 db and 1 apache server, if they are running a promotion or for some reason need more bandwidth it's super easy to bring other nodes online and put them behind a loadbalancer to handle the load.

Each resource has it's uses, I guess that's an important part for each of us on our sites...find the hosting that matches it the best.
 
I'm not sure what you mean by 'bringing other nodes on line well'. If you're referring to the speed of launching an additional node I would put the time at around 30 seconds for it to build and deploy itself. After that you just tell it to boot and you're good to go.

They also do offer a load balancing feature, though I've not yet had the pleasure of being popular enough to need it:
http://www.linode.com/nodebalancers/
 
Could you put the steps you decided not to include in a post please? Last time I setup my own server was nearly 5 years ago so I have forgot everything.
 
I installed xenforo on my home "cloud" (only 6 servers tho was fun ran like a dream with nuts speeds) shame I didn't get stats like you did tho. Nice info cheers
 
Top Bottom