-
Notifications
You must be signed in to change notification settings - Fork 4
UserNotes:yikaus
Kevin Yi edited this page Oct 27, 2016
·
4 revisions
ssh alpha.cmd.io :add nc gophernet/netcat
ssh alpha.cmd.io nc -vz 127.0.0.1 2200
same as what I think , the nc command run remotely and not in run in current machine .
Add a self build ansible docker
Dockerfile
FROM alpine
MAINTAINER yikaus
RUN set -ex \
&& apk add --no-cache py-pip build-base python-dev libffi-dev openssl-dev \
&& pip install ansible \
&& mkdir /ansible \
&& apk del build-base py-pip libffi-dev openssl-dev
WORKDIR /ansible
ENTRYPOINT ["ansible"]
Then docker build and docker push to yikaus/ansible
Add to my cmdio
ssh alpha.cmd.io :add ansible yikaus/ansible
ssh alpha.cmd.io ansible -i localhost, all -a "whoami" -c local
localhost | SUCCESS | rc=0 >>
root
ssh alpha.cmd.io ansible -i localhost, all -a "ifconfig" -c local
localhost | SUCCESS | rc=0 >>
eth0 Link encap:Ethernet HWaddr 02:42:AC:11:00:02
inet addr:172.17.0.2 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::42:acff:fe11:2%32633/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:180 (180.0 B) TX bytes:258 (258.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1%32633/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
I tried the envy before , cmd.io seems a hosted version of envy , using sshcommand redirect to docker entry point , is that right ? Using network command like nc/netstat won't be much useful as I expect the command running currently context/machine not remote .
ssh alpha.cmd.io ansible all -c local -i 'localhost,' -m raw -a \'wget -qO- http://169.254.169.254/latest/meta-data/\'
localhost | SUCCESS | rc=0 >>
ami-id
ami-launch-index
ami-manifest-path
block-device-mapping/
hostname
instance-action
instance-id
instance-type
local-hostname
local-ipv4
mac
metrics/
network/
placement/
profile
public-hostname
public-ipv4
public-keys/
reservation-id
security-groups
services/