Git, Fabric and Python - Tag You're It

There are many discussions that you can read about value of creating 'versions' or 'versioning' software.  More often then not, the versions (e.g. v 1.2.34) are used for marketing purposes or commercial product releases.  Does the internal engineering staff pay attention to such monikers on a daily basis?  Not really.  ​

​There are some instances, however, whereby knowing exactly which files on running on what server can come in handy.  

I wrote this Fabric task that can be called when doing a code push.  It tags the set of files with the name of the host machine the deploy is going to + a unique time stamp.  It also creates a 'tag' file which contains what branch of the code was used for this deployment.


Uncomplicated Firewall (UFW)

RackSpace's flavor of Ubuntu has installed the Uncomplicated Firewall and enables it by default (my experience).  Nice utility to manage the iptables for a local software based firewall.  ​

Enable UFW

To turn UFW on with the default set of rules:

sudo ufw enable

To check the status of UFW:

sudo ufw status verbose

Allow

sudo ufw allow <port>/<optional: protocol>

example: Allow incoming tcp and udp packet for MySQL

sudo ufw allow 3306  #open port for MySQL

example: To allow incoming tcp and udp packet on port 53

sudo ufw allow 53

example: To allow incoming tcp packets on port 53

sudo ufw allow 53/tcp

example: To allow incoming udp packets on port 53

sudo ufw allow 53/udp

Deny

sudo ufw deny <port>/<optional: protocol>

example: To deny tcp and udp packets on port 53

sudo ufw deny 53

example: To deny incoming tcp packets on port 53

sudo ufw deny 53/tcp

example: To deny incoming udp packets on port 53

sudo ufw deny 53/udp