{"id":9165,"date":"2016-03-18T07:39:10","date_gmt":"2016-03-18T04:39:10","guid":{"rendered":"http:\/\/blog.altoros.com\/?p=9165"},"modified":"2019-06-20T03:01:35","modified_gmt":"2019-06-20T00:01:35","slug":"deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix","status":"publish","type":"post","link":"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/","title":{"rendered":"Deploying a Rails App with Elasticsearch to IBM Bluemix"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_79_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/#First_steps_in_Bluemix\" >First steps in Bluemix<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/#Ruby_and_Bluemix\" >Ruby and Bluemix<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/#Services_in_Bluemix\" >Services in Bluemix<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/#Deploy_your_application_in_Bluemix\" >Deploy your application in Bluemix<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/#Conclusions_pros_and_cons\" >Conclusions: pros and cons<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/#Related_reading\" >Related reading<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"First_steps_in_Bluemix\"><\/span>First steps in Bluemix<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>For starters, I went to the <a href=\"https:\/\/cloud.ibm.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Bluemix<\/a> web page to create an account.<\/p>\n<p>Users can manage their applications with the Cloud Foundry CLI in Bluemix, so I found the requirements for installing it. In the list of <a href=\"https:\/\/developer.ibm.com\/bluemix\/support\/#prereqs\" target=\"_blank\" rel=\"noopener noreferrer\">prerequisites<\/a>, the Cloud Foundry CLI version 6.5.1 or later is specified.<\/p>\n<p><center><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/ibm-bluemix-prerequisites.png\" alt=\"ibm-bluemix-prerequisites\" width=\"640\" class=\"aligncenter size-full wp-image-9172\" \/><\/center><\/p>\n<p>I <a href=\"https:\/\/github.com\/cloudfoundry\/cli\/releases\" target=\"_blank\" rel=\"noopener noreferrer\">downloaded<\/a> the latest version of the CLI\u20146.16.1. The <a href=\"https:\/\/docs.cloudfoundry.org\/devguide\/deploy-apps\/ssh-apps.html\" target=\"_blank\" rel=\"noopener noreferrer\"><code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf ssh<\/code><\/a> command released in the CF CLI <a href=\"https:\/\/github.com\/cloudfoundry\/cli\/releases\/tag\/v6.13.0\" target=\"_blank\" rel=\"noopener noreferrer\">v6.13.0<\/a> works with <a href=\"https:\/\/docs.cloudfoundry.org\/concepts\/diego\/diego-architecture.html\" target=\"_blank\" rel=\"noopener noreferrer\">Diego<\/a>, a container management system. For now, Diego is <a href=\"https:\/\/developer.ibm.com\/answers\/questions\/243601\/cloudfoundry-ssh-error-authorization-server-did-no.html\" target=\"_blank\" rel=\"noopener noreferrer\">not active<\/a> in Bluemix.<\/p>\n<p>I used the <a href=\"https:\/\/cloud.ibm.com\/docs\/starters\/install_cli.html\" target=\"_blank\" rel=\"noopener noreferrer\">documentation<\/a> to connect to Bluemix via the Cloud Foundry CLI. On the way, you\u2019ll meet things like <em>organization<\/em> and <em>space<\/em>.<\/p>\n<p><center><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/ibm-bluemix-first-steps.png\" alt=\"ibm-bluemix-first-steps\" width=\"640\" class=\"aligncenter size-full wp-image-9170\" \/><\/center><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Ruby_and_Bluemix\"><\/span>Ruby and Bluemix<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>I\u2019m a Ruby developer, so I want to know what are the <em>buildpacks<\/em> and versions that Bluemix provides.<\/p>\n<p>Bluemix uses Cloud Foundry buildpacks and <a href=\"https:\/\/cloud.ibm.com\/docs\/runtimes\/ruby\/index.html\" target=\"_blank\" rel=\"noopener noreferrer\">supports<\/a> the Ruby versions <em>2.0.0<\/em>, <em>2.1.6<\/em>, <em>2.1.7<\/em>, <em>2.2.2<\/em>, and <em>2.2.3<\/em>. If you need another version of Ruby (for example, the latest 2.3.0), you can refer to the external <a href=\"https:\/\/github.com\/cloudfoundry\/ruby-buildpack\" target=\"_blank\" rel=\"noopener noreferrer\">Ruby buildpack<\/a> or create your own.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Services_in_Bluemix\"><\/span>Services in Bluemix<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>To get my application running in Bluemix, I need to install <a href=\"https:\/\/cloud.ibm.com\/catalog\" target=\"_blank\" rel=\"noopener noreferrer\">services<\/a>: one for PostgreSQL DB and one for Elasticsearch.<\/p>\n<p>Unlike in Heroku, Bluemix environment variables are JSON objects with all service information, and you need to parse JSON to get the parameters you want to use. At my <a href=\"https:\/\/github.com\/lcostantini\/bluemix-elasticsearch-rails\/commit\/2c5bb086fc9d4851de01eec537162f43edc973fe\" target=\"_blank\" rel=\"noopener noreferrer\">GitHub<\/a>, you can see how to parse JSON to have access to the services.<\/p>\n<p>To get the environment variables like in Heroku, you can add them <a href=\"https:\/\/docs.cloudfoundry.org\/devguide\/deploy-apps\/environment-variable.html\" target=\"_blank\" rel=\"noopener noreferrer\">manually<\/a> on the Bluemix dashboard or with the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf set-env<\/code> command.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>The DB service<\/strong><\/p>\n<p>I found <a href=\"https:\/\/cloud.ibm.com\/catalog\/?search=postgres\" target=\"_blank\" rel=\"noopener noreferrer\">two services<\/a> for Postgres. One is <em>PostgreSQL by Compose<\/em>, and it requires a registered account in Compose. They also ask for your payment information and offer a 30-day trial. The second option is <em>ElephantSQL<\/em>, which provides a free plan without having an extra account. I chose the second.<\/p>\n<p><center><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/ibm-bluemix-postgres-postgresql.png\" alt=\"ibm-bluemix-postgres-postgresql\" width=\"640\" class=\"aligncenter size-full wp-image-9171\" \/><\/center><\/p>\n<p>After getting the ElephantSQL service, you need to bind it to your application. On the dashboard with your application, you will see a button for binding. It creates an environment variable for the DB.<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/ibm-bluemix-elasticsearch-rails.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/ibm-bluemix-elasticsearch-rails.png\" alt=\"ibm-bluemix-elasticsearch-rails\" width=\"640\" class=\"aligncenter size-full wp-image-9168\" \/><\/a><\/p>\n<p>This is all? No, my friend, you still should run migrations.<\/p>\n<p>You need to create the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">manifest.yml<\/code> file that is used by Cloud Foundry when deploying an application. The file provides information about added services, host, number of instances, and so on.<\/p>\n<p>The <a href=\"https:\/\/cloud.ibm.com\/docs\/manageapps\/depapps.html\" target=\"_blank\" rel=\"noopener noreferrer\">manifest<\/a> supports the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">command<\/code> option\u2014the custom start command for your application or the command to run script files\u2014that you can modify.<\/p>\n<p>I created the file in my application and only modified the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">command<\/code> option to run the migrations.<\/p>\n<p><center><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/ibm-bluemix-elasticsearch.png\" alt=\"ibm-bluemix-elasticsearch\" width=\"639\" height=\"73\" class=\"aligncenter size-full wp-image-9167\" \/><\/center><\/p>\n<p>&nbsp;<\/p>\n<p><strong>The Elasticsearch service<\/strong><\/p>\n<p>Now, we can add the Elasticsearch service. Similar to the DB service, I found two options. One\u2014<em>Elasticsearch by Compose<\/em>\u2014had the same restrictions as the service for the DB, so I chose the second service that offered a free plan\u2014<em>Searchly<\/em>. I installed and bound the service to the application in the same way as I did for the DB service.<\/p>\n<p><center><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/ibm-bluemix-elasticsearch-services.png\" alt=\"ibm-bluemix-elasticsearch-services\" width=\"431\" height=\"553\" class=\"aligncenter size-full wp-image-9169\" \/><\/center><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Deploy_your_application_in_Bluemix\"><\/span>Deploy your application in Bluemix<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>To test Bluemix and its services, I created a simple <a href=\"https:\/\/github.com\/lcostantini\/bluemix-elasticsearch-rails\" target=\"_blank\" rel=\"noopener noreferrer\">application<\/a> with CRUD functionality for posts and a search box using Rails and the scaffold command.<\/p>\n<p>For making a deployment in Bluemix, you only need to run the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf push <em>appname<\/em><\/code> command.<\/p>\n<p>Finally, we can see the application up and running.<\/p>\n<p><center><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/ibm-bluemix-sample-rails-application.png\" alt=\"ibm-bluemix-sample-rails-application\" width=\"640\" class=\"aligncenter size-full wp-image-9173\" \/><\/center><\/p>\n<p>The sample application has a seed that creates one hundred posts with random words. To run the seed, you need to run the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf push<\/code> command with the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">-c<\/code> flag and add the task there. In my case, it was <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf push elasticsearch-rails -c \u201crake posts:seed\u201d<\/code>.<\/p>\n<p>The last command run in the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">-c<\/code> flag is remembered by <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf push<\/code>, so you need to execute it again with <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">-c \u201cnull\u201d<\/code> to delete the saved command.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Conclusions_pros_and_cons\"><\/span>Conclusions: pros and cons<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The first time that I tried to create an account in Bluemix, I had bad luck: the confirmation e-mail never reached my inbox. For this reason, I couldn\u2019t use it again to log in, so I tried another personal e-mail account and everything worked well. When I got to the login page, there were  two fields: one for the password and another for the IBM id. I didn\u2019t have an IBM id, and the confirmation e-mail didn\u2019t say anything about that, so I entered my e-mail account like an IBM id and voila! Finally, I could log in to Bluemix.<\/p>\n<p>The documentation for getting started with Bluemix is easy and very helpful. However, if you try to find documentation for more specific cases, it can become a difficult task (for example, if you try to find the requirements for installing the Cloud Foundry CLI in Bluemix).<\/p>\n<p>I personally don&#8217;t like how environment variables are saved in Bluemix. You need to use the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">JSON.parse<\/code> method to parse the environment variables and then access the desired configuration, which means including additional code in your application without a reason. To <a href=\"https:\/\/docs.cloudfoundry.org\/buildpacks\/ruby\/ruby-tips.html\" target=\"_blank\" rel=\"noopener noreferrer\">solve<\/a> this, Bluemix offers you a way to define environment variables like Heroku does, and you can obtain them using <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">ENV['VARIABLE']<\/code>.<\/p>\n<p>Also, another thing I don&#8217;t like is the way it is used to run migrations. You need to add a new file (manifest) and know how to write it. You don&#8217;t want to run the migrations every time you make <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf push<\/code>. There are ways to avoid this problem, but you need to read about that.<\/p>\n<p>Finally, you can\u2019t connect to the instance running in Bluemix, so you need to make <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf push<\/code> every time you want to run a command (for example, <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">rake db:seed<\/code>). I know that commands are not executed very often in a production environment, but you might want to connect to a running application for debugging, or if you use Elasticsearch and indexes are being modified, you need to reindex everything in the DB.<\/p>\n<p>For me, these are the weak points in Bluemix. At the same time, you have a great set of services that is growing, and I really like the application dashboard. Deploying an application is really easy, and you don\u2019t need to do more than in Heroku. Also, you can configure an application in the manifest file.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Related_reading\"><\/span>Related reading<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/getting-started-with-ibm-bluemix-deploying-a-sample-ruby-sinatra-app\/\">Getting Started with IBM Bluemix: Deploying a Sample Ruby\/Sinatra App<\/a><\/li>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/continuous-integration-and-continuous-delivery-in-ibm-bluemix\/\">Continuous Integration and Continuous Delivery in IBM Bluemix<\/a><\/li>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/the-ibm-bluemix-object-storage-service-in-ruby-projects\/\">Using IBM Bluemix Object Storage in Ruby Projects<\/a><\/li>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/demo-building-java-apps-with-bluemix-and-db2\/\">Building Java Apps with IBM Bluemix and DB2<\/a><\/li>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/how-to-connect-to-xpages-nosql-db-from-the-node-js-runtime-in-bluemix\/\">How to Connect to XPages NoSQL DB from the Node.js Runtime in Bluemix<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>First steps in Bluemix<\/p>\n<p>For starters, I went to the Bluemix web page to create an account.<\/p>\n<p>Users can manage their applications with the Cloud Foundry CLI in Bluemix, so I found the requirements for installing it. In the list of prerequisites, the Cloud Foundry CLI version 6.5.1 or later is specified.<\/p>\n<\/p>\n<p>I [&#8230;]<\/p>\n","protected":false},"author":74,"featured_media":44439,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":"","_links_to":"","_links_to_target":""},"categories":[214],"tags":[873,187],"class_list":["post-9165","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-cloud-native","tag-ibm-bluemix"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Deploying a Rails App with Elasticsearch to IBM Bluemix | Altoros<\/title>\n<meta name=\"description\" content=\"The article will help Ruby developers to get started with IBM Bluemix, demonstrating how to deploy a simple application that uses the Elasticsearch service and a database.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Deploying a Rails App with Elasticsearch to IBM Bluemix | Altoros\" \/>\n<meta property=\"og:description\" content=\"First steps in Bluemix For starters, I went to the Bluemix web page to create an account. Users can manage their applications with the Cloud Foundry CLI in Bluemix, so I found the requirements for installing it. In the list of prerequisites, the Cloud Foundry CLI version 6.5.1 or later is specified. I [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/\" \/>\n<meta property=\"og:site_name\" content=\"Altoros\" \/>\n<meta property=\"article:published_time\" content=\"2016-03-18T04:39:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-06-20T00:01:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/ibm-bluemix-postgres-postgresql-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"695\" \/>\n\t<meta property=\"og:image:height\" content=\"325\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Leandro Costantini\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Leandro Costantini\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/\",\"url\":\"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/\",\"name\":\"Deploying a Rails App with Elasticsearch to IBM Bluemix | Altoros\",\"isPartOf\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/ibm-bluemix-postgres-postgresql-1.png\",\"datePublished\":\"2016-03-18T04:39:10+00:00\",\"dateModified\":\"2019-06-20T00:01:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/f3c2ad80365ed5c422e5f8a447071cfe\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/#primaryimage\",\"url\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/ibm-bluemix-postgres-postgresql-1.png\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/ibm-bluemix-postgres-postgresql-1.png\",\"width\":695,\"height\":325},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.altoros.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Deploying a Rails App with Elasticsearch to IBM Bluemix\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#website\",\"url\":\"https:\/\/www.altoros.com\/blog\/\",\"name\":\"Altoros\",\"description\":\"Insight\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.altoros.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/f3c2ad80365ed5c422e5f8a447071cfe\",\"name\":\"Leandro Costantini\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/12\/Leandro_Costantini-140x140.jpg\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/12\/Leandro_Costantini-140x140.jpg\",\"caption\":\"Leandro Costantini\"},\"description\":\"Leandro Costantini is a software engineer at Altoros. He specializes in Ruby on Rails as well as the Rack, Cuba, and Sinatra frameworks. Leandro is a huge fan of extreme programing practices, including TDD and pair programming.\",\"url\":\"https:\/\/www.altoros.com\/blog\/author\/leandro-costantini\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Deploying a Rails App with Elasticsearch to IBM Bluemix | Altoros","description":"The article will help Ruby developers to get started with IBM Bluemix, demonstrating how to deploy a simple application that uses the Elasticsearch service and a database.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/","og_locale":"en_US","og_type":"article","og_title":"Deploying a Rails App with Elasticsearch to IBM Bluemix | Altoros","og_description":"First steps in Bluemix For starters, I went to the Bluemix web page to create an account. Users can manage their applications with the Cloud Foundry CLI in Bluemix, so I found the requirements for installing it. In the list of prerequisites, the Cloud Foundry CLI version 6.5.1 or later is specified. I [...]","og_url":"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/","og_site_name":"Altoros","article_published_time":"2016-03-18T04:39:10+00:00","article_modified_time":"2019-06-20T00:01:35+00:00","og_image":[{"width":695,"height":325,"url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/ibm-bluemix-postgres-postgresql-1.png","type":"image\/png"}],"author":"Leandro Costantini","twitter_misc":{"Written by":"Leandro Costantini","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/","url":"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/","name":"Deploying a Rails App with Elasticsearch to IBM Bluemix | Altoros","isPartOf":{"@id":"https:\/\/www.altoros.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/#primaryimage"},"image":{"@id":"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/#primaryimage"},"thumbnailUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/ibm-bluemix-postgres-postgresql-1.png","datePublished":"2016-03-18T04:39:10+00:00","dateModified":"2019-06-20T00:01:35+00:00","author":{"@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/f3c2ad80365ed5c422e5f8a447071cfe"},"breadcrumb":{"@id":"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/#primaryimage","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/ibm-bluemix-postgres-postgresql-1.png","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/ibm-bluemix-postgres-postgresql-1.png","width":695,"height":325},{"@type":"BreadcrumbList","@id":"https:\/\/www.altoros.com\/blog\/deploying-a-rails-app-with-elasticsearch-to-ibm-bluemix\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.altoros.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Deploying a Rails App with Elasticsearch to IBM Bluemix"}]},{"@type":"WebSite","@id":"https:\/\/www.altoros.com\/blog\/#website","url":"https:\/\/www.altoros.com\/blog\/","name":"Altoros","description":"Insight","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.altoros.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/f3c2ad80365ed5c422e5f8a447071cfe","name":"Leandro Costantini","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/12\/Leandro_Costantini-140x140.jpg","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/12\/Leandro_Costantini-140x140.jpg","caption":"Leandro Costantini"},"description":"Leandro Costantini is a software engineer at Altoros. He specializes in Ruby on Rails as well as the Rack, Cuba, and Sinatra frameworks. Leandro is a huge fan of extreme programing practices, including TDD and pair programming.","url":"https:\/\/www.altoros.com\/blog\/author\/leandro-costantini\/"}]}},"_links":{"self":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/9165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/users\/74"}],"replies":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/comments?post=9165"}],"version-history":[{"count":8,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/9165\/revisions"}],"predecessor-version":[{"id":44440,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/9165\/revisions\/44440"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media\/44439"}],"wp:attachment":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media?parent=9165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/categories?post=9165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/tags?post=9165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}