推到命令行现有的AWS弹性魔豆的应用 [英] Pushing to an existing AWS Elastic Beanstalk application from the command line

查看:137
本文介绍了推到命令行现有的AWS弹性魔豆的应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用弹性魔豆的Web仪表盘,使应用程序和环境。我知道我可以更新,使用仪表板和上传我的应用程序的zip文件,但我宁愿使用命令行来上传我的应用程序。

I've used the web dashboard of Elastic Beanstalk to make an application and an environment. I know I can update that using the dashboard and uploading a zip file of my application, but I would rather use the command line to upload my application.

显然,正确的工具,这是 EB 的CLI界面,弹性魔豆。我已经安装了这一点,并试图使用它,继亚马逊部署瓶应用到AWS弹性魔豆的教程。然而,这似乎创造一个完全不同的应用程序到一个可见的EB仪表盘 - 做它不会显示在仪表盘上的变化,以及应用程序甚至有一个不同的URL

Apparently the correct tool for this is eb, the CLI for Elastic Beanstalk. I've installed this and attempted to use it, following the Amazon "Deploying a Flask Application to AWS Elastic Beanstalk" tutorial. However, this seems to create a completely different application to the one visible on the EB dashboard - changes made to it don't appear on the dashboard, and the application even has a different URL.

如何使用命令行来访问AWS弹性魔豆?

How can I use the command line to access an existing application on AWS Elastic Beanstalk?

推荐答案

要开始使用混帐aws.push 为您的应用程序,您必须初始化与AWS的Git仓库魔豆元数据。我使用的是git的版本控制假设(的如果你不是,你将不得不首先初始化与 git的初始化项目的)。

To begin using git aws.push for your application you will have to initialize your git repository with AWS Beanstalk metadata. I'm assuming you are using git for version control (if you are not, you will have to initialize your project with git init first).

$ cd angrywhopper
$ git init #optional
$ eb init
...
$ git aws.push

漫步向导步骤,提交您的code和推动应用程序。

Walk through wizard steps, commit your code and push the app.

弹性魔豆容器可以通过重新运行 EB初始化进一步定制或内部.ebextensions目录中的配置文件。

Elastic Beanstalk container can be further customized by either rerunning eb init or with configuration file inside .ebextensions directory.

如果 EB 不支持的东西,你想用,看看的AWS弹性魔豆API命令行界面,这是功能更丰富。

If eb does not support something you would like to use, have a look at AWS Elastic Beanstalk API Command Line Interface, which is more feature-rich.

在配置更多细节可以在下列指南中找到:

More details on the configuration can be found in the following guides:

  • Customizing and Configuring AWS Elastic Beanstalk Environments
  • Customizing and Configuring a Python Container

确认,在EB向导服务区是你选择在仪表板下拉一样的区域。

Make sure that service region in eb wizard is the same as region you pick in dashboard dropdown.

注:我会建议使用临时名称在一开始,以确保您的应用程序按预期工作与新的工作流程,然后通过重新运行 EB的init 。不要忘了,只要你的迁移,以避免任何不必要的费用做了终止临时环境。

NB: I would suggest to use temporary name in the beginning to make sure your app works as expected with the new workflow and then rename it to the original by rerunning eb init. Don't forget to terminate the temporary environment as soon as you done with the migration to avoid any unnecessary fees.

这篇关于推到命令行现有的AWS弹性魔豆的应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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