使用 Capistrano 执行 Rake 任务?
Capistrano 仅用于部署 Rails 应用程序吗?
基本上我想要一个脚本框架来为我处理所有服务器/客户端脚本。
示例:
更新 Ubuntu、安装具有依赖项的 gems 等。
创建一个新的 Rails 应用程序,Git 初始化它并提交,创建 Heroku 项目并上传应用程序。
自动化基本文件/文件夹操作
我应该考虑使用 Capistrano 来实现此目的(因为它可以处理服务器/客户端)还是应该使用 Rake 来实现此目的?
Capistrano 可以做 Rake 能做的一切,但反之则不行?
各自的优点和缺点是什么?
Is Capistrano only used for deploying Rails apps?
Basically I want a scripting framework to handle all server/client scripting for me.
Examples:
Updating Ubuntu, installing gems with dependencies etc.
Creating a new Rails app, Git initialize it and commit, create Heroku project and upload the app.
Automatize basic file/folder operations
Should I consider to use Capistrano for this (cause it can handle server/clients) or should I just use Rake for it?
Capistrano could do everything Rake could, but not the other way around?
What are the pros and cons with each?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了使 capistrano 更加通用,我们做了一些尝试 - capistrano-boss 和我自己的capistrano-provisioning - 可能有人已经完成了。当然,在远程运行命令和组织任务、命名空间、挂钩等方面,capistrano 是首屈一指的。但我还没有看到一个全面的解决方案,可以让您真正使用它来管理远程系统。
您调查过 chef 吗?看来这个经常和cap一起使用。例如,37signals 拥有丰富的厨师食谱 - 而且它们也是 capistrano 的来源。
A few attempts have been made at making capistrano more universal - capistrano-boss and my own capistrano-provisioning, for example - it may be that somebody has already done it. Certainly, in terms of running commands remotely and organising tasks, namespaces, hooks etc, capistrano is second-to-none. But I've yet to see a comprehensive solution that allows you to really administer remote systems using it.
Have you investigated chef? It seems that this is frequently used in conjunction with cap. 37signals, for example, have extensive chef recipes available - and they were also the source of capistrano.