see: https://github.com/nocoast-hacknight/nocoast-hacknight.github.com
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
def register_machine(apiserver, retry=False): | |
parsed = urlparse.urlparse(apiserver) | |
# identity = hookenv.local_unit().replace('/', '-') | |
private_address = hookenv.unit_private_ip() | |
with open('/proc/meminfo') as fh: | |
info = fh.readline() | |
mem = info.strip().split(":")[1].strip().split()[0] | |
cpus = os.sysconf("SC_NPROCESSORS_ONLN") |
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
FROM ubuntu:14.04 | |
RUN apt-get update -qy | |
RUN apt-get install -qy software-properties-common | |
RUN apt-add-repository ppa:juju/stable | |
RUN apt-get install -qy lxc iptables | |
RUN apt-get -qy install juju-core juju-quickstart juju-deployer tmux charm-tools juju-local openssh-client | |
RUN apt-get install -qy python-pip git | |
RUN pip install git+git://github.com/juju-solutions/bundletester.git | |
RUN pip install blessings | |
RUN useradd ubuntu |
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
class GitHubGiveAway(object): | |
questions = "day job",\ | |
"fav python project",\ | |
"fav conference",\ | |
"python foo" | |
answers = "Python DevOps Ninja Janitor Monkey @ SurveyMonkey, "\ | |
"ZDjangoGears by Ian Bicking or Starkiller or pythong.org, "\ | |
"Snow or Castle or Mountain Sprints or Pylons Project MiniCon, "\ | |
"so drunk when I wrote this I only had one eye I open".split(', ') |