Some info about what kind of server you get inside a lambda function on AWS.
$ uname -a
Linux ip-10-25-140-177 4.9.43-17.39.amzn1.x86_64 #1 SMP Fri Sep 15 23:39:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
#!/usr/bin/env python3 | |
# Example Usage: | |
# $ curl -s https://sherlock-holm.es/stories/plain-text/croo.txt | ./rake.py --limit=10 --minscore=5 | |
# Download SmartStopList.txt from: | |
# https://github.com/fabianvf/python-rake | |
import sys | |
import RAKE | |
import argparse | |
# Accept input from stdin or filename |
/* | |
Minimal HTTP Response Server Test | |
Modified from [sustrik/dsock/tutorial/step3.c] | |
Test with `wrk -t2 -c100 -d30s localhost:5555` | |
Copyright (c) 2016 Martin Sustrik | |
Copyright (c) 2017 John W. Leimgruber III | |
Permission is hereby granted, free of charge, to any person obtaining a copy |
#!/usr/bin/env python3 | |
## Run | |
# docker run --rm -it -v `pwd`:/app -w /app python:3.5.2-slim /bin/bash | |
# pip install aiohttp uvloop | |
# python async-client.py | |
## References | |
# http://aiohttp.readthedocs.io/en/stable/ | |
# https://github.com/MagicStack/uvloop |
Output of gdb
bt full
:
A top level redirect can be updated to point to the latest git ref Docker container.
location = / {
rewrite ^/(.*) /abc1234/$1 redirect;
}
location ~ "^/([0-9a-zA-Z]{7})/.*$" {
set $target $1.myimage.dev.docker:5000;
auth_basic off;
proxy_pass http://$target;
Docker Daemon logs for two failed attempts pushing to private registry. The 3rd push seems to be working so far. | |
@400000005384d7371398bf1c [c7612ee1] +job allocate_interface(8a7da707411b8d77be142606d0b558792cbbec61b511ac395db5f318832b9265) | |
@400000005384d737139ae5e4 [debug] attach.go:59 attach: stdout: begin | |
@400000005384d737139b9994 [debug] attach.go:97 attach: stderr: begin | |
@400000005384d737139c030c [debug] attach.go:143 attach: waiting for job 1/2 | |
@400000005384d737139e2dbc [c7612ee1] -job allocate_interface(8a7da707411b8d77be142606d0b558792cbbec61b511ac395db5f318832b9265) = OK (0) | |
@400000005384d73b2145a594 [c7612ee1] +job release_interface(8a7da707411b8d77be142606d0b558792cbbec61b511ac395db5f318832b9265) | |
@400000005384d73b21466114 [c7612ee1] -job release_interface(8a7da707411b8d77be142606d0b558792cbbec61b511ac395db5f318832b9265) = OK (0) | |
@400000005384d73b21489394 [debug] attach.go:76 attach: stdout: end |
nsinit
provides a handy way to access a shell inside a running container's namespace. This is useful for learning about how containers work, debugging your system without worrying about sshd daemons, and even hot fixes in production all you sad pandas!
:p
Running the docker daemon with the lxc driver allows you to use lxc-attach
to do this. But now that docker deafults to the new native libcontainer driver, nsinit
is probably the best way to go. jpetazzo's blog has a great high level summary.
The new issue is that the libcontainer .json format is under heavy development so you need to keep an nsinit
binary built from the exact release tag from the the docker github repo. The tricky part for me was understanding that golang is designed with certain assumptions about dependencies vs versioning with regards to when you push to master, push to a topic branch, and fork a project.
input { | |
syslog { | |
type => syslog | |
port => 514 | |
} | |
tcp { | |
type => "apache-access" | |
port => 9514 | |
} |