创建将UserData传递到容器实例的AWS Batch托管计算环境 [英] Create AWS Batch Managed Compute Environment passing UserData to Container Instances

查看:92
本文介绍了创建将UserData传递到容器实例的AWS Batch托管计算环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个托管的计算环境用于 AWS批次,但使用 ,但是我有找不到将用户数据传递到托管批处理计算环境的方法.

最多只能指定AMI.但是,由于我们要使用Managed,因此必须使用Amazon ECS-optimized AMI.

我更喜欢使用 EC2用户数据作为解决方案,因为它为我们希望执行的任何其他引导提供了切入点.但是我愿意接受其他黑客或解决方案,只要它们适用于托管计算环境.

解决方案

您可以基于AWS提供的AMI创建AMI,并对其进行自定义.由于Batch和/或ECS守护程序正在其上运行,因此仍将对其进行管理.

作为旁注,我正在尝试做同样的事情,但到目前为止还没有运气.我可能最终会创建一个自定义AMI,并将配置脚本包含在/etc/rc.local中的AMI本身中.这并不理想,但我认为Batch不能传递所需的用户数据脚本.我仍在调查.

I would like to create a Managed Compute Environment for AWS Batch, but use EC2 User Data to configure the instances as they are brought into the ECS fleet that Batch is scheduling jobs onto.

It shouldn't matter, but the purpose of the User Data script is to pull down large data files onto an InstanceStore that the Docker containers will reference.

This is possible in ECS, but I have found no way to pass User Data to a Managed Batch Compute Environment.

At most, I can specify the AMI. But since we're going with Managed, we must use the Amazon ECS-optimized AMI.

I'd prefer to use EC2 User Data as the solution, as it gives a entry-point for any other bootstrapping we wish to perform. But I'm open to other hacks or solutions, so long as they are applicable to a Managed Compute Environment.

解决方案

You can create an AMI based on the AWS provided AMI, and customize it. It will still be managed since the Batch and/or ECS daemon is running on it.

As a side note I’m trying to do the same thing but no luck so far. I may end up creating a custom AMI and include the configure script in the AMI itself in /etc/rc.local. Not ideal but I don’t think Batch can pass a user data script other than what it needs. I am still looking into this.

这篇关于创建将UserData传递到容器实例的AWS Batch托管计算环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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