• This repository has been archived on 17/May/2023
  • Stars
    star
    125
  • Rank 284,734 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 12 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple git-based deployment for fabric

gitric

Very simple git-based deployment for fabric.

Git pulling from a remote repository requires that you open your repository to the world and it means your deployment process relies on one more moving piece. Since git is distributed you can push from your local repository and rely on one fewer external resource and limit access to your private repositories to your internal network but still get lightning fast git deployments.

Installation

pip install gitric

Features

  • Uses git push instead of git pull.
    • Pre-seeds your target's immutable git object store so you can stop and restart your server before and after the working copy is modified instead of waiting for network IO and the working copy to update.
  • Won't let you deploy from a dirty working copy (can be overridden for testing).
  • Won't let you lose history (can be overridden for rollbacks).
cd example
virtualenv .env --no-site-packages
source .env/bin/activate
pip install -r requirements.txt
fab -l
Available commands:
    
    allow_dirty  allow pushing even when the working copy is dirty
    deploy       an example deploy action
    force_push   allow pushing even when history will be lost
    prod         an example production deployment

After creating a test-deploy user on my server:

fab prod deploy
...
[yourserverhere] out: HEAD is now at b2db04e Initial commit


Done.
Disconnecting from yourserverhere... done.

You can't deploy when your working copy is dirty:

touch dirty_working_copy
fab prod deploy
...
Fatal error: Working copy is dirty. This check can be overridden by
importing gitric.api.allow_dirty and adding allow_dirty to your call.

Aborting.

And it (well git) won't let you deploy when you would lose history unless overridden with a force_push:

# simulate a divergent history
echo "#hello" >> requirements.txt
git add requirements.txt
git commit --amend
fab prod deploy
....
Fatal error: 11485c970d21ea2003c0be3be820905220d34631 is a non-fast-forward
push. The seed will abort so you don't lose information. If you are doing this
intentionally import gitric.api.force_push and add it to your call.

More Repositories

1

go_mapreduce

A simple MapReduce implementation in Google Go.
Go
88
star
2

qc

A Quickcheck implementation for Python
Python
67
star
3

mcts

A simple Monte Carlo Tree Search library
JavaScript
40
star
4

pfpp

Pure python functional programming
Python
28
star
5

mittmcts

Python Information Set Monte Carlo Tree Search library for learning and analysis of games
Python
17
star
6

someassemblyrequired

Assembly Web "Framework"
12
star
7

websocket_cardgames

An implementation of David Parlett's Cross Purposes card game and Kaibosh, a Euchre variant in which players bid to name trump
Python
11
star
8

mariposa

Safely and automatically migrate database schemas
Python
10
star
9

gerl

Genetic programming for Erlang
Erlang
8
star
10

websocket_tictactoe

A websocket sample that uses web-socket-js and tornado to build a simple Tic Tac Toe application in Python
Python
8
star
11

universal_boardgame_client

An attempt to build a ZunTzu-like client in Python for playing boardgames over the internet
Python
6
star
12

websocket_set

Set the card game in Python
Python
5
star
13

gp_through_unit_tests

Attempt to create terminals and functions by analyzing unit tests for use in genetic programming
Python
4
star
14

blue-green-machine

A very simple example of blue/green deployments with Python
Python
3
star
15

methodfinder

A methodfinder for Python that understands side-effects
Python
3
star
16

phpglobalmock

Mock global function calls in PHP for testing and refactoring
PHP
2
star
17

python-constraint

A copy of https://pypi.python.org/pypi/python-constraint/ made to work with Python 3
Python
2
star
18

euchredb

A database of the best cards to lead for all possible Euchre hands
Python
2
star
19

sv-subversion

Automatically exported from code.google.com/p/sv-subversion
Python
1
star
20

websockget

Simple command line websocket client
Go
1
star
21

python_wc_multiprocessing

A simple Python word counter that uses the multiprocessing module
Python
1
star
22

magictrick

Rules engine for the card game Magic Trick
Dart
1
star
23

hfm

An old filemanager for GNOME - preserved for posterity
C
1
star
24

tricksterstable-rs

Rust implementations of game engines featured in Trickster's Table
Rust
1
star