{"action":"created","comment":{"url":"https://api.github.com/repos/18F/cloud-foundry-notes/pulls/comments/36355998","id":36355998,"diff_hunk":"@@ -6,22 +6,34 @@ title: Databases\n weight: 10\n ---\n \n-The current recommendation is to use our RDS service broker to spin up and manage a database for you. If you need more control, however, you can use AWS-managed resources directly.\n+There are multiple options for how to set up databases for use with applications in Cloud Foundry.\n \n-## Service Broker\n+## Services\n+\n+The easiest way to set up a database is via [services](http://docs.cloudfoundry.org/devguide/services/), which are managed by Cloud Foundry itself. To see what database options are available, run `cf marketplace`. You will now see a list of `service`s, each with a corresponding list of `plan`s.\n+\n+To start a database service instance within Cloud Foundry (where `DB_NAME` is something like `APP_NAME-ENV-db`):\n \n ```bash\n-cf create-service rds <PLAN> <DB_NAME>\n+cf create-service <SERVICE> <PLAN> <DB_NAME>\n cf bind-service <APP_NAME> <DB_NAME>\n cf restage <APP_NAME>\n ```\n \n-Where `PLAN` is one of `shared-psql`, `micro-psql`, or `medium-psql`. The shared instance is preferred as an existing, shared database will be used. The other two options will take longer to spin up, but may be required by your application.\n+If you want to use PostgreSQL, use the `rds` service rather than `postgresql*`. This gives you things like database snapshots automatically. The `shared-psql` plan(s) uses an existing instance, which is preferred for staging environments. For a production application, use `micro-psql` or `medium-psql`. To use the `rds` service with `myapp` in your staging environment, for example, you would do something like:","path":"content/apps/databases.md","position":22,"original_position":22,"commit_id":"cc2ec9a40044e0daf2997ca61ede12b84c616548","original_commit_id":"cc2ec9a40044e0daf2997ca61ede12b84c616548","user":{"login":"dlapiduz","id":4604,"avatar_url":"https://avatars.githubusercontent.com/u/4604?v=3","gravatar_id":"","url":"https://api.github.com/users/dlapiduz","html_url":"https://github.com/dlapiduz","followers_url":"https://api.github.com/users/dlapiduz/followers","following_url":"https://api.github.com/users/dlapiduz/following{/other_user}","gists_url":"https://api.github.com/users/dlapiduz/gists{/gist_id}","starred_url":"https://api.github.com/users/dlapiduz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlapiduz/subscriptions","organizations_url":"https://api.github.com/users/dlapiduz/orgs","repos_url":"https://api.github.com/users/dlapiduz/repos","events_url":"https://api.github.com/users/dlapiduz/events{/privacy}","received_events_url":"https://api.github.com/users/dlapiduz/received_events","type":"User","site_admin":false},"body":"I am not sure we should discourage people from using the shared service for production stuff.... If it is just a simple open data app it can totally go in the shared service.","created_at":"2015-08-05T21:23:53Z","updated_at":"2015-08-05T21:23:53Z","html_url":"https://github.com/18F/cloud-foundry-notes/pull/85#discussion_r36355998","pull_request_url":"https://api.github.com/repos/18F/cloud-foundry-notes/pulls/85","_links":{"self":{"href":"https://api.github.com/repos/18F/cloud-foundry-notes/pulls/comments/36355998"},"html":{"href":"https://github.com/18F/cloud-foundry-notes/pull/85#discussion_r36355998"},"pull_request":{"href":"https://api.github.com/repos/18F/cloud-foundry-notes/pulls/85"}}},"pull_request":{"url":"https://api.github.com/repos/18F/cloud-foundry-notes/pulls/85","id":41722480,"html_url":"https://github.com/18F/cloud-foundry-notes/pull/85","diff_url":"https://github.com/18F/cloud-foundry-notes/pull/85.diff","patch_url":"https://github.com/18F/cloud-foundry-notes/pull/85.patch","issue_url":"https://api.github.com/repos/18F/cloud-foundry-notes/issues/85","number":85,"state":"open","locked":false,"title":"expand information around database services","user":{"login":"afeld","id":86842,"avatar_url":"https://avatars.githubusercontent.com/u/86842?v=3","gravatar_id":"","url":"https://api.github.com/users/afeld","html_url":"https://github.com/afeld","followers_url":"https://api.github.com/users/afeld/followers","following_url":"https://api.github.com/users/afeld/following{/other_user}","gists_url":"https://api.github.com/users/afeld/gists{/gist_id}","starred_url":"https://api.github.com/users/afeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afeld/subscriptions","organizations_url":"https://api.github.com/users/afeld/orgs","repos_url":"https://api.github.com/users/afeld/repos","events_url":"https://api.github.com/users/afeld/events{/privacy}","received_events_url":"https://api.github.com/users/afeld/received_events","type":"User","site_admin":false},"body":"Had been re-writing this page concurrently with @cmc333333 in #84 :blush: Rebased on top of `master`.","created_at":"2015-08-05T20:30:15Z","updated_at":"2015-08-05T21:23:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b68cbd254289004105a09e298e97c73e69a2b7f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/18F/cloud-foundry-notes/pulls/85/commits","review_comments_url":"https://api.github.com/repos/18F/cloud-foundry-notes/pulls/85/comments","review_comment_url":"https://api.github.com/repos/18F/cloud-foundry-notes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/18F/cloud-foundry-notes/issues/85/comments","statuses_url":"https://api.github.com/repos/18F/cloud-foundry-notes/statuses/cc2ec9a40044e0daf2997ca61ede12b84c616548","head":{"label":"18F:prefer-db-services","ref":"prefer-db-services","sha":"cc2ec9a40044e0daf2997ca61ede12b84c616548","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":29991068,"name":"cloud-foundry-notes","full_name":"18F/cloud-foundry-notes","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/cloud-foundry-notes","description":"Documentation site for 18F's deployment of Cloud Foundry","fork":false,"url":"https://api.github.com/repos/18F/cloud-foundry-notes","forks_url":"https://api.github.com/repos/18F/cloud-foundry-notes/forks","keys_url":"https://api.github.com/repos/18F/cloud-foundry-notes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/cloud-foundry-notes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/cloud-foundry-notes/teams","hooks_url":"https://api.github.com/repos/18F/cloud-foundry-notes/hooks","issue_events_url":"https://api.github.com/repos/18F/cloud-foundry-notes/issues/events{/number}","events_url":"https://api.github.com/repos/18F/cloud-foundry-notes/events","assignees_url":"https://api.github.com/repos/18F/cloud-foundry-notes/assignees{/user}","branches_url":"https://api.github.com/repos/18F/cloud-foundry-notes/branches{/branch}","tags_url":"https://api.github.com/repos/18F/cloud-foundry-notes/tags","blobs_url":"https://api.github.com/repos/18F/cloud-foundry-notes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/cloud-foundry-notes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/cloud-foundry-notes/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/cloud-foundry-notes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/cloud-foundry-notes/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/cloud-foundry-notes/languages","stargazers_url":"https://api.github.com/repos/18F/cloud-foundry-notes/stargazers","contributors_url":"https://api.github.com/repos/18F/cloud-foundry-notes/contributors","subscribers_url":"https://api.github.com/repos/18F/cloud-foundry-notes/subscribers","subscription_url":"https://api.github.com/repos/18F/cloud-foundry-notes/subscription","commits_url":"https://api.github.com/repos/18F/cloud-foundry-notes/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/cloud-foundry-notes/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/cloud-foundry-notes/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/cloud-foundry-notes/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/cloud-foundry-notes/contents/{+path}","compare_url":"https://api.github.com/repos/18F/cloud-foundry-notes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/cloud-foundry-notes/merges","archive_url":"https://api.github.com/repos/18F/cloud-foundry-notes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/cloud-foundry-notes/downloads","issues_url":"https://api.github.com/repos/18F/cloud-foundry-notes/issues{/number}","pulls_url":"https://api.github.com/repos/18F/cloud-foundry-notes/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/cloud-foundry-notes/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/cloud-foundry-notes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/cloud-foundry-notes/labels{/name}","releases_url":"https://api.github.com/repos/18F/cloud-foundry-notes/releases{/id}","created_at":"2015-01-28T22:15:24Z","updated_at":"2015-07-26T14:34:19Z","pushed_at":"2015-08-05T20:30:15Z","git_url":"git://github.com/18F/cloud-foundry-notes.git","ssh_url":"git@github.com:18F/cloud-foundry-notes.git","clone_url":"https://github.com/18F/cloud-foundry-notes.git","svn_url":"https://github.com/18F/cloud-foundry-notes","homepage":"https://docs.18f.gov","size":16490,"stargazers_count":8,"watchers_count":8,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":15,"forks":5,"open_issues":15,"watchers":8,"default_branch":"master"}},"base":{"label":"18F:master","ref":"master","sha":"1a41896b5d9318b91c58869490697ec193e8511c","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":29991068,"name":"cloud-foundry-notes","full_name":"18F/cloud-foundry-notes","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/cloud-foundry-notes","description":"Documentation site for 18F's deployment of Cloud Foundry","fork":false,"url":"https://api.github.com/repos/18F/cloud-foundry-notes","forks_url":"https://api.github.com/repos/18F/cloud-foundry-notes/forks","keys_url":"https://api.github.com/repos/18F/cloud-foundry-notes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/cloud-foundry-notes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/cloud-foundry-notes/teams","hooks_url":"https://api.github.com/repos/18F/cloud-foundry-notes/hooks","issue_events_url":"https://api.github.com/repos/18F/cloud-foundry-notes/issues/events{/number}","events_url":"https://api.github.com/repos/18F/cloud-foundry-notes/events","assignees_url":"https://api.github.com/repos/18F/cloud-foundry-notes/assignees{/user}","branches_url":"https://api.github.com/repos/18F/cloud-foundry-notes/branches{/branch}","tags_url":"https://api.github.com/repos/18F/cloud-foundry-notes/tags","blobs_url":"https://api.github.com/repos/18F/cloud-foundry-notes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/cloud-foundry-notes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/cloud-foundry-notes/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/cloud-foundry-notes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/cloud-foundry-notes/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/cloud-foundry-notes/languages","stargazers_url":"https://api.github.com/repos/18F/cloud-foundry-notes/stargazers","contributors_url":"https://api.github.com/repos/18F/cloud-foundry-notes/contributors","subscribers_url":"https://api.github.com/repos/18F/cloud-foundry-notes/subscribers","subscription_url":"https://api.github.com/repos/18F/cloud-foundry-notes/subscription","commits_url":"https://api.github.com/repos/18F/cloud-foundry-notes/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/cloud-foundry-notes/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/cloud-foundry-notes/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/cloud-foundry-notes/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/cloud-foundry-notes/contents/{+path}","compare_url":"https://api.github.com/repos/18F/cloud-foundry-notes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/cloud-foundry-notes/merges","archive_url":"https://api.github.com/repos/18F/cloud-foundry-notes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/cloud-foundry-notes/downloads","issues_url":"https://api.github.com/repos/18F/cloud-foundry-notes/issues{/number}","pulls_url":"https://api.github.com/repos/18F/cloud-foundry-notes/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/cloud-foundry-notes/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/cloud-foundry-notes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/cloud-foundry-notes/labels{/name}","releases_url":"https://api.github.com/repos/18F/cloud-foundry-notes/releases{/id}","created_at":"2015-01-28T22:15:24Z","updated_at":"2015-07-26T14:34:19Z","pushed_at":"2015-08-05T20:30:15Z","git_url":"git://github.com/18F/cloud-foundry-notes.git","ssh_url":"git@github.com:18F/cloud-foundry-notes.git","clone_url":"https://github.com/18F/cloud-foundry-notes.git","svn_url":"https://github.com/18F/cloud-foundry-notes","homepage":"https://docs.18f.gov","size":16490,"stargazers_count":8,"watchers_count":8,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":15,"forks":5,"open_issues":15,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/18F/cloud-foundry-notes/pulls/85"},"html":{"href":"https://github.com/18F/cloud-foundry-notes/pull/85"},"issue":{"href":"https://api.github.com/repos/18F/cloud-foundry-notes/issues/85"},"comments":{"href":"https://api.github.com/repos/18F/cloud-foundry-notes/issues/85/comments"},"review_comments":{"href":"https://api.github.com/repos/18F/cloud-foundry-notes/pulls/85/comments"},"review_comment":{"href":"https://api.github.com/repos/18F/cloud-foundry-notes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/18F/cloud-foundry-notes/pulls/85/commits"},"statuses":{"href":"https://api.github.com/repos/18F/cloud-foundry-notes/statuses/cc2ec9a40044e0daf2997ca61ede12b84c616548"}}}}