{"_id":"567af282b56bac0d0019d87e","parentDoc":null,"category":{"_id":"567af26cb56bac0d0019d87d","pages":["567af282b56bac0d0019d87e","567af41fc952030d0038c782","567af469b56bac0d0019d887","567af4a493919f0d00c97a72","567af4c7c952030d0038c788","568371947af9120d007ac34d","568411af3b87430d00483c14","5684127c65976e0d00001bf1","568414c77916270d00eee2e1","5684152b7af9120d007ac3e9","5684162b3b87430d00483c21","5684164f65976e0d00001bfe","568440dcc11c7e0d00aaff47","56eadf15eed93a0e00dd501b","56eadffb0ce1452200bd5db1","56eae136d25d831700006abc"],"project":"5633ebff7e9e880d00af1a53","__v":16,"version":"5633ec007e9e880d00af1a56","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-23T19:13:48.702Z","from_sync":false,"order":5,"slug":"quickstart-guides","title":"Heroku Plan Management"},"user":"5633ec9b35355017003ca3f2","__v":30,"project":"5633ebff7e9e880d00af1a53","version":{"_id":"5633ec007e9e880d00af1a56","project":"5633ebff7e9e880d00af1a53","__v":15,"createdAt":"2015-10-30T22:15:28.105Z","releaseDate":"2015-10-30T22:15:28.105Z","categories":["5633ec007e9e880d00af1a57","5633f072737ea01700ea329d","5637a37d0704070d00f06cf4","5637cf4e7ca5de0d00286aeb","564503082c74cf1900da48b4","564503cb7f1fff210078e70a","567af26cb56bac0d0019d87d","567afeb8802b2b17005ddea0","567aff47802b2b17005ddea1","567b0005802b2b17005ddea3","568adfffcbd4ca0d00aebf7e","56ba80078cf7c9210009673e","574d127f6f075519007da3d0","574fde60aef76a0e00840927","57a22ba6cd51b22d00f623a0"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-23T19:14:10.420Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"Heroku makes it quick and easy to get started with Bonsai Elasticsearch. We recommend using one of the [official clients](http://www.elasticsearch.org/guide/).\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Installing Bonsai-Elasticsearch\"\n}\n[/block]\nThere are two ways to add Bonsai to your Heroku app:\n1. Through the Heroku CLI tool\n2. Through the Heroku app dashboard\n\nAdding Bonsai to your app automatically creates a cluster for you. It also adds the `BONSAI_URL` environment variable, which will contain the canonical URL and credentials to your Elasticsearch cluster. This automation makes it fast and easy to get started with your new cluster.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"We now offer a free Sandbox plan for development and testing on Heroku. A list of all available plans and capacities can be found at https://elements.heroku.com/addons/bonsai.\",\n  \"title\": \"Our Heroku Add on\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Using the Heroku CLI tool\"\n}\n[/block]\nYou can add Bonsai Elasticsearch to your app with this command:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ heroku addons:add bonsai\\n\\t-----> Adding bonsai to some-appname-4005... done, v18 (free)\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\nYou can verify that the operation was successful by running `heroku config:get BONSAI_URL`, or ` heroku config | grep BONSAI`:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ heroku config:get BONSAI_URL\\n\\t-----> http://username:password:::at:::redwood-12345.us-east-1.bonsai.io/\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\nIf this value is null, then Bonsai was not properly added to your account. Try again and look for error messages. If you still have problems, [give us a shout](mailto:support@bonsai.io).\n\nOnce the addon has been successfully added, you can check on the status of your cluster by running `$ heroku addons:open bonsai -a <your app>`\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Using the Heroku dashboard\"\n}\n[/block]\nIf for some reason you can't use Heroku's command line tool, you can always add Bonsai Elasticsearch via Heroku's simple dashboard:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/4bWfX5NAS2KUo57XvEGO_chrome-window-flaticon-heroku-add-bonsai.png\",\n        \"chrome-window-flaticon-heroku-add-bonsai.png\",\n        \"2741\",\n        \"1465\",\n        \"#8b68b1\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n1. Navigate to our [addon page](https://addons.heroku.com/bonsai)\n2. Click on the plan you would like to add\n3. Select the app to which you would like to add Bonsai\n4. Click on the \"Add\" button\n5. You should see a success message along the lines of `Added bonsai:<plan> to <your app>`\n\nIf for some reason that doesn't work, [reach out to us](mailto:support@bonsai.io) and we'll help out.\n\nOnce Bonsai has been successully added to your app, you can check on the cluster via Heroku's dashboard. Simply log in to Heroku and navigate to your app. You should see a list of addons that have been added to your app. Click on \"Bonsai Elasticsearch,\" and you will be taken to your cluster's dashboard.\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Next Steps\"\n}\n[/block]\nDo you want to [upgrade your cluster to the latest version](doc:elasticsearch-2x-upgrade)?\n\nTime to create some indices? We have index auto-creation disabled by default for most index types, so if your integration requires indices to be set up, now might be a good time to [create your first indices](doc:creating-your-first-index).","excerpt":"","slug":"getting-started-with-heroku","type":"basic","title":"Installing the Bonsai Addon"}

Installing the Bonsai Addon


Heroku makes it quick and easy to get started with Bonsai Elasticsearch. We recommend using one of the [official clients](http://www.elasticsearch.org/guide/). [block:api-header] { "type": "basic", "title": "Installing Bonsai-Elasticsearch" } [/block] There are two ways to add Bonsai to your Heroku app: 1. Through the Heroku CLI tool 2. Through the Heroku app dashboard Adding Bonsai to your app automatically creates a cluster for you. It also adds the `BONSAI_URL` environment variable, which will contain the canonical URL and credentials to your Elasticsearch cluster. This automation makes it fast and easy to get started with your new cluster. [block:callout] { "type": "info", "body": "We now offer a free Sandbox plan for development and testing on Heroku. A list of all available plans and capacities can be found at https://elements.heroku.com/addons/bonsai.", "title": "Our Heroku Add on" } [/block] [block:api-header] { "type": "basic", "title": "Using the Heroku CLI tool" } [/block] You can add Bonsai Elasticsearch to your app with this command: [block:code] { "codes": [ { "code": "$ heroku addons:add bonsai\n\t-----> Adding bonsai to some-appname-4005... done, v18 (free)", "language": "curl" } ] } [/block] You can verify that the operation was successful by running `heroku config:get BONSAI_URL`, or ` heroku config | grep BONSAI`: [block:code] { "codes": [ { "code": "$ heroku config:get BONSAI_URL\n\t-----> http://username:password@redwood-12345.us-east-1.bonsai.io/", "language": "curl" } ] } [/block] If this value is null, then Bonsai was not properly added to your account. Try again and look for error messages. If you still have problems, [give us a shout](mailto:support@bonsai.io). Once the addon has been successfully added, you can check on the status of your cluster by running `$ heroku addons:open bonsai -a <your app>` [block:api-header] { "type": "basic", "title": "Using the Heroku dashboard" } [/block] If for some reason you can't use Heroku's command line tool, you can always add Bonsai Elasticsearch via Heroku's simple dashboard: [block:image] { "images": [ { "image": [ "https://files.readme.io/4bWfX5NAS2KUo57XvEGO_chrome-window-flaticon-heroku-add-bonsai.png", "chrome-window-flaticon-heroku-add-bonsai.png", "2741", "1465", "#8b68b1", "" ] } ] } [/block] 1. Navigate to our [addon page](https://addons.heroku.com/bonsai) 2. Click on the plan you would like to add 3. Select the app to which you would like to add Bonsai 4. Click on the "Add" button 5. You should see a success message along the lines of `Added bonsai:<plan> to <your app>` If for some reason that doesn't work, [reach out to us](mailto:support@bonsai.io) and we'll help out. Once Bonsai has been successully added to your app, you can check on the cluster via Heroku's dashboard. Simply log in to Heroku and navigate to your app. You should see a list of addons that have been added to your app. Click on "Bonsai Elasticsearch," and you will be taken to your cluster's dashboard. [block:api-header] { "type": "basic", "title": "Next Steps" } [/block] Do you want to [upgrade your cluster to the latest version](doc:elasticsearch-2x-upgrade)? Time to create some indices? We have index auto-creation disabled by default for most index types, so if your integration requires indices to be set up, now might be a good time to [create your first indices](doc:creating-your-first-index).