Random thoughts of a warped mind…

August 2, 2013

Cloudfront woes – “Your request contains one or more invalid invalidation paths.” – Use custom regexp for URI::encode

Filed under: All,Amazon EC2,EC2,Linux,Ruby — Srinivas @ 12:27

AWS Cloudfront is a content delivery network part of Amazons EC2/AWS stack which lets you serve static assets from a source (S3 bucket or custom origin server) by caching it across numerous edge locations. Occassionally the underlying content can change which needs the cache to be refreshed – This is done via a Cloudfront cache invalidation request which specifies a distribution id and a list of paths to refresh (e.g. /index.html or /imgs/logo.png etc).


May 30, 2013

Source config info from a Chef data bag in a knife executable script

Filed under: Amazon EC2,Chef,EC2,Ruby — Srinivas @ 03:59

Its nice not to have to hardcode config info into multiple scripts – A clean way to do this is to use Knife data bags . This way config information can be shared between cookbooks run on chef managed instances as well as used in one-off scripts run from your chef management box.

The trick is to use ‘Chef::DataBagItem’ in your script and execute this script via “knife exec scriptname.rb”. This means that the execution of this script will use your chef login info to access your chef server, access the data bag and pull the keys from it into your local script.


May 24, 2013

Sinatra app on Redhats OpenShift PaaS

Filed under: Development,EC2,Git,Linux,Redhat OpenShift,Ruby,Virtualization — Srinivas @ 02:08

Got to poke around a bit today into Redhats Open Shift PaaS… This is quite similar to Herokus platform in the sense you could pick up a “dev platform”, build an app locally and push it to the PaaS and run it from there…

For the impatient, rush over to the App on Openshift and  pull the code from github


March 8, 2013

My chef cookbook to provision EBS PIOPS volumes at Amazon EC2

Filed under: Amazon EC2,Chef,EC2,Git,Linux,Ruby — Srinivas @ 20:21

Heres my Chef cookbook to provision PIOPS EBS Volumes at Amazon EC2 (PIOPS volumes can be requested with a specific IOPs count which is guaranteed to be provided, something plain vanilla EBS volumes dont/cant do).

This cookbook is intended to be a drop-in replacement for Opscodes standard AWS cookbook (except that the namespace used for the node attributes is different, so a little manual work/scripting would be required). Support for Elastic volumes and Load balancers coming shortly…

This cookbook uses the Fog gem so is more easily extendable (or extensible?) to add more AWS resources as needed… Fog v1.6.0 or higher will be auto-installed when this cookbook is invoked.

See Onepower_AWS  for details.

Things to note -

1. Not all AWS Availability zones support PIOPS volumes, see bin/test_piops_support.rb for figuring out which AZs support PIOPS volumes.

2. PIOPS volumes tend to cost more than plain vanilla EBS volumes – And for a real performance gain, PIOPS volumes must be used with instances launched with the ebs-optimized flag as thats what sets up instance specific QoS at AWS to sort of segregate dedicated I/O bandwidth for the instance to access a PIOPS volume (separate from the standard network interface bandwidth that normal EBS uses/shares).

December 17, 2012

Set Name tags on Amazon EBS Volumes

Filed under: Amazon EC2,EC2,Linux,Ruby,Virtualization — Srinivas @ 17:06

If you are like me and hate scrolling hell AND have to deal with many many  EBS volumes, then its nice to have EBS volumes “named” to show their attachment info (i.e. which server instance is associated to them etc) and have this info updated via script – Its always a good idea to avoid ambiguity – especially when dealing with production file systems!


« Newer PostsOlder Posts »

Powered by WordPress