Mass部署相同的代码到Heroku个人帐户 [英] Mass Deploy same code to Heroku individual accounts

查看:137
本文介绍了Mass部署相同的代码到Heroku个人帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设置一个商业模式,我在大量部署相同的代码库(Python Django与Postgres)到我的客户英雄帐户。



(我希望客户管理他们自己的帐户和我只能作为软件提供商。然而,客户应该获得一个SaaS的经验,没有我实际需要处理多租户的细节。客户也可以随时冻结,退出升级过程或切换到自定义代码)



所以客户将购买我的软件并设置heroku帐户。我将从客户获取凭证,并将其添加到我的部署过程中,并且代码将每次都部署到所有帐户的错误修复和新版本。



你是否认为可以用Heroku来实现?

解决方案

是的,这是可能的,实际上IHMO真的很容易。 / p>

最简单的方法是获取每个帐户的凭据并执行git push。但更好的方法是使用Heroku api。您可以先将新版本部署到自己的应用程序中,这样可以为您编译一个可以部署到其他应用程序的插件。好处是你只需要运行构建阶段。



看看 Heroku Platform API ,主要在 slug 发布节。您可以使用 slug info 获取编译好的插件的URL, slug create 将编译好的插件上传到您的客户端应用程序中, code> release create 来部署它。



还查看发布阶段,因为您需要一种在部署时为每个客户端运行迁移的方法。


I want to set a business model where I Mass deploy same code base(Python Django with Postgres) to my customers heroku accounts .

(I want customers to manage their own accounts and for me to stay only as software provider.However customers should get a SaaS experience without me actually having to take care of multitenant details.Also customers will be able to freeze at any time and get out of the upgrade process or to switch to custom code)

So customer will purchase my software and setup the heroku account . I will get credentials from customer and add it to my deployment process and the code will be deployed each time to all the accounts for bugs fixes and for new versions.

Do you think it is possible to achieve with Heroku?

解决方案

Yes, it is possible and actually it is really easy to do IHMO.

The simplest method would be to just get credentials for each account and do git push. But a better way is to use Heroku api. You can first deploy new version to your own app which will give you a compiled slug that you can then deploy to other apps. The benefit is that you will only have to run build phase once.

Take a look at Heroku Platform API, mainly at slug and release sections. You can use slug info to get url for compiled slug, slug create to upload compiled slug into your client app and release create to deploy it.

Also look into Release phase, because you need a way to run migrations for each client when you deploy.

这篇关于Mass部署相同的代码到Heroku个人帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆