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
AWSTemplateFormatVersion: 2010-09-09 | |
Description: Test Server Infrastructure | |
Parameters: | |
ParentVPCStack: | |
Description: 'Stack name of parent VPC stack based on vpc/vpc-*azs.yaml template.' | |
Type: String | |
Default: 'TestVPC' | |
ParentSSHBastionStack: | |
Description: 'Optional but recommended stack name of parent SSH bastion host/instance stack based on vpc/vpc-ssh-bastion.yaml template.' | |
Type: String |
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
--- | |
AWSTemplateFormatVersion: 2010-09-09 | |
Description: Test Server Infrastructure | |
Parameters: | |
ParentVPCStack: | |
Description: Stack name of parent VPC stack based on vpc/vpc-*azs.yaml template. | |
Type: String | |
Default: 'TestVPC' | |
ParentSSHBastionStack: | |
Description: 'Optional but recommended stack name of parent SSH bastion host/instance stack based on vpc/vpc-ssh-bastion.yaml template.' |
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
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import os | |
from fabric.api import cd, run, sudo, prefix, task, env, quiet, warn_only | |
from fabric.contrib.files import exists, sed | |
from fabric.tasks import Task | |
# The information to connecting to the server: `testserver` is contained | |
# in the local user's `~/.ssh/config` file |
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
""" | |
Tasks for managing a test server | |
""" | |
import os | |
from fabric.api import cd, env, prefix, run, sudo, task | |
from fabric.contrib.files import exists, sed | |
from fabric.context_managers import hide | |
from fabric.colors import green, red | |
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 | |
## WARNING: This file is generated | |
#!/usr/bin/env python | |
"""Create a "virtual" Python installation | |
""" | |
# If you change the version here, change it in setup.py | |
# and docs/conf.py as well. | |
virtualenv_version = "1.6.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
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
ServerName $$$$PROJECT_NAME$$$$ | |
ServerAlias media-$$$$PROJECT_NAME$$$$ | |
ServerAlias $$$$PROJECT_NAME$$$$.test.education.nationalgeographic.com | |
DocumentRoot $$$$PROJECT_HOME$$$$$$$$PROJECT_NAME$$$$/media | |
WSGIDaemonProcess $$$$PROJECT_NAME$$$$ user=webdev group=webdev \ | |
processes=3 threads=1 maximum-requests=1000 \ | |
python-path=$$$$PROJECT_HOME$$$$$$$$PROJECT_NAME$$$$/example/virtualenv/lib/python2.6/site-packages |
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
""" | |
Default template for WSGI definition. Assumes virtualenv is in the same | |
directory as this file, and is called virtualenv | |
""" | |
import os, sys, site | |
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__))) | |
site.addsitedir('virtualenv/lib/python2.6/site-packages') |
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
""" | |
A model field and widget that allows selecting multiple items from a static | |
list of choices. Based on http://djangosnippets.org/snippets/1200/ | |
""" | |
from django.db import models | |
from django.core import exceptions | |
from django import forms | |
from django.utils.text import capfirst | |
class MultiSelectFormField(forms.MultipleChoiceField): |
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 textwrap, virtualenv | |
def adjust_options(options): | |
voot_opts = { | |
'no_site_packages': not options.use_site_packages, | |
'unzip_setuptools': not options.zip_setuptools, | |
'use_distribute': not options.setuptools, | |
} |
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 __future__ import with_statement | |
from fabric.api import env, run, settings, hide, local | |
from fabric.decorators import hosts, runs_once | |
import os | |
import pip | |
import sys, xmlrpclib | |
from cStringIO import StringIO | |
from distutils.version import StrictVersion, LooseVersion | |
def _find_current_version(package, index_urls=None): |