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
#!/usr/bin/env python | |
import boto | |
from boto.ec2 import elb | |
ACCESS_KEY_ID = 'access-key-id' | |
SECRET_ACCESS_KEY = 'secret-access-key' | |
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
#!/usr/bin/env python | |
from tornado import gen | |
from tornado.ioloop import IOLoop | |
from tornado.concurrent import Future | |
from tornado.httpclient import AsyncHTTPClient | |
from tornado.httpclient import HTTPRequest | |
from tornado.httpclient import HTTPResponse | |
import mock |
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
#!/usr/bin/env python | |
from tornado import gen | |
from tornado.ioloop import IOLoop | |
from tornado.httpclient import AsyncHTTPClient | |
from tornado.httpclient import HTTPRequest | |
from tornado.httpclient import HTTPResponse | |
import mock | |
import StringIO |
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
#!/usr/bin/env python | |
from tornado import gen | |
from tornado.ioloop import IOLoop | |
from tornado.httpclient import AsyncHTTPClient | |
from tornado.httpclient import HTTPClient | |
from tornado.httpclient import HTTPResponse | |
from tornado.httpclient import HTTPRequest | |
from tornado.httpclient import HTTPError | |
import StringIO |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"net" | |
"net/http" | |
) | |
func indexHandler(w http.ResponseWriter, r *http.Request) { |
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
pods | |
Pods are groups of containers that are deployed and scheduled together. Pods form the atomic unit of scheduling in Kubernetes, as opposed to single containers in other systems. A pod will typically include 1 to 5 containers which work together to provide a service. In addition to these user containers, Kubernetes will run other containers to provide logging and monitoring services. Pods are treated as ephemeral in Kubernetes; you should expect them to be created and destoyed continually as the | |
system evolves. | |
services | |
Services are stable endpoints that can be addressed by name. Services can be connected to pods by using label selectors; for example my “cache” service may connect to several “redis” pods identified by the label selector “type”: “redis”. The service will automatically round-robin requests between the pods. In this way, services can be used to connect parts of a system to each other. Using services provides a layer of abstraction that means applications do not need to know interna |
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
--- | |
- name: install java 7 dependencies | |
apt: name=python-software-properties state=latest update_cache=yes | |
- name: add java repository | |
apt_repository: repo='ppa:webupd8team/java' | |
- name: auto accept license for java | |
action: shell echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections |
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 | |
LOCKFILE="/tmp/foo.lock" | |
function atexit { | |
lockfile-remove $LOCKFILE | |
echo atexit! | |
exit | |
} |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
from tornado import gen | |
from tornado.httpclient import HTTPError | |
from tornado.httpclient import AsyncHTTPClient | |
from tornado.httputil import url_concat | |
from tornado.ioloop import IOLoop | |
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
- name: install java 7 dependencies | |
sudo: yes | |
apt: name=python-software-properties state=latest update_cache=yes | |
- name: add java repository | |
sudo: yes | |
apt_repository: repo='ppa:webupd8team/java' | |
- name: add elasticsearch/logstash repository | |
sudo: yes |
NewerOlder