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
""" | |
This fabric file makes setting up and deploying a django application much | |
easier, but it does make a few assumptions. Namely that you're using Git, | |
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have | |
Django installed on your local machine and SSH installed on both the local | |
machine and any servers you want to deploy to. | |
_note that I've used the name project_name throughout this example. Replace | |
this with whatever your project is called._ |
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
""" | |
Distributor ID: Ubuntu | |
Description: Ubuntu 10.04 LTS | |
Release: 10.04 | |
Codename: lucid | |
Author: Adelein Rodriguez, adeleinr@gmail.com | |
Note: This is an adaptation from a fabric script presented here: | |
http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p.html | |
Summary: This script: |
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
description "upstart configuration for gunicorn" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
exec /home/jamie/.virtualenvs/projectname/bin/gunicorn_django -c /home/jamie/code/projectname/gunicorn.py /home/jamie/code/projectname/settings/production.py |
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
upstream uwsgi { | |
ip_hash; | |
server 127.0.0.1:40000; | |
} | |
server { | |
listen 80; | |
server_name www.domain.com; | |
root /sites/mysite/; | |
access_log /sites/mysite/log/nginx/access.log; |
install CentOS 6
yum update
yum upgrade
check the server time. sync the time to a time server if needed (service 'ntpd')
download and install Postgresql Server v9.1 rpm package:
rpm -Uvh http://yum.pgrpms.org/9.1/redhat/rhel-6-x86_64/pgdg-centos91-9.1-4.noarch.rpm
This should have installed the necessary server package: postgresql91-server.x86_64
.
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Security; | |
using System.Web; | |
using System.Web.Hosting; | |
namespace PdfGenerator | |
{ | |
public class PdfGenerator |
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
public class InventoryController : ApiController | |
{ | |
private readonly IInventoryManagementService _inventoryManagementService; | |
private readonly IUnitOfWork _unitOfWork; | |
public InventoryController(IUnitOfWork unitOfWork) | |
{ | |
_unitOfWork = unitOfWork; //access services | |
_inventoryManagementService = _unitOfWork.Get<IInventoryManagementService>(); | |
} |
This tutorial guides you through creating your first Vagrant project.
We start with a generic Ubuntu VM, and use the Chef provisioning tool to:
- install packages for vim, git
- create user accounts, as specified in included JSON config files
- install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository
Afterwards, we'll see how easy it is to package our newly provisioned VM
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
from twisted.internet import defer, reactor | |
from twisted.web.client import getPage | |
def listCallback(results): | |
print results | |
def finish(ign): | |
reactor.stop() | |
def test(): |
OlderNewer