Static site hosting: Difference between revisions

From OpenHatch wiki
Content added Content deleted
imported>Paulproteus
imported>Paulproteus
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 3: Line 3:
Many of the sites created by OpenHatch are purely static files. This includes the Campus Outreach site at http://campus.openhatch.org/ and the Boston Python Workshop website at http://bostonpythonworkshop.com/.
Many of the sites created by OpenHatch are purely static files. This includes the Campus Outreach site at http://campus.openhatch.org/ and the Boston Python Workshop website at http://bostonpythonworkshop.com/.


So far, we have hosted these sites on the main OpenHatch linode. We're in the process of moving them to Rackspace Cloud Files.
So far, we have hosted these sites on the main OpenHatch linode. We're in the process of moving them to NearlyFreeSpeech.NET.


== History ==
== History ==
Line 9: Line 9:
On November 19, 2011, the main OpenHatch linode had an outage. This meant that all the sites hosted on it, including these static sites, were down. Jessica McKellar urged us to find a more reliable, well-monitored hosting situation for the Boston Python Workshop.
On November 19, 2011, the main OpenHatch linode had an outage. This meant that all the sites hosted on it, including these static sites, were down. Jessica McKellar urged us to find a more reliable, well-monitored hosting situation for the Boston Python Workshop.


== Rationale for Rackspace Cloud Files ==
== Rationale for NearlyFreeSpeech.NET ==


* Normally I would go with NearlyFreeSpeech.NET. They have about 2 hours of downtime every 4 years, and they schedule these outages in advance. I feel more comfortable putting our files on a hosting service where we believe the hosting company is big enough to geographically spread its data around multiple data centers. (Perhaps NFS does this as well; I'm not sure.)
* They are reliable and security-minded: They have about 2 hours of downtime every 4 years, and they schedule these outages in advance. (So if we want to handle their outages by changing DNS to point at our own server during these short outages.)
* I would prefer to use some "cloud"-esque thing like Rackspace Cloud Files or Amazon EC2+CloudFront, but none of those services let you point the root of a domain name to them.
* Both are super cheap; less than $40/yr for our needs.
** I feel more comfortable putting our files on a hosting service where we believe the hosting company is big enough to geographically spread its data around multiple data centers. (Perhaps NFS does this as well; I'm not sure.)
* Rackspace Cloud Files has an SLA that guarantees 99.9% uptime, but I would say the SLA has no "teeth" -- they will simply refund portions of your month's hosting costs, which to us is very little money. You can read it here: http://www.rackspace.com/cloud/cloud_hosting_products/files/faq/
* All these options are super cheap; less than $40/yr for our needs.
* In general, I strongly prefer to put static sites with hosts that understand how easy it is to serve static sites. NearlyFreeSpeech.NET and Rackspace Cloud Files and others have clear provisions for marking sites as static, which indicates they have a clue.
* In general, I strongly prefer to put static sites with hosts that understand how easy it is to serve static sites. NearlyFreeSpeech.NET and Rackspace Cloud Files and others have clear provisions for marking sites as static, which indicates they have a clue.
* NFS.net can manage DNS for these domains, which minimizes our hassle.


== Status ==
== Status ==


* Asheesh created an account with Rackspace Cloud Files. Username = openhatch; password is randomly generated.
* Asheesh created an account with Nearly Free Speech.
* The '''staticsites''' shell account has one directory per static site that we generate. Each directory contains an '''update_and_push.sh''' script that gets the latest version from git and pushes it to the hosting provider. (Right now, this just covers bostonpythonworkshop.com.)
* Right now, the "sip" shell account on linode.openhatch.org maps to the BPW website URL. Asheesh plans to set up the "sip" shell account to have the info + authentication secrets to push the files to Rackspace Cloud Files rather than have Apache/nginx serve them out of /home/sip/.
* All SSH keys from the deploy account have been copied (on a one-time basis, on 2011-11-26) to the staticsites shell account.
** In the future, maybe, the BPW repo will hopefully contain enough info (except authentication secrets) for people to do a push to Rackspace Cloud Files
* The staticsites shell account has enough info + authentication secrets for people to this push to NFS.net to work.

To use:

ssh staticsites@linode.openhatch.org
cd bostonpythonworkshop.com # for example
./update_and_push.sh

* BPW's site is hosted with NFS.net at a different URL than bostonpythonworkshop.com, as well as bostonpythonworkshop.com.
* BPW's domain points at NFS.net's DNS servers, which will handle DNS for us.
* This applies to these other static sites:
** campus.openhatch.org
** penn.openhatch.org
** corp.openhatch.org
** labs.openhatch.org

== How to create a site ==

* See [[Static_site_hosting/create]]

Latest revision as of 17:47, 29 May 2013

Summary

Many of the sites created by OpenHatch are purely static files. This includes the Campus Outreach site at http://campus.openhatch.org/ and the Boston Python Workshop website at http://bostonpythonworkshop.com/.

So far, we have hosted these sites on the main OpenHatch linode. We're in the process of moving them to NearlyFreeSpeech.NET.

History

On November 19, 2011, the main OpenHatch linode had an outage. This meant that all the sites hosted on it, including these static sites, were down. Jessica McKellar urged us to find a more reliable, well-monitored hosting situation for the Boston Python Workshop.

Rationale for NearlyFreeSpeech.NET

  • They are reliable and security-minded: They have about 2 hours of downtime every 4 years, and they schedule these outages in advance. (So if we want to handle their outages by changing DNS to point at our own server during these short outages.)
  • I would prefer to use some "cloud"-esque thing like Rackspace Cloud Files or Amazon EC2+CloudFront, but none of those services let you point the root of a domain name to them.
    • I feel more comfortable putting our files on a hosting service where we believe the hosting company is big enough to geographically spread its data around multiple data centers. (Perhaps NFS does this as well; I'm not sure.)
  • All these options are super cheap; less than $40/yr for our needs.
  • In general, I strongly prefer to put static sites with hosts that understand how easy it is to serve static sites. NearlyFreeSpeech.NET and Rackspace Cloud Files and others have clear provisions for marking sites as static, which indicates they have a clue.
  • NFS.net can manage DNS for these domains, which minimizes our hassle.

Status

  • Asheesh created an account with Nearly Free Speech.
  • The staticsites shell account has one directory per static site that we generate. Each directory contains an update_and_push.sh script that gets the latest version from git and pushes it to the hosting provider. (Right now, this just covers bostonpythonworkshop.com.)
  • All SSH keys from the deploy account have been copied (on a one-time basis, on 2011-11-26) to the staticsites shell account.
  • The staticsites shell account has enough info + authentication secrets for people to this push to NFS.net to work.

To use:

ssh staticsites@linode.openhatch.org
cd bostonpythonworkshop.com # for example
./update_and_push.sh
  • BPW's site is hosted with NFS.net at a different URL than bostonpythonworkshop.com, as well as bostonpythonworkshop.com.
  • BPW's domain points at NFS.net's DNS servers, which will handle DNS for us.
  • This applies to these other static sites:
    • campus.openhatch.org
    • penn.openhatch.org
    • corp.openhatch.org
    • labs.openhatch.org

How to create a site