使用 amazon S3 托管远程 Hg 存储库

发布于 2024-08-26 22:47:03 字数 151 浏览 1 评论 0原文

在 Amazon S3 上托管集中式 Mercurial 存储库(经济上)是否可行。据我所知,只需购买一个 S3 帐户和一个域名,我基本上就可以将其用作远程服务器。其基础是每月每 GB 0.15 美元,并且我所有的存储库加起来可能不到 300mb,这将使它便宜得离谱……或者我错过了什么?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

尛丟丟 2024-09-02 22:47:03

有可能但是与将其托管在可以运行可执行文件的地方相比,您会损失一些速度/效率。 Mercurial 具有在克隆、推送和拉取期间执行的服务器端代码。在正常设置中,您可以通过通过 http 运行 cgi 或 wsgi 或通过 ssh 运行 hg 可执行文件来触发远程执行。这些都无法通过 S3 获得。

然而,有几种方法可以绕过这个限制。一种有更多限制,一种需要更多设置:

选项一是将存储库放在那里并通过 http-static:// URL 访问它,这是一种只读回退模式,mercurial 优惠。它的效率不是很高,而且如上所述,它是只读的。

选项二是使用 s3fs 或 fusion 之类的工具将 s3 挂载到本地文件系统上。

在这两种情况下,s3 都无法使用 Mercurial 漂亮的 Web 界面。

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.

酒浓于脸红 2024-09-02 22:47:03

不,你不是。不知道你认为什么是便宜。我正在使用它,偶尔会收到 1.6 美元的账单。我在那里放了一个大备份。如果你愿意的话可以尝试一下,冒着损失 2 美元左右的风险。

顺便说一下,我建议使用 S3Organizer,这是一个火狐扩展。

No, you are not. I do not know what you consider cheap. I am using it and I get billed $1.6 occasionally. I placed a large backup there. Try it if you like, at the risk of losing $2 or so.

By the way, I suggest using the S3Organizer, which is a Firefox extension.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文