Fargate:我可以重新启动特定容器吗?

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

Fargate: Can I restart specific containers?

问题

容器

  • 用于我的私有网络的堡垒SSH服务器。
  • 用于为SSH服务器提供authorized_keys的rsync服务器。
  • rsync服务器提交的存储库包括一些新的authorized_keys。

在推送新的提交到我的rsync ECR时,我想重新启动容器,但不包括SSH服务器。

我可以在一个任务中满足这个要求吗?还是应该将SSH作业隔离开来?

如果有任何相关的文档,请分享。

英文:

Containers

  • Bastion SSH servers for my private network.
  • rsync server for providing authorized_keys to SSH servers.
  • The repository for rsync server commits include some new authorized_keys.

When pushing new commits to my rsync ECR, I want to restart containers excluding SSH servers.

Can I satisfy this in only one task? or, should I isolate a SSH job?

If there are any mentioned documents too, please share it.

答案1

得分: 1

如果你指的重新启动是指替换,我认为这是不可能的。如果你更改特定容器的Docker镜像标签,任务定义会整体改变和版本化。对于这个特定用例,更好的做法是使用不同的任务定义。

关于[Amazon ECS任务定义]:(https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html):

你的整个应用程序堆栈不需要存在于单个任务定义中,大多数情况下也不应该如此。你的应用程序可以通过将相关的容器组合到自己的任务定义中,跨多个任务定义。

英文:

If by restart you mean to replace, I don't think this is possible. If you change the docker image tag for a specific container inside the task definition, the task is changed and versioned as a whole. For this particular use case, It'd be a better idea to use different task definitions.

About [Amazon ECS Task Definitions]:(https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html):

> Your entire application stack does not need to exist on a single task definition, and in most cases it should not. Your application can span multiple task definitions by combining related containers into their own task definitions,

huangapple
  • 本文由 发表于 2020年1月6日 17:23:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/59609497.html
匿名

发表评论

匿名网友

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

确定