英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论