cxmcc / ecsctl Goto Github PK
View Code? Open in Web Editor NEWkubectl-style command line tool for AWS EC2 Container Service (ECS)
License: MIT License
kubectl-style command line tool for AWS EC2 Container Service (ECS)
License: MIT License
Hello, I had problems when executing this command
ecsctl get nodes
Traceback (most recent call last): File "/usr/local/bin/ecsctl", line 7, in <module> from ecsctl.__main__ import main File "/usr/local/lib/python2.7/dist-packages/ecsctl/__main__.py", line 1, in <module> from .cmds import cli File "/usr/local/lib/python2.7/dist-packages/ecsctl/cmds.py", line 7, in <module> from .pty import Pty File "/usr/local/lib/python2.7/dist-packages/ecsctl/pty.py", line 2, in <module> import docker File "/usr/local/lib/python2.7/dist-packages/docker/__init__.py", line 6, in <module> from .client import Client, AutoVersionClient, from_env # flake8: noqa File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 11, in <module> from . import api File "/usr/local/lib/python2.7/dist-packages/docker/api/__init__.py", line 2, in <module> from .build import BuildApiMixin File "/usr/local/lib/python2.7/dist-packages/docker/api/build.py", line 9, in <module> from .. import utils File "/usr/local/lib/python2.7/dist-packages/docker/utils/__init__.py", line 2, in <module> from .utils import ( File "/usr/local/lib/python2.7/dist-packages/docker/utils/utils.py", line 19, in <module> from .. import tls File "/usr/local/lib/python2.7/dist-packages/docker/tls.py", line 5, in <module> from .ssladapter import ssladapter File "/usr/local/lib/python2.7/dist-packages/docker/ssladapter/__init__.py", line 1, in <module> from .ssladapter import SSLAdapter # flake8: noqa File "/usr/local/lib/python2.7/dist-packages/docker/ssladapter/ssladapter.py", line 21, in <module> from backports.ssl_match_hostname import match_hostname ImportError: No module named ssl_match_hostname
I tried reinstalling backports.ssl-match-hostname package but nothing :(
Ubuntu 16.04 LTS
Thank you so much for writing this repo.
An interactive shell would be invaluable to me, but I cannot figure out what you mean by "customizing docker daemon to listen on internal addresses."
I see the comand iptables --insert INPUT 1 --in-interface docker+ --protocol tcp --destination-port MYDOCKERPORT --jump DROP
here. should I run my docker command with a -p MYDOCKERPORT
option? Should I run the iptables
command on my laptop. Would this allow me to interactively exec into a container in ecs?
Thank you.
-Daniel Vizzini
Thanks for the great tool.
I've created a simple Dockerfile
and instructions, to make it easy to run without setting up Python:
https://github.com/outofcoffee/ecsctl-docker
Please let me know if you're interested in a PR.
Does ecsctl support fargate tasks right now? I will appreciate of you can help with this issue.
"ecsctl exec --cluster test1 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx date" gives the following error on a fargate task:
Traceback (most recent call last):
File "/home/ubuntu/.local/bin/ecsctl", line 11, in
sys.exit(main())
File "/home/ubuntu/.local/lib/python3.5/site-packages/ecsctl/main.py", line 6, in main
cli(obj=default_config)
File "/home/ubuntu/.local/lib/python3.5/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/home/ubuntu/.local/lib/python3.5/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/ubuntu/.local/lib/python3.5/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ubuntu/.local/lib/python3.5/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ubuntu/.local/lib/python3.5/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/ubuntu/.local/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/ubuntu/.local/lib/python3.5/site-packages/ecsctl/cmds.py", line 220, in exec_command
pty.exec_command()
File "/home/ubuntu/.local/lib/python3.5/site-packages/ecsctl/pty.py", line 46, in exec_command
first_container_name, hostname = self.get_ecs_hostname_of_task()
File "/home/ubuntu/.local/lib/python3.5/site-packages/ecsctl/pty.py", line 24, in get_ecs_hostname_of_task
container_instance = info['containerInstanceArn']
KeyError: 'containerInstanceArn'
Please forgive me since I have not tested yet and very new to ecs debugging,
but I do not unerstand the context of "docker-daemon" in this part of the doc
Do I modify my local dockerd or is it on the ec2 instance in aws?
The section above says "Requires customizing docker daemon to listen on internal addresses)" and further confuses me since ecs is not "internal" in my mind ...
I have a few clusters across different regions and as of now I have to set the env var AWS_DEFAULT_REGION
when switching regions. would be nice to switch regions via --region
arg
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.