RedisLabs Now Available in Pivotal Web Services Marketplace

June 6, 2014 Nima Badiey

The following is a guest blog post by Itamar Haber, Chief Developers Advocate at Redis Labs, a provider of enterprise-class Redis for developers.

Redis Cloud is a fully-managed cloud service for hosting and running Redis datasets. The service provides developers with a highly-available, scalable and performant database-as-a-service that is ideally suited to scalable web and mobile app. For Cloud Foundry developers building and hosting apps on Pivotal Web Services, you can now add Redis Cloud to your apps directly from the Services Marketplace.

Web Console

RedisBlog - Image 1

Click on the Redis Cloud service to see the Plan Selection page:

RedisBlog - Image 2

Choose a plan to start with (I recommend starting with the Free 25MB plan) and select the ‘BUY THIS PLAN’ button to create the service instance. You can also choose to bind it to a specific application. If you aren’t ready to bind the RedisDB to your app right now, you can always bind it later from the application dashboard or through the command line interface (CLI).

RedisBlog - Image 3

Command Line Interface

If you’re more inclined to use the command line interface, here are the steps:

First, create the service:

$ cf create-service rediscloud PLAN_NAME INSTANCE_NAME

Where PLAN_NAME is the plan you want to use and INSTANCE_NAME is the name you want to use for the service. Once the service’s instance is created, bind it to your application with the following command:

$ cf bind-service APP_NAME INSTANCE_NAME

Where APP_NAME is the name of the application that the service will be bound to.

That’s all there is to it—your first database will be created automatically, and your app will now be able to use Redis Cloud. You can obtain the immutable endpoint (hostname and port) of your Redis Cloud database by fetching the contents of your app’s VCAP_SERVICES environment variable, or from the service’s management console (click the ‘MANAGE’ link in under the Redis Cloud service). Depending on the plan you purchased, you can also use the management console to edit the properties of your database.

Redis Cloud is fully compliant with the open source Redis project, so all you need to do is point your application to your Redis Cloud endpoint and you’re good to go. For example, if you’re using Ruby, create an intializer file (e.g. config/initializers/redis.rb) with the following content:

rediscloud_service = JSON.parse(ENV[‘VCAP_SERVICES’])[“rediscloud-n/a”]

credentials = rediscloud_service.first[“credentials”]

$redis = Redis.new(:host => credentials[“hostname”], :port => credentials[“port”], :password => credentials[“password”])

That’s all that’s needed to get you started so you can focus on developing your application instead of worrying about things like:

  • node failures (our service boasts automatic and transparent failover),
  • scaling up or down (that’s done seamlessly, instantly and without interruption to the service),
  • data persistence (included free of charge),
  • daily and on-demand backups (also included), or
  • any other operational aspect regarding your Redis database.

If you need any help, have questions or feedback—feel free to contact Itamar via email or Twitter. For support questions, send an email to support@redislabs.com. Happy coding!

About the Author

Biography

Previous
Computing's 3rd Era Pivots Into High Gear This Week At Cloud Foundry Summit
Computing's 3rd Era Pivots Into High Gear This Week At Cloud Foundry Summit

In an hour, the Cloud Foundry Summit will begin in San Francisco's Hilton. The opening keynotes by Pivotal'...

Next
Using Data Science Techniques for the Automatic Clustering of IT Alerts
Using Data Science Techniques for the Automatic Clustering of IT Alerts

Large enterprise IT infrastructure technology components generate large volumes of alert messages. Instead ...