迁移一个EAR应用程序从AppEngine到Google Cloud SDK。

huangapple go评论68阅读模式
英文:

Migrating an EAR application from AppEngine to Google Cloud SDK

问题

自从去年8月30日Google App Engine正式终止服务后,无法再使用appengine(appcfg)命令行来部署同一应用的更新。

我之前使用的是appengine Maven插件,该插件实际上是使用appcfg来部署我的应用程序。

现在我正在寻找将我的应用迁移到Google Cloud SDK的方法,但在我看到的限制中,Google Cloud SDK不支持部署EAR应用程序。

令人惊讶的是,我的应用确实具有EAR结构。

针对这个问题是否有解决方法,或者我应该彻底改变我的应用程序结构?

英文:

Since App Engine reached the end of life last August on the 30th, it's not possible anymore to deploy updates to the same application using the appengine (appcfg) command line.

I was using the appengine maven plugin which in turn was using appcfg to deploy my application.

I'm looking on how to migrate my application to Google Cloud SDK now but between the limitations I saw that Google Cloud SDK does not support EAR applications to be deployed.

Surprize surprize my applications does have an EAR structure.

Is there a workaround for this or should I completely change the structure of my application?

答案1

得分: 1

你无需改变应用程序结构。只是部署过程有些微小的变化。

之前,您通常会创建 WAR 文件并将其打包成可部署的 EAR 文件。

现在,您仍然会创建相同的 WAR 文件,但不必将它们打包成 EAR 文件。相反,您可以使用以下 gcloud 命令一起部署它们:

gcloud app deploy ./path_module1/WEB-INF/appengine-web.xml ./path_module2/WEB-INF/appengine-web.xml

这里的 path_moduleX 是指指向已解压的构件的路径(当然不是指向源代码的路径)。

详情请参阅此处的说明:https://cloud.google.com/appengine/docs/standard/java/configuration-files

英文:

You don't have to change your application structure at all. It's only the deployment that it slightly altered.

Before, you used to create war artifacts and package them into a deployable ear.

Now you keep creating the same war artifacts but you must not package them into an ear. Instead, you deploy them all together using the gcloud command:

gcloud app deploy ./path_module1/WEB-INF/appengine-web.xml ./path_module2/WEB-INF/appengine-web.xml

path_moduleX are paths to the exploded artifacts (not path to your source code, of course)

as explained here https://cloud.google.com/appengine/docs/standard/java/configuration-files

huangapple
  • 本文由 发表于 2020年9月21日 19:33:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/63991434.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定