Skip to content
View index.js
'use strict';
console.log('Loading event');
var logGroupName = 'vpc-flow-logs',
region = 'eu-west-1';
var AWS = require('aws-sdk'),
Promise = require('bluebird'),
async = require('async'),
View gist:328055f3713eeeb2eb32
andrew@andrew-office:~/Desktop/projects/github/photobox/services-operations/aws/sparkleformation/cloudformation$ export KUBERNETES_PROVIDER=aws; wget -q -O - https://get.k8s.io | bash
Downloading kubernetes release v1.1.2 to /home/andrew/Desktop/projects/github/photobox/services-operations/aws/sparkleformation/cloudformation/kubernetes.tar.gz
--2015-12-01 15:40:33-- https://storage.googleapis.com/kubernetes-release/release/v1.1.2/kubernetes.tar.gz
Resolving storage.googleapis.com (storage.googleapis.com)... 64.233.184.128, 2a00:1450:400c:c0b::80
Connecting to storage.googleapis.com (storage.googleapis.com)|64.233.184.128|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 191474443 (183M) [application/x-tar]
Saving to: ‘kubernetes.tar.gz’
100%[======================================================================================================================================================================================================================================================
View create-elbs.sh
ELBS="`aws elb describe-load-balancers`";
echo "$ELBS" | jq -c '.LoadBalancerDescriptions[] | select(.LoadBalancerName|contains("production-services"))' | tr -d '^J' | while read line; do
NAME=$(echo $line | jq -r '.LoadBalancerName')
echo $NAME | grep tmp$ && continue;
LISTENERS=$(echo $line | jq -c '.ListenerDescriptions[].Listener'| tr -d '^J' | tr '\n' ',' | sed 's/^/\[/g;s/,$/]/g');
SCHEME=$(echo $line | jq -r '.Scheme')
aws elb create-load-balancer --load-balancer-name "${NAME}tmp" --listeners "${LISTENERS}" --scheme "${SCHEME}" --security-groups sg-3c7df658 --subnets subnet-f598ee9d
done;
View docker
9e38d6183e86 docker.photobox.com:443/photobox/services-shipping:v_182 "bash /run.sh" 32 hours ago Up 32 hours 8080-8081/tcp, 0.0.0.0:8096->8096/tcp ecs-production-services-shipping-15-production-services-shipping-9ca3c0e2b792879ce601
View event.json
{
"Records": [
{
"awsRegion": "eu-west-1",
"eventID": "0ed50878-9f42-4e73-a361-2d19ee0a61d7",
"eventName": "LookupEvents",
"eventSource": "cloudtrail.amazonaws.com",
"eventTime": "2015-11-22T12:26:22Z",
"eventType": "AwsApiCall",
"eventVersion": "1.04",
View gist:6750772a9b22c47c12fc
root@checkout-web1:/home/ubuntu# sar -r -f /var/log/sysstat/sa11
Linux 3.13.0-68-generic (checkout-web1) 11/11/2015 _x86_64_ (2 CPU)
08:04:05 PM LINUX RESTART
08:04:43 PM LINUX RESTART
08:05:01 PM kbmemfree kbmemused %memused kbbuffers kbcached kbcommit %commit kbactive kbinact kbdirty
08:15:01 PM 5247780 2927856 35.81 153484 1875052 1603000 19.61 1341056 1276076 264
08:25:01 PM 5197672 2977964 36.42 158040 1887524 1633344 19.98 1388768 1275992 372
View t.json
{
"eventList":[
{
"description":"scheduled reboot",
"endTime":"2015-11-25T00:00:00.000Z",
"eventStatus":"Scheduled",
"eventType":"system-reboot",
"name":"Live Loadbalancer-v1.15 (cloud.photobox.com - Cloudbrain clustrix router)",
"resourceId":"i-a08992ec",
"resourceType":"instance",
View exec.sh
./gor \
-output-tcp-stats=true \
-stats=true \
-verbose=true \
--output-http-elasticsearch internal-elk-4-ElkInternalL-MIOYKFA2SGUG-911857723.eu-west-1.elb.amazonaws.com:9200/gor \
--input-tcp 0:28020 \
-http-set-header "X-From: gor" \
--split-output=true \
--output-http http://10.59.9.61:8080 \
--output-http http://10.59.9.62:8080 \
View gist:92da2fb80a3d20e32810
aws --region=eu-central-1 --profile=photobox-babel-test ec2 describe-instances --filters "Name=tag:Name,Values=jmeter-server" | jq -r '.Reservations[].Instances[].PublicIpAddress' | while read line; do
echo $line;
ssh -i ~/.ssh/photobox/zepplin/jmeter.pem -n ubuntu@$line "sudo bash -c 'stop jmeter; pkill -9 jmeter; pkill -9 java; start jmeter; status jmeter; ps aufx | grep jmeter;'"
done
View gist2
{"timestamp":"2015-08-24T11:12:10.137086+0000","level":"warn","message":"loading extension files from directory","directory":"/etc/sensu/extensions"}
/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:664:in `connect_server': unable to resolve server address (EventMachine::ConnectionError)
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:664:in `bind_connect'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:640:in `connect'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.5.0/lib/amqp/session.rb:457:in `connect'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.5.0/lib/amqp.rb:242:in `connect'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-transport-3.2.0/lib/sensu/transport/rabbitmq.rb:119:in `setup_connection'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-transport-3.2.0/lib/sensu/transport/rabbitmq.rb:148:in `conne
Something went wrong with that request. Please try again.