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 datetime import datetime | |
| from docker import Client | |
| from djangoapp.instance.models import Instance | |
| class AmonInstance(object): | |
| def __init__(self, account=None): | |
| self.client = Client(base_url='unix://var/run/docker.sock', version='1.15') | |
| self.account_id = 1 | |
| self.instance = Instance.objects.get(account_id=self.account_id) |
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
| ID=$(docker run -d image-name /bin/bash) | |
| docker export $ID | docker import – flat-image-name |
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
| "ansible_all_ipv4_addresses": [ | |
| "REDACTED IP ADDRESS" | |
| ], | |
| "ansible_all_ipv6_addresses": [ | |
| "REDACTED IPV6 ADDRESS" | |
| ], | |
| "ansible_architecture": "x86_64", | |
| "ansible_bios_date": "09/20/2012", | |
| "ansible_bios_version": "6.00", | |
| "ansible_cmdline": { |
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
| docker rmi $(docker images | grep "^<none>" | awk '{print $3}') |
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
| sudo sh -c "echo 'deb http://beta.packages.amon.cx/repo amon contrib' > /etc/apt/sources.list.d/amonagent.list" | |
| sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv AD53961F | |
| sudo apt-get install -y --force-yes python-software-properties software-properties-common | |
| sudo apt-add-repository -y ppa:ansible/ansible | |
| sudo apt-get update | |
| sudo apt-get install -y --force-yes amon-agent ansible |
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
| echo 'deb http://http.debian.net/debian-backports squeeze-backports(-sloppy) main' > /etc/apt/sources.list.d/backports.list | |
| apt-get update | |
| apt-get -t squeeze-backports install "ansible" |
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
| ### Keybase proof | |
| I hereby claim: | |
| * I am martinrusev on github. | |
| * I am martinrusev (https://keybase.io/martinrusev) on keybase. | |
| * I have a public key whose fingerprint is E353 444E 05E5 E1C3 13D1 0AE1 D455 88EF 9307 989E | |
| To claim this, I am signing this object: |
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 mongo:latest | |
| MAINTAINER Martin Rusev | |
| RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv AD53961F | |
| RUN echo 'deb http://bg.archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list && \ | |
| echo 'deb http://bg.archive.ubuntu.com/ubuntu precise-updates universe' >> /etc/apt/sources.list | |
| RUN echo 'deb http://packages.amon.cx/repo amon contrib' >> /etc/apt/sources.list |
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 inspect import currentframe, getframeinfo;frameinfo = getframeinfo(currentframe());print frameinfo.filename, frameinfo.lineno |
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
| iozone -l 32 -O -i 0 -i 1 -i 2 -e -+n -r 4K -s 4G |