Permalink
Switch branches/tags
2.0 1.1 1.0 20130117141529-5356e3c 20130117141412-5356e3c 20130117111900-ec7bf67 20121213164714-45e99b0 20121213163756-45e99b0 20121213094252-3c0fcd0 20121212172816-d378e4d 20121212151244-7cdbc56 20121212145432-7cdbc56 20121212142054-7cdbc56 20121212141326-d378e4d 20121203101221-bb8557d 20121203095534-1ba21c6 20121129175645-8f74643 20121129125255-9e6d4a5 20121128220809-9543a70 20121108174551-1cc1bef 20121108165832-1e6a63b 20121107172238-95efe86 20121107101645-e86fc41 20121107100756-ca452e2 20121107094505-b1d9aec 20121106165309-76baa8c 20121106120118-bc0266c 20121105181626-3450da1 20121105100449-fa46008 20121105095558-ad6186a 20121102113105-d378e4d 20121102111808-d378e4d 20121019093000-901103d 20121019091156-1c7cfe8 20121017112815-c76611e 20121016131011-e351204 20121015090331-2fe3766 20121012153011-f569aec 20121012150925-e99db68 20121012083020-5421992 20121012082152-83c9731 20121011091319-0062394 20121010161714-a7fd276 20121010083755-ab5970a 20121010082637-2c42433 20120927093040-e24eb19 20120927092332-faf87e8 20120927085135-86d2dda 20120926134530-83abf07 20120926134213-71127a0 20120925124933-6a86237 20120924182830-ddc3bc4 20120806140629-9d31317 20120806140250-b11fff5 20120806132912-4bb8dd4 20120806132411-83d0519 20120806125709-273573c 20120726122839-e598958 20120726111812-7ca35fa 20120725181403-d617610 20120725171513-b53fe7c 20120725163637-911187b 20120725145003-a7b89c0 20120712144426-8891001 20120712132632-c2feac5 20120711165048-58dfaed 20120710121715-28e38a3 20120709120217-68074ff 20120709115759-68074ff 20120709113600-ff4c5ce 20120709113210-68074ff 20120709112154-2fdf115 20120709110929-2fdf115 20120706161112-2fdf115 20120705173731-ff4c5ce 20120705170709-6064926 20120704164359-9745065 20120703204528-ff615eb 20120703131338-d4f8488 20120703094435-5919cca 20120628105255-229e695 20120628084908-6b342a7 20120628081046-00f113b 20120626104035-9e6cfe1 20120625164218-2f1bdba 20120625143330-fceb179 20120625084036-9b49887 20120622232101-860108e 20120622230511-2c56157 20120622223740-71bf3ec 20120622223714-71bf3ec 20120622223639-71bf3ec 20120622223308-71bf3ec 20120622222738-71bf3ec 20120622222153-71bf3ec 20120622221150-71bf3ec 20120622221031-71bf3ec 20120621113214-6bd4bbe 20120621112025-cce6610 20120621110917-3406819
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
72 lines (56 sloc) 1.47 KB
import site
import os
import os.path
from fabric.api import task, env, execute
site.addsitedir(os.path.abspath('fabric'))
import db
import release
import wsgi_server
import fab_git as git
import puppet
env.releases_path = '/var/webapps/make.mozilla.org'
env.repo_url = 'git://github.com/mozilla/make.mozilla.org.git'
env.forward_agent = True
env.puppet_user = os.getenv('AS', env.user)
env.user = 'make_mozilla'
hosts = {
'development': ['make-dev1.vm.labs.scl3.mozilla.com'],
'staging': ['make-stage1.vm.labs.scl3.mozilla.com'],
'production': ['make-prod1.vm.labs.scl3.mozilla.com']
}
# which branch goes to which server
branches = {
'development': 'development',
'staging': 'staging',
'production': 'master'
}
env.deploy_env = os.getenv('TO', 'development')
env.hosts = hosts[env.deploy_env]
env.deploy_branch = branches[env.deploy_env]
def perform_release(migrate=False, setup=False):
execute(release.create)
execute(release.symlink)
if setup:
execute(db.setup)
if migrate:
execute(db.migrate)
execute(wsgi_server.restart)
execute(release.prune_old)
@task
def deploy():
perform_release()
@task
def deploy_with_migrations():
perform_release(migrate=True)
@task
def setup():
execute(release.initial_setup)
execute(git.clone)
@task
def deploy_cold():
execute(setup)
perform_release(migrate=True, setup=True)
@task
def update_settings():
release.put_updated_settings()
execute(wsgi_server.restart)