Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using amazon S3 to host remote Hg Repositories

Is it feasible (financially) to host centralised mercurial repositories on Amazon S3. As far as i can see, just by buying an S3 account, and a domain name, i could essentialy use it as a remote server. On the basis that its 0.15 dollars per month per gb and and all of my repos together probably come to less than 300mb that would make it ridiculously cheap... or am i missing something?

like image 553
richzilla Avatar asked Mar 30 '10 13:03

richzilla


People also ask

Is S3 a Web server?

S3 is an object-based storage service and not a web server. It only supports hosting a static web application. An application requiring server-side processing can't be hosted in S3.

What can you do with Amazon S3?

Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance. You can use Amazon S3 to store and retrieve any amount of data at any time, from anywhere.

What is the maximum size of the S3 bucket?

The total volume of data and number of objects you can store are unlimited. Individual Amazon S3 objects can range in size from a minimum of 0 bytes to a maximum of 5 TB.

Why do we need S3 bucket?

A bucket is a container for objects stored in Amazon S3. You can store any number of objects in a bucket and can have up to 100 buckets in your account. To request an increase, visit the Service Quotas Console . Every object is contained in a bucket.


1 Answers

It's possible but you'll lose some speed/efficiency versus hosting it somewhere you can run executables. Mercurial has server side code that gets executed during clone, push, and pull. In a normal setup you trigger that remote execution by running a cgi or wsgi over http or by running the hg executable over ssh. Neither of those are available over S3.

There are, however, a few ways you could get around that limitation. One has more restrictions and one requires more setup:

Option one is to s3put the repo up there and access it via http-static:// URLs, which is a read-only fallback mode that mercurial offers. It's not very efficient, and as mentioned, it's read-only.

Option two is to mount s3 on your local filesystem using something like s3fs or fuse.

In neither case would Mercurial's nifty web interface be available from s3.

like image 171
Ry4an Brase Avatar answered Oct 17 '22 12:10

Ry4an Brase