For Rackspace the place you want to start is Getting Started: The Rackspace Open Cloud.
Specifically for Cloud Block Storage you'll want to start at The Examples and then checkout the cloudblockstorage package. The CreateVolumeAndAttach.java example might be exactly what you're looking for.
There is no portable abstraction for block storage in jclouds like there is for compute and blobstore (aka object storage) so you won't be able to do this via a template. But the code above will work with any OpenStack powered cloud.
BTW, the code.google.com site for jclouds is well out of date and shouldn't be used. The place to go is jclouds Documentation.