This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat ec2din.txt | \ | |
perl -pe ' \ | |
s{us-east-\S+}{us-east-xx}g; | |
s{i-[0-9a-f]{8}}{i-xxxxxxxx}g; | |
s{vol-[0-9a-f]{8}}{vol-xxxxxxxx}g; | |
s{\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d.\d\d\dZ}{dddd-dd-ddTdd:dd:dd.dddZ}g; | |
s{(arn:aws:cloudformation):\S+}{$1:xxxxxx}g; | |
s{/dev/sd\S+}{/dev/sdxxx}g;; | |
s{(\w)-[0-9a-f]{8}(,?)}{$1-xxxxxxxx$2}g; | |
s{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-fx]{12}_\S+}{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_xxxx}g; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function d { | |
did=$(docker run -d precise runsvdir /etc/service) | |
ip=$(docker inspect $did | grep IpAddress | cut -d'"' -f4) | |
nc -z $ip 22 && ssh -oStrictHostKeyChecking=no root@$ip | |
docker kill $did | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p ubuntu/{dists,pool} | |
meh=$( | |
rsync -iaO --exclude ubuntu --exclude pool --exclude dists rsync://archive.ubuntu.com/ubuntu/. ubuntu/ | |
for a in dists/{lucid,precise}{,-{backports,security,updates}}; do | |
rsync -iaO --exclude 'installer-*' rsync://archive.ubuntu.com/ubuntu/$a/. ubuntu/$a/ | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2538 ? S 0:00 | | \_ nginx: master process nginx -g daemon off; | |
2547 ? S 0:00 | | \_ nginx: worker process | |
2548 ? S 0:00 | | \_ nginx: worker process | |
2549 ? S 0:00 | | \_ nginx: worker process | |
2550 ? S 0:00 | | \_ nginx: worker process | |
2535 ? S 0:00 | \_ runsv memcached | |
2541 ? Sl 0:00 | | \_ memcached -u memcache | |
2536 ? S 0:00 | \_ runsv redis | |
2540 ? S 0:00 | | \_ redis-server | |
2537 ? S 0:00 | \_ runsv ssh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PID TTY STAT TIME COMMAND | |
1 ? S 0:00 runsvdir /etc/service | |
4 ? S 0:00 runsv nginx | |
8 ? S 0:00 \_ nginx: master process nginx -g daemon off; | |
17 ? S 0:00 \_ nginx: worker process | |
18 ? S 0:00 \_ nginx: worker process | |
19 ? S 0:00 \_ nginx: worker process | |
20 ? S 0:00 \_ nginx: worker process | |
5 ? S 0:00 runsv memcached | |
10 ? Sl 0:00 \_ memcached -u memcache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root 1378 0.1 2.2 486092 11344 ? Ssl 07:00 0:04 /usr/local/bin/docker -d | |
root 1539 0.0 0.2 21164 1132 ? S 07:01 0:00 \_ /usr/bin/lxc-start -n 687378f63f96399519662486e439c4c524574da8bb180058ca71aca570641031 -f /var/lib/docker/containers/687378f63f96399519662486e439c4c524574da8bb180058ca71a | |
root 1544 0.0 0.0 188 24 ? S 07:01 0:00 | \_ runsvdir -P /etc/service | |
root 1575 0.0 0.0 164 4 ? Ss 07:01 0:00 | \_ runsv ssh | |
root 1576 0.0 0.5 49956 2844 ? S 07:01 0:00 | \_ /usr/sbin/sshd -D | |
root 3887 0.0 0.2 21164 1160 ? S 07:40 0:00 \_ /usr/bin/lxc-start -n 24e1604df2befa7de335e14c991c9b6b99b609192c881d13f6e51fe92d08fe41 -f /var/lib/docker/containers/24e1604df2befa7de335e14c991c9b6b99b609192c881d13f6e51 | |
root 3894 0.0 0.0 188 32 ? S 07:40 0:00 \_ runsvdir -P /etc/service | |
root 3925 0.0 0.0 164 4 ? Ss 07:40 0:00 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@f7586939fe50:~# ps axuf | |
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND | |
root 1 0.0 0.0 188 24 ? S 23:36 0:00 runsvdir -P /etc/service | |
root 514 0.0 0.0 164 4 ? Ss 23:36 0:00 runsv ssh | |
root 515 0.0 0.5 49956 2848 ? S 23:36 0:00 \_ /usr/sbin/sshd -D | |
root 516 0.0 0.7 73356 3628 ? Ss 23:37 0:00 \_ sshd: root@pts/0 | |
root 600 0.8 0.8 23204 4440 pts/0 Ss 23:37 0:00 \_ -bash | |
root 635 0.0 0.2 18128 1124 pts/0 R+ 23:37 0:00 \_ ps axuf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@c4a6608aaff6:~# ps axf | |
PID TTY STAT TIME COMMAND | |
1 ? S 0:00 bash -c aptitude install -y openssh-server; mkdir -p /var/run/sshd; mkdir /root/.ssh; wget -O /root/.ssh/authorized_keys https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub ; /usr/sbin/sshd -d | |
511 ? S 0:00 sshd: root@pts/0 | |
595 pts/0 Ss 0:00 \_ -bash | |
642 pts/0 R+ 0:00 \_ ps axf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run as a non-root user on Ubuntu Precise | |
export DEBIAN_FRONTEND="noninteractive" | |
sudo aptitude -y install lxc bsdtar libsqlite3-dev git pkg-config | |
sudo aptitude -y install linux-image-extra-$(uname -r) | |
sudo aptitude -y install golang 0<&- | |
cd |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.