#Mac OS X
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
| import sqlalchemy | |
| import sqlalchemy.exc | |
| import sqlalchemy.ext.declarative | |
| import sqlalchemy.orm | |
| import sqlalchemy.sql.functions | |
| from sqlalchemy import create_engine | |
| engine = create_engine('postgresql://user:pass@my.host.post/db_name') | |
| Base = sqlalchemy.ext.declarative.declarative_base(bind=engine) |
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
| [cloudera-cdh5] | |
| name=Cloudera's Distribution for Hadoop, Version 5 | |
| gpgcheck=1 | |
| gpgkey=http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/RPM-GPG-KEY-cloudera | |
| baseurl=http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/ | |
| humanname=Cloudera's Distribution for Hadoop, Version 5 | |
| #http://mirror.centos.org/centos/$releasever/os/$basearch/ |
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 jinja2 import Template | |
| import json | |
| import httplib2 | |
| import argparse | |
| TEMPLATE = """ | |
| user www-data; | |
| worker_processes 4; | |
| pid /run/nginx.pid; | |
| daemon off; |
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 boto import route53 | |
| r53 = route53.connect_to_region(region_name='us-east-1') | |
| dev_aws = r53.get_zone('my-domain.local') | |
| with open('hosts') as host: | |
| i = 0 | |
| rrs = route53.record.ResourceRecordSets(r53, dev_aws.id) | |
| for line in host.readlines(): |
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
| <resolver:AttributeDefinition id="transientId" xsi:type="ad:TransientId"> | |
| <resolver:AttributeEncoder xsi:type="enc:SAML1StringNameIdentifier" | |
| nameFormat="urn:mace:shibboleth:1.0:nameIdentifier"/> | |
| <resolver:AttributeEncoder xsi:type="enc:SAML2StringNameID" | |
| nameFormat="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"/> | |
| </resolver:AttributeDefinition> | |
| <resolver:AttributeDefinition id="awsRoles" xsi:type="ad:Mapped" sourceAttributeID="memberOf"> | |
| <resolver:Dependency ref="myLDAP"/> | |
| <resolver:AttributeEncoder |
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 | |
| ''' | |
| EC2 external inventory script | |
| ================================= | |
| Generates inventory that Ansible can understand by making API request to | |
| AWS EC2 using the Boto library. | |
| NOTE: This script assumes Ansible is being executed where the environment |
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 flask import Flask | |
| from flask import request | |
| import os | |
| import logging | |
| import json | |
| log = logging.getLogger(__name__) | |
| app = Flask(__name__) | |
| AWS_CREDENTIALS = { | |
| 'access_key': None, |
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
| # | |
| # ElasticSearch Dockerfile | |
| FROM centos:6.4 | |
| RUN yum install -q -y which java-1.7.0-openjdk java-1.7.0-openjdk-devel | |
| RUN update-alternatives --set java /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java | |
| RUN yum install -y -q https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.1.noarch.rpm | |
| EXPOSE 9200 9300 | |