Bundler Problems with Capistrano RoR3

by Simon Morley on January 28, 2012

There’s no doubt I was stuck on this one due to my inability to read the docs carefully.

Whilst deploying an app via git using capistrano, I was continuously stuck after upgrading my gems. The reason? I wasn’t using bundle install…

Do this to upgrade your local and remote applications:

bundle update

bundle install

git add .

git commit -a -m “Some updates….”

git push origin master

cap <<stage>> deploy

 

{ 0 comments }

Basic Firewall Rules for Rackspace Cloud

by Simon Morley on January 3, 2012

Create new file in /etc/iptables.test

* filter
:INPUT DROP [1:48]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [129:20352]

# Allows all loopback (lo0) traffic and drop all traffic to 127/8 that doesn’t
-A INPUT -i lo -j ACCEPT

#Accept SSH connections
#-A INPUT -p tcp -m state –state NEW –dport 22 -j ACCEPT
-A INPUT -s 1.2.3.4/32 -p tcp -m tcp –dport 22 -j ACCEPT
-A INPUT -s 2.3.4.5 -p tcp -m tcp –dport 22 -j ACCEPT

#Accept Established connections
-A INPUT -m state –state RELATED,ESTABLISH -j ACCEPT

#Accept HTTP connections
-A INPUT -p tcp -m tcp –dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp –dport 443 -j ACCEPT
-A INPUT -p tcp -m tcp –dport 8080 -j ACCEPT

#Accept MySQL requests
-A INPUT -s 1.2.3.4/32 -p tcp -m tcp –dport 3306 -j ACCEPT
-A INPUT -s 2.3.4.5/32 -p tcp -m tcp –dport 3306 -j ACCEPT

#Accept all radius requests
-A INPUT -p udp -m udp –dport 1812 -j ACCEPT
-A INPUT -p udp -m udp –dport 1813 -j ACCEPT

#Accept all PING requests on ICMP
-A INPUT -p icmp -j ACCEPT

# Reject all other inbound – default deny unless explicitly allowed policy

-A INPUT -j REJECT
-A FORWARD -j REJECT

COMMIT

Test your commands work:

iptables-restore < /etc/iptables.test

Make sure you can login from another terminal session.

Save out rules:

iptables-save > /etc/iptables.rules

Add to network interface start up script:

auto lo
iface lo inet loopback
pre-up iptables-restore < /etc/iptables.rules

Reboot your server….

{ 0 comments }

Don’t install rails 3.x or RVM as root user Ubuntu

October 22, 2011

A whole day’s been wasted figuring this out… Save time and energy – install RVM as single user, then install rails 3.x. Tweet

Read the full article →

Migrating to iCloud

October 13, 2011

2 hours spent upgrading my Macbook, 1 hours on my iPhone and, then Apple show me this… Tweet

Read the full article →

Make s3 Buckets Public s3cmd

August 9, 2011

Another note to self. s3cmd setacl –acl-public –recursive s3://bucket-name/folder-name Or use in root with acl-private to lock down entire bucket. Forget the browser… Tweet

Read the full article →

Wired in

July 30, 2011

For the last (I don’t know how many) weeks, I’ve been writing the code for a new internal ordering system for PolkaSpots Supafly Wi-Fi. Having pushed the first release to our staging server, I feel like I’ve been released back to the world. And, it’s not over yet but I’m through the fog and now [...]

Read the full article →

Ubuntu USB Installation Unknown Keyword Problems

July 26, 2011

More of a reference for myself. Could happily create an Ubuntu server 10.04 tls USB drive from an Ubuntu 10.10 desktop client but could not get the bugger to boot. Was stuck with an Unknown Keywork Problem – something to do with: vesamenu.c32: Not a COM32R image Thanks to this article, I was able to [...]

Read the full article →

Hand-built Fixie for £200

June 19, 2011

Not bad for an afternoon’s work and two trips to the bike shop. And I’ve finally used up all those spare parts that have cluttered up my life for years. Tweet

Read the full article →