Skip to content

Instantly share code, notes, and snippets.

@drucko
drucko / fabfile.py
Created November 20, 2012 11:03 — forked from kogakure/fabfile.py
Python: Fabric (< 0.9) – Server-Backup
#!/usr/bin/python
# -*- coding: utf-8 -*-
from time import *
lt = localtime()
config.fab_hosts = ['server.com'],
config.fab_host = 'server.com',
config.fab_user = 'user',
config.postgres_bin = '/usr/local/pgsql/bin',
@drucko
drucko / fab_ejabberd.py
Created November 20, 2012 09:30 — forked from wamberg/fab_ejabberd.py
Python Fabric ejabberd installation script
"""
Automated installation of ejabberd with a postgresql backend inspired by this
article: http://www.planeterlang.org/en/planet/article/How_to_install_ejabberd_2.0.0_with_PostgreSQL_support/
"""
from fabric.api import run, sudo
EJABBERD_VERSION = '2.0.5'
EJABBERD_SOURCE_HOME = '~/dev/xmpp/oss'
POSTGRES_PSQL_PASSWORD = 'user'
@drucko
drucko / fabfile.py
Created November 20, 2012 09:28 — forked from bingomanatee/fabfile.py
A fabric script file
from fabric.api import *
import agi_config
import fab_lib
# these lists are populated with 'username@hostname' strings by prep_hosts()
ast_hostnames_as_root = []
ast_hostnames_as_tyger = []
agi_hostnames_as_root = []
agi_hostnames_as_tyger = []
@drucko
drucko / gitlab.sh
Created July 17, 2012 11:44 — forked from cristianrasch/gitlab.sh
Install Gitlab on Debian Squeeze/Wheezy
aptitude install -y git curl python-dev python-pip redis-server ruby1.9.1-full rubygems1.9.1
aptitude install -y mysql-server libmysqlclient-dev
adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/git git
adduser --disabled-login --gecos 'gitlab system' gitlab
usermod -a -G git gitlab
su - gitlab
ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa
aptitude install gitolite
cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
su - git