{"id":4645,"date":"2018-03-06T10:05:41","date_gmt":"2018-03-06T18:05:41","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=4645"},"modified":"2024-08-30T02:39:35","modified_gmt":"2024-08-30T09:39:35","slug":"simplified-couchbase-server-cluster-creation-via-docker","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/","title":{"rendered":"Simplified Couchbase Server Cluster Creation via Docker"},"content":{"rendered":"<div id=\"preamble\">\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>It\u2019s pretty straight-forward to run an instance of Couchbase Server in a Docker container. It takes a bit more work to set up and fully configure a cluster. In this post, I\u2019m going to walk through a shell script I wrote to automate the process.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_background\">Background<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>For Couchbase Connect 2017, we built an application that shows off everything from the <a title=\"https:\/\/www.couchbase.com\/downloads?family=server&amp;product=couchbase-analytics&amp;edition=enterprise\" href=\"https:\/\/www.couchbase.com\/downloads?family=server&amp;product=couchbase-analytics&amp;edition=enterprise\">Couchbase Analytics Service<\/a> through to real-time mobile data synchronization using <a title=\"https:\/\/www.couchbase.com\/developers\/mobile\/?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\" href=\"https:\/\/www.couchbase.com\/developers\/mobile\/?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">Couchbase Mobile<\/a>. We use an NFC temperature sensing patch, generate alerts through the Vue.js-based web client, alter schemas on the fly, send push notifications, fail over clusters, and more. Check out this video of it in action.<\/p>\n<p><iframe loading=\"lazy\" title=\"Couchbase Data Platform demo and engineering Q&amp;A \u2013 Connect Silicon\u200b \u200bValley\u200b \u200b2017\" width=\"900\" height=\"506\" src=\"https:\/\/www.youtube.com\/embed\/-U_UjqnhMBI?start=228&#038;feature=oembed&#038;enablejsapi=1&#038;origin=https:\/\/www.couchbase.com\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>In the demo, <a title=\"couchbase server\" href=\"https:\/\/www.couchbase.com\/products\/server\/\">Couchbase Server<\/a>, <a title=\"https:\/\/developer.couchbase.com\/documentation\/mobile\/current\/guides\/sync-gateway\/index.html?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\" href=\"https:\/\/developer.couchbase.com\/documentation\/mobile\/current\/guides\/sync-gateway\/index.html?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">Sync Gateway<\/a>, and the web backend are all running in the cloud. We\u2019re working on releasing the code for the entire project. As part of that, I want to be able to run a trimmed-down version on a single machine.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>That means, ideally, running two Couchbase Server clusters, Sync Gateway, and the Node.js backend application, all simultaneously.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Docker makes running separate instances of Couchbase pretty easy. Completely configuring a whole cluster still takes some work, though. That\u2019s where the script I wrote comes in.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_a_flexible_cluster_creation_script\">A Flexible Cluster Creation Script<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>The script is written using Bash. I had a few goals in mind while developing it:<\/p>\n<\/div>\n<div class=\"olist arabic\">\n<ol>\n<li>Make something general purpose and easy to use.<\/li>\n<li>Allow for flexible configuration, while falling back to sensible defaults.<\/li>\n<li>Minimize dependencies to Bash, common standard utilities (some things are just worth doing in awk), and the Docker cli.<\/li>\n<\/ol>\n<\/div>\n<div class=\"paragraph\">\n<p>I\u2019ve posted the code and other related pieces on Github in <a title=\"https:\/\/gist.github.com\/HodGreeley\/fa88c74baf55115ef83135d4d069e796\" href=\"https:\/\/gist.github.com\/HodGreeley\/fa88c74baf55115ef83135d4d069e796\">this gist<\/a>. Here\u2019s the cluster formation script.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>https:\/\/gist.github.com\/HodGreeley\/fa88c74baf55115ef83135d4d069e796#file-server<\/p>\n<div class=\"sect1\">\n<h2 id=\"_outline\">Outline<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Roughly speaking, in order, the script takes care of the following:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>Configuring parameters<\/li>\n<li>Starting the requested number of Couchbase Server instances, one per Docker container, using the latest production image<\/li>\n<li>Mapping the necessary ports (offsetting each instance to avoid collisions)<\/li>\n<li>Setting the administrative account and password<\/li>\n<li>Selecting the services available and setting the memory allocations for them<\/li>\n<li>Creating a bucket<\/li>\n<li>Granting rights to a client account using <a title=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/security\/concepts-rba-for-apps.html\" href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/security\/concepts-rba-for-apps.html\">RBAC<\/a><\/li>\n<li>Combining the nodes into a cluster<\/li>\n<li>Rebalancing the final cluster<\/li>\n<\/ul>\n<p>I won\u2019t go through the script in detail. There are comments that tell which section corresponds to the outline. Feel free to leave a comment here or on Github if you have questions.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_usage\">Usage<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>I wrote this to set up clusters on my Mac. I expect it will work equally well for any machine that can run Bash and Docker. The script doesn\u2019t have any options. Everything is controlled by supplying parameters as key\/value pairs. They\u2019re supplied four ways. In order of priority, from lowest to highest,<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>Defaults (written into the script itself)<\/li>\n<li>Existing environment variables<\/li>\n<li>Lines fed to the standard input<\/li>\n<li>Supplied as command line arguments<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>In the last two instances, parameters are supplied just the way you would define an environment variable. E.g. to request 3 nodes, add <code>COUCHBASE_NODE_COUNT=3<\/code>, either on the command line or redirected from a file. Look at where the defaults are set to see what you can control.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Port mapping takes a little explanation. Couchbase uses several port ranges. To create a cluster, a number of ports have to both be exposed by Docker and mapped to open ports on the host machine. To do this, specify blocks of ranges and mappings, separated by double colons (<code>::<\/code>). For example, setting <code>COUCHBASE_SERVER_PORTS=\"9091-9094:8091-8094::12210:11210<\/code> maps the standard Couchbase ports 8091-8094 and 11210 to the host machine ports 9091-9094 and 12210, respectively.<\/p>\n<\/div>\n<div class=\"sect2\">\n<h2 id=\"_example\">Example<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>In a typical scenario, you might have the cluster administrator account information assigned in environment variables. I.e.<\/p>\n<pre class=\"lang:sh decode:true\">export COUCHBASE_ADMINISTRATOR_USERNAME=Administrator\r\nexport COUCHBASE_ADMINISTRATOR_PASSWORD=password<\/pre>\n<\/div>\n<div class=\"paragraph\">\n<p>You might then keep some other general configuration information in a file. The name doesn\u2019t matter. Here\u2019s one I use I call <code>london-cluster<\/code><\/p>\n<\/div>\n<div class=\"paragraph\">\n<pre class=\"lang:sh decode:true\">COUCHBASE_NODE_NAME=london\r\nCOUCHBASE_CLUSTER_NAME=london-cluster\r\nCOUCHBASE_BUCKET=health\r\nCOUCHBASE_RBAC_USERNAME=admin \r\nCOUCHBASE_RBAC_PASSWORD=password \r\nCOUCHBASE_RBAC_NAME='J. D. User' \r\nCOUCHBASE_RBAC_ROLES=Admin \r\nCOUCHBASE_SERVER_PORTS=\"11091-11094:8091-8094::14210:11210\"<\/pre>\n<p>Finally, to start the cluster, you would invoke something like the following on the command line.<\/p>\n<\/div>\n<\/div>\n<pre class=\"lang:sh decode:true\">$ .\/server COUCHBASE_NODE_COUNT=3 &lt; london-cluster<\/pre>\n<h2 id=\"_related_scripts\">Related Scripts<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>In the <a title=\"https:\/\/gist.github.com\/HodGreeley\/fa88c74baf55115ef83135d4d069e796\" href=\"https:\/\/gist.github.com\/HodGreeley\/fa88c74baf55115ef83135d4d069e796\">gist<\/a> you can also find a similar script for setting up Sync Gateway. That script is a little more built out in terms of having commands to create a container, start it, stop it, and remove it. Because Sync Gateway requires a configuration file, the script has to work a little harder to do the parameter substitutions.\u00a0 Otherwise it&#8217;s similar to but simpler than the server script.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>There\u2019s also a script that sets up the entire demo, including using the previous two scripts. As I mentioned earlier, we\u2019re working on releasing the code for the whole application end-to-end. The setup script gives an idea of what\u2019s involved.<\/p>\n<\/div>\n<\/div>\n<h3 id=\"_postscript\">Postscript<\/h3>\n<div class=\"paragraph\">\n<p>Couchbase is open source and <a title=\"https:\/\/www.couchbase.com\/downloads\" href=\"https:\/\/www.couchbase.com\/downloads\/\">free to try out<\/a>.<br \/>\n<strong>Get started<\/strong> with <a title=\"https:\/\/www.couchbase.com\/get-started\" href=\"https:\/\/developer.couchbase.com\/tutorials\">sample code, example queries, tutorials, and more<\/a>.<br \/>\nFind more resources on our <a title=\"https:\/\/www.couchbase.com\/developers\/?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\" href=\"https:\/\/www.couchbase.com\/developers\/\">developer portal<\/a>.<br \/>\nFollow us on Twitter <a title=\"https:\/\/twitter.com\/CouchbaseDev\" href=\"https:\/\/twitter.com\/CouchbaseDev\">@CouchbaseDev<\/a>.<br \/>\nYou can post questions on our <a title=\"https:\/\/www.couchbase.com\/forums\/?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\" href=\"https:\/\/www.couchbase.com\/forums\/?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">forums<\/a>.<br \/>\nWe actively participate on <a title=\"https:\/\/stackoverflow.com\/questions\/tagged\/couchbase\" href=\"https:\/\/stackoverflow.com\/questions\/tagged\/couchbase\">Stack Overflow<\/a>.<br \/>\nHit me up on Twitter with any questions, comments, topics you\u2019d like to see, etc. <a title=\"https:\/\/twitter.com\/HodGreeley\" href=\"https:\/\/twitter.com\/HodGreeley\">@HodGreeley<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>It\u2019s pretty straight-forward to run an instance of Couchbase Server in a Docker container. It takes a bit more work to set up and fully configure a cluster. In this post, I\u2019m going to walk through a shell script I [&hellip;]<\/p>\n","protected":false},"author":73,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1815,1816],"tags":[1300,1519,1935],"ppma_author":[9042],"class_list":["post-4645","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-best-practices-and-tutorials","category-couchbase-server","tag-cluster","tag-docker","tag-script"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.7.1 (Yoast SEO v25.7) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Simplified Couchbase Server Cluster Creation via Docker<\/title>\n<meta name=\"description\" content=\"This article walks you through a shell script which author wrote to automate the process. Check out how it is written using Bash language its usage etc.\" \/>\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.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Simplified Couchbase Server Cluster Creation via Docker\" \/>\n<meta property=\"og:description\" content=\"This article walks you through a shell script which author wrote to automate the process. Check out how it is written using Bash language its usage etc.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-03-06T18:05:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-30T09:39:35+00:00\" \/>\n<meta name=\"author\" content=\"Hod Greeley, Developer Advocate, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@HodGreeley\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hod Greeley, Developer Advocate, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/\"},\"author\":{\"name\":\"Hod Greeley, Developer Advocate, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/9b62593c8a13531e53d52fcd5aabbca4\"},\"headline\":\"Simplified Couchbase Server Cluster Creation via Docker\",\"datePublished\":\"2018-03-06T18:05:41+00:00\",\"dateModified\":\"2024-08-30T09:39:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/\"},\"wordCount\":843,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"keywords\":[\"Cluster\",\"docker\",\"script\"],\"articleSection\":[\"Best Practices and Tutorials\",\"Couchbase Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/\",\"name\":\"Simplified Couchbase Server Cluster Creation via Docker\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2018-03-06T18:05:41+00:00\",\"dateModified\":\"2024-08-30T09:39:35+00:00\",\"description\":\"This article walks you through a shell script which author wrote to automate the process. Check out how it is written using Bash language its usage etc.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Simplified Couchbase Server Cluster Creation via Docker\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/9b62593c8a13531e53d52fcd5aabbca4\",\"name\":\"Hod Greeley, Developer Advocate, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/21eb69cb5d4a401fb23b149e4f4e9e87\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/52d0018695c0ced0d1c68cf64a6195c81dbac03dce5983f98eb209e7c84350df?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/52d0018695c0ced0d1c68cf64a6195c81dbac03dce5983f98eb209e7c84350df?s=96&d=mm&r=g\",\"caption\":\"Hod Greeley, Developer Advocate, Couchbase\"},\"description\":\"Hod Greeley is a Developer Advocate for Couchbase, living in Silicon Valley. He has over two decades of experience as a software engineer and engineering manager. He has worked in a variety of software fields, including computational physics and chemistry, computer and network security, finance, and mobile. Prior to joining Couchbase in 2016, Hod led developer relations for mobile at Samsung. Hod holds a Ph.D. in chemical physics from Columbia University.\",\"sameAs\":[\"https:\/\/hod.greeley.org\/blog\",\"https:\/\/x.com\/HodGreeley\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/hod-greeley\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Simplified Couchbase Server Cluster Creation via Docker","description":"This article walks you through a shell script which author wrote to automate the process. Check out how it is written using Bash language its usage etc.","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.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/","og_locale":"en_US","og_type":"article","og_title":"Simplified Couchbase Server Cluster Creation via Docker","og_description":"This article walks you through a shell script which author wrote to automate the process. Check out how it is written using Bash language its usage etc.","og_url":"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/","og_site_name":"The Couchbase Blog","article_published_time":"2018-03-06T18:05:41+00:00","article_modified_time":"2024-08-30T09:39:35+00:00","author":"Hod Greeley, Developer Advocate, Couchbase","twitter_card":"summary_large_image","twitter_creator":"@HodGreeley","twitter_misc":{"Written by":"Hod Greeley, Developer Advocate, Couchbase","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/"},"author":{"name":"Hod Greeley, Developer Advocate, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/9b62593c8a13531e53d52fcd5aabbca4"},"headline":"Simplified Couchbase Server Cluster Creation via Docker","datePublished":"2018-03-06T18:05:41+00:00","dateModified":"2024-08-30T09:39:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/"},"wordCount":843,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","keywords":["Cluster","docker","script"],"articleSection":["Best Practices and Tutorials","Couchbase Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/","url":"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/","name":"Simplified Couchbase Server Cluster Creation via Docker","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2018-03-06T18:05:41+00:00","dateModified":"2024-08-30T09:39:35+00:00","description":"This article walks you through a shell script which author wrote to automate the process. Check out how it is written using Bash language its usage etc.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/simplified-couchbase-server-cluster-creation-via-docker\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Simplified Couchbase Server Cluster Creation via Docker"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/9b62593c8a13531e53d52fcd5aabbca4","name":"Hod Greeley, Developer Advocate, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/21eb69cb5d4a401fb23b149e4f4e9e87","url":"https:\/\/secure.gravatar.com\/avatar\/52d0018695c0ced0d1c68cf64a6195c81dbac03dce5983f98eb209e7c84350df?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/52d0018695c0ced0d1c68cf64a6195c81dbac03dce5983f98eb209e7c84350df?s=96&d=mm&r=g","caption":"Hod Greeley, Developer Advocate, Couchbase"},"description":"Hod Greeley is a Developer Advocate for Couchbase, living in Silicon Valley. He has over two decades of experience as a software engineer and engineering manager. He has worked in a variety of software fields, including computational physics and chemistry, computer and network security, finance, and mobile. Prior to joining Couchbase in 2016, Hod led developer relations for mobile at Samsung. Hod holds a Ph.D. in chemical physics from Columbia University.","sameAs":["https:\/\/hod.greeley.org\/blog","https:\/\/x.com\/HodGreeley"],"url":"https:\/\/www.couchbase.com\/blog\/author\/hod-greeley\/"}]}},"authors":[{"term_id":9042,"user_id":73,"is_guest":0,"slug":"hod-greeley","display_name":"Hod Greeley, Developer Advocate, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/52d0018695c0ced0d1c68cf64a6195c81dbac03dce5983f98eb209e7c84350df?s=96&d=mm&r=g","author_category":"","last_name":"Greeley","first_name":"Hod","job_title":"","user_url":"https:\/\/hod.greeley.org\/blog","description":"Hod Greeley is a Developer Advocate for Couchbase, living in Silicon Valley. He has over two decades of experience as a software engineer and engineering manager. He has worked in a variety of software fields, including computational physics and chemistry, computer and network security, finance, and mobile. Prior to joining Couchbase in 2016, Hod led developer relations for mobile at Samsung. Hod holds a Ph.D. in chemical physics from Columbia University."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/4645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/73"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=4645"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/4645\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=4645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=4645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=4645"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=4645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}