This file contains 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/sh | |
USER=%(user)s | |
NAME=celeryd | |
VIRTUALENV=%(virtualenv_dir)s | |
PROJECT_ROOT=%(project_root)s | |
DAEMON=$VIRTUALENV/bin/celeryd | |
PIDFILE=$PROJECT_ROOT/$NAME.pid | |
LOGFILE=$PROJECT_ROOT/$NAME.log |
This file contains 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 | |
SSHAGENT=/usr/bin/ssh-agent | |
SSHAGENTARGS="-s" | |
PARENT_JOB=pstat_master_unittest | |
KEY_PATH=$HOME/policystat/fabric/pstat_dev.key | |
if [ ! -z "$WORKSPACE" ]; then | |
WORKSPACE=/vol/fs/var/lib/hudson/home/jobs/pstat_master_deploy/workspace | |
fi |
This file contains 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 | |
# Hosted at: http://gist.github.com/294861 | |
SSHAGENT=/usr/bin/ssh-agent | |
SSHAGENTARGS="-s" | |
# Job we're using for deploying the virtualenv | |
PARENT_JOB=pstat_master_unittest | |
KEY_PATH=$HOME/policystat/fabric/pstat_dev.key |
This file contains 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 _install_webdriver(venv_path): | |
""" | |
Install/build the python webdriver client. The setup.py is busted, so we have | |
to do extra work beyond the virtualenv. | |
See: http://groups.google.com/group/webdriver/browse_thread/thread/f5c3484ab5ae5800/fdae02fa223d00b0 | |
""" | |
webdriver_dir = os.path.join(venv_path, 'src', 'webdriver') | |
py_bin = os.path.join(venv_path, 'bin', 'python') | |
with cd(webdriver_dir): |
This file contains 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 | |
# Copyright 2008-2009 WebDriver committers | |
# Copyright 2008-2009 Google Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains 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
# Install virtualenv | |
sudo pip install virtualenv | |
# Install virtualenvwrapper | |
sudo pip install virtualenvwrapper | |
# Configure virtualenvwrapper | |
echo "export WORKON_HOME=$HOME/.virtualenvs" | tee -a ~/.bashrc | |
echo "source /usr/local/bin/virtualenvwrapper_bashrc" | tee -a ~/.bashrc | |
source ~/.bashrc |
This file contains 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 | |
#http://gist.github.com/gists/315136 | |
SSHAGENT=/usr/bin/ssh-agent | |
SSHAGENTARGS="-s" | |
PARENT_JOB=pstat_master_unittest | |
KEY_PATH=$HOME/policystat/fabric/pstat_dev.key | |
PROJECT_ROOT=/var/www/pstattest.com/ | |
DB_NAME=pstattest |
This file contains 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 optparse, subprocess, logging, os, sys, shutil | |
APT_COMMAND = 'apt-get -o Dpkg::Options::="--force-confnew" -y --force-yes -qq install %s' | |
def apt_install(app): | |
logging.info("Calling: %s" % (APT_COMMAND % app)) | |
subprocess.call(APT_COMMAND % app, shell=True) |
This file contains 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 build_document_pdf(document, realtime=False, timeout=None, watermark=True): | |
""" | |
Builds and caches a PDF copy of this document. | |
If ``realtime`` is True, returns the URL to the PDF. Otherwise, the PDF is | |
generated as asynchronously in the background. | |
""" | |
if not timeout: | |
timeout = print_settings.PRINTING_TIMEOUT | |
pdf_generator = DocumentPdfGenerator() |
This file contains 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 BackupArchiveGenerator(Task): | |
def get_archive_name(self, tenant, date, archive): | |
""" | |
Build and return the archive name based on the requested archive. | |
""" | |
filename = '%s_to_%s' % (date.strftime('%Y_%m_%d'), datetime.datetime.today().strftime('%Y_%m_%d')) | |
if archive: | |
filename = "%s_archive" % filename | |
destination = os.path.join(tenant.subdomain, '%s.zip' % filename) |
OlderNewer