简体   繁体   English

如何在 Fargate 容器中启动 rails 控制台

[英]How to launch a rails console in a Fargate container

I would like to open a Rails console in a Fargate container to interact with my production installation我想在 Fargate 容器中打开一个 Rails 控制台来与我的生产安装进行交互

However after searching the web and posting in the AWS forum I could not find an answer to this question但是在网上搜索并在 AWS 论坛上发帖后,我找不到这个问题的答案

Does anyone know how I can do this?有谁知道我怎么能做到这一点? This seems like a mandatory thing to have in any production environment and having no easy way to do it is kind of surprising coming from such a respected cloud provider as AWS这似乎是在任何生产环境中都必须拥有的东西,并且没有简单的方法来做到这一点,来自像 AWS 这样受人尊敬的云提供商有点令人惊讶

Thanks谢谢

I would like to open a Rails console in a Fargate container to interact with my production installation我想在 Fargate 容器中打开一个 Rails 控制台来与我的生产安装进行交互

However after searching the web and posting in the AWS forum I could not find an answer to this question但是,在网上搜索并在 AWS 论坛上发帖后,我找不到这个问题的答案

Does anyone know how I can do this?有谁知道我怎么能做到这一点? This seems like a mandatory thing to have in any production environment and having no easy way to do it is kind of surprising coming from such a respected cloud provider as AWS这似乎是在任何生产环境中都必须拥有的东西,并且没有简单的方法来做到这一点,来自像 AWS 这样受人尊敬的云提供商有点令人惊讶

Thanks谢谢

I would like to open a Rails console in a Fargate container to interact with my production installation我想在 Fargate 容器中打开一个 Rails 控制台来与我的生产安装进行交互

However after searching the web and posting in the AWS forum I could not find an answer to this question但是,在网上搜索并在 AWS 论坛上发帖后,我找不到这个问题的答案

Does anyone know how I can do this?有谁知道我怎么能做到这一点? This seems like a mandatory thing to have in any production environment and having no easy way to do it is kind of surprising coming from such a respected cloud provider as AWS这似乎是在任何生产环境中都必须拥有的东西,并且没有简单的方法来做到这一点,来自像 AWS 这样受人尊敬的云提供商有点令人惊讶

Thanks谢谢

I would like to open a Rails console in a Fargate container to interact with my production installation我想在 Fargate 容器中打开一个 Rails 控制台来与我的生产安装进行交互

However after searching the web and posting in the AWS forum I could not find an answer to this question但是,在网上搜索并在 AWS 论坛上发帖后,我找不到这个问题的答案

Does anyone know how I can do this?有谁知道我怎么能做到这一点? This seems like a mandatory thing to have in any production environment and having no easy way to do it is kind of surprising coming from such a respected cloud provider as AWS这似乎是在任何生产环境中都必须拥有的东西,并且没有简单的方法来做到这一点,来自像 AWS 这样受人尊敬的云提供商有点令人惊讶

Thanks谢谢

I would like to open a Rails console in a Fargate container to interact with my production installation我想在 Fargate 容器中打开一个 Rails 控制台来与我的生产安装进行交互

However after searching the web and posting in the AWS forum I could not find an answer to this question但是,在网上搜索并在 AWS 论坛上发帖后,我找不到这个问题的答案

Does anyone know how I can do this?有谁知道我怎么能做到这一点? This seems like a mandatory thing to have in any production environment and having no easy way to do it is kind of surprising coming from such a respected cloud provider as AWS这似乎是在任何生产环境中都必须拥有的东西,并且没有简单的方法来做到这一点,来自像 AWS 这样受人尊敬的云提供商有点令人惊讶

Thanks谢谢

I would like to open a Rails console in a Fargate container to interact with my production installation我想在 Fargate 容器中打开一个 Rails 控制台来与我的生产安装进行交互

However after searching the web and posting in the AWS forum I could not find an answer to this question但是,在网上搜索并在 AWS 论坛上发帖后,我找不到这个问题的答案

Does anyone know how I can do this?有谁知道我怎么能做到这一点? This seems like a mandatory thing to have in any production environment and having no easy way to do it is kind of surprising coming from such a respected cloud provider as AWS这似乎是在任何生产环境中都必须拥有的东西,并且没有简单的方法来做到这一点,来自像 AWS 这样受人尊敬的云提供商有点令人惊讶

Thanks谢谢

[Update 2021] : It is now possible to run a command in interactive mode with AWS Fargate! [2021 年更新] :现在可以使用 AWS Fargate 在交互模式下运行命令!

News: https://aws.amazon.com/fr/blogs/containers/new-using-amazon-ecs-exec-access-your-containers-fargate-ec2/新闻: https : //aws.amazon.com/fr/blogs/containers/new-using-amazon-ecs-exec-access-your-containers-fargate-ec2/

The command to run is:要运行的命令是:

aws ecs execute-command \
  --cluster cluster-name \
  --task task-id \
  --container container-name \ # optional
  --interactive \
  --command "rails c"

Troubleshooting :故障排除

Check the AWS doc for IAM permissions: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html#ecs-exec-prerequisites检查 IAM 权限的 AWS 文档: https : //docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html#ecs-exec-prerequisites

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM