【问题标题】:Deploy Spring Boot application with Elastic BeansTalk CLI使用 Elastic BeansTalk CLI 部署 Spring Boot 应用程序
【发布时间】:2019-03-08 21:23:02
【问题描述】:

我在 Elastic BeansTalk 上有一个 Spring Boot 应用程序,它运行良好。部署 jar 也完全没有问题。

我正在尝试使用 EB 命令行界面部署应用程序,但我收到了这个我无法理解的错误

darko [分析] $ eb deploy 将 Volta demo/app-44a2-181003_171058.jar 上传到 S3。可能还要等一下。 上传完成。 2018-10-03 15:11:00 INFO 环境更新开始。
2018-10-03 15:11:09 信息将新版本部署到实例。 2018-10-03 15:11:13 错误无法启动应用程序,因为源包不包含名为 application.jar 或 Procfile 的文件。 2018-10-03 15:11:15 错误 [实例:i-0252754fc608a26ac] 实例上的命令失败。返回码:1 输出:(截断)...ics/pom.properties
无法启动应用程序,因为源包不包含名为 application.jar 的文件或 Procfile。 无法启动应用程序,因为源包不包含名为 application.jar 的文件或 Procfile。 挂钩 /opt/elasticbeanstalk/hooks/appdeploy/pre/01_configure_application.sh 失败。有关更多详细信息,请使用控制台或 EB CLI 检查 /var/log/eb-activity.log。 2018-10-03 15:11:15 INFO 命令执行已在所有实例上完成。摘要:[成功:0,失败:1]。 2018-10-03 15:11:15 错误在实例 ID“i-0252754fc608a26ac”上执行命令失败。中止操作。 2018-10-03 15:11:16 错误无法部署应用程序。

知道缺少什么吗?

【问题讨论】:

    标签: java spring amazon-web-services spring-boot


    【解决方案1】:

    我能够成功部署。我所需要的只是 .elasticbeanstalk 目录中的 config.yml 中的正确文件名。这是我的工作 config.yml

    branch-defaults:
      master:
        environment: analytics-env
    environment-defaults:
      analytics-env:
        branch: null
        repository: null
    deploy:
      artifact: target/analytics-0.0.1-SNAPSHOT.jar
    global:
      application_name: Analytics
      default_ec2_keyname: null
      default_platform: arn:aws:elasticbeanstalk:eu-central-1::platform/Java 8 running
        on 64bit Amazon Linux/2.7.5
      default_region: eu-central-1
      include_git_submodules: true
      instance_profile: null
      platform_name: null
      platform_version: null
      profile: null
      sc: git
      workspace_type: Application
    

    【讨论】:

    • 可以,或者添加一个包含 deploy: artifact: my_source_bundle.zip 的 Procfile
    猜你喜欢
    • 2017-09-28
    • 2020-07-05
    • 2020-11-09
    • 2015-01-27
    • 2015-09-07
    • 1970-01-01
    • 2016-10-06
    • 2019-09-25
    • 2019-07-27
    相关资源
    最近更新 更多