Dave M
Dave M

Reputation: 21

AWS Batch for private container image

I want to launch many jobs ( all jobs using same software) with AWS batch; as one would do in cluster computing using a job scheduler. Docker image for this software is not available thus I need to create my own. In Aws batch service I see one can define a container image (registered/domain names). I think I can not use my own private image as I do not have a domain name. Then do I have to go for elastic container registry for my docker image which comes with a price? Or is there any other way. Also, I prefer command line rather console mode in AWS but there are not many blogs or tutorials available explaining CLI exhaustively. Any suggestions are much appreciated.

Upvotes: 2

Views: 1771

Answers (2)

jbasko
jbasko

Reputation: 7330

I'm not too experienced, still building my own infrastructure, but it seems the pricing for ECR (the storage and transfer) itself is nothing compared to NAT Gateway which you will need to have to allow your EC2 instances from inside your VPC to talk to the ECR. That is if price is your concern.

I'm just like you - I don't use web console because it's not repeatable - use Cloudformation with something like ansible. This is a good example project that I mostly followed: https://github.com/aws-samples/aws-batch-genomics

If you build the docker image locally, it will probably take too long to upload it to ECR so I'd recommend it building using Aws CodeBuild which is what I did -- again, the infrastructure for this can be expressed in Cloudformation, orchestrated with ansible.

Upvotes: 1

codequestions
codequestions

Reputation: 111

I think I can not use my own private image as I do not have a domain name.

Not a problem. Give it a unique name for the first name and use it for all your docker images. MyOwnName/MySpecificDocker

Then do I have to go for elastic container registry for my docker image which comes with a price?

Follow the instructions about the elastic container registry. They step through it and you upload your docker image. No cost.

Also, I prefer command line rather console mode in AWS but there are not many blogs or tutorials available explaining CLI exhaustively.

Start with the console to at least get it checked out and working. You may have to rebuild different versions of your docker or change job descriptions as you debug it.

Once working you can use CLI but I tend to use Python or Javascript.

For CLI check out: https://docs.aws.amazon.com/cli/latest/reference/batch/index.html

And likely you'' only need to submit jobs when setup: https://docs.aws.amazon.com/cli/latest/reference/batch/submit-job.html

Upvotes: 0

Related Questions