10000 Implement EC2 support through Moto by brettneese · Pull Request #1363 · localstack/localstack · GitHub
[go: up one dir, main page]

Skip to content

Implement EC2 support through Moto #1363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 11, 2019
Merged

Conversation

brettneese
Copy link
Contributor

This adds basic EC2 support using the prexisting Moto implementation.

It needs an update to the client to pass through the proper port, although I've already bumped the requirements.txt version and submitted a PR - see here.

Open to any input! :)

Closes #691

@whummer
Copy link
Member
whummer commented Jun 8, 2019

Thanks for this PR @brettneese ! Looks like we still have a compilation error in the Java libs? (see travis build logs)

@brettneese
Copy link
Contributor Author

@whummer Weird, didn't have that problem locally, but now that this is merged I can look at it more today. localstack/localstack-python-client#15

@localstack localstack deleted a comment Jun 10, 2019
@brettneese
Copy link
Contributor Author

@whummer fixed the CI issues, but now the build is just kinda hanging on at the end. Any idea why that might be?

@brettneese
Copy link
Contributor Author

Oops, I take that back, looks like it's still doing things, haha.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 70.322% when pulling 6200a44 on brettneese:master into 483f7cd on localstack:master.

@whummer
Copy link
Member
whummer commented Jun 11, 2019

Great, thanks for the quick turnaround @brettneese .

@whummer whummer merged commit 89ffa24 into localstack:master Jun 11, 2019
@Angel-O
Copy link
Angel-O commented Sep 8, 2019

@whummer @brettneese

How is this supposed to work? I am unable to mock an ec2 instance. I'm using Terraform pointing the ec2 endpoint to localhost on port 4597. Any clue or example?

Thank you

@brettneese
Copy link
Contributor Author

@Angel-O

I'm not sure why you'd be pointing Terraform at localstack, but an example is here:
http://docs.getmoto.org/en/latest/docs/ec2_tut.html

Note that Moto may not support all endpoints, which may trip up Terraform. Nor does it actually create real instances of any kind. You can see the currently supported endpoints here: http://docs.getmoto.org/en/latest/index.html

I can verify that the endpoints mentioned worked as I'm already using it across multiple projects via the nodejs AWS SDK.

@Angel-O
Copy link
Angel-O commented Sep 9, 2019

@brettneese

Thank you for your reply. Well I'm pointing Terraform to localstack because I want to run mock ec2 instances locally and deploy docker containers onto them, using Terraform rather than issuing aws cli commands or writing Python code, primarily for convenience.

Thanks for clarifying: I was under the impression that I could create mock ec2 instances of some sort (maybe as docker containers...) and deploy containers onto them (that was my plan given that localstack does not support ecs yet)

You are right, I figured it out after playing around with Moto: it looks like Moto does not support the all the AWS endpoints, therefore the Terraform script doesn't work at least when it comes to create ec2 instances.

It's a shame because other services work fine: I will have to rely on a combination of Terraform + localstack + ecs-cli to be able to run containers locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for EC2 instances
4 participants
0