Rackspace Rack Review – December 2012

Happy holidays and welcome to Rack Review! This monthly digest features new product updates, combined with news and tips to help make your Rackspace® experience a rewarding one.
Cloud Networks Now Available
Cloud Networks is a powerful new addition to the open cloud that provides you with the ability to create isolated, layer 2 networks that look like traditional networks in both architecture and function – simplifying networking in the cloud. With the click of a button, you are now able to create software-defined networks allowing you to enhance the network security for your Cloud Servers™, creating sub-nets and controlling the traffic that flows between servers. Learn more.
The Architecture and Development Behind Cloud Block Storage
Last month we introduced one of our latest open cloud offerings, Cloud Block Storage, and this month we want to dive into the technical details behind it. Cloud Block Storage provides high performance and is ideal for applications that require large amounts of storage, scaling independently of your Cloud Server. There is a lot of history behind how this came about and how it can be leveraged. Come read about it on our DevOps blog.
Send and Receive Email in Your App for FREE
A few months ago, Rackspace acquired Mailgun, making it easy for you to send, receive and track emails through your websites and applications via the RESTful API or SMTP. Mailgun is the email automation engine trusted by over 10,000 developers who are sick of fighting with email servers. With sample code written in all of the most popular languages, like Ruby, PHP, Python, C# and Java, integration is easy. All Rackspace customers receive a $19/month credit for Mailgun services (use coupon code mg4rackspace). That’s enough to send up to 19,000 emails per month at no cost to you! Visit Mailgun to sign up.
Manage the Rackspace Open Cloud with the New Windows 8 App
We are offering you a new application that gives you the option to manage your Rackspace Cloud account directly from Microsoft’s newly-launched Windows 8 operating system. This free application can help you get even more out of your investment in the Rackspace Cloud by allowing you to manage your Cloud Servers directly from Windows 8. Learn more.
Help Protect Your VMware Virtual Machines with Replication
You need to have the ability to recover business-critical virtual machines (VMs) and restart the important apps in the event of a data center outage or unplanned downtime. Geographical redundancy is a key component to any sound disaster recovery (DR) strategy, and it’s a must-have for when disaster strikes. Read how VM Replication helps protect and recover Rackspace-hosted VMs by easily and affordably replicating VMs between our data centers.
Protect Servers Using Bastion Hosts and Isolated Cloud Networks
The public Internet can be a scary place for servers. Log files of servers attached to public addresses will show regular port scans and URL snooping. These log entries are the inescapable reminder that your hosts are always one misconfiguration away from disaster. We can help! We have created a guide that will teach you how to create a bastion host and an isolated cloud network so you can reduce the number of servers that have to encounter these threats. Learn more on our DevOps blog.
Giving Back to the Local Community
We held the largest Thanksgiving drive and distribution in San Antonio, Texas, – providing 1,000 families with turkeys and all the trimmings through our annual Turkey Drive, supported by the San Antonio Food Bank.
NoSQL Explained
For over thirty years, relational database technology has been the gold standard. Modern workloads and unprecedented data volumes, however, are driving businesses to look at alternatives to the traditional relational database. This “NoSQL movement” has given rise to a host of non-relational-database technologies, designed for large-capacity storage and scalability. We’ve taken some time to explain some of the popular options available for NoSQL.
Caching for the Holidays
Around the holidays, getting cash for a gift might make you think that the person didn’t put a lot of thought into your present. However, in the world of server configurations, giving cache to your customers is probably one of the best things you can do. Learn more about caching.
25 Most Influential Executives of 2012
Our own Lanham Napier, Rackspace CEO, was on the list of “The 25 Most Influential Executives of 2012.” See the full list here.
Tired of Email Management Hassles? Make the Move Now with Free Hosted Microsoft® Exchange Migrations
Tired of the headache of managing your own Exchange email server? Or worse, dealing with an unreliable or unresponsive provider? For a limited time, we are offering free email migrations (up to 250 Exchange mailboxes) when you sign up for a new Rackspace Hosted Exchange account. Our reliable, business-class Exchange hosting takes email off of your worry list, so you can stay focused on your business, while we manage your email. Learn more about our migration services. (Offer ends December 31, 2012)
Join Us in the Fight Against Patent Trolls
Fed up with patent trolls? So are we. Find out what we’re doing to help keep technologies out of the claws of patent trolls. And, better yet, join us in the fight. Find out more.
Start Using SharePoint® 2013 Today
We are glad to offer you two ways to get your own SharePoint 2013 site up and running today. The first option is the free trial, where you can get 45 days to explore and experience SharePoint 2012. Sign up for this limited time offer. The second option is to create your own Cloud Server with SharePoint 2013 and SQL Server 2012 images, ideal for project-based SharePoint deployments. To do this, simply go to the Cloud Control Panel and choose one of the available SharePoint images to get started right away.
Looking for extra help to reach your goals in the cloud? Visit the Rackspace Cloud Tools Marketplaceto find a catalogue of third-party-developed applications designed for the Rackspace open cloud. This month’s featured partners are:

SOASTA – Load and Performance Testing Solution
SOASTA CloudTestis an end-to-end integrated platform, available as a turnkey on-demand service for external, web-scale testing and as on-premise editions for use by testers behind the firewall. Cloud testing easily enables fast, low-cost testing at full web-scale, providing the confidence that the web or mobile application or site can withstand daily load in addition to the largest peaks and surges in traffic.Papertrail – Detect & Avoid Infrastructure Problems
Papertrail helps detect, resolve and avoid infrastructure problems using log messages. Aggregate and manage log messages from Cloud Servers, Managed Hosting, Hybrid Hosting, and other servers — both flat files and syslog. Setup takes a minute, then tail, search, react, analyze and archive.

 

Featured Rackspace Blog Postsfrom this past month:

  • Scale Storage Independently From Your Cloud Servers With Cloud Block Storage – Read
  • Mobile Sync for Rackspace Email, Take it Anywhere – Read
  • Cassandra By Example – Read
  • Out of time this holiday season? 5 Survival Tips to get ready for the rush – Read
  • Business Email Blunders: Could This Happen To You? – Read
  • Which CMS is right for you? – Read

URL for API

Question:

Hi,

I am a new python. Can you help me with this please?

I setup http://github.com/rackspace/python-cloudservers tool and it’s ok for me. But this source is difficult.

I want to use simple url to send request to server API and get response.

Example: https://auth.api.rackspacecloud.com/v1.0/flavors

But I dont know how to set API KEY and user for this link

Can you help me please?

Thanks

Answers:

You can find your API key in the control panel under “Your Account” -> “API Access”.

Your first request to cloud files needs to be to authenticate with the Rackspace Cloud auth system. You will then be given a token that you will use for each subsequent request until the token expires. The language bindings (Python in your case) abstract this process and offer a simpler way to access Cloud Files.

You can find this entire process, and more, described in our developer docs. http://docs.rackspacecloud.com/files/api/cf-devguide-latest.pdf

Medium Trust and Cloud Files .NET API

Questions:

I’m using Cloud Files for about a month now and I’m working on application which store files in Cloud Files.

I used .NET API for Cloud files to get Stream for File in Cloud and return content of file via ASP.NET HTTP Handler.

It works fine on my Development Server but as soon as I transfer it into Cloud Sites I get this while connecting to Cloud Files:

Request for the permission of type ‘System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.

The command which I get this error is:

Connection CloudConnection = new Connection(new UserCredentials(ServerUsername, ServerPassword));

Is there anything which I need to done to be able to run application on Cloud Sites?

On my development Server I set Trust Level to Medium and I got same error!!! So I think it’s about Medium Trust, but I don’t have any idea if it’s possible to make it work on RackSpace Cloud Sites?

I really appreciate any help.

Answers:

Make sure you have the latest version of the Cloudfiles API. I was getting this with the older API. Authentication is different in the new API and it works in Medium Trust.

======================

I’m having this exact same problem, using a recent version of the API.

Does the Cloud Files .NET API definitely work in medium trust?

======================

Definitely works. i use it every day.

Can’t return the amount of objects in a container?

Question:

I am attempting to return the amount of objects in a container. When loading the page it shows only the bit of text ‘number of objects: ‘ and no number.

No errors show when loading the page, its connecting to the cloud and the container name is correct too.

Code:

Code:
require('../../rackspace_store/cloudfiles.php');

 // cloud info
 $username = "username"; 
 $key = "key"; 

 // Connect to Rackspace
 $auth = new CF_Authentication($username, $key);
 $auth->authenticate();
 $conn = new CF_Connection($auth);
 $files = $conn->get_container("containername");
 print "Number of Objects: ". $files->count ."\n";
 $conn->close();

Answers:

$c =$ conn->get_container(“my_container”);
$c->object_count;
$c->bytes_used;

object_count and bytes_used should give you the two attributes you are looking for.

Expire a video in container?

Question:

I’m looking for a feature, not sure if it’s readily available in Rackspace… Can we expire a video after certain period of time, meaning video still exists (not removed) in the container but needs to re-access it if it expired.

Answers:

Sounds like you’re looking for a video streaming service which has specific publication features. Cloud Files (and there’s a forum specifically for Cloud Files here as well) is just for storing files, you would have to build your own web site or web service to have that kind of feature built on top of and using Cloud Files. Try www.bitsontherun.com – they have a free tier that you might be able to make use of. (I am not affiliated with them.)

============

In cyberduck, select the video

go to Get Info

Go to Distribution (CDN)

Drag bottom of requester

This reveals an Invalidate Button

Click it to “remove selected files from distribution cache)

You can upload a file of the same name if you like but there is a lag while the change propagates.

Unexpected response () – Please Help

Question:

I have this in my test php file:
include_once(“cloud/cloudfiles.php”);
$auth = new CF_Authentication(MY_NAME, MY_APIKEY, NULL, UK_AUTHURL);
$auth->authenticate();
$conn = new CF_Connection($auth);

and all I get from authenticate is:

Fatal error: Uncaught exception ‘InvalidResponseException’ with message ‘Unexpected response (): ‘ in /home/royaltyf/public_html/cloud/cloudfiles.php:213 Stack trace: #0 /home/royaltyf/public_html/testcloud.php(10): CF_Authentication->authenticate() #1 {main} thrown in /home/royaltyf/public_html/cloud/cloudfiles.php on line 213

MY_NAME and MY_APIKEY are OK – doublechecked that…

Please Help me.

Answers:

I ran into a similar issue with CentOS. Is there anymore information from the error output you didn’t display? Such as:

* SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
* Closing connection #0

If you use CentOS I found the following guide will fix this issue.
http://cleverna.me/posts/centos-openssl-has-out-of-date-ca-certs

Hopefully this fixes your issue. It did mine.

Cloud Files Streaming File / Force Download Issue

Question:

I’m using a function to pass a streaming URI to the browser for force-downloading large files (100megs each). I found a great example of this here:

https://gist.github.com/938948

Caveat: I do not want to display a direct public URL to the files. So I must do some sort of force-download The download function is like this:

function cloudDownload($connection,$container,$filename) {
try {
$folderDetail = getCloudFolder($connection,$container);
$cdnURL = $folderDetail->cdn_uri;
$path = $cdnURL.’/’.$filename;
$filesize = getFilesize($connection,$container,$filename);

// For cloud based files.
session_cache_limiter(‘none’);
@ set_time_limit(0); // For large files.

header(‘Cache-Control: must-revalidate, post-check=0, pre-check=0’);
header(‘Content-Description: File Transfer’);
header(“Content-Type: application/force-download”);
header(“Content-Type: application/octec-stream”, false);
header(“Content-Type: application/download”, false);
header(“Content-Disposition: attachment; filename=$filename”);
header(“Content-Transfer-Encoding: binary”);
header(“Content-Length: $filesize”);
readfile($path);
}
}

The only problem is you cannot download more than one file at a time. Is there a better way to force-download a file without revealing its URL? Is there something else I should add to the header to allow multiple file downloads?

Answers:

You can’t hide where the file is coming from, no. The way you’re doing it there (reading from Cloud Files to your server, then pushing it to the client) is the only way that I’ve heard of. Keep in mind that you’re essentially paying for double bandwidth using that method and you’re not getting any of the benefits of the multiple edge servers a CDN gives you.

I’m going to be posting a feature request in a few minutes for increased flexibility in this area. I would love to be able to generate “throw away” links that expire after a certain period of time. Right now a redirect is the best you can do (but that exposes the URL too, even if it takes the user looking at the headers to see it).