Help
RSS
API
Feed
Maltego
Contact
Domain > blog.arungupta.me
×
Welcome!
Right click nodes and scroll the mouse to navigate the graph.
×
More information on this domain is in
AlienVault OTX
Is this malicious?
Yes
No
DNS Resolutions
Date
IP Address
2014-04-03
97.74.180.128
(
ClassC
)
2025-01-28
172.67.129.7
(
ClassC
)
Port 80
HTTP/1.1 301 Moved PermanentlyDate: Tue, 28 Jan 2025 14:37:19 GMTContent-Type: text/htmlContent-Length: 167Connection: keep-aliveCache-Control: max-age3600Expires: Tue, 28 Jan 2025 15:37:19 GMTLocation: https://blog.arungupta.me/Report-To: {endpoints:{url:https:\/\/a.nel.cloudflare.com\/report\/v4?sCO0YlBDDrNYDvEJt56Wg9kJImeyadwpzSH%2Fa1E0F%2BA%2F6oQq4IYfzhaTDT%2Fpo23zukNcabEVll76h3U%2BeaaZd6zEvzp%2BtikaKBMjzBatd5IJJjSq8A9PzFx1Yb%2BERnYFVTvY1oA%3D%3D},group:cf-nel,max_age:604800}NEL: {success_fraction:0,report_to:cf-nel,max_age:604800}Server: cloudflareCF-RAY: 9091b8440ebb9b62-SEAalt-svc: h3:443; ma86400server-timing: cfL4;desc?protoTCP&rtt9241&min_rtt9241&rtt_var4620&sent1&recv3&lost0&retrans0&sent_bytes0&recv_bytes56&delivery_rate0&cwnd249&unsent_bytes0&cid0000000000000000&ts0&x0 html>head>title>301 Moved Permanently/title>/head>body>center>h1>301 Moved Permanently/h1>/center>hr>center>cloudflare/center>/body>/html>
Port 443
HTTP/1.1 200 OKDate: Tue, 28 Jan 2025 14:37:19 GMTContent-Type: text/html; charsetutf-8Transfer-Encoding: chunkedConnection: keep-alivex-powered-by: PHP/8.1.31last-modified: Sun, 09 Jun 2019 14:57:33 14JunGMTvary: Accept-Encodingx-turbo-charged-by: LiteSpeedcf-cache-status: DYNAMICReport-To: {endpoints:{url:https:\/\/a.nel.cloudflare.com\/report\/v4?sbIE5XTmkKEQTDax1S6m3eokwPfyyns2IkPoeIt1vRNrAgAiSqXL88hpE6qnKtxc47H5EnxO7uWUDg2GqkoSCBsT25ith7750gEZGLOBgK32tdbkraycsjsK%2BrrT0Q2ej2X385g%3D%3D},group:cf-nel,max_age:604800}NEL: {success_fraction:0,report_to:cf-nel,max_age:604800}Server: cloudflareCF-RAY: 9091b844788627a7-SEAalt-svc: h3:443; ma86400server-timing: cfL4;desc?protoTCP&rtt9185&min_rtt9096&rtt_var2657&sent5&recv6&lost0&retrans0&sent_bytes2856&recv_bytes728&delivery_rate318381&cwnd252&unsent_bytes0&cidf3197303dd3c4545&ts217&x0 !DOCTYPE html>html prefixog: http://ogp.me/ns#>head> meta charsetUTF-8> meta nameviewport contentwidthdevice-width> link relprofile hrefhttps://gmpg.org/xfn/11> link relpingback href/xmlrpc.php> link relicon href/favicon.png> style typetext/css mediascreen> @import http://blog.arungupta.me/wp-content/plugins/wp-custom-fields-search/templates/searchforms.css; /style> title>Miles to go 4.0 ... - Arun Gupta is a technology enthusiast, avid runner, author of a best-selling book, globe trotter, a community guy, Java Champion, JavaOne Rockstar, JUG Leader, Minecraft Modder, NetBeans Dream Teamer, Devoxx4Kids-er, Docker Captain and works at AWS./title> link relcanonical href/> link relnext href/page/2/> meta propertyog:locale contenten_US> meta propertyog:type contentwebsite> meta propertyog:title contentMiles to go 4.0 ... - Arun Gupta is a technology enthusiast, avid runner, author of a best-selling book, globe trotter, a community guy, Java Champion, JavaOne Rockstar, JUG Leader, Minecraft Modder, NetBeans Dream Teamer, Devoxx4Kids-er, Docker Captain and works at AWS.> meta propertyog:description contentArun Gupta is a technology enthusiast, avid runner, author of a best-selling book, globe trotter, a community guy, Java Champion, JavaOne Rockstar, JUG Leader, Minecraft Modder, NetBeans Dream Teamer, Devoxx4Kids-er, Docker Captain and works at AWS.> meta propertyog:url contenthttp://blog.arungupta.me> meta propertyog:site_name contentMiles to go 4.0 ...> meta nametwitter:card contentsummary> meta nametwitter:site content@arungupta> script typeapplication/ld+json> {@context:http:\/\/schema.org,@type:WebSite,url:http:\/\/blog.arungupta.me\/,name:Miles to go 4.0 ...,potentialAction:{@type:SearchAction,target:http:\/\/blog.arungupta.me\/?s{search_term_string},query-input:required namesearch_term_string}} /script> script typeapplication/ld+json> {@context:http:\/\/schema.org,@type:Person,url:http:\/\/blog.arungupta.me,sameAs:https:\/\/twitter.com\/arungupta,name:Arun Gupta} /script> link relalternate typeapplication/rss+xml titleMiles to go 4.0 ... » Feed href/feed/> link relalternate typeapplication/rss+xml titleMiles to go 4.0 ... » Comments Feed href/comments/feed/> script typetext/javascript> window._wpemojiSettings {baseUrl:http:\/\/s.w.org\/images\/core\/emoji\/72x72\/,ext:.png,source:{concatemoji:http:\/\/blog.arungupta.me\/wp-includes\/js\/wp-emoji-release.min.js?ver4.3.19}}; !function(a,b,c){function d(a){var cb.createElement(canvas),dc.getContext&&c.getContext(2d);return d&&d.fillText?(d.textBaselinetop,d.font600 32px Arial,flaga?(d.fillText(String.fromCharCode(55356,56812,55356,56807),0,0),c.toDataURL().length>3e3):(d.fillText(String.fromCharCode(55357,56835),0,0),0!d.getImageData(16,16,1,1).data0)):!1}function e(a){var cb.createElement(script);c.srca,c.typetext/javascript,b.getElementsByTagName(head)0.appendChild(c)}var f,g;c.supports{simple:d(simple),flag:d(flag)},c.DOMReady!1,c.readyCallbackfunction(){c.DOMReady!0},c.supports.simple&&c.supports.flag||(gfunction(){c.readyCallback()},b.addEventListener?(b.addEventListener(DOMContentLoaded,g,!1),a.addEventListener(load,g,!1)):(a.attachEvent(onload,g),b.attachEvent(onreadystatechange,function(){completeb.readyState&&c.readyCallback()})),fc.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings); /script> style typetext/css> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 .07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } /style> link relstylesheet idyarppWidgetCss-css href/wp-content/plugins/yet-another-related-posts-plugin/style/widget.css?ver4.3.19 typetext/css mediaall> link relstylesheet idsociablecss-css href/wp-content/plugins/sociable/css/sociable.css?ver4.3.19 typetext/css mediaall> link relstylesheet idcrayon-css href/wp-content/plugins/crayon-syntax-highlighter/css/min/crayon.min.css?ver_2.7.2_beta typetext/css mediaall> link relstylesheet idcrayon-theme-coda-special-board-css href/wp-content/plugins/crayon-syntax-highlighter/themes/coda-special-board/coda-special-board.css?ver_2.7.2_beta typetext/css mediaall> link relstylesheet idcrayon-font-monaco-css href/wp-content/plugins/crayon-syntax-highlighter/fonts/monaco.css?ver_2.7.2_beta typetext/css mediaall> link relstylesheet idbcct_style-css href/wp-content/plugins/better-click-to-tweet/assets/css/styles.css?ver3.0 typetext/css mediaall> link relstylesheet idcptch_stylesheet-css href/wp-content/plugins/captcha/css/front_end_style.css?ver4.3.0 typetext/css mediaall> link relstylesheet iddashicons-css href/wp-includes/css/dashicons.min.css?ver4.3.19 typetext/css mediaall> link relstylesheet idcptch_desktop_style-css href/wp-content/plugins/captcha/css/desktop_style.css?ver4.3.0 typetext/css mediaall> link relstylesheet idcollapseomatic-css-css href/wp-content/plugins/jquery-collapse-o-matic/light_style.css?ver1.6 typetext/css mediaall> link relstylesheet idparent-style-css href/wp-content/themes/twentythirteen/style.css?ver4.3.19 typetext/css mediaall> link relstylesheet idchild-style-css href/wp-content/themes/twentythirteen-child/style.css?ver4.3.19 typetext/css mediaall> link relstylesheet idtwentythirteen-fonts-css href//fonts.googleapis.com/css?familySource+Sans+Pro%3A300%2C400%2C700%2C300italic%2C400italic%2C700italic%7CBitter%3A400%2C700&subsetlatin%2Clatin-ext typetext/css mediaall> link relstylesheet idgenericons-css href/wp-content/themes/twentythirteen/genericons/genericons.css?ver3.03 typetext/css mediaall> link relstylesheet idtwentythirteen-style-css href/wp-content/themes/twentythirteen-child/style.css?ver2013-07-18 typetext/css mediaall> script typetext/javascript src/wp-includes/js/jquery/jquery.js?ver1.11.3>/script> script typetext/javascript src/wp-includes/js/jquery/jquery-migrate.min.js?ver1.2.1>/script> script typetext/javascript src/wp-content/plugins/sociable/js/sociable.js?ver4.3.19>/script> script typetext/javascript src/wp-content/plugins/sociable/js/vuible.js?ver4.3.19>/script> script typetext/javascript src/wp-content/plugins/sociable/js/addtofavorites.js?ver4.3.19>/script> script typetext/javascript> /* !CDATA */ var CrayonSyntaxSettings {version:_2.7.2_beta,is_admin:0,ajaxurl:http:\/\/blog.arungupta.me\/wp-admin\/admin-ajax.php,prefix:crayon-,setting:crayon-setting,selected:crayon-setting-selected,changed:crayon-setting-changed,special:crayon-setting-special,orig_value:data-orig-value,debug:}; var CrayonSyntaxStrings {copy:Press %s to Copy, %s to Paste,minimize:Click To Expand Code}; /* > */ /script> script typetext/javascript src/wp-content/plugins/crayon-syntax-highlighter/js/min/crayon.min.js?ver_2.7.2_beta>/script> link relEditURI typeapplication/rsd+xml titleRSD href/xmlrpc.php?rsd> link relwlwmanifest typeapplication/wlwmanifest+xml href/wp-includes/wlwmanifest.xml> script typetext/javascript> var base_url_sociable http://blog.arungupta.me/wp-content/plugins/sociable/ /script> script typetext/javascript srchttps://apis.google.com/js/plusone.js>/script> meta propertyog:site_name contentMiles to go 4.0 ...> meta propertyog:locale contenten_us> meta propertyog:type contentwebsite> meta propertyog:title contentMiles to go 2.0 ...> meta propertyog:url contenthttp://blog.arungupta.me> meta propertyog:description contentArun Gupta is a technology enthusiast, avid runner, author of a best-selling book, globe trotter, a community guy, Java Champion, JavaOne Rockstar, JUG Leader, Minecraft Modder, Devoxx4Kids-er, and a Red Hatter.> meta propertyog:image contenthttp://blog.arungupta.me/wp-content/uploads/2013/10/arun-feb25-2012.png> script typetext/javascript src/wp-content/plugins/wp-spamshield/js/jscripts.php>/script>/head>body classhome blog single-author>div idpage classhfeed site>header idmasthead classsite-header rolebanner>h1 classsite-title>Miles to go 4.0 …/h1>h2 classsite-description>Arun Gupta is a technology enthusiast, avid runner, author of a best-selling book, globe trotter, a community guy, Java Champion, JavaOne Rockstar, JUG Leader, Minecraft Modder, NetBeans Dream Teamer, Devoxx4Kids-er, Docker Captain and works at AWS./h2>div idnavbar classnavbar>nav idsite-navigation classnavigation main-navigation rolenavigation>button classmenu-toggle>Menu/button> a classscreen-reader-text skip-link href#content titleSkip to content>Skip to content/a>div classmenu-main-menu-container>ul idprimary-menu classnav-menu>li idmenu-item-11257 classmenu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-11257>a href/>Home/a>/li>li idmenu-item-11258 classmenu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-11258>a href/about/>About/a>ul classsub-menu>li idmenu-item-11259 classmenu-item menu-item-type-post_type menu-item-object-page menu-item-11259>a href/about/photos/>Photos/a>/li>li idmenu-item-11260 classmenu-item menu-item-type-post_type menu-item-object-page menu-item-11260>a href/about/speaking-credentials/>Speaking Credentials/a>/li>li idmenu-item-12744 classmenu-item menu-item-type-post_type menu-item-object-page menu-item-12744>a href/about/races/>Races/a>/li>/ul>/li>li idmenu-item-11264 classmenu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-11264>a href/books/>My Books & Videos/a>ul classsub-menu>li idmenu-item-14629 classmenu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-14629>a href/books/>My Books/a>ul classsub-menu>li idmenu-item-14238 classmenu-item menu-item-type-post_type menu-item-object-page menu-item-14238>a href/books/docker-for-java-developers/>Docker for Java Developers/a>/li>li idmenu-item-12721 classmenu-item menu-item-type-post_type menu-item-object-page menu-item-12721>a href/books/minecraft-modding-forge/>Minecraft Modding with Forge/a>/li>li idmenu-item-11266 classmenu-item menu-item-type-post_type menu-item-object-page menu-item-11266>a href/books/java-ee-7-essentials/>Java EE 7 Essentials/a>/li>li idmenu-item-11915 classmenu-item menu-item-type-post_type menu-item-object-page menu-item-11915>a href/books/javaee7-html5-enterprise-application-development/>Java EE 7 and HTML5 Enterprise Application Development/a>/li>li idmenu-item-11265 classmenu-item menu-item-type-post_type menu-item-object-page menu-item-11265>a href/books/java-ee-6-pocket-guide/>Java EE 6 Pocket Guide/a>/li>/ul>/li>li idmenu-item-14628 classmenu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-14628>a href/my-video-courses/>My Video Courses/a>ul classsub-menu>li idmenu-item-14636 classmenu-item menu-item-type-post_type menu-item-object-page menu-item-14636>a href/my-video-courses/docker-for-java-play-by-play/>Docker for Java Play by Play (Pluralsight)/a>/li>li idmenu-item-12205 classmenu-item menu-item-type-post_type menu-item-object-page menu-item-12205>a href/my-video-courses/javaee7-video-course/>Java EE 7 Video Course/a>/li>/ul>/li>/ul>/li>li idmenu-item-14702 classmenu-item menu-item-type-post_type menu-item-object-page menu-item-14702>a href/talks/>Talks/a>/li>li idmenu-item-12043 classmenu-item menu-item-type-post_type menu-item-object-page menu-item-12043>a href/devoxx4kids/>Devoxx4Kids/a>/li>li idmenu-item-12042 classmenu-item menu-item-type-post_type menu-item-object-page menu-item-12042>a href/archives-3/>Archives/a>/li>/ul>/div>form rolesearch methodget classsearch-form actionhttps://blog.arungupta.me/>label>span classscreen-reader-text>Search for:/span> input typesearch classsearch-field placeholderSearch … value names titleSearch for: />/label> input typesubmit classsearch-submit valueSearch />/form>/nav>/div>/header>div idmain classsite-main>div idprimary classcontent-area>div idcontent classsite-content rolemain>article idpost-14772 classpost-14772 post type-post status-publish format-standard hentry category-containers tag-containers tag-kubernetes>header classentry-header>h1 classentry-title>a href/gossip-kubernetes-aws-kops/ relbookmark>Gossip-based Kubernetes Cluster on AWS using Kops/a>/h1>div classentry-meta>span classdate>a href/gossip-kubernetes-aws-kops/ titlePermalink to Gossip-based Kubernetes Cluster on AWS using Kops relbookmark>time classentry-date datetime2017-06-22T12:26:33+00:00>June 22, 2017/time>/a>/span>span classcategories-links>a href/topics/containers/ relcategory tag>containers/a>/span>span classtags-links>a href/tag/containers/ reltag>containers/a>, a href/tag/kubernetes/ reltag>kubernetes/a>/span>span classauthor vcard>a classurl fn n href/author/admin/ titleView all posts by arungupta relauthor>arungupta/a>/span>/div>/header>div classentry-content>p>a href/multimaster-kubernetes-cluster-amazon-kops/>Creating a Kubernetes cluster using Kops/a> requires a top-level domain or a sub domain and setting up Route 53 hosted zones. This domain allows the worker nodes to discover the master and the master to discover all the etcd servers. This is also needed for code>kubectl/code> to be able to talk directly with the master. This worked well but an additional hassle for the developers./p>p>a href/wp-content/uploads/2015/01/kubernetes-logo.png>img classalignnone wp-image-12277 src/wp-content/uploads/2015/01/kubernetes-logo.png altKubernetes Logo width199 height176 />/a>/p>p>Kops 1.6.2 adds an experimental support for gossip-based, uses Weave Mesh, discovery of nodes. This makes the process of setting up Kubernetes cluster using Kops DNS-free, and much more simplified./p>p>Let’s take a look!/p>ol>li>Install or upgrade kops:br />div idcrayon-5cfd1e54a596c414064959 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>brew upgrade kops/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54a596c414064959-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a596c414064959-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54a596c414064959-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54a596c414064959-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a596c414064959-2>span classcrayon-e>brew/span> span classcrayon-e>upgrade/span> span classcrayon-i>kops/span>/div>div classcrayon-line idcrayon-5cfd1e54a596c414064959-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>/li>li>Check the version:br />div idcrayon-5cfd1e54a598d188624303 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>~ $ kops versionVersion 1.6.2/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54a598d188624303-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a598d188624303-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54a598d188624303-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a598d188624303-4>4/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54a598d188624303-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a598d188624303-2>span classcrayon-o>~/span> span classcrayon-h>/span>span classcrayon-sy>$/span> span classcrayon-h>/span>span classcrayon-e>kops/span> span classcrayon-e>version/span>/div>div classcrayon-line idcrayon-5cfd1e54a598d188624303-3>span classcrayon-i>Version/span> span classcrayon-h>/span>span classcrayon-cn>1.6.2/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a598d188624303-4> /div>/div>/td>/tr>/tbody>/table>/div>/div>/li>li>Create an S3 bucket as “state store”:br />div idcrayon-5cfd1e54a599b224070792 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>aws s3api create-bucket --bucket kubernetes-arungupta-meexport KOPS_STATE_STOREs3://kubernetes-arungupta-me/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54a599b224070792-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a599b224070792-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54a599b224070792-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a599b224070792-4>4/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54a599b224070792-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a599b224070792-2>span classcrayon-e>aws/span> span classcrayon-e>s3api/span> span classcrayon-v>create/span>span classcrayon-o>-/span>span classcrayon-v>bucket/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-e>bucket/span> span classcrayon-v>kubernetes/span>span classcrayon-o>-/span>span classcrayon-v>arungupta/span>span classcrayon-o>-/span>span classcrayon-e>me/span>/div>div classcrayon-line idcrayon-5cfd1e54a599b224070792-3>span classcrayon-e>export/span> span classcrayon-v>KOPS_STATE_STORE/span>span classcrayon-o>/span>span classcrayon-v>s3/span>span classcrayon-o>:/span>span classcrayon-c>//kubernetes-arungupta-me/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a599b224070792-4> /div>/div>/td>/tr>/tbody>/table>/div>/div>/li>li>Create a Kubernetes cluster:br />div idcrayon-5cfd1e54a59aa602709216 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>kops create cluster cluster.k8s.local --zones us-east-1a --yes/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54a59aa602709216-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59aa602709216-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54a59aa602709216-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54a59aa602709216-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59aa602709216-2>span classcrayon-e>kops/span> span classcrayon-e>create/span> span classcrayon-e>cluster/span> span classcrayon-v>cluster/span>span classcrayon-sy>./span>span classcrayon-v>k8s/span>span classcrayon-sy>./span>span classcrayon-v>local/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-e>zones/span> span classcrayon-v>us/span>span classcrayon-o>-/span>span classcrayon-v>east/span>span classcrayon-o>-/span>span classcrayon-cn>1a/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-i>yes/span>/div>div classcrayon-line idcrayon-5cfd1e54a59aa602709216-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>It shows the output as:br />div idcrayon-5cfd1e54a59c9396210486 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>I0622 16:52:07.494558 83656 create_cluster.go:655 Inferred --cloudaws from zone us-east-1aI0622 16:52:07.495012 83656 create_cluster.go:841 Using SSH public key: /Users/argu/.ssh/id_rsa.pubI0622 16:52:08.540445 83656 subnets.go:183 Assigned CIDR 172.20.32.0/19 to subnet us-east-1aI0622 16:52:16.327523 83656 apply_cluster.go:396 Gossip DNS: skipping DNS validationI0622 16:52:25.539755 83656 executor.go:91 Tasks: 0 done / 67 total; 32 can runI0622 16:52:29.843320 83656 vfs_castore.go:422 Issuing new certificate: kubecfgI0622 16:52:30.108046 83656 vfs_castore.go:422 Issuing new certificate: kubeletI0622 16:52:30.139629 83656 vfs_castore.go:422 Issuing new certificate: kube-schedulerI0622 16:52:31.072229 83656 vfs_castore.go:422 Issuing new certificate: kube-proxyI0622 16:52:31.082560 83656 vfs_castore.go:422 Issuing new certificate: kube-controller-managerI0622 16:52:31.579158 83656 vfs_castore.go:422 Issuing new certificate: kopsI0622 16:52:32.742807 83656 executor.go:91 Tasks: 32 done / 67 total; 13 can runI0622 16:52:43.057189 83656 executor.go:91 Tasks: 45 done / 67 total; 18 can runI0622 16:52:50.047375 83656 executor.go:91 Tasks: 63 done / 67 total; 3 can runI0622 16:53:02.047610 83656 vfs_castore.go:422 Issuing new certificate: masterI0622 16:53:03.027007 83656 executor.go:91 Tasks: 66 done / 67 total; 1 can runI0622 16:53:04.197637 83656 executor.go:91 Tasks: 67 done / 67 total; 0 can runI0622 16:53:04.884362 83656 update_cluster.go:229 Exporting kubecfg for clusterKops has set your kubectl context to cluster.k8s.localCluster is starting. It should be ready in a few minutes.Suggestions: * validate cluster: kops validate cluster * list nodes: kubectl get nodes --show-labels * ssh to the master: ssh -i ~/.ssh/id_rsa admin@api.cluster.k8s.localThe admin user is specific to Debian. If not using Debian please use the appropriate user based on your OS. * read about installing addons: https://github.com/kubernetes/kops/blob/master/docs/addons.md/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54a59c9396210486-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59c9396210486-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54a59c9396210486-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59c9396210486-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54a59c9396210486-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59c9396210486-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54a59c9396210486-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59c9396210486-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54a59c9396210486-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59c9396210486-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54a59c9396210486-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59c9396210486-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54a59c9396210486-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59c9396210486-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54a59c9396210486-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59c9396210486-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54a59c9396210486-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59c9396210486-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54a59c9396210486-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59c9396210486-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54a59c9396210486-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59c9396210486-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54a59c9396210486-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59c9396210486-24>24/div>div classcrayon-num data-linecrayon-5cfd1e54a59c9396210486-25>25/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59c9396210486-26>26/div>div classcrayon-num data-linecrayon-5cfd1e54a59c9396210486-27>27/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59c9396210486-28>28/div>div classcrayon-num data-linecrayon-5cfd1e54a59c9396210486-29>29/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59c9396210486-30>30/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54a59c9396210486-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59c9396210486-2>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>52/span>span classcrayon-o>:/span>span classcrayon-cn>07.494558/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>create_cluster/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>655/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-v>Inferred/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>cloud/span>span classcrayon-o>/span>span classcrayon-e>aws/span> span classcrayon-e>from/span> span classcrayon-i>zone/span> span classcrayon-h>/span>span classcrayon-s>us-east-1a/span>/div>div classcrayon-line idcrayon-5cfd1e54a59c9396210486-3>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>52/span>span classcrayon-o>:/span>span classcrayon-cn>07.495012/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>create_cluster/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>841/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-e>Using/span> span classcrayon-e>SSH/span> span classcrayon-m>public/span> span classcrayon-h>/span>span classcrayon-v>key/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>Users/span>span classcrayon-o>//span>span classcrayon-v>argu/span>span classcrayon-o>//span>span classcrayon-sy>./span>span classcrayon-v>ssh/span>span classcrayon-o>//span>span classcrayon-v>id_rsa/span>span classcrayon-sy>./span>span classcrayon-e>pub/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59c9396210486-4>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>52/span>span classcrayon-o>:/span>span classcrayon-cn>08.540445/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>subnets/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>183/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-e>Assigned/span> span classcrayon-i>CIDR/span> span classcrayon-h>/span>span classcrayon-cn>172.20.32.0/span>span classcrayon-o>//span>span classcrayon-cn>19/span> span classcrayon-h>/span>span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>subnet/span> span classcrayon-v>us/span>span classcrayon-o>-/span>span classcrayon-v>east/span>span classcrayon-o>-/span>span classcrayon-cn>1a/span>/div>div classcrayon-line idcrayon-5cfd1e54a59c9396210486-5>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>52/span>span classcrayon-o>:/span>span classcrayon-cn>16.327523/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>apply_cluster/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>396/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-e>Gossip/span> span classcrayon-v>DNS/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>skipping/span> span classcrayon-e>DNS/span> span classcrayon-e>validation/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59c9396210486-6>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>52/span>span classcrayon-o>:/span>span classcrayon-cn>25.539755/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>executor/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>91/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-v>Tasks/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>0/span> span classcrayon-h>/span>span classcrayon-v>done/span> span classcrayon-h>/span>span classcrayon-o>//span> span classcrayon-h>/span>span classcrayon-cn>67/span> span classcrayon-h>/span>span classcrayon-v>total/span>span classcrayon-sy>;/span> span classcrayon-h>/span>span classcrayon-cn>32/span> span classcrayon-h>/span>span classcrayon-e>can/span> span classcrayon-e>run/span>/div>div classcrayon-line idcrayon-5cfd1e54a59c9396210486-7>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>52/span>span classcrayon-o>:/span>span classcrayon-cn>29.843320/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>vfs_castore/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>422/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-e>Issuing/span> span classcrayon-r>new/span> span classcrayon-h>/span>span classcrayon-v>certificate/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>kubecfg/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59c9396210486-8>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>52/span>span classcrayon-o>:/span>span classcrayon-cn>30.108046/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>vfs_castore/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>422/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-e>Issuing/span> span classcrayon-r>new/span> span classcrayon-h>/span>span classcrayon-v>certificate/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>kubelet/span>/div>div classcrayon-line idcrayon-5cfd1e54a59c9396210486-9>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>52/span>span classcrayon-o>:/span>span classcrayon-cn>30.139629/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>vfs_castore/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>422/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-e>Issuing/span> span classcrayon-r>new/span> span classcrayon-h>/span>span classcrayon-v>certificate/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>kube-scheduler/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59c9396210486-10>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>52/span>span classcrayon-o>:/span>span classcrayon-cn>31.072229/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>vfs_castore/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>422/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-e>Issuing/span> span classcrayon-r>new/span> span classcrayon-h>/span>span classcrayon-v>certificate/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>kube-proxy/span>/div>div classcrayon-line idcrayon-5cfd1e54a59c9396210486-11>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>52/span>span classcrayon-o>:/span>span classcrayon-cn>31.082560/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>vfs_castore/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>422/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-e>Issuing/span> span classcrayon-r>new/span> span classcrayon-h>/span>span classcrayon-v>certificate/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>kube-controller-manager/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59c9396210486-12>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>52/span>span classcrayon-o>:/span>span classcrayon-cn>31.579158/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>vfs_castore/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>422/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-e>Issuing/span> span classcrayon-r>new/span> span classcrayon-h>/span>span classcrayon-v>certificate/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>kops/span>/div>div classcrayon-line idcrayon-5cfd1e54a59c9396210486-13>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>52/span>span classcrayon-o>:/span>span classcrayon-cn>32.742807/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>executor/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>91/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-v>Tasks/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>32/span> span classcrayon-h>/span>span classcrayon-v>done/span> span classcrayon-h>/span>span classcrayon-o>//span> span classcrayon-h>/span>span classcrayon-cn>67/span> span classcrayon-h>/span>span classcrayon-v>total/span>span classcrayon-sy>;/span> span classcrayon-h>/span>span classcrayon-cn>13/span> span classcrayon-h>/span>span classcrayon-e>can/span> span classcrayon-e>run/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59c9396210486-14>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>52/span>span classcrayon-o>:/span>span classcrayon-cn>43.057189/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>executor/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>91/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-v>Tasks/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>45/span> span classcrayon-h>/span>span classcrayon-v>done/span> span classcrayon-h>/span>span classcrayon-o>//span> span classcrayon-h>/span>span classcrayon-cn>67/span> span classcrayon-h>/span>span classcrayon-v>total/span>span classcrayon-sy>;/span> span classcrayon-h>/span>span classcrayon-cn>18/span> span classcrayon-h>/span>span classcrayon-e>can/span> span classcrayon-e>run/span>/div>div classcrayon-line idcrayon-5cfd1e54a59c9396210486-15>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>52/span>span classcrayon-o>:/span>span classcrayon-cn>50.047375/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>executor/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>91/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-v>Tasks/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>63/span> span classcrayon-h>/span>span classcrayon-v>done/span> span classcrayon-h>/span>span classcrayon-o>//span> span classcrayon-h>/span>span classcrayon-cn>67/span> span classcrayon-h>/span>span classcrayon-v>total/span>span classcrayon-sy>;/span> span classcrayon-h>/span>span classcrayon-cn>3/span> span classcrayon-h>/span>span classcrayon-e>can/span> span classcrayon-e>run/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59c9396210486-16>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>53/span>span classcrayon-o>:/span>span classcrayon-cn>02.047610/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>vfs_castore/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>422/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-e>Issuing/span> span classcrayon-r>new/span> span classcrayon-h>/span>span classcrayon-v>certificate/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>master/span>/div>div classcrayon-line idcrayon-5cfd1e54a59c9396210486-17>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>53/span>span classcrayon-o>:/span>span classcrayon-cn>03.027007/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>executor/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>91/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-v>Tasks/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>66/span> span classcrayon-h>/span>span classcrayon-v>done/span> span classcrayon-h>/span>span classcrayon-o>//span> span classcrayon-h>/span>span classcrayon-cn>67/span> span classcrayon-h>/span>span classcrayon-v>total/span>span classcrayon-sy>;/span> span classcrayon-h>/span>span classcrayon-cn>1/span> span classcrayon-h>/span>span classcrayon-e>can/span> span classcrayon-e>run/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59c9396210486-18>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>53/span>span classcrayon-o>:/span>span classcrayon-cn>04.197637/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>executor/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>91/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-v>Tasks/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>67/span> span classcrayon-h>/span>span classcrayon-v>done/span> span classcrayon-h>/span>span classcrayon-o>//span> span classcrayon-h>/span>span classcrayon-cn>67/span> span classcrayon-h>/span>span classcrayon-v>total/span>span classcrayon-sy>;/span> span classcrayon-h>/span>span classcrayon-cn>0/span> span classcrayon-h>/span>span classcrayon-e>can/span> span classcrayon-e>run/span>/div>div classcrayon-line idcrayon-5cfd1e54a59c9396210486-19>span classcrayon-i>I0622/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>53/span>span classcrayon-o>:/span>span classcrayon-cn>04.884362/span>span classcrayon-h> /span> span classcrayon-cn>83656/span> span classcrayon-h>/span>span classcrayon-v>update_cluster/span>span classcrayon-sy>./span>span classcrayon-v>go/span>span classcrayon-o>:/span>span classcrayon-cn>229/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-e>Exporting/span> span classcrayon-e>kubecfg/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-e>cluster/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59c9396210486-20>span classcrayon-e>Kops/span> span classcrayon-e>has/span> span classcrayon-e>set/span> span classcrayon-e>your/span> span classcrayon-e>kubectl/span> span classcrayon-e>context/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-v>cluster/span>span classcrayon-sy>./span>span classcrayon-v>k8s/span>span classcrayon-sy>./span>span classcrayon-e>local/span>/div>div classcrayon-line idcrayon-5cfd1e54a59c9396210486-21> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59c9396210486-22>span classcrayon-e>Cluster/span> span classcrayon-st>is/span> span classcrayon-h>/span>span classcrayon-v>starting/span>span classcrayon-sy>./span>span classcrayon-h> /span>span classcrayon-e>It/span> span classcrayon-e>should/span> span classcrayon-e>be/span> span classcrayon-e>ready/span> span classcrayon-st>in/span> span classcrayon-h>/span>span classcrayon-i>a/span> span classcrayon-h>/span>span classcrayon-e>few/span> span classcrayon-v>minutes/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54a59c9396210486-23> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59c9396210486-24>span classcrayon-v>Suggestions/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54a59c9396210486-25>span classcrayon-h>/span>span classcrayon-o>*/span> span classcrayon-h>/span>span classcrayon-e>validate/span> span classcrayon-v>cluster/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>kops/span> span classcrayon-e>validate/span> span classcrayon-e>cluster/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59c9396210486-26>span classcrayon-e>*/span> span classcrayon-h>/span>span classcrayon-e>list/span> span classcrayon-v>nodes/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>kubectl/span> span classcrayon-e>get/span> span classcrayon-v>nodes/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>show/span>span classcrayon-o>-/span>span classcrayon-e>labels/span>/div>div classcrayon-line idcrayon-5cfd1e54a59c9396210486-27>span classcrayon-e>*/span> span classcrayon-h>/span>span classcrayon-e>ssh/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>the/span> span classcrayon-v>master/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>ssh/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>i/span> span classcrayon-h>/span>span classcrayon-o>~/span>span classcrayon-o>//span>span classcrayon-sy>./span>span classcrayon-v>ssh/span>span classcrayon-o>//span>span classcrayon-e>id_rsa/span> span classcrayon-v>admin/span>span classcrayon-sy>@/span>span classcrayon-v>api/span>span classcrayon-sy>./span>span classcrayon-v>cluster/span>span classcrayon-sy>./span>span classcrayon-v>k8s/span>span classcrayon-sy>./span>span classcrayon-e>local/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59c9396210486-28>span classcrayon-e>The/span> span classcrayon-e>admin/span> span classcrayon-e>user/span> span classcrayon-st>is/span> span classcrayon-h>/span>span classcrayon-e>specific/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-v>Debian/span>span classcrayon-sy>./span> span classcrayon-h>/span>span classcrayon-st>If/span> span classcrayon-h>/span>span classcrayon-st>not/span> span classcrayon-h>/span>span classcrayon-e>using/span> span classcrayon-e>Debian/span> span classcrayon-e>please/span> span classcrayon-st>use/span> span classcrayon-h>/span>span classcrayon-e>the/span> span classcrayon-e>appropriate/span> span classcrayon-e>user/span> span classcrayon-e>based/span> span classcrayon-e>on/span> span classcrayon-e>your/span> span classcrayon-v>OS/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54a59c9396210486-29>span classcrayon-h>/span>span classcrayon-o>*/span> span classcrayon-h>/span>span classcrayon-e>read/span> span classcrayon-e>about/span> span classcrayon-e>installing/span> span classcrayon-v>addons/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>https/span>span classcrayon-o>:/span>span classcrayon-c>//github.com/kubernetes/kops/blob/master/docs/addons.md/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59c9396210486-30> /div>/div>/td>/tr>/tbody>/table>/div>/div>Wait for a few minutes for the cluster to be created./li>li>Validate the cluster:br />div idcrayon-5cfd1e54a59dc480606943 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>~ $ kops validate clusterUsing cluster from kubectl context: cluster.k8s.localValidating cluster cluster.k8s.localINSTANCE GROUPSNAME ROLE MACHINETYPE MIN MAX SUBNETSmaster-us-east-1a Master m3.medium 1 1 us-east-1anodes Node t2.medium 2 2 us-east-1aNODE STATUSNAME ROLE READYip-172-20-36-52.ec2.internal node Trueip-172-20-38-117.ec2.internal master Trueip-172-20-49-179.ec2.internal node TrueYour cluster cluster.k8s.local is ready/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54a59dc480606943-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59dc480606943-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54a59dc480606943-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59dc480606943-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54a59dc480606943-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59dc480606943-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54a59dc480606943-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59dc480606943-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54a59dc480606943-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59dc480606943-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54a59dc480606943-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59dc480606943-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54a59dc480606943-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59dc480606943-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54a59dc480606943-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59dc480606943-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54a59dc480606943-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59dc480606943-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54a59dc480606943-19>19/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54a59dc480606943-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59dc480606943-2>span classcrayon-o>~/span> span classcrayon-h>/span>span classcrayon-sy>$/span> span classcrayon-h>/span>span classcrayon-e>kops/span> span classcrayon-e>validate/span> span classcrayon-e>cluster/span>/div>div classcrayon-line idcrayon-5cfd1e54a59dc480606943-3>span classcrayon-e>Using/span> span classcrayon-e>cluster/span> span classcrayon-e>from/span> span classcrayon-e>kubectl/span> span classcrayon-v>context/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>cluster/span>span classcrayon-sy>./span>span classcrayon-v>k8s/span>span classcrayon-sy>./span>span classcrayon-e>local/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59dc480606943-4> /div>div classcrayon-line idcrayon-5cfd1e54a59dc480606943-5>span classcrayon-e>Validating/span> span classcrayon-e>cluster/span> span classcrayon-v>cluster/span>span classcrayon-sy>./span>span classcrayon-v>k8s/span>span classcrayon-sy>./span>span classcrayon-e>local/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59dc480606943-6> /div>div classcrayon-line idcrayon-5cfd1e54a59dc480606943-7>span classcrayon-e>INSTANCE/span> span classcrayon-e>GROUPS/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59dc480606943-8>span classcrayon-e>NAME /span>span classcrayon-e>ROLE /span>span classcrayon-e>MACHINETYPE /span>span classcrayon-e>MIN /span>span classcrayon-e>MAX /span>span classcrayon-e>SUBNETS/span>/div>div classcrayon-line idcrayon-5cfd1e54a59dc480606943-9>span classcrayon-v>master/span>span classcrayon-o>-/span>span classcrayon-v>us/span>span classcrayon-o>-/span>span classcrayon-v>east/span>span classcrayon-o>-/span>span classcrayon-cn>1a/span>span classcrayon-h> /span>span classcrayon-e>Master /span>span classcrayon-v>m3/span>span classcrayon-sy>./span>span classcrayon-i>medium/span>span classcrayon-h> /span>span classcrayon-cn>1/span>span classcrayon-h> /span>span classcrayon-cn>1/span>span classcrayon-h> /span>span classcrayon-v>us/span>span classcrayon-o>-/span>span classcrayon-v>east/span>span classcrayon-o>-/span>span classcrayon-cn>1a/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59dc480606943-10>span classcrayon-e>nodes /span>span classcrayon-e>Node /span>span classcrayon-v>t2/span>span classcrayon-sy>./span>span classcrayon-i>medium/span>span classcrayon-h> /span>span classcrayon-cn>2/span>span classcrayon-h> /span>span classcrayon-cn>2/span>span classcrayon-h> /span>span classcrayon-v>us/span>span classcrayon-o>-/span>span classcrayon-v>east/span>span classcrayon-o>-/span>span classcrayon-cn>1a/span>/div>div classcrayon-line idcrayon-5cfd1e54a59dc480606943-11> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59dc480606943-12>span classcrayon-e>NODE/span> span classcrayon-e>STATUS/span>/div>div classcrayon-line idcrayon-5cfd1e54a59dc480606943-13>span classcrayon-e>NAME /span>span classcrayon-e>ROLE /span>span classcrayon-e>READY/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59dc480606943-14>span classcrayon-v>ip/span>span classcrayon-o>-/span>span classcrayon-cn>172/span>span classcrayon-o>-/span>span classcrayon-cn>20/span>span classcrayon-o>-/span>span classcrayon-cn>36/span>span classcrayon-o>-/span>span classcrayon-cn>52.ec2.internal/span>span classcrayon-h> /span>span classcrayon-e>node /span>span classcrayon-t>True/span>/div>div classcrayon-line idcrayon-5cfd1e54a59dc480606943-15>span classcrayon-v>ip/span>span classcrayon-o>-/span>span classcrayon-cn>172/span>span classcrayon-o>-/span>span classcrayon-cn>20/span>span classcrayon-o>-/span>span classcrayon-cn>38/span>span classcrayon-o>-/span>span classcrayon-cn>117.ec2.internal/span>span classcrayon-h> /span>span classcrayon-e>master /span>span classcrayon-t>True/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59dc480606943-16>span classcrayon-v>ip/span>span classcrayon-o>-/span>span classcrayon-cn>172/span>span classcrayon-o>-/span>span classcrayon-cn>20/span>span classcrayon-o>-/span>span classcrayon-cn>49/span>span classcrayon-o>-/span>span classcrayon-cn>179.ec2.internal/span>span classcrayon-h> /span>span classcrayon-e>node /span>span classcrayon-t>True/span>/div>div classcrayon-line idcrayon-5cfd1e54a59dc480606943-17> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59dc480606943-18>span classcrayon-e>Your/span> span classcrayon-e>cluster/span> span classcrayon-v>cluster/span>span classcrayon-sy>./span>span classcrayon-v>k8s/span>span classcrayon-sy>./span>span classcrayon-e>local/span> span classcrayon-st>is/span> span classcrayon-h>/span>span classcrayon-i>ready/span>/div>div classcrayon-line idcrayon-5cfd1e54a59dc480606943-19> /div>/div>/td>/tr>/tbody>/table>/div>/div>/li>li>Get the list of nodes using code>kubectl/code>:br />div idcrayon-5cfd1e54a59eb775445534 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>~ $ kubectl get nodesNAME STATUS AGE VERSIONip-172-20-36-52.ec2.internal Ready,node 4h v1.6.2ip-172-20-38-117.ec2.internal Ready,master 4h v1.6.2ip-172-20-49-179.ec2.internal Ready,node 4h v1.6.2/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54a59eb775445534-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59eb775445534-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54a59eb775445534-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59eb775445534-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54a59eb775445534-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59eb775445534-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54a59eb775445534-7>7/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54a59eb775445534-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59eb775445534-2>span classcrayon-o>~/span> span classcrayon-h>/span>span classcrayon-sy>$/span> span classcrayon-h>/span>span classcrayon-e>kubectl/span> span classcrayon-e>get/span> span classcrayon-e>nodes/span>/div>div classcrayon-line idcrayon-5cfd1e54a59eb775445534-3>span classcrayon-e>NAME /span>span classcrayon-e>STATUS /span> span classcrayon-e>AGE /span> span classcrayon-e>VERSION/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59eb775445534-4>span classcrayon-v>ip/span>span classcrayon-o>-/span>span classcrayon-cn>172/span>span classcrayon-o>-/span>span classcrayon-cn>20/span>span classcrayon-o>-/span>span classcrayon-cn>36/span>span classcrayon-o>-/span>span classcrayon-cn>52.ec2.internal/span>span classcrayon-h> /span>span classcrayon-v>Ready/span>span classcrayon-sy>,/span>span classcrayon-i>node/span>span classcrayon-h> /span> span classcrayon-cn>4h/span>span classcrayon-h> /span>span classcrayon-v>v1/span>span classcrayon-sy>./span>span classcrayon-cn>6.2/span>/div>div classcrayon-line idcrayon-5cfd1e54a59eb775445534-5>span classcrayon-v>ip/span>span classcrayon-o>-/span>span classcrayon-cn>172/span>span classcrayon-o>-/span>span classcrayon-cn>20/span>span classcrayon-o>-/span>span classcrayon-cn>38/span>span classcrayon-o>-/span>span classcrayon-cn>117.ec2.internal/span>span classcrayon-h> /span> span classcrayon-v>Ready/span>span classcrayon-sy>,/span>span classcrayon-i>master/span>span classcrayon-h> /span> span classcrayon-cn>4h/span>span classcrayon-h> /span>span classcrayon-v>v1/span>span classcrayon-sy>./span>span classcrayon-cn>6.2/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59eb775445534-6>span classcrayon-v>ip/span>span classcrayon-o>-/span>span classcrayon-cn>172/span>span classcrayon-o>-/span>span classcrayon-cn>20/span>span classcrayon-o>-/span>span classcrayon-cn>49/span>span classcrayon-o>-/span>span classcrayon-cn>179.ec2.internal/span>span classcrayon-h> /span> span classcrayon-v>Ready/span>span classcrayon-sy>,/span>span classcrayon-i>node/span>span classcrayon-h> /span> span classcrayon-cn>4h/span>span classcrayon-h> /span>span classcrayon-v>v1/span>span classcrayon-sy>./span>span classcrayon-cn>6.2/span>/div>div classcrayon-line idcrayon-5cfd1e54a59eb775445534-7> /div>/div>/td>/tr>/tbody>/table>/div>/div>/li>li>Deleting a cluster is pretty straight forward as well:br />div idcrayon-5cfd1e54a59fa447195170 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>kops delete cluster cluster.k8s.local --yes/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54a59fa447195170-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a59fa447195170-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54a59fa447195170-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54a59fa447195170-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a59fa447195170-2>span classcrayon-e>kops/span> span classcrayon-e>delete/span> span classcrayon-e>cluster/span> span classcrayon-v>cluster/span>span classcrayon-sy>./span>span classcrayon-v>k8s/span>span classcrayon-sy>./span>span classcrayon-v>local/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-i>yes/span>/div>div classcrayon-line idcrayon-5cfd1e54a59fa447195170-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>/li>/ol>p>That’s it!/p>p>github.com/arun-gupta/kubernetes-java-sample provide several examples of getting started with Kubernetes./p>p>File issues at github.com/kubernetes/kops/issues./p>p> /p>/div>footer classentry-meta>div classcomments-link>a href/gossip-kubernetes-aws-kops/#comments>View all 29 comments/a>/div>/footer>/article>article idpost-14733 classpost-14733 post type-post status-publish format-standard hentry category-conferences>header classentry-header>h1 classentry-title>a href/devoxx-cloud-containers-infrastructure-track/ relbookmark>Devoxx Belgium 2017 – Submit Talks for Cloud, Containers and Infrastructure Track/a>/h1>div classentry-meta>span classdate>a href/devoxx-cloud-containers-infrastructure-track/ titlePermalink to Devoxx Belgium 2017 – Submit Talks for Cloud, Containers and Infrastructure Track relbookmark>time classentry-date datetime2017-06-09T17:13:34+00:00>June 9, 2017/time>/a>/span>span classcategories-links>a href/topics/conferences/ relcategory tag>conferences/a>/span>span classauthor vcard>a classurl fn n href/author/admin/ titleView all posts by arungupta relauthor>arungupta/a>/span>/div>/header>div classentry-content>p>Devoxx Belgium is the one of the finest developer conferences in Europe. This year it’s running from Nov 6-10 in Antwerp, Belgium. I certainly have the privilege of being involved with the conference for a several years now./p>p>img classalignnone size-large wp-image-14734 src/wp-content/uploads/2017/06/devoxx-be-2017-1024x510.png altdevoxx-be-2017 width604 height301 />/p>p>What are some of the cool things about this conference?/p>ul>li>Rock star speakers from around the world with 3 hrs Deep Dive sessions, Conference Session, Birds of Feather, Hands-on Lab, Ignite, Quickie and of course an inspiring opening and closing keynote./li>li>Pioneers of theater-style seating – This not only provides comfortable seatingbr />for each attendee but the screens are very clearly visible to everybody in the room./li>li>All talks recorded and released on youtube./li>li>No need to pre-register for a session, just show up and watch. If you miss it, then just watch the replay on youtube later./li>li>Community votes on whiteboard – Attendees gets a chance to vote on topics ranging from their favorite non-Java language, operating system, or anything you like./li>li>Thursday night movie/li>li>Fries with mayo/li>li>Belgian beer and chocolates/li>li>We are called Devoxxians!/li>/ul>p>I’m sure there are other cool things that can be said img src/wp-includes/images/smilies/simple-smile.png alt:) classwp-smiley styleheight: 1em; max-height: 1em; />/p>p>iframe width604 height340 srchttps://www.youtube.com/embed/o_FcPr-xyNc?featureoembed frameborder0 allowfullscreenallowfullscreen>/iframe>/p>p>Conference’s Call for Papers (called as Call for Passion) is running. There are multiple tracks:/p>ul>li>Big Data & Machine Learning/li>li>Cloud, Containers & Infrastructure/li>li>Mind the Geek/li>li>Java Language/li>li>Programming Languages/li>li>Methodology & Culture/li>li>Mobile & IOT/li>li>Architecture & Security/li>li>Server-side Java/li>li>Modern Web/li>/ul>p>Descriptions for each track is explained at cfp.devoxx.be./p>p>I’m helping with the Cloud, Containers and Infrastructure track. Here are some suggested topics that we are looking in that track:/p>ul>li>FaaS + Serverless (101, 201, 301, debugging dev/test, different cloud providers)/li>li>Serverless in Production (ideally from a customer, different cloud providers)/li>li>Latest deep dive on Docker, Kubernetes, ECS, DC/OS/li>li>Setting up container pipeline using Chef/Puppet/Salt/Ansible/li>li>Continuous Delivery of Microservices using Containers/li>li>Microservices using Netflix OSS/li>li>Docker and Java (cores, memory, packaging, base image etc)/li>li>gRPC/li>li>Service discovery in microservices (different approaches, w/ and w/o containers –/li>li>Prometheus, NewRelic, DataDog, Weave, etc)/li>li>Monitoring containers in production/li>li>Migrating from VMs to Containers/li>li>Design patterns and Anti-patterns/li>li>Gotchas, Tips & Tricks for AWS, Google Cloud, Azure and other providers/li>li>Any other topic that you feel is relevant/li>/ul>p>Make the job of the program committee extremely difficult. CFP ends Jul 7./p>p>Submit your passion today!/p>/div>footer classentry-meta>div classcomments-link>a href/devoxx-cloud-containers-infrastructure-track/#comments>View all 13 comments/a>/div>/footer>/article>article idpost-14693 classpost-14693 post type-post status-publish format-standard hentry category-containers category-java category-techtip tag-docker tag-image tag-java>header classentry-header>h1 classentry-title>a href/smaller-java-image-docker-multi-stage-build/ relbookmark>Creating Smaller Java Image using Docker Multi-stage Build/a>/h1>div classentry-meta>span classdate>a href/smaller-java-image-docker-multi-stage-build/ titlePermalink to Creating Smaller Java Image using Docker Multi-stage Build relbookmark>time classentry-date datetime2017-04-21T23:05:04+00:00>April 21, 2017/time>/a>/span>span classcategories-links>a href/topics/containers/ relcategory tag>containers/a>, a href/topics/java/ relcategory tag>java/a>, a href/topics/techtip/ relcategory tag>techtip/a>/span>span classtags-links>a href/tag/docker/ reltag>docker/a>, a href/tag/image/ reltag>image/a>, a href/tag/java/ reltag>java/a>/span>span classauthor vcard>a classurl fn n href/author/admin/ titleView all posts by arungupta relauthor>arungupta/a>/span>/div>/header>div classentry-content>p>Two of the announcements at DockerCon 2017 directly relevant to Java developers are:/p>ul>li>Docker Multi-stage build/li>li>Oracle JRE in Docker Store/li>/ul>p>This blog explains the purpose of Docker multi-stage build and provide examples of how they help us generate smaller and more efficient Java Docker images./p>p>a href/wp-content/uploads/2017/04/multi-stage-build.jpg>img classalignnone size-full wp-image-14707 src/wp-content/uploads/2017/04/multi-stage-build.jpg altDocker Multi-stage Build width924 height488 />/a>/p>p>Just show me the code: github.com/arun-gupta/docker-java-multistage./p>h2>What is the issue?/h2>p>Building a Docker image for a Java application typically involves building the application and package the generated artifact into an image. A Java developer would likely use Maven or Gradle to build a JAR or WAR file. If you are using the Maven base image to build the application then it will download the required dependencies from the configured repositories and keep them in the image. The number of JARs in the local repository could be significant depending upon the number of dependencies in the code>pom.xml/code>. This could leave a lot of cruft in the image./p>p>Let’s take a look at a sample Dockerfile:/p>div idcrayon-5cfd1e54a8705436777452 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>FROM maven:3.5-jdk-8COPY src /usr/src/myapp/srcCOPY pom.xml /usr/src/myappRUN mvn -f /usr/src/myapp/pom.xml clean packageENV WILDFLY_VERSION 10.1.0.FinalENV WILDFLY_HOME /usrRUN cd $WILDFLY_HOME && curl http://download.jboss.org/wildfly/$WILDFLY_VERSION/wildfly-$WILDFLY_VERSION.tar.gz | tar zx && mv $WILDFLY_HOME/wildfly-$WILDFLY_VERSION $WILDFLY_HOME/wildflyRUN cp /usr/src/myapp/target/people-1.0-SNAPSHOT.war $WILDFLY_HOME/wildfly/standalone/deployments/people.warEXPOSE 8080CMD /usr/wildfly/bin/standalone.sh, -b, 0.0.0.0/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54a8705436777452-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a8705436777452-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54a8705436777452-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a8705436777452-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54a8705436777452-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a8705436777452-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54a8705436777452-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a8705436777452-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54a8705436777452-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a8705436777452-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54a8705436777452-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a8705436777452-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54a8705436777452-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a8705436777452-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54a8705436777452-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a8705436777452-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54a8705436777452-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a8705436777452-18>18/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54a8705436777452-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a8705436777452-2>span classcrayon-e>FROM/span> span classcrayon-v>maven/span>span classcrayon-o>:/span>span classcrayon-cn>3.5/span>span classcrayon-o>-/span>span classcrayon-v>jdk/span>span classcrayon-o>-/span>span classcrayon-cn>8/span>/div>div classcrayon-line idcrayon-5cfd1e54a8705436777452-3> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a8705436777452-4>span classcrayon-e>COPY/span> span classcrayon-v>src/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>usr/span>span classcrayon-o>//span>span classcrayon-v>src/span>span classcrayon-o>//span>span classcrayon-v>myapp/span>span classcrayon-o>//span>span classcrayon-e>src/span>/div>div classcrayon-line idcrayon-5cfd1e54a8705436777452-5>span classcrayon-e>COPY/span> span classcrayon-v>pom/span>span classcrayon-sy>./span>span classcrayon-v>xml/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>usr/span>span classcrayon-o>//span>span classcrayon-v>src/span>span classcrayon-o>//span>span classcrayon-e>myapp/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a8705436777452-6>span classcrayon-e>RUN/span> span classcrayon-v>mvn/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>f/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>usr/span>span classcrayon-o>//span>span classcrayon-v>src/span>span classcrayon-o>//span>span classcrayon-v>myapp/span>span classcrayon-o>//span>span classcrayon-v>pom/span>span classcrayon-sy>./span>span classcrayon-e>xml/span> span classcrayon-e>clean/span> span classcrayon-t>package/span>/div>div classcrayon-line idcrayon-5cfd1e54a8705436777452-7> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a8705436777452-8>span classcrayon-e>ENV/span> span classcrayon-v>WILDFLY/span>span classcrayon-sy>_/span>VERSION span classcrayon-h>/span>span classcrayon-cn>10.1.0.Final/span>/div>div classcrayon-line idcrayon-5cfd1e54a8705436777452-9>span classcrayon-e>ENV/span> span classcrayon-v>WILDFLY_HOME/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-e>usr/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a8705436777452-10> /div>div classcrayon-line idcrayon-5cfd1e54a8705436777452-11>span classcrayon-e>RUN/span> span classcrayon-i>cd/span> span classcrayon-h>/span>span classcrayon-sy>$/span>span classcrayon-v>WILDFLY_HOME/span> span classcrayon-h>/span>span classcrayon-o>&&/span> span classcrayon-h>/span>span classcrayon-e>curl/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//download.jboss.org/wildfly/$WILDFLY_VERSION/wildfly-$WILDFLY_VERSION.tar.gz | tar zx && mv $WILDFLY_HOME/wildfly-$WILDFLY_VERSION $WILDFLY_HOME/wildfly/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a8705436777452-12> /div>div classcrayon-line idcrayon-5cfd1e54a8705436777452-13>span classcrayon-e>RUN/span> span classcrayon-v>cp/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>usr/span>span classcrayon-o>//span>span classcrayon-v>src/span>span classcrayon-o>//span>span classcrayon-v>myapp/span>span classcrayon-o>//span>span classcrayon-v>target/span>span classcrayon-o>//span>span classcrayon-v>people/span>span classcrayon-o>-/span>span classcrayon-cn>1.0/span>span classcrayon-o>-/span>span classcrayon-v>SNAPSHOT/span>span classcrayon-sy>./span>span classcrayon-i>war/span> span classcrayon-h>/span>span classcrayon-sy>$/span>span classcrayon-v>WILDFLY_HOME/span>span classcrayon-o>//span>span classcrayon-v>wildfly/span>span classcrayon-o>//span>span classcrayon-v>standalone/span>span classcrayon-o>//span>span classcrayon-v>deployments/span>span classcrayon-o>//span>span classcrayon-v>people/span>span classcrayon-sy>./span>span classcrayon-e>war/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a8705436777452-14> /div>div classcrayon-line idcrayon-5cfd1e54a8705436777452-15>span classcrayon-i>EXPOSE/span> span classcrayon-h>/span>span classcrayon-cn>8080/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a8705436777452-16> /div>div classcrayon-line idcrayon-5cfd1e54a8705436777452-17>span classcrayon-i>CMD/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-s>/usr/wildfly/bin/standalone.sh/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-s>-b/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-s>0.0.0.0/span>span classcrayon-sy>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a8705436777452-18> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>In this Dockerfile:/p>ul>li>code>maven:3.5-jdk-8/code> is used as the base image/li>li>Application source code is copied to the image/li>li>Maven is used to build the application artifact/li>li>WildFly is downloaded and installed/li>li>Generated artifact is copied to the code>deployments/code> directory of WildFly/li>li>Finally, WildFly is started/li>/ul>p>There are several issues with this kind of flow:/p>ul>li>Using code>maven/code> as the base image restricts on what functionality is available in the image. This requires WildFly to be downloaded and configured explicitly./li>li>Building the artifact downloads all Maven dependencies. These stay in the image and are not needed at runtime. This causes an unnecessary bloat in the image size at runtime./li>li>Change in WildFly version will require to update the Dockerfile. This would’ve been much easier if we could use the code>jboss/wildfly/code> base image by itself./li>li>In addition, unit tests may run before packaging the artifact and integration tests after the image is created. The test dependencies and results is again not needed to live in the production image./li>/ul>p>There are other ways to build the Docker image. For example, splitting the Dockerfile into two files. The first file will then build the artifact and copy the artifact to a common location using volume mapping. The second file will then pick up the generated artifact and then use the lean base image. This approach has also has issues where multiple Dockerfiles need to be maintained separately. Additional, there is an out-of-band hand-off between the two Dockerfiles./p>p>Let’s see how these issues are resolved with multi-stage build./p>h2>What are Docker multi-stage build?/h2>p>Multi-stage build allows multiple code>FROM/code> statements in a Dockerfile. The instructions following each code>FROM/code> statement and until the next one, creates an intermediate image. The final code>FROM/code> statement is the final base image. Artifacts from intermediate stages can be copied using code>COPY --from<image-number>/code>, starting from 0 for the first base image. The artifacts not copied over are discarded. This allows to keep the final image lean and only include the relevant artifacts./p>p>code>FROM/code> syntax is updated to specify stage name using code>as <stage-name>/code>. For example:/p>div idcrayon-5cfd1e54a8723376936816 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>FROM maven:3.5-jdk-8 as BUILD/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54a8723376936816-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a8723376936816-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54a8723376936816-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54a8723376936816-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a8723376936816-2>span classcrayon-e>FROM/span> span classcrayon-v>maven/span>span classcrayon-o>:/span>span classcrayon-cn>3.5/span>span classcrayon-o>-/span>span classcrayon-v>jdk/span>span classcrayon-o>-/span>span classcrayon-cn>8/span> span classcrayon-h>/span>span classcrayon-st>as/span> span classcrayon-h>/span>span classcrayon-i>BUILD/span>/div>div classcrayon-line idcrayon-5cfd1e54a8723376936816-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>This allows to use the stage name instead of the number with code>--from/code> option./p>p>Let’s take a look at a sample Dockerfile:/p>div idcrayon-5cfd1e54a8731900192470 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>FROM maven:3.5-jdk-8 as BUILDCOPY src /usr/src/myapp/srcCOPY pom.xml /usr/src/myappRUN mvn -f /usr/src/myapp/pom.xml clean packageFROM jboss/wildfly:10.1.0.FinalCOPY --fromBUILD /usr/src/myapp/target/people-1.0-SNAPSHOT.war /opt/jboss/wildfly/standalone/deployments/people.war/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54a8731900192470-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a8731900192470-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54a8731900192470-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a8731900192470-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54a8731900192470-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a8731900192470-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54a8731900192470-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a8731900192470-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54a8731900192470-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54a8731900192470-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54a8731900192470-11>11/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54a8731900192470-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a8731900192470-2>span classcrayon-e>FROM/span> span classcrayon-v>maven/span>span classcrayon-o>:/span>span classcrayon-cn>3.5/span>span classcrayon-o>-/span>span classcrayon-v>jdk/span>span classcrayon-o>-/span>span classcrayon-cn>8/span> span classcrayon-h>/span>span classcrayon-st>as/span> span classcrayon-h>/span>span classcrayon-e>BUILD/span>/div>div classcrayon-line idcrayon-5cfd1e54a8731900192470-3> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a8731900192470-4>span classcrayon-e>COPY/span> span classcrayon-v>src/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>usr/span>span classcrayon-o>//span>span classcrayon-v>src/span>span classcrayon-o>//span>span classcrayon-v>myapp/span>span classcrayon-o>//span>span classcrayon-e>src/span>/div>div classcrayon-line idcrayon-5cfd1e54a8731900192470-5>span classcrayon-e>COPY/span> span classcrayon-v>pom/span>span classcrayon-sy>./span>span classcrayon-v>xml/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>usr/span>span classcrayon-o>//span>span classcrayon-v>src/span>span classcrayon-o>//span>span classcrayon-e>myapp/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a8731900192470-6>span classcrayon-e>RUN/span> span classcrayon-v>mvn/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>f/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>usr/span>span classcrayon-o>//span>span classcrayon-v>src/span>span classcrayon-o>//span>span classcrayon-v>myapp/span>span classcrayon-o>//span>span classcrayon-v>pom/span>span classcrayon-sy>./span>span classcrayon-e>xml/span> span classcrayon-e>clean/span> span classcrayon-t>package/span>/div>div classcrayon-line idcrayon-5cfd1e54a8731900192470-7> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a8731900192470-8>span classcrayon-e>FROM/span> span classcrayon-v>jboss/span>span classcrayon-o>//span>span classcrayon-v>wildfly/span>span classcrayon-o>:/span>span classcrayon-cn>10.1.0.Final/span>/div>div classcrayon-line idcrayon-5cfd1e54a8731900192470-9> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54a8731900192470-10>span classcrayon-v>COPY/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>from/span>span classcrayon-o>/span>span classcrayon-v>BUILD/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>usr/span>span classcrayon-o>//span>span classcrayon-v>src/span>span classcrayon-o>//span>span classcrayon-v>myapp/span>span classcrayon-o>//span>span classcrayon-v>target/span>span classcrayon-o>//span>span classcrayon-v>people/span>span classcrayon-o>-/span>span classcrayon-cn>1.0/span>span classcrayon-o>-/span>span classcrayon-v>SNAPSHOT/span>span classcrayon-sy>./span>span classcrayon-v>war/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>opt/span>span classcrayon-o>//span>span classcrayon-v>jboss/span>span classcrayon-o>//span>span classcrayon-v>wildfly/span>span classcrayon-o>//span>span classcrayon-v>standalone/span>span classcrayon-o>//span>span classcrayon-v>deployments/span>span classcrayon-o>//span>span classcrayon-v>people/span>span classcrayon-sy>./span>span classcrayon-i>war/span>/div>div classcrayon-line idcrayon-5cfd1e54a8731900192470-11> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>In this Dockerfile:/p>ul>li>There are two code>FROM/code> instructions. This means this is a two-stage build./li>li>code>maven:3.5-jdk-8/code> is the base image for the first build. This is used to build the WAR file for the application. The first stage is named as code>BUILD/code>./li>li>code>jboss/wildfly:10.1.0.Final/code> is the second and the final base image for the build. WAR file generated in the first stage is copied over to this stage using code>COPY --from/code> syntax. The file is directly copied in the WildFly deployments directory./li>/ul>p>Let’s take a look at what are some of the advantages of this approach./p>h2>Advantages of Docker multi-stage build/h2>ul>li>One Dockerfile has the entire build process defined. There is no need to have separate Dockerfiles and then coordinate transfer of artifact between “build” Dockerfile and “run” Dockerfile using volume mapping./li>li>Base image for the final image can be chosen appropriately to meet the runtime needs. This helps with reduction of the overall size of the runtime image. Additionally, the cruft from build time is discarded during intermediate stage./li>li>Standard WildFly base image is used instead of downloading and configuring the distribution manually. This makes it a lot easier to update the image if a newer tag is released./li>/ul>p>Size of the image built using a single Dockerfile is 816MB. In contrast, the size of the image built using multi-stage build is 584MB./p>p>a href/wp-content/uploads/2017/04/multi-stage-docker-java-image.png>img classalignnone size-large wp-image-14709 src/wp-content/uploads/2017/04/multi-stage-docker-java-image-1024x89.png altDocker Multi-stage Java Image width604 height52 />/a>/p>p>So, using a multi-stage helps create a much smaller image./p>p>Is this a typical way of building Docker image? Are there other ways by which the image size can be reduced?/p>p>Sure, you can use code>docker-maven-plugin/code> as shown at github.com/arun-gupta/docker-java-sample to build/test the image locally and then push to repo. But this mechanism allows you to generate and package artifact without any other dependency, including Java./p>p>Sure, code>maven:jdk-8-alpine/code> image can be used to create a smaller image. But then you’ll have to create or find a WildFly image built using code>jdk-8-alpine/code>, or something similar, as well. But the cruft, such as maven repository, two Dockerfiles, sharing of artifact using volume mapping or some other similar technique would still be there./p>p>There are other ways to craft your build cycle. But if you are using Dockerfile to build your artifact then you should seriously consider multi-stage builds./p>p>Read more discussion in PR #31257./p>p>As mentioned earlier, the complete code for this is available at github.com/arun-gupta/docker-java-multistage./p>p>Sign up for Docker Online Meetup to get a DockerCon 2017 recap./p>/div>footer classentry-meta>div classcomments-link>a href/smaller-java-image-docker-multi-stage-build/#comments>View all 24 comments/a>/div>/footer>/article>article idpost-14679 classpost-14679 post type-post status-publish format-standard hentry category-containers category-techtip tag-docker tag-osx tag-windows>header classentry-header>h1 classentry-title>a href/docker-remote-api-mac-windows-osx/ relbookmark>Docker Remote API on Windows and OSX/a>/h1>div classentry-meta>span classdate>a href/docker-remote-api-mac-windows-osx/ titlePermalink to Docker Remote API on Windows and OSX relbookmark>time classentry-date datetime2017-04-16T20:43:24+00:00>April 16, 2017/time>/a>/span>span classcategories-links>a href/topics/containers/ relcategory tag>containers/a>, a href/topics/techtip/ relcategory tag>techtip/a>/span>span classtags-links>a href/tag/docker/ reltag>docker/a>, a href/tag/osx/ reltag>osx/a>, a href/tag/windows/ reltag>windows/a>/span>span classauthor vcard>a classurl fn n href/author/admin/ titleView all posts by arungupta relauthor>arungupta/a>/span>/div>/header>div classentry-content>p>There are multiple ways to monitor Docker containers./p>ul>li>Docker CLI provides the code>docker container stats/code> API that gives basic information about the running containers./li>li>Docker Remote API provides more detailed information about the containers./li>li>Starting with Docker 1.13, there is an experimental feature with a Prometheus endpoint/li>li>cAdvisor is an open source tool that provides last container usage and performance characteristics. This data can be stored in a time series database, such as InfluxDB. This data can then be shown in a fancy graph using a Kibana dashboard./li>/ul>p>These options were covered in detail in an a href/monitoring-docker-containers-stats-cadvisor-universal-control-plane/>earlier blog/a>./p>p>There are other commercial options like Docker EE, Sysdig, Datadog, New Relic, App Dynamics and others. If you are running containers on AWS, then CloudWatch can provide integrated monitoring./p>p>OSX is my primary development platform. But recently, I needed a way to monitor Docker containers using the Remote API (aka REST API) on a Windows machine. The output of the REST API is exactly same independent of the operating system. But the way to access the Docker REST API using code>curl/code> is different on an OSX and a Windows machine. This blog will explain how to exactly access this API on these two operating systems./p>p>Check out 1.27 swagger specification to learn more about the capabilities of the REST API. A nicer and a more readable version of the API can be seen using Swagger UI. This is broken until #32649 is fixed./p>p>Complete details about how the REST API corresponds to different Docker versions is explained in Docker REST API Versioning./p>p>We’ll dig into this a bit later but first let’s take a look on how this API can be accessed./p>h2>Docker Remote API on OSX/h2>p>On OSX, code>curl/code> connects using a Unix domain socket as shown:/p>div idcrayon-5cfd1e54aad96550574235 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>curl --unix-sock /var/run/docker.sock http://localhost/containers/<name-or-id>/stats/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aad96550574235-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aad96550574235-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aad96550574235-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aad96550574235-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aad96550574235-2>span classcrayon-v>curl/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>unix/span>span classcrayon-o>-/span>span classcrayon-v>sock/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-t>var/span>span classcrayon-o>//span>span classcrayon-v>run/span>span classcrayon-o>//span>span classcrayon-v>docker/span>span classcrayon-sy>./span>span classcrayon-e>sock/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//localhost/containers/<name-or-id>/stats/span>/div>div classcrayon-line idcrayon-5cfd1e54aad96550574235-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>A WildFly container can be started as:/p>div idcrayon-5cfd1e54aadaf964260416 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker run --name web -d jboss/wildfly/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aadaf964260416-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadaf964260416-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aadaf964260416-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aadaf964260416-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadaf964260416-2>span classcrayon-e>docker/span> span classcrayon-v>run/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-e>name/span> span classcrayon-v>web/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>d/span> span classcrayon-h>/span>span classcrayon-v>jboss/span>span classcrayon-o>//span>span classcrayon-i>wildfly/span>/div>div classcrayon-line idcrayon-5cfd1e54aadaf964260416-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Stats can then be obtained using the command:/p>div idcrayon-5cfd1e54aadbd220222984 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>curl --unix-socket /var/run/docker.sock http://localhost/containers/web/stats/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aadbd220222984-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadbd220222984-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aadbd220222984-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aadbd220222984-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadbd220222984-2>span classcrayon-v>curl/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>unix/span>span classcrayon-o>-/span>span classcrayon-v>socket/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-t>var/span>span classcrayon-o>//span>span classcrayon-v>run/span>span classcrayon-o>//span>span classcrayon-v>docker/span>span classcrayon-sy>./span>span classcrayon-e>sock/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//localhost/containers/web/stats/span>/div>div classcrayon-line idcrayon-5cfd1e54aadbd220222984-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>This will start printing stats as:/p>div idcrayon-5cfd1e54aadcb571419828 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>span classcrayon-language>JavaScript/span>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>{ read:2017-04-16T21:25:06.99499178Z, preread:0001-01-01T00:00:00Z, pids_stats:{ current:40 }, blkio_stats:{ io_service_bytes_recursive: { major:8, minor:0, op:Read, value:0 }, { major:8, minor:0, op:Write, value:4096 }, { major:8, minor:0, op:Sync, value:0 }, { major:8, minor:0, op:Async, value:4096 }, { major:8, minor:0, op:Total, value:4096 } , io_serviced_recursive: { major:8, minor:0, op:Read, value:0 }, { major:8, minor:0, op:Write, value:1 }, { major:8, minor:0, op:Sync, value:0 }, { major:8, minor:0, op:Async, value:1 }, { major:8, minor:0, op:Total, value:1 } , io_queue_recursive: , io_service_time_recursive: , io_wait_time_recursive: , io_merged_recursive: , io_time_recursive: , sectors_recursive: }, num_procs:0, storage_stats:{ }, cpu_stats:{ cpu_usage:{ total_usage:9569101779, percpu_usage: 4920699125, 4648402654 , usage_in_kernelmode:1050000000, usage_in_usermode:7730000000 }, system_cpu_usage:5431500000000, online_cpus:2, throttling_data:{ periods:0, throttled_periods:0, throttled_time:0 } }, precpu_stats:{ cpu_usage:{ total_usage:0, usage_in_kernelmode:0, usage_in_usermode:0 }, throttling_data:{ periods:0, throttled_periods:0, throttled_time:0 } }, memory_stats:{ usage:266448896, max_usage:285159424, stats:{ active_anon:241647616, active_file:90112, cache:225280, dirty:20480, hierarchical_memory_limit:9223372036854772000, hierarchical_memsw_limit:9223372036854772000, inactive_anon:20971520, inactive_file:135168, mapped_file:32768, pgfault:81529, pgmajfault:1, pgpgin:76795, pgpgout:12624, rss:262619136, rss_huge:0, swap:57344, total_active_anon:241647616, total_active_file:90112, total_cache:225280, total_dirty:20480, total_inactive_anon:20971520, total_inactive_file:135168, total_mapped_file:32768, total_pgfault:81529, total_pgmajfault:1, total_pgpgin:76795, total_pgpgout:12624, total_rss:262619136, total_rss_huge:0, total_swap:57344, total_unevictable:0, total_writeback:0, unevictable:0, writeback:0 }, limit:2096181248 }, name:/web, id:b6ad4af36f05ce100877d2d60c72e01b87f3627682e4492e7abe2a099b709953, networks:{ eth0:{ rx_bytes:2764, rx_packets:50, rx_errors:0, rx_dropped:0, tx_bytes:0, tx_packets:0, tx_errors:0, tx_dropped:0 } }}/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-24>24/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-25>25/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-26>26/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-27>27/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-28>28/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-29>29/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-30>30/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-31>31/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-32>32/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-33>33/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-34>34/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-35>35/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-36>36/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-37>37/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-38>38/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-39>39/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-40>40/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-41>41/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-42>42/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-43>43/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-44>44/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-45>45/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-46>46/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-47>47/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-48>48/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-49>49/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-50>50/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-51>51/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-52>52/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-53>53/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-54>54/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-55>55/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-56>56/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-57>57/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-58>58/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-59>59/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-60>60/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-61>61/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-62>62/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-63>63/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-64>64/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-65>65/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-66>66/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-67>67/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-68>68/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-69>69/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-70>70/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-71>71/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-72>72/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-73>73/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-74>74/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-75>75/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-76>76/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-77>77/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-78>78/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-79>79/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-80>80/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-81>81/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-82>82/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-83>83/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-84>84/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-85>85/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-86>86/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-87>87/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-88>88/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-89>89/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-90>90/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-91>91/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-92>92/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-93>93/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-94>94/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-95>95/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-96>96/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-97>97/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-98>98/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-99>99/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-100>100/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-101>101/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-102>102/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-103>103/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-104>104/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-105>105/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-106>106/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-107>107/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-108>108/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-109>109/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-110>110/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-111>111/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-112>112/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-113>113/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-114>114/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-115>115/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-116>116/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-117>117/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-118>118/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-119>119/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-120>120/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-121>121/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-122>122/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-123>123/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-124>124/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-125>125/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-126>126/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-127>127/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-128>128/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-129>129/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-130>130/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-131>131/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-132>132/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-133>133/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-134>134/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-135>135/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-136>136/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-137>137/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-138>138/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-139>139/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-140>140/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-141>141/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-142>142/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-143>143/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-144>144/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-145>145/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-146>146/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-147>147/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-148>148/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-149>149/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-150>150/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-151>151/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-152>152/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-153>153/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-154>154/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-155>155/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-156>156/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-157>157/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-158>158/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-159>159/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-160>160/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-161>161/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-162>162/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-163>163/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-164>164/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-165>165/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-166>166/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-167>167/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-168>168/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-169>169/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-170>170/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-171>171/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-172>172/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-173>173/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-174>174/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-175>175/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-176>176/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-177>177/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-178>178/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-179>179/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-180>180/div>div classcrayon-num data-linecrayon-5cfd1e54aadcb571419828-181>181/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadcb571419828-182>182/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-2>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-3>span classcrayon-h> /span> span classcrayon-s>read/span>span classcrayon-o>:/span>span classcrayon-s>2017-04-16T21:25:06.99499178Z/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-4>span classcrayon-h> /span> span classcrayon-s>preread/span>span classcrayon-o>:/span>span classcrayon-s>0001-01-01T00:00:00Z/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-5>span classcrayon-h> /span> span classcrayon-s>pids_stats/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-6>span classcrayon-h> /span>span classcrayon-s>current/span>span classcrayon-o>:/span>span classcrayon-cn>40/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-7>span classcrayon-h> /span> span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-8>span classcrayon-h> /span> span classcrayon-s>blkio_stats/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-9>span classcrayon-h> /span>span classcrayon-s>io_service_bytes_recursive/span>span classcrayon-o>:/span>span classcrayon-sy>/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-10>span classcrayon-h> /span> span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-11>span classcrayon-h> /span>span classcrayon-s>major/span>span classcrayon-o>:/span>span classcrayon-cn>8/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-12>span classcrayon-h> /span>span classcrayon-s>minor/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-13>span classcrayon-h> /span>span classcrayon-s>op/span>span classcrayon-o>:/span>span classcrayon-s>Read/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-14>span classcrayon-h> /span>span classcrayon-s>value/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-15>span classcrayon-h> /span> span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-16>span classcrayon-h> /span> span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-17>span classcrayon-h> /span>span classcrayon-s>major/span>span classcrayon-o>:/span>span classcrayon-cn>8/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-18>span classcrayon-h> /span>span classcrayon-s>minor/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-19>span classcrayon-h> /span>span classcrayon-s>op/span>span classcrayon-o>:/span>span classcrayon-s>Write/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-20>span classcrayon-h> /span>span classcrayon-s>value/span>span classcrayon-o>:/span>span classcrayon-cn>4096/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-21>span classcrayon-h> /span> span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-22>span classcrayon-h> /span> span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-23>span classcrayon-h> /span>span classcrayon-s>major/span>span classcrayon-o>:/span>span classcrayon-cn>8/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-24>span classcrayon-h> /span>span classcrayon-s>minor/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-25>span classcrayon-h> /span>span classcrayon-s>op/span>span classcrayon-o>:/span>span classcrayon-s>Sync/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-26>span classcrayon-h> /span>span classcrayon-s>value/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-27>span classcrayon-h> /span> span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-28>span classcrayon-h> /span> span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-29>span classcrayon-h> /span>span classcrayon-s>major/span>span classcrayon-o>:/span>span classcrayon-cn>8/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-30>span classcrayon-h> /span>span classcrayon-s>minor/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-31>span classcrayon-h> /span>span classcrayon-s>op/span>span classcrayon-o>:/span>span classcrayon-s>Async/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-32>span classcrayon-h> /span>span classcrayon-s>value/span>span classcrayon-o>:/span>span classcrayon-cn>4096/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-33>span classcrayon-h> /span> span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-34>span classcrayon-h> /span> span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-35>span classcrayon-h> /span>span classcrayon-s>major/span>span classcrayon-o>:/span>span classcrayon-cn>8/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-36>span classcrayon-h> /span>span classcrayon-s>minor/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-37>span classcrayon-h> /span>span classcrayon-s>op/span>span classcrayon-o>:/span>span classcrayon-s>Total/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-38>span classcrayon-h> /span>span classcrayon-s>value/span>span classcrayon-o>:/span>span classcrayon-cn>4096/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-39>span classcrayon-h> /span> span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-40>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-41>span classcrayon-h> /span>span classcrayon-s>io_serviced_recursive/span>span classcrayon-o>:/span>span classcrayon-sy>/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-42>span classcrayon-h> /span> span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-43>span classcrayon-h> /span>span classcrayon-s>major/span>span classcrayon-o>:/span>span classcrayon-cn>8/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-44>span classcrayon-h> /span>span classcrayon-s>minor/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-45>span classcrayon-h> /span>span classcrayon-s>op/span>span classcrayon-o>:/span>span classcrayon-s>Read/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-46>span classcrayon-h> /span>span classcrayon-s>value/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-47>span classcrayon-h> /span> span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-48>span classcrayon-h> /span> span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-49>span classcrayon-h> /span>span classcrayon-s>major/span>span classcrayon-o>:/span>span classcrayon-cn>8/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-50>span classcrayon-h> /span>span classcrayon-s>minor/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-51>span classcrayon-h> /span>span classcrayon-s>op/span>span classcrayon-o>:/span>span classcrayon-s>Write/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-52>span classcrayon-h> /span>span classcrayon-s>value/span>span classcrayon-o>:/span>span classcrayon-cn>1/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-53>span classcrayon-h> /span> span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-54>span classcrayon-h> /span> span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-55>span classcrayon-h> /span>span classcrayon-s>major/span>span classcrayon-o>:/span>span classcrayon-cn>8/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-56>span classcrayon-h> /span>span classcrayon-s>minor/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-57>span classcrayon-h> /span>span classcrayon-s>op/span>span classcrayon-o>:/span>span classcrayon-s>Sync/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-58>span classcrayon-h> /span>span classcrayon-s>value/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-59>span classcrayon-h> /span> span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-60>span classcrayon-h> /span> span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-61>span classcrayon-h> /span>span classcrayon-s>major/span>span classcrayon-o>:/span>span classcrayon-cn>8/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-62>span classcrayon-h> /span>span classcrayon-s>minor/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-63>span classcrayon-h> /span>span classcrayon-s>op/span>span classcrayon-o>:/span>span classcrayon-s>Async/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-64>span classcrayon-h> /span>span classcrayon-s>value/span>span classcrayon-o>:/span>span classcrayon-cn>1/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-65>span classcrayon-h> /span> span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-66>span classcrayon-h> /span> span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-67>span classcrayon-h> /span>span classcrayon-s>major/span>span classcrayon-o>:/span>span classcrayon-cn>8/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-68>span classcrayon-h> /span>span classcrayon-s>minor/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-69>span classcrayon-h> /span>span classcrayon-s>op/span>span classcrayon-o>:/span>span classcrayon-s>Total/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-70>span classcrayon-h> /span>span classcrayon-s>value/span>span classcrayon-o>:/span>span classcrayon-cn>1/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-71>span classcrayon-h> /span> span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-72>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-73>span classcrayon-h> /span>span classcrayon-s>io_queue_recursive/span>span classcrayon-o>:/span>span classcrayon-sy>/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-74> /div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-75>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-76>span classcrayon-h> /span>span classcrayon-s>io_service_time_recursive/span>span classcrayon-o>:/span>span classcrayon-sy>/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-77> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-78>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-79>span classcrayon-h> /span>span classcrayon-s>io_wait_time_recursive/span>span classcrayon-o>:/span>span classcrayon-sy>/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-80> /div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-81>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-82>span classcrayon-h> /span>span classcrayon-s>io_merged_recursive/span>span classcrayon-o>:/span>span classcrayon-sy>/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-83> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-84>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-85>span classcrayon-h> /span>span classcrayon-s>io_time_recursive/span>span classcrayon-o>:/span>span classcrayon-sy>/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-86> /div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-87>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-88>span classcrayon-h> /span>span classcrayon-s>sectors_recursive/span>span classcrayon-o>:/span>span classcrayon-sy>/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-89> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-90>span classcrayon-h> /span>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-91>span classcrayon-h> /span> span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-92>span classcrayon-h> /span> span classcrayon-s>num_procs/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-93>span classcrayon-h> /span> span classcrayon-s>storage_stats/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-94> /div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-95>span classcrayon-h> /span> span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-96>span classcrayon-h> /span> span classcrayon-s>cpu_stats/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-97>span classcrayon-h> /span>span classcrayon-s>cpu_usage/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-98>span classcrayon-h> /span> span classcrayon-s>total_usage/span>span classcrayon-o>:/span>span classcrayon-cn>9569101779/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-99>span classcrayon-h> /span> span classcrayon-s>percpu_usage/span>span classcrayon-o>:/span>span classcrayon-sy>/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-100>span classcrayon-h> /span>span classcrayon-cn>4920699125/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-101>span classcrayon-h> /span>span classcrayon-cn>4648402654/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-102>span classcrayon-h> /span> span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-103>span classcrayon-h> /span> span classcrayon-s>usage_in_kernelmode/span>span classcrayon-o>:/span>span classcrayon-cn>1050000000/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-104>span classcrayon-h> /span> span classcrayon-s>usage_in_usermode/span>span classcrayon-o>:/span>span classcrayon-cn>7730000000/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-105>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-106>span classcrayon-h> /span>span classcrayon-s>system_cpu_usage/span>span classcrayon-o>:/span>span classcrayon-cn>5431500000000/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-107>span classcrayon-h> /span>span classcrayon-s>online_cpus/span>span classcrayon-o>:/span>span classcrayon-cn>2/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-108>span classcrayon-h> /span>span classcrayon-s>throttling_data/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-109>span classcrayon-h> /span> span classcrayon-s>periods/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-110>span classcrayon-h> /span> span classcrayon-s>throttled_periods/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-111>span classcrayon-h> /span> span classcrayon-s>throttled_time/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-112>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-113>span classcrayon-h> /span> span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-114>span classcrayon-h> /span> span classcrayon-s>precpu_stats/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-115>span classcrayon-h> /span>span classcrayon-s>cpu_usage/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-116>span classcrayon-h> /span> span classcrayon-s>total_usage/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-117>span classcrayon-h> /span> span classcrayon-s>usage_in_kernelmode/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-118>span classcrayon-h> /span> span classcrayon-s>usage_in_usermode/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-119>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-120>span classcrayon-h> /span>span classcrayon-s>throttling_data/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-121>span classcrayon-h> /span> span classcrayon-s>periods/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-122>span classcrayon-h> /span> span classcrayon-s>throttled_periods/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-123>span classcrayon-h> /span> span classcrayon-s>throttled_time/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-124>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-125>span classcrayon-h> /span> span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-126>span classcrayon-h> /span> span classcrayon-s>memory_stats/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-127>span classcrayon-h> /span>span classcrayon-s>usage/span>span classcrayon-o>:/span>span classcrayon-cn>266448896/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-128>span classcrayon-h> /span>span classcrayon-s>max_usage/span>span classcrayon-o>:/span>span classcrayon-cn>285159424/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-129>span classcrayon-h> /span>span classcrayon-s>stats/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-130>span classcrayon-h> /span> span classcrayon-s>active_anon/span>span classcrayon-o>:/span>span classcrayon-cn>241647616/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-131>span classcrayon-h> /span> span classcrayon-s>active_file/span>span classcrayon-o>:/span>span classcrayon-cn>90112/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-132>span classcrayon-h> /span> span classcrayon-s>cache/span>span classcrayon-o>:/span>span classcrayon-cn>225280/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-133>span classcrayon-h> /span> span classcrayon-s>dirty/span>span classcrayon-o>:/span>span classcrayon-cn>20480/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-134>span classcrayon-h> /span> span classcrayon-s>hierarchical_memory_limit/span>span classcrayon-o>:/span>span classcrayon-cn>9223372036854772000/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-135>span classcrayon-h> /span> span classcrayon-s>hierarchical_memsw_limit/span>span classcrayon-o>:/span>span classcrayon-cn>9223372036854772000/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-136>span classcrayon-h> /span> span classcrayon-s>inactive_anon/span>span classcrayon-o>:/span>span classcrayon-cn>20971520/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-137>span classcrayon-h> /span> span classcrayon-s>inactive_file/span>span classcrayon-o>:/span>span classcrayon-cn>135168/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-138>span classcrayon-h> /span> span classcrayon-s>mapped_file/span>span classcrayon-o>:/span>span classcrayon-cn>32768/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-139>span classcrayon-h> /span> span classcrayon-s>pgfault/span>span classcrayon-o>:/span>span classcrayon-cn>81529/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-140>span classcrayon-h> /span> span classcrayon-s>pgmajfault/span>span classcrayon-o>:/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-141>span classcrayon-h> /span> span classcrayon-s>pgpgin/span>span classcrayon-o>:/span>span classcrayon-cn>76795/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-142>span classcrayon-h> /span> span classcrayon-s>pgpgout/span>span classcrayon-o>:/span>span classcrayon-cn>12624/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-143>span classcrayon-h> /span> span classcrayon-s>rss/span>span classcrayon-o>:/span>span classcrayon-cn>262619136/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-144>span classcrayon-h> /span> span classcrayon-s>rss_huge/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-145>span classcrayon-h> /span> span classcrayon-s>swap/span>span classcrayon-o>:/span>span classcrayon-cn>57344/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-146>span classcrayon-h> /span> span classcrayon-s>total_active_anon/span>span classcrayon-o>:/span>span classcrayon-cn>241647616/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-147>span classcrayon-h> /span> span classcrayon-s>total_active_file/span>span classcrayon-o>:/span>span classcrayon-cn>90112/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-148>span classcrayon-h> /span> span classcrayon-s>total_cache/span>span classcrayon-o>:/span>span classcrayon-cn>225280/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-149>span classcrayon-h> /span> span classcrayon-s>total_dirty/span>span classcrayon-o>:/span>span classcrayon-cn>20480/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-150>span classcrayon-h> /span> span classcrayon-s>total_inactive_anon/span>span classcrayon-o>:/span>span classcrayon-cn>20971520/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-151>span classcrayon-h> /span> span classcrayon-s>total_inactive_file/span>span classcrayon-o>:/span>span classcrayon-cn>135168/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-152>span classcrayon-h> /span> span classcrayon-s>total_mapped_file/span>span classcrayon-o>:/span>span classcrayon-cn>32768/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-153>span classcrayon-h> /span> span classcrayon-s>total_pgfault/span>span classcrayon-o>:/span>span classcrayon-cn>81529/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-154>span classcrayon-h> /span> span classcrayon-s>total_pgmajfault/span>span classcrayon-o>:/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-155>span classcrayon-h> /span> span classcrayon-s>total_pgpgin/span>span classcrayon-o>:/span>span classcrayon-cn>76795/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-156>span classcrayon-h> /span> span classcrayon-s>total_pgpgout/span>span classcrayon-o>:/span>span classcrayon-cn>12624/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-157>span classcrayon-h> /span> span classcrayon-s>total_rss/span>span classcrayon-o>:/span>span classcrayon-cn>262619136/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-158>span classcrayon-h> /span> span classcrayon-s>total_rss_huge/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-159>span classcrayon-h> /span> span classcrayon-s>total_swap/span>span classcrayon-o>:/span>span classcrayon-cn>57344/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-160>span classcrayon-h> /span> span classcrayon-s>total_unevictable/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-161>span classcrayon-h> /span> span classcrayon-s>total_writeback/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-162>span classcrayon-h> /span> span classcrayon-s>unevictable/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-163>span classcrayon-h> /span> span classcrayon-s>writeback/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-164>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-165>span classcrayon-h> /span>span classcrayon-s>limit/span>span classcrayon-o>:/span>span classcrayon-cn>2096181248/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-166>span classcrayon-h> /span> span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-167>span classcrayon-h> /span> span classcrayon-s>name/span>span classcrayon-o>:/span>span classcrayon-s>/web/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-168>span classcrayon-h> /span> span classcrayon-s>id/span>span classcrayon-o>:/span>span classcrayon-s>b6ad4af36f05ce100877d2d60c72e01b87f3627682e4492e7abe2a099b709953/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-169>span classcrayon-h> /span> span classcrayon-s>networks/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-170>span classcrayon-h> /span>span classcrayon-s>eth0/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-171>span classcrayon-h> /span> span classcrayon-s>rx_bytes/span>span classcrayon-o>:/span>span classcrayon-cn>2764/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-172>span classcrayon-h> /span> span classcrayon-s>rx_packets/span>span classcrayon-o>:/span>span classcrayon-cn>50/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-173>span classcrayon-h> /span> span classcrayon-s>rx_errors/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-174>span classcrayon-h> /span> span classcrayon-s>rx_dropped/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-175>span classcrayon-h> /span> span classcrayon-s>tx_bytes/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-176>span classcrayon-h> /span> span classcrayon-s>tx_packets/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-177>span classcrayon-h> /span> span classcrayon-s>tx_errors/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-178>span classcrayon-h> /span> span classcrayon-s>tx_dropped/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-179>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-180>span classcrayon-h> /span> span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54aadcb571419828-181>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadcb571419828-182> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>These stats are refreshed every second./p>p>Any other REST API can be invoked very easily with this. This is simple and straight forward./p>h2>Install Docker on Windows/h2>p>Docker installation on Windows depends on the flavor of your operating system./p>p>Are you using Windows 10+ Pro 64-bit, then use Docker for Windows./p>p>If using any older version of Windows, then you need to use Docker Toolbox./p>p>Are you installing Windows in a virtual machine? Then Virtual Box cannot be used to create the VM. This is because Virtual Box does not support nested virtualization. This is required as Docker Toolbox uses Virtual Box to create and start Docker Machine. VMWare Fusion seems to work fine here though./p>p>Now that you know that VMWare Fusion needs to be used, make sure you enable nested virtualization before starting the virtual machine./p>p>Many thanks to Stefan Scherer (@stefscherer) for helping me understand the Windows configuration details./p>p>Let’s see how the Docker REST API can now be invoked./p>h2>Docker Remote API on Windows 7/8/h2>p>This section shows how to invoke the REST API using code>curl/code> on Windows 7/8./p>p>The REST API can be invoked using code>curl/code> as shown:/p>div idcrayon-5cfd1e54aade2619803427 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>curl --cert <CERT> --cacert <CA_CERT> --key <KEY> https://localhost/containers/<name-or-id>/stats/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aade2619803427-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aade2619803427-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aade2619803427-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aade2619803427-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aade2619803427-2>span classcrayon-v>curl/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>cert/span> span classcrayon-h>/span>span classcrayon-o></span>span classcrayon-v>CERT/span>span classcrayon-o>>/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>cacert/span> span classcrayon-h>/span>span classcrayon-o></span>span classcrayon-v>CA_CERT/span>span classcrayon-o>>/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>key/span> span classcrayon-h>/span>span classcrayon-o></span>span classcrayon-v>KEY/span>span classcrayon-o>>/span> span classcrayon-h>/span>span classcrayon-v>https/span>span classcrayon-o>:/span>span classcrayon-c>//localhost/containers/<name-or-id>/stats/span>/div>div classcrayon-line idcrayon-5cfd1e54aade2619803427-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>First of all, the REST API, code>/containers/<name-or-id>/stats/code>, is exactly the same. The way this API can be invoked is a bit different./p>p>There are four differences: The first three parameters specify security credentials for the Docker Machine generated by Docker Toolbox on your Windows box:/p>ul>li>code><CERT>/code> is the SSL certificate for Docker Machine/li>li>code><CA_CERT>/code> is the Certificate Authority certificate for the Docker Machine/li>li>code><KEY>/code> is the key generated for the Docker Machine/li>/ul>p>The values of these configuration parameters is those generated by code>docker-machine/code> CLI./p>p>The last change is that the protocol is changed from code>http/code> to code>https/code>./p>p>Here is the exact command that worked on Windows 7 VM:/p>div idcrayon-5cfd1e54aadf2739492134 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>$ curl --cert /c/Users/Arun\ Gupta/.docker/machine/machines/default/cert.pem --cacert /c/Users/Arun\ Gupta/.docker/machine/machines/default/ca.pem --key /c/Users/Arun\ Gupta/.docker/machine/machines/default/key.pem https://192.168.99.100:2376/containers/web/stats/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aadf2739492134-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aadf2739492134-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aadf2739492134-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aadf2739492134-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aadf2739492134-2>span classcrayon-sy>$/span> span classcrayon-h>/span>span classcrayon-v>curl/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>cert/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>c/span>span classcrayon-o>//span>span classcrayon-v>Users/span>span classcrayon-o>//span>span classcrayon-v>Arun/span>span classcrayon-sy>\/span> span classcrayon-h>/span>span classcrayon-v>Gupta/span>span classcrayon-o>//span>span classcrayon-sy>./span>span classcrayon-v>docker/span>span classcrayon-o>//span>span classcrayon-v>machine/span>span classcrayon-o>//span>span classcrayon-v>machines/span>span classcrayon-o>//span>span classcrayon-st>default/span>span classcrayon-o>//span>span classcrayon-v>cert/span>span classcrayon-sy>./span>span classcrayon-v>pem/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>cacert/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>c/span>span classcrayon-o>//span>span classcrayon-v>Users/span>span classcrayon-o>//span>span classcrayon-v>Arun/span>span classcrayon-sy>\/span> span classcrayon-h>/span>span classcrayon-v>Gupta/span>span classcrayon-o>//span>span classcrayon-sy>./span>span classcrayon-v>docker/span>span classcrayon-o>//span>span classcrayon-v>machine/span>span classcrayon-o>//span>span classcrayon-v>machines/span>span classcrayon-o>//span>span classcrayon-st>default/span>span classcrayon-o>//span>span classcrayon-v>ca/span>span classcrayon-sy>./span>span classcrayon-v>pem/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>key/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>c/span>span classcrayon-o>//span>span classcrayon-v>Users/span>span classcrayon-o>//span>span classcrayon-v>Arun/span>span classcrayon-sy>\/span> span classcrayon-h>/span>span classcrayon-v>Gupta/span>span classcrayon-o>//span>span classcrayon-sy>./span>span classcrayon-v>docker/span>span classcrayon-o>//span>span classcrayon-v>machine/span>span classcrayon-o>//span>span classcrayon-v>machines/span>span classcrayon-o>//span>span classcrayon-st>default/span>span classcrayon-o>//span>span classcrayon-v>key/span>span classcrayon-sy>./span>span classcrayon-e>pem/span> span classcrayon-v>https/span>span classcrayon-o>:/span>span classcrayon-c>//192.168.99.100:2376/containers/web/stats/span>/div>div classcrayon-line idcrayon-5cfd1e54aadf2739492134-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>This invocation will print the exact same stats output on Windows 7 VM./p>p>Now that you know how to use this API on OSX and Windows, you can also this API to do everything that Docker CLI. This is because the Docker CLI is just a convenient wrapper over the REST API. So a code>docker container run/code> command is invoking the appropriate REST API on the Docker Host./p>h2>Docker Remote API on Windows 10/h2>p>If you are using Windows 10, then use Docker for Windows. After that, you need to figure out which code>curl/code> command to be used. There are couple of options:/p>ul>li>Use Bash shell on Windows. It has code>curl/code> command that works like Unix command that we all know pretty well. In this case, the REST API can be invoked as:br />div idcrayon-5cfd1e54aae01574416079 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>curl http://localhost:2375/containers/web/stats/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aae01574416079-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aae01574416079-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aae01574416079-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aae01574416079-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aae01574416079-2>span classcrayon-e>curl/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//localhost:2375/containers/web/stats/span>/div>div classcrayon-line idcrayon-5cfd1e54aae01574416079-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>Docker for Windows listens on port code>2375/code> on Windows./li>li>If you are Powershell user, then install code>curl/code> command as:br />div idcrayon-5cfd1e54aae0f903004498 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>choco install -u curl/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aae0f903004498-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aae0f903004498-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aae0f903004498-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aae0f903004498-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aae0f903004498-2>span classcrayon-e>choco/span> span classcrayon-v>install/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>u/span> span classcrayon-h>/span>span classcrayon-i>curl/span>/div>div classcrayon-line idcrayon-5cfd1e54aae0f903004498-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>Now the command to invoke the REST API is:br />div idcrayon-5cfd1e54aae1d980847556 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>curl.exe http://localhost:2375/containers/web/stats/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aae1d980847556-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aae1d980847556-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aae1d980847556-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aae1d980847556-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aae1d980847556-2>span classcrayon-v>curl/span>span classcrayon-sy>./span>span classcrayon-e>exe/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//localhost:2375/containers/web/stats/span>/div>div classcrayon-line idcrayon-5cfd1e54aae1d980847556-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>Note, there is a code>curl/code> alias in Powershell and that is an alias for code>Invoke-WebRequest/code>. So make sure to use code>curl.exe/code> to invoke the REST API as this is the command installed using Chocolatey./li>/ul>p>This blog provided different options of how to invoke the Docker Remote API using code>curl/code> on Windows and OSX./p>p> /p>/div>footer classentry-meta>div classcomments-link>a href/docker-remote-api-mac-windows-osx/#comments>View all 7 comments/a>/div>/footer>/article>article idpost-14660 classpost-14660 post type-post status-publish format-standard hentry category-personal tag-aws tag-couchbase>header classentry-header>h1 classentry-title>a href/bye-bye-couchbase-hello-amazon-web-services/ relbookmark>Bye Bye Couchbase, Hello Amazon Web Services!/a>/h1>div classentry-meta>span classdate>a href/bye-bye-couchbase-hello-amazon-web-services/ titlePermalink to Bye Bye Couchbase, Hello Amazon Web Services! relbookmark>time classentry-date datetime2017-04-10T05:44:01+00:00>April 10, 2017/time>/a>/span>span classcategories-links>a href/topics/personal/ relcategory tag>personal/a>/span>span classtags-links>a href/tag/aws/ reltag>aws/a>, a href/tag/couchbase/ reltag>couchbase/a>/span>span classauthor vcard>a classurl fn n href/author/admin/ titleView all posts by arungupta relauthor>arungupta/a>/span>/div>/header>div classentry-content>p>After spending a little over 18 months at Couchbase, the future is cloudy, very cloudy!/p>p>Friday, April 7th, 2017, was my last day at Couchbase. This Monday, April 10th, 2017, is my first day at Amazon./p>p>a href/wp-content/uploads/2017/04/aws.jpg>img classalignnone size-large wp-image-14668 src/wp-content/uploads/2017/04/aws-1024x768.jpg altaws width604 height453 />/a>/p>h2>What will I be doing?/h2>p>I’ll be part of the newly formed Open Source team at Amazon Web Services. I’m super excited to be working with Adrian Cockroft (@adrianco) and Zaheda Bhorat (@zahedab)./p>p>As a Principal Open Source Technologist, my initial focus will be to make sure AWS continues to be the best platform for running your containerized solutions. Yes, we’d like you to use EC2 Container Service. But if you want to use Docker, Kubernetes, DC/OS or any other open source orchestration framework, so be it! We will continue to work with our partners and the open source community, including contributing to these projects, to make sure AWS remains the best place to run your containerized workloads./p>p>In addition, there are numerous other opportunities around open source and AWS like mxnet, Blox and likely many more to be created./p>h2>Why change?/h2>p>I had a lot of fun working at a Silicon Valley startup. The amount of learning in terms of implementing the pipeline from adoption -> engagement -> monetization was immense. Working with different teams very closely, learning their machinery and helping them understand the relevance of community was quite a thrilling experience. Having significant part of the company colocated in a single location allowed a different level of interaction altogether. Working with Developer Advocacy team to meet, and quite often exceed, the metrics every month was a lot of fun./p>p>However, for those who’ve followed me speaking at conferences and read my content over the past couple of years know that I’m passionate about containers. As Oprah Winfrey said:/p>blockquote>p>Passion is energy!/p>p>Feel the power that comes from focusing on what excites you/p>/blockquote>p>This opportunity at AWS allows me to follow my heart and passion./p>p>Some other quotes that truly symbolize my state of mind at this time …/p>p>a href/wp-content/uploads/2017/04/passion1.jpg>img classalignnone wp-image-14672 src/wp-content/uploads/2017/04/passion1.jpg altpassion1 width278 height337 />/a> a href/wp-content/uploads/2017/04/passion3.jpg>img classalignnone wp-image-14673 src/wp-content/uploads/2017/04/passion3.jpg altpassion3 width305 height305 />/a>/p>p>This personal change is by no means any indication on the quality of Couchbase products. Both Couchbase Server and Couchbase Mobile are very well positioned for enterprise adoption. N1QL allows database developers to leverage their SQL skills and apply them to a NoSQL document database. Couchbase Mobile is a unique offering that provides offline capability for mobile applications and synchronization with a backend database when online. It will continue to blaze new trails and bring new types of customers. I wish all of them good luck!/p>p>A popular saying is “change is the only constant”. And so here I go again making another change in my career. Looking forward to see you at conferences and meetups around the world./p>p>This also means, the blog title will change to Miles to go 4.0 now (a href/welcome-to-miles-to-go/>2.0/a>, a href/new-gig-at-couchbase/>3.0/a>)!/p>h2>Where will you see me?/h2>p>Some upcoming speaking engagements are DockerCon (Austin), GIDS (Bangalore), OSCON (Austin). Amazon Web Services is a gold sponsor at DockerCon and OSCON and so you can find me at the booth as well./p>p>You’ll also see me at some AWS Summits and re:Invent./p>p>And of course, you can follow me on twitter @arungupta to find out what’s keeping me busy!/p>p>In the meanwhile, here are some links for you to learn more about AWS:/p>ul>li>AWS on Twitch/li>li>This is My Architecture that shows innovative architectural solutions on the AWS Cloud/li>li>AWS Blog/li>li>Follow @awscloud/li>/ul>p>Looking forward to AWSome and exciting weeks/months/years ahead!/p>p> /p>/div>footer classentry-meta>div classcomments-link>a href/bye-bye-couchbase-hello-amazon-web-services/#comments>View all 6 comments/a>/div>/footer>/article>article idpost-14658 classpost-14658 post type-post status-publish format-standard hentry category-containers category-couchbase category-javaee category-wildfly tag-couchbase tag-javaee tag-kubernetes tag-wildfly>header classentry-header>h1 classentry-title>a href/service-discovery-java-database-application-kubernetes/ relbookmark>Service Discovery with Java and Database application in Kubernetes/a>/h1>div classentry-meta>span classdate>a href/service-discovery-java-database-application-kubernetes/ titlePermalink to Service Discovery with Java and Database application in Kubernetes relbookmark>time classentry-date datetime2017-03-11T23:34:01+00:00>March 11, 2017/time>/a>/span>span classcategories-links>a href/topics/containers/ relcategory tag>containers/a>, a href/topics/couchbase/ relcategory tag>couchbase/a>, a href/topics/java/javaee/ relcategory tag>javaee/a>, a href/topics/redhat/wildfly/ relcategory tag>wildfly/a>/span>span classtags-links>a href/tag/couchbase/ reltag>couchbase/a>, a href/tag/javaee/ reltag>javaee/a>, a href/tag/kubernetes/ reltag>kubernetes/a>, a href/tag/wildfly/ reltag>wildfly/a>/span>span classauthor vcard>a classurl fn n href/author/admin/ titleView all posts by arungupta relauthor>arungupta/a>/span>/div>/header>div classentry-content>p>This blog will show how a simple Java application can talk to a database using service discovery in Kubernetes./p>p>img classalignnone wp-image-2543 srchttp://blog.couchbase.com/wp-content/uploads/2017/02/cropped-Couchbase-Blog-lockup.png alt width100 height100 /> img classalignnone wp-image-2942 srchttp://blog.couchbase.com/wp-content/uploads/2017/03/kubernetes-logo.png altKubernetes Logo width117 height104 /> img classalignnone wp-image-2943 srchttp://blog.couchbase.com/wp-content/uploads/2017/03/wildfly-logo.png altWildFly Logo width129 height100 />/p>p>Service Discovery with Java and Database application in DC/OS explains why service discovery is an important aspect for a multi-container application. That blog also explained how this can be done for DC/OS./p>p>Let’s see how this can be accomplished in Kubernetes with a single instance of application server and database server. This blog will use WildFly for application server and Couchbase for database./p>p>This blog will use the following main steps:/p>ul>li>Start Kubernetes one-node cluster/li>li>Kubernetes application definition/li>li>Deploy the application/li>li>Access the application/li>/ul>h2>Start Kubernetes Cluster/h2>p>Minikube is the easiest way to start a one-node Kubernetes cluster in a VM on your laptop. The binary needs to be downloaded first and then installed./p>p>Complete installation instructions are available at github.com/kubernetes/minikube./p>p>The latest release can be installed on OSX as as:/p>div idcrayon-5cfd1e54ac179273149166 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.17.1/minikube-darwin-amd64 \&& chmod +x minikube/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54ac179273149166-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac179273149166-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54ac179273149166-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac179273149166-4>4/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54ac179273149166-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac179273149166-2>span classcrayon-v>curl/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-e>Lo/span> span classcrayon-e>minikube/span> span classcrayon-v>https/span>span classcrayon-o>:/span>span classcrayon-c>//storage.googleapis.com/minikube/releases/v0.17.1/minikube-darwin-amd64 \/span>/div>div classcrayon-line idcrayon-5cfd1e54ac179273149166-3>span classcrayon-o>&&/span> span classcrayon-h>/span>span classcrayon-v>chmod/span> span classcrayon-h>/span>span classcrayon-o>+/span>span classcrayon-i>x/span> span classcrayon-h>/span>span classcrayon-i>minikube/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac179273149166-4> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>It also requires kubectl to be installed. Installing and Setting up kubectl provide detailed instructions on how to setup kubectl. On OSX, it can be installed as:/p>div idcrayon-5cfd1e54ac190195124791 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl \ && chmod +x ./kubectl/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54ac190195124791-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac190195124791-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54ac190195124791-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac190195124791-4>4/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54ac190195124791-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac190195124791-2>span classcrayon-v>curl/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-e>LO/span> span classcrayon-v>https/span>span classcrayon-o>:/span>span classcrayon-c>//storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl \/span>/div>div classcrayon-line idcrayon-5cfd1e54ac190195124791-3>span classcrayon-h> /span>span classcrayon-o>&&/span> span classcrayon-h>/span>span classcrayon-v>chmod/span> span classcrayon-h>/span>span classcrayon-o>+/span>span classcrayon-i>x/span> span classcrayon-h>/span>span classcrayon-sy>./span>span classcrayon-o>//span>span classcrayon-i>kubectl/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac190195124791-4> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Now, start the cluster as:/p>div idcrayon-5cfd1e54ac19e195208482 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>minikube startStarting local Kubernetes cluster...Starting VM...Downloading Minikube ISO 88.71 MB / 88.71 MB 100.00% 0sSSH-ing files into VM...Setting up certs...Starting cluster components...Connecting to cluster...Setting up kubeconfig...Kubectl is now configured to use the cluster./textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54ac19e195208482-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac19e195208482-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54ac19e195208482-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac19e195208482-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54ac19e195208482-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac19e195208482-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54ac19e195208482-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac19e195208482-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54ac19e195208482-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac19e195208482-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54ac19e195208482-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac19e195208482-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54ac19e195208482-13>13/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54ac19e195208482-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac19e195208482-2>span classcrayon-e>minikube/span> span classcrayon-e>start/span>/div>div classcrayon-line idcrayon-5cfd1e54ac19e195208482-3>span classcrayon-e>Starting/span> span classcrayon-e>local/span> span classcrayon-e>Kubernetes/span> span classcrayon-v>cluster/span>span classcrayon-sy>./span>span classcrayon-sy>./span>span classcrayon-sy>./span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac19e195208482-4>span classcrayon-e>Starting/span> span classcrayon-v>VM/span>span classcrayon-sy>./span>span classcrayon-sy>./span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54ac19e195208482-5>span classcrayon-e>Downloading/span> span classcrayon-e>Minikube/span> span classcrayon-i>ISO/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac19e195208482-6>span classcrayon-h>/span>span classcrayon-cn>88.71/span> span classcrayon-h>/span>span classcrayon-v>MB/span> span classcrayon-h>/span>span classcrayon-o>//span> span classcrayon-h>/span>span classcrayon-cn>88.71/span> span classcrayon-h>/span>span classcrayon-i>MB/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-cn>100.00/span>span classcrayon-o>%/span> span classcrayon-h>/span>span classcrayon-cn>0s/span>/div>div classcrayon-line idcrayon-5cfd1e54ac19e195208482-7>span classcrayon-v>SSH/span>span classcrayon-o>-/span>span classcrayon-e>ing/span> span classcrayon-e>files/span> span classcrayon-e>into/span> span classcrayon-v>VM/span>span classcrayon-sy>./span>span classcrayon-sy>./span>span classcrayon-sy>./span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac19e195208482-8>span classcrayon-e>Setting/span> span classcrayon-e>up/span> span classcrayon-v>certs/span>span classcrayon-sy>./span>span classcrayon-sy>./span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54ac19e195208482-9>span classcrayon-e>Starting/span> span classcrayon-e>cluster/span> span classcrayon-v>components/span>span classcrayon-sy>./span>span classcrayon-sy>./span>span classcrayon-sy>./span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac19e195208482-10>span classcrayon-e>Connecting/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-v>cluster/span>span classcrayon-sy>./span>span classcrayon-sy>./span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54ac19e195208482-11>span classcrayon-e>Setting/span> span classcrayon-e>up/span> span classcrayon-v>kubeconfig/span>span classcrayon-sy>./span>span classcrayon-sy>./span>span classcrayon-sy>./span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac19e195208482-12>span classcrayon-e>Kubectl/span> span classcrayon-st>is/span> span classcrayon-h>/span>span classcrayon-e>now/span> span classcrayon-e>configured/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-st>use/span> span classcrayon-h>/span>span classcrayon-e>the/span> span classcrayon-v>cluster/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54ac19e195208482-13> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>The code>kubectl version/code> command shows more details about the kubectl client and minikube server version:/p>div idcrayon-5cfd1e54ac1ad016734846 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>kubectl versionClient Version: version.Info{Major:1, Minor:5, GitVersion:v1.5.4, GitCommit:7243c69eb523aa4377bce883e7c0dd76b84709a1, GitTreeState:clean, BuildDate:2017-03-07T23:53:09Z, GoVersion:go1.7.4, Compiler:gc, Platform:darwin/amd64}Server Version: version.Info{Major:1, Minor:5, GitVersion:v1.5.3, GitCommit:029c3a408176b55c30846f0faedf56aae5992e9b, GitTreeState:clean, BuildDate:1970-01-01T00:00:00Z, GoVersion:go1.7.3, Compiler:gc, Platform:linux/amd64}/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54ac1ad016734846-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ad016734846-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ad016734846-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ad016734846-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ad016734846-5>5/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54ac1ad016734846-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ad016734846-2>span classcrayon-e>kubectl/span> span classcrayon-e>version/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ad016734846-3>span classcrayon-e>Client/span> span classcrayon-v>Version/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>version/span>span classcrayon-sy>./span>span classcrayon-v>Info/span>span classcrayon-sy>{/span>span classcrayon-v>Major/span>span classcrayon-o>:/span>span classcrayon-s>1/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-v>Minor/span>span classcrayon-o>:/span>span classcrayon-s>5/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-v>GitVersion/span>span classcrayon-o>:/span>span classcrayon-s>v1.5.4/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-v>GitCommit/span>span classcrayon-o>:/span>span classcrayon-s>7243c69eb523aa4377bce883e7c0dd76b84709a1/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-v>GitTreeState/span>span classcrayon-o>:/span>span classcrayon-s>clean/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-v>BuildDate/span>span classcrayon-o>:/span>span classcrayon-s>2017-03-07T23:53:09Z/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-v>GoVersion/span>span classcrayon-o>:/span>span classcrayon-s>go1.7.4/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-v>Compiler/span>span classcrayon-o>:/span>span classcrayon-s>gc/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-v>Platform/span>span classcrayon-o>:/span>span classcrayon-s>darwin/amd64/span>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ad016734846-4>span classcrayon-e>Server/span> span classcrayon-v>Version/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>version/span>span classcrayon-sy>./span>span classcrayon-v>Info/span>span classcrayon-sy>{/span>span classcrayon-v>Major/span>span classcrayon-o>:/span>span classcrayon-s>1/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-v>Minor/span>span classcrayon-o>:/span>span classcrayon-s>5/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-v>GitVersion/span>span classcrayon-o>:/span>span classcrayon-s>v1.5.3/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-v>GitCommit/span>span classcrayon-o>:/span>span classcrayon-s>029c3a408176b55c30846f0faedf56aae5992e9b/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-v>GitTreeState/span>span classcrayon-o>:/span>span classcrayon-s>clean/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-v>BuildDate/span>span classcrayon-o>:/span>span classcrayon-s>1970-01-01T00:00:00Z/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-v>GoVersion/span>span classcrayon-o>:/span>span classcrayon-s>go1.7.3/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-v>Compiler/span>span classcrayon-o>:/span>span classcrayon-s>gc/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-v>Platform/span>span classcrayon-o>:/span>span classcrayon-s>linux/amd64/span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ad016734846-5> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>More details about the cluster can be obtained using the code>kubectl cluster-info/code> command:/p>div idcrayon-5cfd1e54ac1bb430024056 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>Kubernetes master is running at https://192.168.99.100:8443KubeDNS is running at https://192.168.99.100:8443/api/v1/proxy/namespaces/kube-system/services/kube-dnskubernetes-dashboard is running at https://192.168.99.100:8443/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboardTo further debug and diagnose cluster problems, use kubectl cluster-info dump./textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54ac1bb430024056-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1bb430024056-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54ac1bb430024056-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1bb430024056-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54ac1bb430024056-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1bb430024056-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54ac1bb430024056-7>7/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54ac1bb430024056-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1bb430024056-2>span classcrayon-e>Kubernetes/span> span classcrayon-e>master/span> span classcrayon-st>is/span> span classcrayon-h>/span>span classcrayon-e>running/span> span classcrayon-e>at/span> span classcrayon-v>https/span>span classcrayon-o>:/span>span classcrayon-c>//192.168.99.100:8443/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1bb430024056-3>span classcrayon-e>KubeDNS/span> span classcrayon-st>is/span> span classcrayon-h>/span>span classcrayon-e>running/span> span classcrayon-e>at/span> span classcrayon-v>https/span>span classcrayon-o>:/span>span classcrayon-c>//192.168.99.100:8443/api/v1/proxy/namespaces/kube-system/services/kube-dns/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1bb430024056-4>span classcrayon-v>kubernetes/span>span classcrayon-o>-/span>span classcrayon-e>dashboard/span> span classcrayon-st>is/span> span classcrayon-h>/span>span classcrayon-e>running/span> span classcrayon-e>at/span> span classcrayon-v>https/span>span classcrayon-o>:/span>span classcrayon-c>//192.168.99.100:8443/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1bb430024056-5> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1bb430024056-6>span classcrayon-st>To/span> span classcrayon-h>/span>span classcrayon-e>further/span> span classcrayon-e>debug/span> span classcrayon-st>and/span> span classcrayon-h>/span>span classcrayon-e>diagnose/span> span classcrayon-e>cluster/span> span classcrayon-v>problems/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-st>use/span> span classcrayon-h>/span>span classcrayon-s>kubectl cluster-info dump/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54ac1bb430024056-7> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>br />/p>h2>Kubernetes Application Definition/h2>p>Application definition is defined at github.com/arun-gupta/kubernetes-java-sample/blob/master/service-discovery.yml. It consists of:/p>ul>li>A Couchbase service/li>li>Couchbase replica set with a single pod/li>li>A WildFly replica set with a single pod/li>/ul>div idcrayon-5cfd1e54ac1ca539792091 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>apiVersion: v1kind: Servicemetadata: name: couchbase-servicespec: selector: app: couchbase-rs-pod ports: - name: admin port: 8091 - name: views port: 8092 - name: query port: 8093 - name: memcached port: 11210---apiVersion: extensions/v1beta1kind: ReplicaSetmetadata: name: couchbase-rsspec: replicas: 1 template: metadata: labels: app: couchbase-rs-pod spec: containers: - name: couchbase image: arungupta/couchbase:travel ports: - containerPort: 8091 - containerPort: 8092 - containerPort: 8093 - containerPort: 11210---apiVersion: extensions/v1beta1kind: ReplicaSetmetadata: name: wildfly-rs labels: name: wildflyspec: replicas: 1 template: metadata: labels: name: wildfly spec: containers: - name: wildfly-rs-pod image: arungupta/wildfly-couchbase-javaee:travel env: - name: COUCHBASE_URI value: couchbase-service ports: - containerPort: 8080/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-24>24/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-25>25/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-26>26/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-27>27/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-28>28/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-29>29/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-30>30/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-31>31/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-32>32/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-33>33/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-34>34/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-35>35/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-36>36/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-37>37/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-38>38/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-39>39/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-40>40/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-41>41/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-42>42/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-43>43/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-44>44/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-45>45/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-46>46/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-47>47/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-48>48/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-49>49/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-50>50/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-51>51/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-52>52/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-53>53/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-54>54/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-55>55/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-56>56/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-57>57/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-58>58/div>div classcrayon-num data-linecrayon-5cfd1e54ac1ca539792091-59>59/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1ca539792091-60>60/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-2>span classcrayon-v>apiVersion/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>v1/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-3>span classcrayon-v>kind/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>Service/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-4>span classcrayon-v>metadata/span>span classcrayon-o>:/span> span classcrayon-h>/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-5>span classcrayon-h> /span>span classcrayon-v>name/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-e>service/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-6>span classcrayon-v>spec/span>span classcrayon-o>:/span> span classcrayon-h>/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-7>span classcrayon-h> /span>span classcrayon-v>selector/span>span classcrayon-o>:/span> span classcrayon-h>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-8>span classcrayon-h> /span>span classcrayon-v>app/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-v>rs/span>span classcrayon-o>-/span>span classcrayon-e>pod/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-9>span classcrayon-e> /span>span classcrayon-v>ports/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-10>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-v>name/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>admin/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-11>span classcrayon-e> /span>span classcrayon-v>port/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>8091/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-12>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-v>name/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>views/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-13>span classcrayon-e> /span>span classcrayon-v>port/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>8092/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-14>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-v>name/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>query/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-15>span classcrayon-e> /span>span classcrayon-v>port/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>8093/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-16>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-v>name/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>memcached/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-17>span classcrayon-e> /span>span classcrayon-v>port/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>11210/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-18>span classcrayon-o>--/span>span classcrayon-o>-/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-19>span classcrayon-v>apiVersion/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>extensions/span>span classcrayon-o>//span>span classcrayon-e>v1beta1/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-20>span classcrayon-v>kind/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>ReplicaSet/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-21>span classcrayon-v>metadata/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-22>span classcrayon-h> /span>span classcrayon-v>name/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-e>rs/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-23>span classcrayon-v>spec/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-24>span classcrayon-h> /span>span classcrayon-v>replicas/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-25>span classcrayon-h> /span>span classcrayon-v>template/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-26>span classcrayon-h> /span>span classcrayon-v>metadata/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-27>span classcrayon-h> /span>span classcrayon-v>labels/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-28>span classcrayon-h> /span>span classcrayon-v>app/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-v>rs/span>span classcrayon-o>-/span>span classcrayon-e>pod/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-29>span classcrayon-e> /span>span classcrayon-v>spec/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-30>span classcrayon-h> /span>span classcrayon-v>containers/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-31>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-v>name/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>couchbase/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-32>span classcrayon-e> /span>span classcrayon-v>image/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>:/span>span classcrayon-e>travel/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-33>span classcrayon-e> /span>span classcrayon-v>ports/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-34>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-v>containerPort/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>8091/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-35>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-v>containerPort/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>8092/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-36>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-v>containerPort/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>8093/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-37>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-v>containerPort/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>11210/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-38>span classcrayon-o>--/span>span classcrayon-o>-/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-39>span classcrayon-v>apiVersion/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>extensions/span>span classcrayon-o>//span>span classcrayon-e>v1beta1/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-40>span classcrayon-v>kind/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>ReplicaSet/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-41>span classcrayon-v>metadata/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-42>span classcrayon-h> /span>span classcrayon-v>name/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>wildfly/span>span classcrayon-o>-/span>span classcrayon-e>rs/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-43>span classcrayon-e> /span>span classcrayon-v>labels/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-44>span classcrayon-h> /span>span classcrayon-v>name/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>wildfly/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-45>span classcrayon-v>spec/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-46>span classcrayon-h> /span>span classcrayon-v>replicas/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-47>span classcrayon-h> /span>span classcrayon-v>template/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-48>span classcrayon-h> /span>span classcrayon-v>metadata/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-49>span classcrayon-h> /span>span classcrayon-v>labels/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-50>span classcrayon-h> /span>span classcrayon-v>name/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>wildfly/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-51>span classcrayon-e> /span>span classcrayon-v>spec/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-52>span classcrayon-h> /span>span classcrayon-v>containers/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-53>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-v>name/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>wildfly/span>span classcrayon-o>-/span>span classcrayon-v>rs/span>span classcrayon-o>-/span>span classcrayon-e>pod/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-54>span classcrayon-e> /span>span classcrayon-v>image/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>wildfly/span>span classcrayon-o>-/span>span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-v>javaee/span>span classcrayon-o>:/span>span classcrayon-e>travel/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-55>span classcrayon-e> /span>span classcrayon-v>env/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-56>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-v>name/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>COUCHBASE_URI/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-57>span classcrayon-e> /span>span classcrayon-v>value/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-e>service/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-58>span classcrayon-e> /span>span classcrayon-v>ports/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1ca539792091-59>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-v>containerPort/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>8080/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1ca539792091-60> /div>/div>/td>/tr>/tbody>/table>/div>/div>The key part is where the value of the code>COUCHBASE_URI/code> environment variable is name of the Couchbase service. This allows the application deployed in WildFly to dynamically discovery the service and communicate with the database.p>br />/p>p>arungupta/couchbase:travel Docker image is created using github.com/arun-gupta/couchbase-javaee/blob/master/couchbase/Dockerfile./p>p>arungupta/wildfly-couchbase-javaee:travel Docker image is created using github.com/arun-gupta/couchbase-javaee/blob/master/Dockerfile./p>p>Java EE application waits for database initialization to be complete before it starts querying the database. This can be seen at github.com/arun-gupta/couchbase-javaee/blob/master/src/main/java/org/couchbase/sample/javaee/Database.java#L25./p>h2>Deploy Application/h2>p>This application can be deployed as:/p>div idcrayon-5cfd1e54ac1db939216953 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>kubectl create -f ~/workspaces/kubernetes-java-sample/service-discovery.yml/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54ac1db939216953-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1db939216953-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54ac1db939216953-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54ac1db939216953-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1db939216953-2>span classcrayon-e>kubectl/span> span classcrayon-v>create/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>f/span> span classcrayon-h>/span>span classcrayon-o>~/span>span classcrayon-o>//span>span classcrayon-v>workspaces/span>span classcrayon-o>//span>span classcrayon-v>kubernetes/span>span classcrayon-o>-/span>span classcrayon-v>java/span>span classcrayon-o>-/span>span classcrayon-v>sample/span>span classcrayon-o>//span>span classcrayon-v>service/span>span classcrayon-o>-/span>span classcrayon-v>discovery/span>span classcrayon-sy>./span>span classcrayon-i>yml/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1db939216953-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>The list of service and replica set can be shown using the command code>kubectl get svc,rs/code>:/p>div idcrayon-5cfd1e54ac1e9899091557 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGEsvc/couchbase-service 10.0.0.97 <none> 8091/TCP,8092/TCP,8093/TCP,11210/TCP 27msvc/kubernetes 10.0.0.1 <none> 443/TCP 1hsvc/wildfly-rs 10.0.0.252 <none> 8080/TCP 21mNAME DESIRED CURRENT READY AGErs/couchbase-rs 1 1 1 27mrs/wildfly-rs 1 1 1 27m/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54ac1e9899091557-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1e9899091557-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54ac1e9899091557-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1e9899091557-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54ac1e9899091557-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1e9899091557-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54ac1e9899091557-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1e9899091557-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54ac1e9899091557-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1e9899091557-10>10/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54ac1e9899091557-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1e9899091557-2>span classcrayon-e>NAME /span>span classcrayon-v>CLUSTER/span>span classcrayon-o>-/span>span classcrayon-e>IP /span> span classcrayon-v>EXTERNAL/span>span classcrayon-o>-/span>span classcrayon-e>IP /span> span classcrayon-e>PORT/span>span classcrayon-sy>(/span>span classcrayon-v>S/span>span classcrayon-sy>)/span>span classcrayon-h> /span>span classcrayon-e>AGE/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1e9899091557-3>span classcrayon-v>svc/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-i>service/span>span classcrayon-h> /span> span classcrayon-cn>10.0.0.97/span>span classcrayon-h> /span>span classcrayon-o></span>span classcrayon-v>none/span>span classcrayon-o>>/span>span classcrayon-h> /span>span classcrayon-cn>8091/span>span classcrayon-o>//span>span classcrayon-v>TCP/span>span classcrayon-sy>,/span>span classcrayon-cn>8092/span>span classcrayon-o>//span>span classcrayon-v>TCP/span>span classcrayon-sy>,/span>span classcrayon-cn>8093/span>span classcrayon-o>//span>span classcrayon-v>TCP/span>span classcrayon-sy>,/span>span classcrayon-cn>11210/span>span classcrayon-o>//span>span classcrayon-i>TCP/span>span classcrayon-h> /span> span classcrayon-cn>27m/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1e9899091557-4>span classcrayon-v>svc/span>span classcrayon-o>//span>span classcrayon-i>kubernetes/span>span classcrayon-h> /span>span classcrayon-cn>10.0.0.1/span>span classcrayon-h> /span> span classcrayon-o></span>span classcrayon-v>none/span>span classcrayon-o>>/span>span classcrayon-h> /span>span classcrayon-cn>443/span>span classcrayon-o>//span>span classcrayon-i>TCP/span>span classcrayon-h> /span>span classcrayon-cn>1h/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1e9899091557-5>span classcrayon-v>svc/span>span classcrayon-o>//span>span classcrayon-v>wildfly/span>span classcrayon-o>-/span>span classcrayon-i>rs/span>span classcrayon-h> /span>span classcrayon-cn>10.0.0.252/span>span classcrayon-h> /span> span classcrayon-o></span>span classcrayon-v>none/span>span classcrayon-o>>/span>span classcrayon-h> /span>span classcrayon-cn>8080/span>span classcrayon-o>//span>span classcrayon-i>TCP/span>span classcrayon-h> /span> span classcrayon-cn>21m/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1e9899091557-6> /div>div classcrayon-line idcrayon-5cfd1e54ac1e9899091557-7>span classcrayon-e>NAME /span>span classcrayon-e>DESIRED /span> span classcrayon-e>CURRENT /span> span classcrayon-e>READY /span> span classcrayon-e>AGE/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1e9899091557-8>span classcrayon-v>rs/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-i>rs/span>span classcrayon-h> /span> span classcrayon-cn>1/span>span classcrayon-h> /span> span classcrayon-cn>1/span>span classcrayon-h> /span> span classcrayon-cn>1/span>span classcrayon-h> /span> span classcrayon-cn>27m/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1e9899091557-9>span classcrayon-v>rs/span>span classcrayon-o>//span>span classcrayon-v>wildfly/span>span classcrayon-o>-/span>span classcrayon-i>rs/span>span classcrayon-h> /span> span classcrayon-cn>1/span>span classcrayon-h> /span> span classcrayon-cn>1/span>span classcrayon-h> /span> span classcrayon-cn>1/span>span classcrayon-h> /span> span classcrayon-cn>27m/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1e9899091557-10> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Logs for the single replica of Couchbase can be obtained using the command code>kubectl logs rs/couchbase-rs/code>:/p>div idcrayon-5cfd1e54ac1f7490345172 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>++ set -m++ sleep 25++ /entrypoint.sh couchbase-serverStarting Couchbase Server -- Web UI available at http://<ip>:8091 and logs available in /opt/couchbase/var/lib/couchbase/logs++ curl -v -X POST http://127.0.0.1:8091/pools/default -d memoryQuota300 -d indexMemoryQuota300. . .{storageMode:memory_optimized,indexerThreads:0,memorySnapshotInterval:200,stableSnapshotInterval:5000,maxRollbackPoints:5,logLevel:info}Type: ++ echo Type: ++ WORKER ++ fg 1/entrypoint.sh couchbase-server/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54ac1f7490345172-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1f7490345172-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54ac1f7490345172-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1f7490345172-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54ac1f7490345172-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1f7490345172-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54ac1f7490345172-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1f7490345172-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54ac1f7490345172-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1f7490345172-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54ac1f7490345172-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1f7490345172-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54ac1f7490345172-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac1f7490345172-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54ac1f7490345172-15>15/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54ac1f7490345172-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1f7490345172-2>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-v>set/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>m/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1f7490345172-3>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-i>sleep/span> span classcrayon-h>/span>span classcrayon-cn>25/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1f7490345172-4>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>entrypoint/span>span classcrayon-sy>./span>span classcrayon-e>sh/span> span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-e>server/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1f7490345172-5>span classcrayon-e>Starting/span> span classcrayon-e>Couchbase/span> span classcrayon-v>Server/span> span classcrayon-h>/span>span classcrayon-o>--/span> span classcrayon-h>/span>span classcrayon-e>Web/span> span classcrayon-e>UI/span> span classcrayon-e>available/span> span classcrayon-e>at/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//<ip>:8091 and logs available in /opt/couchbase/var/lib/couchbase/logs/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1f7490345172-6>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-v>curl/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>v/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>X/span> span classcrayon-h>/span>span classcrayon-e>POST/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//127.0.0.1:8091/pools/default -d memoryQuota300 -d indexMemoryQuota300/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1f7490345172-7> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1f7490345172-8>span classcrayon-sy>./span> span classcrayon-h>/span>span classcrayon-sy>./span> span classcrayon-h>/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54ac1f7490345172-9> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1f7490345172-10>span classcrayon-sy>{/span>span classcrayon-s>storageMode/span>span classcrayon-o>:/span>span classcrayon-s>memory_optimized/span>span classcrayon-sy>,/span>span classcrayon-s>indexerThreads/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>span classcrayon-s>memorySnapshotInterval/span>span classcrayon-o>:/span>span classcrayon-cn>200/span>span classcrayon-sy>,/span>span classcrayon-s>stableSnapshotInterval/span>span classcrayon-o>:/span>span classcrayon-cn>5000/span>span classcrayon-sy>,/span>span classcrayon-s>maxRollbackPoints/span>span classcrayon-o>:/span>span classcrayon-cn>5/span>span classcrayon-sy>,/span>span classcrayon-s>logLevel/span>span classcrayon-o>:/span>span classcrayon-s>info/span>span classcrayon-sy>}/span>span classcrayon-sy>/span>span classcrayon-sy>/span>span classcrayon-v>Type/span>span classcrayon-o>:/span> span classcrayon-h>/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1f7490345172-11>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-i>echo/span> span classcrayon-h>/span>span classcrayon-s>Type: /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1f7490345172-12>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-s>/span> span classcrayon-h>/span>span classcrayon-s>/span> span classcrayon-h>/span>span classcrayon-o>/span> span classcrayon-h>/span>span classcrayon-i>WORKER/span> span classcrayon-h>/span>span classcrayon-s>/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1f7490345172-13>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-i>fg/span> span classcrayon-h>/span>span classcrayon-cn>1/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac1f7490345172-14>span classcrayon-o>//span>span classcrayon-v>entrypoint/span>span classcrayon-sy>./span>span classcrayon-e>sh/span> span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-i>server/span>/div>div classcrayon-line idcrayon-5cfd1e54ac1f7490345172-15> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Logs for the WildFly replica set can be seen using the command code>kubectl logs rs/wildfly-rs/code>:/p>div idcrayon-5cfd1e54ac206391045703 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;> JBoss Bootstrap Environment JBOSS_HOME: /opt/jboss/wildfly. . .06:32:08,537 INFO com.couchbase.client.core.node.Node (cb-io-1-1) Connected to Node couchbase-service06:32:09,262 INFO com.couchbase.client.core.config.ConfigurationProvider (cb-computations-3) Opened bucket travel-sample06:32:09,366 INFO stdout (ServerService Thread Pool -- 65) Sleeping for 3 secs ...06:32:12,369 INFO stdout (ServerService Thread Pool -- 65) Bucket found!06:32:14,194 INFO org.jboss.resteasy.resteasy_jaxrs.i18n (ServerService Thread Pool -- 65) RESTEASY002225: Deploying javax.ws.rs.core.Application: class org.couchbase.sample.javaee.MyApplication06:32:14,195 INFO org.jboss.resteasy.resteasy_jaxrs.i18n (ServerService Thread Pool -- 65) RESTEASY002200: Adding class resource org.couchbase.sample.javaee.AirlineResource from Application class org.couchbase.sample.javaee.MyApplication06:32:14,310 INFO org.wildfly.extension.undertow (ServerService Thread Pool -- 65) WFLYUT0021: Registered web context: /airlines06:32:14,376 INFO org.jboss.as.server (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed airlines.war (runtime-name : airlines.war)06:32:14,704 INFO org.jboss.as (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management06:32:14,704 INFO org.jboss.as (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:999006:32:14,705 INFO org.jboss.as (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started in 29470ms - Started 443 of 691 services (404 services are lazy, passive or on-demand)/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54ac206391045703-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac206391045703-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54ac206391045703-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac206391045703-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54ac206391045703-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac206391045703-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54ac206391045703-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac206391045703-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54ac206391045703-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac206391045703-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54ac206391045703-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac206391045703-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54ac206391045703-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac206391045703-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54ac206391045703-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac206391045703-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54ac206391045703-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac206391045703-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54ac206391045703-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac206391045703-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54ac206391045703-21>21/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54ac206391045703-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac206391045703-2>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>/div>div classcrayon-line idcrayon-5cfd1e54ac206391045703-3> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac206391045703-4>span classcrayon-h> /span>span classcrayon-e>JBoss/span> span classcrayon-e>Bootstrap/span> span classcrayon-e>Environment/span>/div>div classcrayon-line idcrayon-5cfd1e54ac206391045703-5> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac206391045703-6>span classcrayon-e> /span>span classcrayon-v>JBOSS_HOME/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>opt/span>span classcrayon-o>//span>span classcrayon-v>jboss/span>span classcrayon-o>//span>span classcrayon-i>wildfly/span>/div>div classcrayon-line idcrayon-5cfd1e54ac206391045703-7> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac206391045703-8>span classcrayon-sy>./span> span classcrayon-h>/span>span classcrayon-sy>./span> span classcrayon-h>/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54ac206391045703-9> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac206391045703-10>span classcrayon-cn>06/span>span classcrayon-o>:/span>span classcrayon-cn>32/span>span classcrayon-o>:/span>span classcrayon-cn>08/span>span classcrayon-sy>,/span>span classcrayon-cn>537/span> span classcrayon-h>/span>span classcrayon-i>INFO/span>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-v>com/span>span classcrayon-sy>./span>span classcrayon-v>couchbase/span>span classcrayon-sy>./span>span classcrayon-v>client/span>span classcrayon-sy>./span>span classcrayon-v>core/span>span classcrayon-sy>./span>span classcrayon-v>node/span>span classcrayon-sy>./span>span classcrayon-v>Node/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-v>cb/span>span classcrayon-o>-/span>span classcrayon-v>io/span>span classcrayon-o>-/span>span classcrayon-cn>1/span>span classcrayon-o>-/span>span classcrayon-cn>1/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-e>Connected/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>Node/span> span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-i>service/span>/div>div classcrayon-line idcrayon-5cfd1e54ac206391045703-11>span classcrayon-cn>06/span>span classcrayon-o>:/span>span classcrayon-cn>32/span>span classcrayon-o>:/span>span classcrayon-cn>09/span>span classcrayon-sy>,/span>span classcrayon-cn>262/span> span classcrayon-h>/span>span classcrayon-i>INFO/span>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-v>com/span>span classcrayon-sy>./span>span classcrayon-v>couchbase/span>span classcrayon-sy>./span>span classcrayon-v>client/span>span classcrayon-sy>./span>span classcrayon-v>core/span>span classcrayon-sy>./span>span classcrayon-v>config/span>span classcrayon-sy>./span>span classcrayon-v>ConfigurationProvider/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-v>cb/span>span classcrayon-o>-/span>span classcrayon-v>computations/span>span classcrayon-o>-/span>span classcrayon-cn>3/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-e>Opened/span> span classcrayon-e>bucket/span> span classcrayon-v>travel/span>span classcrayon-o>-/span>span classcrayon-i>sample/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac206391045703-12>span classcrayon-cn>06/span>span classcrayon-o>:/span>span classcrayon-cn>32/span>span classcrayon-o>:/span>span classcrayon-cn>09/span>span classcrayon-sy>,/span>span classcrayon-cn>366/span> span classcrayon-h>/span>span classcrayon-i>INFO/span>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-v>stdout/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-e>ServerService/span> span classcrayon-e>Thread/span> span classcrayon-v>Pool/span> span classcrayon-h>/span>span classcrayon-o>--/span> span classcrayon-h>/span>span classcrayon-cn>65/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-e>Sleeping/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-cn>3/span> span classcrayon-h>/span>span classcrayon-i>secs/span> span classcrayon-h>/span>span classcrayon-sy>./span>span classcrayon-sy>./span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54ac206391045703-13>span classcrayon-cn>06/span>span classcrayon-o>:/span>span classcrayon-cn>32/span>span classcrayon-o>:/span>span classcrayon-cn>12/span>span classcrayon-sy>,/span>span classcrayon-cn>369/span> span classcrayon-h>/span>span classcrayon-i>INFO/span>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-v>stdout/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-e>ServerService/span> span classcrayon-e>Thread/span> span classcrayon-v>Pool/span> span classcrayon-h>/span>span classcrayon-o>--/span> span classcrayon-h>/span>span classcrayon-cn>65/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-e>Bucket/span> span classcrayon-v>found/span>span classcrayon-o>!/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac206391045703-14>span classcrayon-cn>06/span>span classcrayon-o>:/span>span classcrayon-cn>32/span>span classcrayon-o>:/span>span classcrayon-cn>14/span>span classcrayon-sy>,/span>span classcrayon-cn>194/span> span classcrayon-h>/span>span classcrayon-i>INFO/span>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-v>org/span>span classcrayon-sy>./span>span classcrayon-v>jboss/span>span classcrayon-sy>./span>span classcrayon-v>resteasy/span>span classcrayon-sy>./span>span classcrayon-v>resteasy_jaxrs/span>span classcrayon-sy>./span>span classcrayon-v>i18n/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-e>ServerService/span> span classcrayon-e>Thread/span> span classcrayon-v>Pool/span> span classcrayon-h>/span>span classcrayon-o>--/span> span classcrayon-h>/span>span classcrayon-cn>65/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>RESTEASY002225/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>Deploying/span> span classcrayon-v>javax/span>span classcrayon-sy>./span>span classcrayon-v>ws/span>span classcrayon-sy>./span>span classcrayon-v>rs/span>span classcrayon-sy>./span>span classcrayon-v>core/span>span classcrayon-sy>./span>span classcrayon-v>Application/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>class/span> span classcrayon-h>/span>span classcrayon-v>org/span>span classcrayon-sy>./span>span classcrayon-v>couchbase/span>span classcrayon-sy>./span>span classcrayon-v>sample/span>span classcrayon-sy>./span>span classcrayon-v>javaee/span>span classcrayon-sy>./span>span classcrayon-i>MyApplication/span>/div>div classcrayon-line idcrayon-5cfd1e54ac206391045703-15>span classcrayon-cn>06/span>span classcrayon-o>:/span>span classcrayon-cn>32/span>span classcrayon-o>:/span>span classcrayon-cn>14/span>span classcrayon-sy>,/span>span classcrayon-cn>195/span> span classcrayon-h>/span>span classcrayon-i>INFO/span>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-v>org/span>span classcrayon-sy>./span>span classcrayon-v>jboss/span>span classcrayon-sy>./span>span classcrayon-v>resteasy/span>span classcrayon-sy>./span>span classcrayon-v>resteasy_jaxrs/span>span classcrayon-sy>./span>span classcrayon-v>i18n/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-e>ServerService/span> span classcrayon-e>Thread/span> span classcrayon-v>Pool/span> span classcrayon-h>/span>span classcrayon-o>--/span> span classcrayon-h>/span>span classcrayon-cn>65/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>RESTEASY002200/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>Adding/span> span classcrayon-t>class/span> span classcrayon-h>/span>span classcrayon-e>resource/span> span classcrayon-v>org/span>span classcrayon-sy>./span>span classcrayon-v>couchbase/span>span classcrayon-sy>./span>span classcrayon-v>sample/span>span classcrayon-sy>./span>span classcrayon-v>javaee/span>span classcrayon-sy>./span>span classcrayon-e>AirlineResource/span> span classcrayon-e>from/span> span classcrayon-e>Application/span> span classcrayon-t>class/span> span classcrayon-h>/span>span classcrayon-v>org/span>span classcrayon-sy>./span>span classcrayon-v>couchbase/span>span classcrayon-sy>./span>span classcrayon-v>sample/span>span classcrayon-sy>./span>span classcrayon-v>javaee/span>span classcrayon-sy>./span>span classcrayon-i>MyApplication/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac206391045703-16>span classcrayon-cn>06/span>span classcrayon-o>:/span>span classcrayon-cn>32/span>span classcrayon-o>:/span>span classcrayon-cn>14/span>span classcrayon-sy>,/span>span classcrayon-cn>310/span> span classcrayon-h>/span>span classcrayon-i>INFO/span>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-v>org/span>span classcrayon-sy>./span>span classcrayon-v>wildfly/span>span classcrayon-sy>./span>span classcrayon-v>extension/span>span classcrayon-sy>./span>span classcrayon-v>undertow/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-e>ServerService/span> span classcrayon-e>Thread/span> span classcrayon-v>Pool/span> span classcrayon-h>/span>span classcrayon-o>--/span> span classcrayon-h>/span>span classcrayon-cn>65/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>WFLYUT0021/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>Registered/span> span classcrayon-e>web/span> span classcrayon-v>context/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-i>airlines/span>/div>div classcrayon-line idcrayon-5cfd1e54ac206391045703-17>span classcrayon-cn>06/span>span classcrayon-o>:/span>span classcrayon-cn>32/span>span classcrayon-o>:/span>span classcrayon-cn>14/span>span classcrayon-sy>,/span>span classcrayon-cn>376/span> span classcrayon-h>/span>span classcrayon-i>INFO/span>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-v>org/span>span classcrayon-sy>./span>span classcrayon-v>jboss/span>span classcrayon-sy>./span>span classcrayon-st>as/span>span classcrayon-sy>./span>span classcrayon-v>server/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-e>ServerService/span> span classcrayon-e>Thread/span> span classcrayon-v>Pool/span> span classcrayon-h>/span>span classcrayon-o>--/span> span classcrayon-h>/span>span classcrayon-cn>34/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>WFLYSRV0010/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-i>Deployed/span> span classcrayon-h>/span>span classcrayon-s>airlines.war/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-v>runtime/span>span classcrayon-o>-/span>span classcrayon-v>name/span> span classcrayon-h>/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>airlines.war/span>span classcrayon-sy>)/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac206391045703-18>span classcrayon-cn>06/span>span classcrayon-o>:/span>span classcrayon-cn>32/span>span classcrayon-o>:/span>span classcrayon-cn>14/span>span classcrayon-sy>,/span>span classcrayon-cn>704/span> span classcrayon-h>/span>span classcrayon-i>INFO/span>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-v>org/span>span classcrayon-sy>./span>span classcrayon-v>jboss/span>span classcrayon-sy>./span>span classcrayon-st>as/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-e>Controller/span> span classcrayon-e>Boot/span> span classcrayon-v>Thread/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>WFLYSRV0060/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>Http/span> span classcrayon-e>management/span> span classcrayon-t>interface/span> span classcrayon-h>/span>span classcrayon-e>listening/span> span classcrayon-e>on/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//127.0.0.1:9990/management/span>/div>div classcrayon-line idcrayon-5cfd1e54ac206391045703-19>span classcrayon-cn>06/span>span classcrayon-o>:/span>span classcrayon-cn>32/span>span classcrayon-o>:/span>span classcrayon-cn>14/span>span classcrayon-sy>,/span>span classcrayon-cn>704/span> span classcrayon-h>/span>span classcrayon-i>INFO/span>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-v>org/span>span classcrayon-sy>./span>span classcrayon-v>jboss/span>span classcrayon-sy>./span>span classcrayon-st>as/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-e>Controller/span> span classcrayon-e>Boot/span> span classcrayon-v>Thread/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>WFLYSRV0051/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>Admin/span> span classcrayon-e>console/span> span classcrayon-e>listening/span> span classcrayon-e>on/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//127.0.0.1:9990/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac206391045703-20>span classcrayon-cn>06/span>span classcrayon-o>:/span>span classcrayon-cn>32/span>span classcrayon-o>:/span>span classcrayon-cn>14/span>span classcrayon-sy>,/span>span classcrayon-cn>705/span> span classcrayon-h>/span>span classcrayon-i>INFO/span>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-v>org/span>span classcrayon-sy>./span>span classcrayon-v>jboss/span>span classcrayon-sy>./span>span classcrayon-st>as/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-e>Controller/span> span classcrayon-e>Boot/span> span classcrayon-v>Thread/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>WFLYSRV0025/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>WildFly/span> span classcrayon-i>Full/span> span classcrayon-h>/span>span classcrayon-cn>10.1.0.Final/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-e>WildFly/span> span classcrayon-i>Core/span> span classcrayon-h>/span>span classcrayon-cn>2.2.0.Final/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-e>started/span> span classcrayon-st>in/span> span classcrayon-h>/span>span classcrayon-cn>29470ms/span> span classcrayon-h>/span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-i>Started/span> span classcrayon-h>/span>span classcrayon-cn>443/span> span classcrayon-h>/span>span classcrayon-i>of/span> span classcrayon-h>/span>span classcrayon-cn>691/span> span classcrayon-h>/span>span classcrayon-e>services/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-cn>404/span> span classcrayon-h>/span>span classcrayon-e>services/span> span classcrayon-e>are/span> span classcrayon-v>lazy/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-e>passive/span> span classcrayon-st>or/span> span classcrayon-h>/span>span classcrayon-v>on/span>span classcrayon-o>-/span>span classcrayon-v>demand/span>span classcrayon-sy>)/span>/div>div classcrayon-line idcrayon-5cfd1e54ac206391045703-21> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>br />/p>h2>Access Application/h2>p>The code>kubectl proxy/code> command starts a proxy to the Kubernetes API server. Let’s start a Kubernetes proxy to access our application:/p>div idcrayon-5cfd1e54ac217481621112 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>kubectl proxyStarting to serve on 127.0.0.1:8001/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54ac217481621112-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac217481621112-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54ac217481621112-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac217481621112-4>4/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54ac217481621112-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac217481621112-2>span classcrayon-e>kubectl/span> span classcrayon-e>proxy/span>/div>div classcrayon-line idcrayon-5cfd1e54ac217481621112-3>span classcrayon-e>Starting/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>serve/span> span classcrayon-i>on/span> span classcrayon-h>/span>span classcrayon-cn>127.0.0.1/span>span classcrayon-o>:/span>span classcrayon-cn>8001/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac217481621112-4> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Expose the WildFly replica set as a service using:/p>div idcrayon-5cfd1e54ac225889064046 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>kubectl expose --namewildfly-service rs/wildfly-rs/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54ac225889064046-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac225889064046-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54ac225889064046-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54ac225889064046-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac225889064046-2>span classcrayon-e>kubectl/span> span classcrayon-v>expose/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>name/span>span classcrayon-o>/span>span classcrayon-v>wildfly/span>span classcrayon-o>-/span>span classcrayon-e>service/span> span classcrayon-v>rs/span>span classcrayon-o>//span>span classcrayon-v>wildfly/span>span classcrayon-o>-/span>span classcrayon-i>rs/span>/div>div classcrayon-line idcrayon-5cfd1e54ac225889064046-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>The list of services can be seen again using code>kubectl get svc/code> command:/p>div idcrayon-5cfd1e54ac233415235405 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>kubectl get svcNAME CLUSTER-IP EXTERNAL-IP PORT(S) AGEcouchbase-service 10.0.0.97 <none> 8091/TCP,8092/TCP,8093/TCP,11210/TCP 41mkubernetes 10.0.0.1 <none> 443/TCP 1hwildfly-service 10.0.0.169 <none> 8080/TCP 5s/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54ac233415235405-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac233415235405-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54ac233415235405-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac233415235405-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54ac233415235405-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac233415235405-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54ac233415235405-7>7/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54ac233415235405-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac233415235405-2>span classcrayon-e>kubectl/span> span classcrayon-e>get/span> span classcrayon-e>svc/span>/div>div classcrayon-line idcrayon-5cfd1e54ac233415235405-3>span classcrayon-e>NAME /span>span classcrayon-v>CLUSTER/span>span classcrayon-o>-/span>span classcrayon-e>IP /span> span classcrayon-v>EXTERNAL/span>span classcrayon-o>-/span>span classcrayon-e>IP /span> span classcrayon-e>PORT/span>span classcrayon-sy>(/span>span classcrayon-v>S/span>span classcrayon-sy>)/span>span classcrayon-h> /span>span classcrayon-e>AGE/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac233415235405-4>span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-i>service/span>span classcrayon-h> /span> span classcrayon-cn>10.0.0.97/span>span classcrayon-h> /span>span classcrayon-o></span>span classcrayon-v>none/span>span classcrayon-o>>/span>span classcrayon-h> /span>span classcrayon-cn>8091/span>span classcrayon-o>//span>span classcrayon-v>TCP/span>span classcrayon-sy>,/span>span classcrayon-cn>8092/span>span classcrayon-o>//span>span classcrayon-v>TCP/span>span classcrayon-sy>,/span>span classcrayon-cn>8093/span>span classcrayon-o>//span>span classcrayon-v>TCP/span>span classcrayon-sy>,/span>span classcrayon-cn>11210/span>span classcrayon-o>//span>span classcrayon-i>TCP/span>span classcrayon-h> /span> span classcrayon-cn>41m/span>/div>div classcrayon-line idcrayon-5cfd1e54ac233415235405-5>span classcrayon-i>kubernetes/span>span classcrayon-h> /span>span classcrayon-cn>10.0.0.1/span>span classcrayon-h> /span> span classcrayon-o></span>span classcrayon-v>none/span>span classcrayon-o>>/span>span classcrayon-h> /span>span classcrayon-cn>443/span>span classcrayon-o>//span>span classcrayon-i>TCP/span>span classcrayon-h> /span>span classcrayon-cn>1h/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac233415235405-6>span classcrayon-v>wildfly/span>span classcrayon-o>-/span>span classcrayon-i>service/span>span classcrayon-h> /span> span classcrayon-cn>10.0.0.169/span>span classcrayon-h> /span> span classcrayon-o></span>span classcrayon-v>none/span>span classcrayon-o>>/span>span classcrayon-h> /span>span classcrayon-cn>8080/span>span classcrayon-o>//span>span classcrayon-i>TCP/span>span classcrayon-h> /span> span classcrayon-cn>5s/span>/div>div classcrayon-line idcrayon-5cfd1e54ac233415235405-7> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Now, the application is accessible at:/p>div idcrayon-5cfd1e54ac241479641158 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>curl http://localhost:8001/api/v1/proxy/namespaces/default/services/wildfly-service/airlines/resources/airline/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54ac241479641158-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac241479641158-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54ac241479641158-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54ac241479641158-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac241479641158-2>span classcrayon-e>curl/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//localhost:8001/api/v1/proxy/namespaces/default/services/wildfly-service/airlines/resources/airline/span>/div>div classcrayon-line idcrayon-5cfd1e54ac241479641158-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>A formatted output looks like:/p>div idcrayon-5cfd1e54ac24f674086735 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;> { travel-sample: { country: United States, iata: Q5, callsign: MILE-AIR, name: 40-Mile Air, icao: MLA, id: 10, type: airline } }, { travel-sample: { country: United States, iata: TQ,. . . name: Airlinair, icao: RLA, id: 1203, type: airline } }/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54ac24f674086735-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac24f674086735-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54ac24f674086735-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac24f674086735-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54ac24f674086735-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac24f674086735-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54ac24f674086735-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac24f674086735-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54ac24f674086735-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac24f674086735-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54ac24f674086735-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac24f674086735-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54ac24f674086735-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac24f674086735-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54ac24f674086735-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac24f674086735-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54ac24f674086735-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac24f674086735-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54ac24f674086735-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac24f674086735-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54ac24f674086735-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac24f674086735-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54ac24f674086735-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac24f674086735-24>24/div>div classcrayon-num data-linecrayon-5cfd1e54ac24f674086735-25>25/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac24f674086735-26>26/div>div classcrayon-num data-linecrayon-5cfd1e54ac24f674086735-27>27/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54ac24f674086735-28>28/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54ac24f674086735-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac24f674086735-2>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54ac24f674086735-3>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac24f674086735-4>span classcrayon-h> /span>span classcrayon-s>travel-sample/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>{/span>/div>div classcrayon-line idcrayon-5cfd1e54ac24f674086735-5>span classcrayon-h> /span>span classcrayon-s>country/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>United States/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac24f674086735-6>span classcrayon-h> /span>span classcrayon-s>iata/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>Q5/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54ac24f674086735-7>span classcrayon-h> /span>span classcrayon-s>callsign/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>MILE-AIR/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac24f674086735-8>span classcrayon-h> /span>span classcrayon-s>name/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>40-Mile Air/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54ac24f674086735-9>span classcrayon-h> /span>span classcrayon-s>icao/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>MLA/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac24f674086735-10>span classcrayon-h> /span>span classcrayon-s>id/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>10/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54ac24f674086735-11>span classcrayon-h> /span>span classcrayon-s>type/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>airline/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac24f674086735-12>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54ac24f674086735-13>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac24f674086735-14>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line idcrayon-5cfd1e54ac24f674086735-15>span classcrayon-h> /span>span classcrayon-s>travel-sample/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac24f674086735-16>span classcrayon-h> /span>span classcrayon-s>country/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>United States/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54ac24f674086735-17>span classcrayon-h> /span>span classcrayon-s>iata/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>TQ/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac24f674086735-18> /div>div classcrayon-line idcrayon-5cfd1e54ac24f674086735-19>span classcrayon-sy>./span> span classcrayon-h>/span>span classcrayon-sy>./span> span classcrayon-h>/span>span classcrayon-sy>./span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac24f674086735-20> /div>div classcrayon-line idcrayon-5cfd1e54ac24f674086735-21>span classcrayon-h> /span> span classcrayon-s>name/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>Airlinair/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac24f674086735-22>span classcrayon-h> /span>span classcrayon-s>icao/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>RLA/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54ac24f674086735-23>span classcrayon-h> /span>span classcrayon-s>id/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1203/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac24f674086735-24>span classcrayon-h> /span>span classcrayon-s>type/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>airline/span>/div>div classcrayon-line idcrayon-5cfd1e54ac24f674086735-25>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac24f674086735-26>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54ac24f674086735-27>span classcrayon-sy>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54ac24f674086735-28> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Now, new pods may be added as part of Couchbase service by scaling the replica set. Existing pods may be terminated or get rescheduled. But the Java EE application will continue to access the database service using the logical name./p>p>This blog showed how a simple Java application can talk to a database using service discovery in Kubernetes./p>p>For further information check out:/p>ul>li>Kubernetes Docs/li>li>Couchbase on Containers/li>li>Couchbase Developer Portal/li>li>Ask questions on Couchbase Forums or Stack Overflow/li>li>Download Couchbase/li>/ul>/div>footer classentry-meta>div classcomments-link>a href/service-discovery-java-database-application-kubernetes/#comments>View all 3 comments/a>/div>/footer>/article>article idpost-14652 classpost-14652 post type-post status-publish format-standard hentry category-containers category-couchbase>header classentry-header>h1 classentry-title>a href/service-discovery-java-database-application-dcos/ relbookmark>Service Discovery with Java and Database application in DC/OS/a>/h1>div classentry-meta>span classdate>a href/service-discovery-java-database-application-dcos/ titlePermalink to Service Discovery with Java and Database application in DC/OS relbookmark>time classentry-date datetime2017-03-09T13:17:35+00:00>March 9, 2017/time>/a>/span>span classcategories-links>a href/topics/containers/ relcategory tag>containers/a>, a href/topics/couchbase/ relcategory tag>couchbase/a>/span>span classauthor vcard>a classurl fn n href/author/admin/ titleView all posts by arungupta relauthor>arungupta/a>/span>/div>/header>div classentry-content>p>This blog will show how a simple Java application can talk to a database using service discovery in DC/OS./p>p>img classalignnone size-full wp-image-2913 srchttp://blog.couchbase.com/wp-content/uploads/2017/03/dcos-1024x538-e1488894866397.png altDC/OS logo width711 height299 />/p>h2>Why Service Discovery?/h2>p>An application typically consist of multiple components such as an application server, a database, a web server, caching and messaging server. Typically, multiple replicas of each component would run based upon the needs of your application. Deploying this application using a container orchestration framework means that each replica would run as a container. So, an application is typically deployed as multi-container application./p>p>Each container is assigned a unique IP address for its lifetime. But containers are ephemeral and may terminate and rescheduled on a different host by the orchestration framework. A container is typically assigned a different IP address in that case. This means an application deployed in application server cannot rely upon the IP address of the database. This is where service discovery is required./p>p>So, multiple replicas of a component are assigned a logical name. For example, code>web/code> for all the application server containers and code>db/code> for all the database containers. Now, an application can talk to the database containers using the logical service name. This allows the database containers to be rescheduled anywhere in the cluster, and also scale up and down dynamically./p>p>Let’s see how this can be accomplished in DC/OS with a single instance of application server and database server. This blog will use WildFly for application server and Couchbase for database./p>p>Couchbase Cluster on Mesos with DC/OS provide more details on how to setup a Couchbase cluster on DC/OS./p>p>This blog will use the following main steps:/p>ul>li>Setup DC/OS Cluster/li>li>Marathon application definition/li>li>Deploy the application/li>/ul>p>The complete source code used in this blog is at github.com/arun-gupta/dcos-java-database./p>p>Many thanks to @unterstein for creating the Maven plugin and helping me understand the inner workings of DC/OS./p>h2>Setup DC/OS Cluster/h2>p>DC/OS cluster can be easily created using the CloudFormation template. Detailed instructions, including system requirements and screenshots and setup, are available at Installing DC/OS on AWS./p>p>CloudFormation output looks as shown:/p>p>img classalignnone size-large wp-image-2904 srchttp://blog.couchbase.com/wp-content/uploads/2017/03/dcos-cluster-cloudformation-output-1024x470.png altDC/OS Cluster CloudFormation Output width900 height413 />/p>p>Note down the value shown for the keys code>DnsAddress/code> and code>PublicSlaveDnsAddress/code>. The value of the first key can be used to access DC/OS GUI and looks like:/p>p>img classalignnone size-large wp-image-2905 srchttp://blog.couchbase.com/wp-content/uploads/2017/03/dcos-cluster-console-default-output-1024x624.png altDC/OS Cluster Console Default Output width900 height548 />/p>p>Configure DC/OS CLI as explained in CLI. In short, the following commands are used:/p>ul>li>code>dcos config set core.dcos_url http://${DnsAddress}/code> Replace code>${DnsAddress}/code> with the corresponding value from the CloudFormation output./li>li>code>dcos auth login/code>/li>li>code>dcos config show core.dcos_acs_token/code>. If not already done, clone the repo from github.com/arun-gupta/dcos-java-database. Create a new filecode>.dcos-token/code> and copy the output from the command in this file./li>li>code>dcos package install marathon-lb/code>/li>/ul>h2>Marathon Application Definition/h2>p>Marathon framework is used to schedule containers in DC/OS. A marathon application can be defined by providing an application definition./p>p>As mentioned earlier, this blog will show how a simple Java application can talk to a database. We’ll use a Java EE application deployed in WildFly and use Couchbase as the database. The application definition looks like:/p>div idcrayon-5cfd1e54adc21026420149 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>{ id:/webapp, apps: { id:database, cpus:4, mem:4096, instances:1, container:{ type:DOCKER, docker:{ image:arungupta/couchbase:travel, network:USER } }, ipAddress:{ networkName:dcos } }, { id:web, dependencies: /webapp/database , cpus:2, mem:4096, instances:1, container:{ type:DOCKER, docker:{ image:arungupta/wildfly-couchbase-javaee:travel, network:USER, portMappings: { hostPort:0, containerPort:8080, protocol:tcp } } }, ipAddress:{ networkName:dcos }, env:{ COUCHBASE_URI:database-webapp.marathon.containerip.dcos.thisdcos.directory }, labels:{ HAPROXY_0_VHOST:DCOS-PublicSlaveLo-DD2EGGFVCJA0-1604955948.us-west-1.elb.amazonaws.com, HAPROXY_GROUP:external } } }/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-24>24/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-25>25/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-26>26/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-27>27/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-28>28/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-29>29/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-30>30/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-31>31/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-32>32/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-33>33/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-34>34/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-35>35/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-36>36/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-37>37/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-38>38/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-39>39/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-40>40/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-41>41/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-42>42/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-43>43/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-44>44/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-45>45/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-46>46/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-47>47/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-48>48/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-49>49/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-50>50/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-51>51/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-52>52/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-53>53/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-54>54/div>div classcrayon-num data-linecrayon-5cfd1e54adc21026420149-55>55/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc21026420149-56>56/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54adc21026420149-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-2>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-3>span classcrayon-h> /span>span classcrayon-s>id/span>span classcrayon-o>:/span>span classcrayon-s>/webapp/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-4>span classcrayon-h> /span>span classcrayon-s>apps/span>span classcrayon-o>:/span>span classcrayon-sy>/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-5>span classcrayon-h> /span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-6>span classcrayon-h> /span>span classcrayon-s>id/span>span classcrayon-o>:/span>span classcrayon-s>database/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-7>span classcrayon-h> /span>span classcrayon-s>cpus/span>span classcrayon-o>:/span>span classcrayon-cn>4/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-8>span classcrayon-h> /span>span classcrayon-s>mem/span>span classcrayon-o>:/span>span classcrayon-cn>4096/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-9>span classcrayon-h> /span>span classcrayon-s>instances/span>span classcrayon-o>:/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-10>span classcrayon-h> /span>span classcrayon-s>container/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-11>span classcrayon-h> /span>span classcrayon-s>type/span>span classcrayon-o>:/span>span classcrayon-s>DOCKER/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-12>span classcrayon-h> /span>span classcrayon-s>docker/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-13>span classcrayon-h> /span>span classcrayon-s>image/span>span classcrayon-o>:/span>span classcrayon-s>arungupta/couchbase:travel/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-14>span classcrayon-h> /span>span classcrayon-s>network/span>span classcrayon-o>:/span>span classcrayon-s>USER/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-15>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-16>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-17>span classcrayon-h> /span>span classcrayon-s>ipAddress/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-18>span classcrayon-h> /span>span classcrayon-s>networkName/span>span classcrayon-o>:/span>span classcrayon-s>dcos/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-19>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-20>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-21>span classcrayon-h> /span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-22>span classcrayon-h> /span>span classcrayon-s>id/span>span classcrayon-o>:/span>span classcrayon-s>web/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-23>span classcrayon-h> /span>span classcrayon-s>dependencies/span>span classcrayon-o>:/span>span classcrayon-sy>/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-24>span classcrayon-h> /span>span classcrayon-s>/webapp/database/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-25>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-26>span classcrayon-h> /span>span classcrayon-s>cpus/span>span classcrayon-o>:/span>span classcrayon-cn>2/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-27>span classcrayon-h> /span>span classcrayon-s>mem/span>span classcrayon-o>:/span>span classcrayon-cn>4096/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-28>span classcrayon-h> /span>span classcrayon-s>instances/span>span classcrayon-o>:/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-29>span classcrayon-h> /span>span classcrayon-s>container/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-30>span classcrayon-h> /span>span classcrayon-s>type/span>span classcrayon-o>:/span>span classcrayon-s>DOCKER/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-31>span classcrayon-h> /span>span classcrayon-s>docker/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-32>span classcrayon-h> /span>span classcrayon-s>image/span>span classcrayon-o>:/span>span classcrayon-s>arungupta/wildfly-couchbase-javaee:travel/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-33>span classcrayon-h> /span>span classcrayon-s>network/span>span classcrayon-o>:/span>span classcrayon-s>USER/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-34>span classcrayon-h> /span>span classcrayon-s>portMappings/span>span classcrayon-o>:/span>span classcrayon-sy>/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-35>span classcrayon-h> /span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-36>span classcrayon-h> /span>span classcrayon-s>hostPort/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-37>span classcrayon-h> /span>span classcrayon-s>containerPort/span>span classcrayon-o>:/span>span classcrayon-cn>8080/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-38>span classcrayon-h> /span>span classcrayon-s>protocol/span>span classcrayon-o>:/span>span classcrayon-s>tcp/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-39>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-40>span classcrayon-h> /span>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-41>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-42>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-43>span classcrayon-h> /span>span classcrayon-s>ipAddress/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-44>span classcrayon-h> /span>span classcrayon-s>networkName/span>span classcrayon-o>:/span>span classcrayon-s>dcos/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-45>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-46>span classcrayon-h> /span>span classcrayon-s>env/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-47>span classcrayon-h> /span>span classcrayon-s>COUCHBASE_URI/span>span classcrayon-o>:/span>span classcrayon-s>database-webapp.marathon.containerip.dcos.thisdcos.directory/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-48>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-49>span classcrayon-h> /span>span classcrayon-s>labels/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-50>span classcrayon-h> /span>span classcrayon-s>HAPROXY_0_VHOST/span>span classcrayon-o>:/span>span classcrayon-s>DCOS-PublicSlaveLo-DD2EGGFVCJA0-1604955948.us-west-1.elb.amazonaws.com/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-51>span classcrayon-h> /span>span classcrayon-s>HAPROXY_GROUP/span>span classcrayon-o>:/span>span classcrayon-s>external/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-52>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-53>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-54>span classcrayon-h> /span>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54adc21026420149-55>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc21026420149-56> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>What are the key points in this application definition?/p>ul>li>Application has two containers: code>database/code> and code>web/code>. The web container has a dependency on the database container defined using code>dependencies/code> attribute./li>li>code>database/code> container uses code>arungupta/couchbase:travel/code> Docker image. This image is created from github.com/arun-gupta/couchbase-javaee/tree/master/couchbase. It uses Couchbase base image and uses Couchbase REST API to pre-configure the database. A sample bucket is also loaded in the database as well./li>li>code>web/code> container uses code>arungupta/wildfly-couchbase-javaee:travel/code> image. This image is created from github.com/arun-gupta/couchbase-javaee/blob/master/Dockerfile. This is a Java EE 7 application bundled in WildFly. The app uses code>COUCHBASE_URI/code> as an environment variable to connect to the Couchbase database. The value of this environment variable is configured to use DNS service discovery and is derived as explained in Virtual Networks./li>/ul>p>Make sure to change the value of code>HAPROXY_0_VHOST/code> to match the value of code>${PublicSlaveDnsAddress}/code> from CloudFormation output. The label code>HAPROXY_0_VHOST/code> instructs Marathon-LB to expose the Docker container, the WildFly application server in our case, on the external load balancer with a virtual host. The code>0/code> in the label key corresponds to the servicePort index, beginning from 0. If you had multiple servicePort definitions, you would iterate them as 0, 1, 2, and so on. Deploying an internally and externally load-balanced app with marathon-lb provide more details about how to configure marathon-lb./p>p>Service Discovery and Load Balancing provide more details about service discovery and load balancing in DC/OS./p>h2>Deploy the Application using Maven/h2>p>The application can be deployed using dcos-maven-plugin./p>p>Plugin looks like:/p>div idcrayon-5cfd1e54adc3f472776738 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>span classcrayon-language>XHTML/span>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;><plugin> <groupId>dcos</groupId> <artifactId>dcos-maven-plugin</artifactId> <version>0.2</version> <configuration> <dcosUrl>http://DCOS-ElasticLoadBa-1TH4TXIU5P783-1163025470.us-west-1.elb.amazonaws.com/</dcosUrl> <deployable>group</deployable> <ignoreSslCertificate>true</ignoreSslCertificate> </configuration> <executions> <execution> <id>dcos:deploy</id> <phase>install</phase> <goals> <goal>deploy</goal> </goals> </execution> </executions></plugin>/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54adc3f472776738-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc3f472776738-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54adc3f472776738-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc3f472776738-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54adc3f472776738-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc3f472776738-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54adc3f472776738-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc3f472776738-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54adc3f472776738-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc3f472776738-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54adc3f472776738-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc3f472776738-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54adc3f472776738-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc3f472776738-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54adc3f472776738-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc3f472776738-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54adc3f472776738-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc3f472776738-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54adc3f472776738-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc3f472776738-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54adc3f472776738-21>21/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54adc3f472776738-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc3f472776738-2>span classcrayon-r><plugin>/span>/div>div classcrayon-line idcrayon-5cfd1e54adc3f472776738-3>span classcrayon-i> /span>span classcrayon-r><groupId>/span>span classcrayon-i>dcos/span>span classcrayon-r></groupId>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc3f472776738-4>span classcrayon-i> /span>span classcrayon-r><artifactId>/span>span classcrayon-i>dcos-maven-plugin/span>span classcrayon-r></artifactId>/span>/div>div classcrayon-line idcrayon-5cfd1e54adc3f472776738-5>span classcrayon-i> /span>span classcrayon-r><version>/span>span classcrayon-i>0.2/span>span classcrayon-r></version>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc3f472776738-6>span classcrayon-i> /span>span classcrayon-r><configuration>/span>/div>div classcrayon-line idcrayon-5cfd1e54adc3f472776738-7>span classcrayon-i> /span>span classcrayon-r><dcosUrl>/span>span classcrayon-i>http://DCOS-ElasticLoadBa-1TH4TXIU5P783-1163025470.us-west-1.elb.amazonaws.com//span>span classcrayon-r></dcosUrl>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc3f472776738-8>span classcrayon-i> /span>span classcrayon-r><deployable>/span>span classcrayon-i>group/span>span classcrayon-r></deployable>/span>/div>div classcrayon-line idcrayon-5cfd1e54adc3f472776738-9>span classcrayon-i> /span>span classcrayon-r><ignoreSslCertificate>/span>span classcrayon-i>true/span>span classcrayon-r></ignoreSslCertificate>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc3f472776738-10>span classcrayon-i> /span>span classcrayon-r></configuration>/span>/div>div classcrayon-line idcrayon-5cfd1e54adc3f472776738-11>span classcrayon-i> /span>span classcrayon-r><executions>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc3f472776738-12>span classcrayon-i> /span>span classcrayon-r><execution>/span>/div>div classcrayon-line idcrayon-5cfd1e54adc3f472776738-13>span classcrayon-i> /span>span classcrayon-r><id>/span>span classcrayon-i>dcos:deploy/span>span classcrayon-r></id>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc3f472776738-14>span classcrayon-i> /span>span classcrayon-r><phase>/span>span classcrayon-i>install/span>span classcrayon-r></phase>/span>/div>div classcrayon-line idcrayon-5cfd1e54adc3f472776738-15>span classcrayon-i> /span>span classcrayon-r><goals>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc3f472776738-16>span classcrayon-i> /span>span classcrayon-r><goal>/span>span classcrayon-i>deploy/span>span classcrayon-r></goal>/span>/div>div classcrayon-line idcrayon-5cfd1e54adc3f472776738-17>span classcrayon-i> /span>span classcrayon-r></goals>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc3f472776738-18>span classcrayon-i> /span>span classcrayon-r></execution>/span>/div>div classcrayon-line idcrayon-5cfd1e54adc3f472776738-19>span classcrayon-i> /span>span classcrayon-r></executions>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc3f472776738-20>span classcrayon-r></plugin>/span>/div>div classcrayon-line idcrayon-5cfd1e54adc3f472776738-21> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Main points in this fragment are:/p>ul>li>Plugin version is 0.2. That indicates the plugin is still in early stages of development./li>li>code>dcosUrl/code> is the value of code>${DnsAddress}/code> key from CloudFormation output. This address is used for deployment of the application./li>li>code><deployable>/code> element enables different types of deployment – app, group or pods. This element is a hint for the plugin and should likely go away in a future version as Marathon API consolidates. Follow #11 for more details./li>/ul>p>Other details and configuration about the plugin are at dcos-maven-plugin./p>p>Deploy the application:/p>div idcrayon-5cfd1e54adc51208524968 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>mvn install/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54adc51208524968-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc51208524968-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54adc51208524968-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54adc51208524968-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc51208524968-2>span classcrayon-e>mvn/span> span classcrayon-i>install/span>/div>div classcrayon-line idcrayon-5cfd1e54adc51208524968-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>The following output is shown:/p>div idcrayon-5cfd1e54adc5f940479410 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>INFO --- dcos-maven-plugin:0.2:deploy (dcos:deploy) @ dcos-java-database ---INFO About to execute DC/OS deployINFO app definition: /Users/arungupta/workspaces/dcos-java-database/app-definition.jsonINFO dcos token: /Users/arungupta/workspaces/dcos-java-database/.dcos-tokenINFO dcos url: http://DCOS-ElasticLoadBa-1TH4TXIU5P783-1163025470.us-west-1.elb.amazonaws.com/INFO ignore ssl certificate: trueINFO deployable: groupINFO Response from DC/OS 200 {version:2017-03-07T13:27:49.970Z,deploymentId:dbc80f96-28cb-4040-8d0d-78452e461ec1}/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54adc5f940479410-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc5f940479410-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54adc5f940479410-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc5f940479410-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54adc5f940479410-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc5f940479410-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54adc5f940479410-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc5f940479410-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54adc5f940479410-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc5f940479410-10>10/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54adc5f940479410-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc5f940479410-2>span classcrayon-sy>/span>span classcrayon-v>INFO/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-v>dcos/span>span classcrayon-o>-/span>span classcrayon-v>maven/span>span classcrayon-o>-/span>span classcrayon-v>plugin/span>span classcrayon-o>:/span>span classcrayon-cn>0.2/span>span classcrayon-o>:/span>span classcrayon-e>deploy/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-v>dcos/span>span classcrayon-o>:/span>span classcrayon-v>deploy/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-sy>@/span> span classcrayon-h>/span>span classcrayon-v>dcos/span>span classcrayon-o>-/span>span classcrayon-v>java/span>span classcrayon-o>-/span>span classcrayon-v>database/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-o>-/span>/div>div classcrayon-line idcrayon-5cfd1e54adc5f940479410-3>span classcrayon-sy>/span>span classcrayon-v>INFO/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-e>About/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>execute/span> span classcrayon-v>DC/span>span classcrayon-o>//span>span classcrayon-e>OS/span> span classcrayon-i>deploy/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc5f940479410-4>span classcrayon-sy>/span>span classcrayon-v>INFO/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-e>app/span> span classcrayon-v>definition/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>Users/span>span classcrayon-o>//span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>workspaces/span>span classcrayon-o>//span>span classcrayon-v>dcos/span>span classcrayon-o>-/span>span classcrayon-v>java/span>span classcrayon-o>-/span>span classcrayon-v>database/span>span classcrayon-o>//span>span classcrayon-v>app/span>span classcrayon-o>-/span>span classcrayon-v>definition/span>span classcrayon-sy>./span>span classcrayon-i>json/span>/div>div classcrayon-line idcrayon-5cfd1e54adc5f940479410-5>span classcrayon-sy>/span>span classcrayon-v>INFO/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-e>dcos/span> span classcrayon-v>token/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>Users/span>span classcrayon-o>//span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>workspaces/span>span classcrayon-o>//span>span classcrayon-v>dcos/span>span classcrayon-o>-/span>span classcrayon-v>java/span>span classcrayon-o>-/span>span classcrayon-v>database/span>span classcrayon-o>//span>span classcrayon-sy>./span>span classcrayon-v>dcos/span>span classcrayon-o>-/span>span classcrayon-i>token/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc5f940479410-6>span classcrayon-sy>/span>span classcrayon-v>INFO/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-e>dcos/span> span classcrayon-v>url/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//DCOS-ElasticLoadBa-1TH4TXIU5P783-1163025470.us-west-1.elb.amazonaws.com//span>/div>div classcrayon-line idcrayon-5cfd1e54adc5f940479410-7>span classcrayon-sy>/span>span classcrayon-v>INFO/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-e>ignore/span> span classcrayon-e>ssl/span> span classcrayon-v>certificate/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>true/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc5f940479410-8>span classcrayon-sy>/span>span classcrayon-v>INFO/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-v>deployable/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>group/span>/div>div classcrayon-line idcrayon-5cfd1e54adc5f940479410-9>span classcrayon-sy>/span>span classcrayon-e>INFO/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-e>Response/span> span classcrayon-h>/span>span classcrayon-e>from/span> span classcrayon-h>/span>span classcrayon-e>DC/span>span classcrayon-o>//span>span classcrayon-e>OS/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-cn>200/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-sy>{/span>span classcrayon-s>version/span>span classcrayon-o>:/span>span classcrayon-s>2017-03-07T13:27:49.970Z/span>span classcrayon-sy>,/span>span classcrayon-s>deploymentId/span>span classcrayon-o>:/span>span classcrayon-s>dbc80f96-28cb-4040-8d0d-78452e461ec1/span>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc5f940479410-10> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Here are some of the updated output from DC/OS console./p>p>First updated Services tab:br />img classalignnone size-large wp-image-2906 srchttp://blog.couchbase.com/wp-content/uploads/2017/03/dcos-cluster-webapp-1-1024x811.png altDC/OS Cluster Web Application width900 height713 />/p>p>Two applications in the service:br />img classalignnone size-large wp-image-2907 srchttp://blog.couchbase.com/wp-content/uploads/2017/03/dcos-cluster-webapp-2-1024x824.png altDC/OS Cluster Web Application width900 height724 />/p>p>Database application has one task:br />img classalignnone size-large wp-image-2908 srchttp://blog.couchbase.com/wp-content/uploads/2017/03/dcos-cluster-webapp-3-1024x484.png altDC/OS Cluster Web Application width900 height425 />/p>p>Status of database task:img classalignnone wp-image-2909 size-large srchttp://blog.couchbase.com/wp-content/uploads/2017/03/dcos-cluster-webapp-4-1024x931.png altDatabase Service Discovery width900 height818 />/p>p>Logs from the database task:br />img classalignnone size-large wp-image-2910 srchttp://blog.couchbase.com/wp-content/uploads/2017/03/dcos-cluster-webapp-5-1024x668.png altDC/OS Cluster Web Application width900 height587 />/p>p>It shows the output from Couchbase REST API for configuring the server./p>p>Status of web task:br />img classalignnone size-large wp-image-2911 srchttp://blog.couchbase.com/wp-content/uploads/2017/03/dcos-cluster-webapp-6-1024x761.png altDC/OS Cluster Web Application width900 height669 />/p>p>Logs from web task:br />img classalignnone size-large wp-image-2912 srchttp://blog.couchbase.com/wp-content/uploads/2017/03/dcos-cluster-webapp-7-1024x606.png altDC/OS Cluster WildFly Output width900 height533 />/p>p>It shows that the Java EE application is deployed successfully./p>p>Access the application:/p>div idcrayon-5cfd1e54adc71748798852 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>curl http://DCOS-PublicSlaveLo-DD2EGGFVCJA0-1604955948.us-west-1.elb.amazonaws.com/airlines/resources/airline/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54adc71748798852-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc71748798852-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54adc71748798852-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54adc71748798852-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc71748798852-2>span classcrayon-e>curl/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//DCOS-PublicSlaveLo-DD2EGGFVCJA0-1604955948.us-west-1.elb.amazonaws.com/airlines/resources/airline/span>/div>div classcrayon-line idcrayon-5cfd1e54adc71748798852-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>The address is the value of the key code>${PublicSlaveDnsAddress}/code> from CloudFormation output. A formatted output, for example with jq, looks like:/p>div idcrayon-5cfd1e54adc7f646058824 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;> { travel-sample: { country: United States, iata: Q5, callsign: MILE-AIR, name: 40-Mile Air, icao: MLA, id: 10, type: airline } }, { travel-sample: { country: United States,. . . icao: RLA, id: 1203, type: airline } }/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54adc7f646058824-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc7f646058824-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54adc7f646058824-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc7f646058824-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54adc7f646058824-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc7f646058824-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54adc7f646058824-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc7f646058824-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54adc7f646058824-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc7f646058824-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54adc7f646058824-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc7f646058824-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54adc7f646058824-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc7f646058824-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54adc7f646058824-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc7f646058824-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54adc7f646058824-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc7f646058824-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54adc7f646058824-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc7f646058824-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54adc7f646058824-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc7f646058824-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54adc7f646058824-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc7f646058824-24>24/div>div classcrayon-num data-linecrayon-5cfd1e54adc7f646058824-25>25/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54adc7f646058824-26>26/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54adc7f646058824-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc7f646058824-2>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54adc7f646058824-3>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc7f646058824-4>span classcrayon-h> /span>span classcrayon-s>travel-sample/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>{/span>/div>div classcrayon-line idcrayon-5cfd1e54adc7f646058824-5>span classcrayon-h> /span>span classcrayon-s>country/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>United States/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc7f646058824-6>span classcrayon-h> /span>span classcrayon-s>iata/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>Q5/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc7f646058824-7>span classcrayon-h> /span>span classcrayon-s>callsign/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>MILE-AIR/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc7f646058824-8>span classcrayon-h> /span>span classcrayon-s>name/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>40-Mile Air/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc7f646058824-9>span classcrayon-h> /span>span classcrayon-s>icao/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>MLA/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc7f646058824-10>span classcrayon-h> /span>span classcrayon-s>id/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>10/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc7f646058824-11>span classcrayon-h> /span>span classcrayon-s>type/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>airline/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc7f646058824-12>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54adc7f646058824-13>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc7f646058824-14>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line idcrayon-5cfd1e54adc7f646058824-15>span classcrayon-h> /span>span classcrayon-s>travel-sample/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc7f646058824-16>span classcrayon-h> /span>span classcrayon-s>country/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>United States/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc7f646058824-17> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc7f646058824-18>span classcrayon-sy>./span> span classcrayon-h>/span>span classcrayon-sy>./span> span classcrayon-h>/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54adc7f646058824-19> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc7f646058824-20>span classcrayon-h> /span> span classcrayon-s>icao/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>RLA/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54adc7f646058824-21>span classcrayon-h> /span>span classcrayon-s>id/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1203/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc7f646058824-22>span classcrayon-h> /span>span classcrayon-s>type/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>airline/span>/div>div classcrayon-line idcrayon-5cfd1e54adc7f646058824-23>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc7f646058824-24>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54adc7f646058824-25>span classcrayon-sy>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54adc7f646058824-26> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>That’s it!/p>p>As mentioned earlier, the complete source code used in this blog is at github.com/arun-gupta/dcos-java-database./p>p>This blog showed how a simple Java application can talk to a database using service discovery in DC/OS./p>p>For further information check out:/p>ul>li>DC/OS Docs/li>li>Couchbase on Containers/li>li>Couchbase Developer Portal/li>li>Ask questions on Couchbase Forums or Stack Overflow/li>li>Download Couchbase/li>/ul>p>Source: blog.couchbase.com/service-discovery-java-database-dcos//p>/div>footer classentry-meta>div classcomments-link>a href/service-discovery-java-database-application-dcos/#comments>View all 8 comments/a>/div>/footer>/article>article idpost-14650 classpost-14650 post type-post status-publish format-standard hentry category-couchbase category-devops>header classentry-header>h1 classentry-title>a href/nosql-simplifies-database-devops-2/ relbookmark>NoSQL Simplifies Database DevOps/a>/h1>div classentry-meta>span classdate>a href/nosql-simplifies-database-devops-2/ titlePermalink to NoSQL Simplifies Database DevOps relbookmark>time classentry-date datetime2017-03-09T13:16:32+00:00>March 9, 2017/time>/a>/span>span classcategories-links>a href/topics/couchbase/ relcategory tag>couchbase/a>, a href/topics/devops/ relcategory tag>devops/a>/span>span classauthor vcard>a classurl fn n href/author/admin/ titleView all posts by arungupta relauthor>arungupta/a>/span>/div>/header>div classentry-content>p>Does your organization want to simplify Database DevOps?br />Is your database becoming a bottleneck to innovate rapidly?br />Do you want to save millions of $$ in database licensing cost?/p>p>Read on!/p>h2>State of Database DevOps/h2>p>State of Database DevOps is a survey on DevOps adoption rates among SQL Server professionals. Over 1000 SQL Server professionals responded to the survey. The respondents came from across the globe and represent a wide range of job roles, company sizes and industries./p>p>There are some good findings in the survey results. A few key findings worth highlighting here:/p>blockquote>p>the greatest challenge with integrating database changes into a DevOps process would still be synchronizing application and database changes/p>/blockquote>p>Another one …/p>blockquote>p>The greatest drawback identified with traditional siloed database development is the increased risk of failed deployments or downtime when introducing changes. This is closely followed by slow development and release cycles and the inability to respond quickly to changing business requirements/p>/blockquote>p>And another one …/p>blockquote>p>Increasing the speed of delivery of database changes and freeing developers up to do more value added work are the key drivers for automating the delivery of database changes/p>/blockquote>p>The challenges highlighted here are not mentioned in the context of SQL server only, but would be applicable towards any relational database. You may be using Oracle, Postgres, MySQL, MariaDB or any other relational database for that matter and would be very much facing these issues. Why?/p>h2>Why is Relational not well suited for Database DevOps?/h2>p>It’s common for an application to operate on data from multiple tables in a RDBMS. For example, placing an order may use Customer, Order and Product tables. Each table has multiple columns with standard data types specific to a database. Tables may have primary, reference and foreign key constraints. Developers building applications using a relational database typically use an Object Relational Mapper (ORM), such as Hibernate or Java Persistence API for Java developers. There are similar ORM for other languages as well. ORMs captures the underlying complex database structure and allow programmers to build applications naturally using their language./p>p>ORMs also use a persistence provider and allows your application to be independent of the underlying database. This persistence provider creates a binding between the language specific class to the database structure. For example, it maps a class to a table or multiple tables, binds the language data types to the types defined in the database and captures the relationship between tables. Theoretically, a programmer can use a different persistence provider to use a different RDBMS for the application. But this is far from a practical experience!/p>p>Any database change requires the ORM classes to be updated otherwise the application may not work. For example, adding a new table may mean a new Java class or updating an existing class. Change of a data type in a column requires the class definition to be updated otherwise the application will not even compile. Adding a new column means adding a new field in the class. Any change requires the classes to be updated and the application needs to be repackaged./p>p>Changes in database structure are required all the time to meet the evolving needs of business. But if the DBAs make a database change and the ORM classes are not updated then there is a disconnect. Application deployment needs to be coordinated with the updating the database schema. There are tools like Flyway, Liquibase and others that integrate application and database deployment. But developers are often not allowed to make any direct changes to the production database. A disconnect would result in your application not working and the business to suffer. DevOps practices can definitely help solve these issues as it requires a close collaboration between developers that are building applications and DBAs that are updating database scripts./p>p>But as the survey reports, more than 50% of the respondents do not have DevOps adopted today./p>p>img classalignnone size-large wp-image-2832 srchttp://blog.couchbase.com/wp-content/uploads/2017/02/database-devops-1-1024x562.png altDatabase DevOps Adoption width900 height494 />/p>p>There are challenges even if you were to integrate database changes into a DevOps process./p>p>img classalignnone size-large wp-image-2833 srchttp://blog.couchbase.com/wp-content/uploads/2017/02/database-devops-14-1024x617.png altDatabase DevOps Challenges width900 height542 />/p>p>Synchronizing application and database changes where the ORM classes need to be synchronized with the backend database structure is the biggest challenge. DBAs may want to structure the database in a certain way which may not be optimal for application development. Applying consistency across application and database development is the next major challenge for ensuring a seamless database DevOps./p>p>A siloed development has serious issues on your ability to rapidly innovate and deliver value to your business./p>p>img classalignnone size-large wp-image-2834 srchttp://blog.couchbase.com/wp-content/uploads/2017/02/database-devops-12-1024x588.png altDatabase DevOps Drawbacks width900 height517 />/p>p>As shown in this image, failed deployments when introducing changes, slow development/release cycles and inability to respond to business needs account for over 60% of the drawbacks./p>p>Speed of delivery of database changes is the biggest concern for database DevOps./p>p>img classalignnone size-large wp-image-2835 srchttp://blog.couchbase.com/wp-content/uploads/2017/02/database-devops-13-1024x624.png altDatabase DevOps Driver width900 height548 />/p>p>So what do you do?/p>h2>How does NoSQL simplify Database DevOps?/h2>p>NoSQL document database helps to simplify database DevOps!/p>p>How does NoSQL simplify database DevOps?/p>ul>li>strong>Schema flexibility/strong> – Developers need a single database that can store rapidly changing structured, semi-structured and unstructured data. NoSQL document database offers schema flexibility by allowing developers operate directly on JSON data and derive meaning out of it/li>li>strong>No impedance mismatch/strong> – With no ORM for the application, there is no impedance mismatch between domain classes and database structure. Only the application code needs to be updated and no coordination is required with the schema changes/li>li>strong>Scalability/strong> – One of the drawbacks mentioned in the report is the inability to adapt to changing business requirements. This highlights scalability as a major DevOps challenge. If the volume of data, the number of queries, or the types of indexes required to support the application changes the database needs to change to accommodate those changes. Not in weeks or months, but today! No SQL databases run on commodity hardware and has a scale-out architecture as opposed to scale-up with RDBMS. Sharding can help with scalability in RDBMS but that’s an extra complexity that now need to be dealt with./li>/ul>p>Learn more about why enterprises move to NoSQL./p>p>Which NoSQL database is preferred by GE, Marriott, Verizon, United, LinkedIn, DIRECTV and many others?/p>p>What are some other advantages of Couchbase?/p>ul>li>Homogeneous distributed architecture – no master/slave/li>li>SQL-like query language to query JSON documents/li>li>Auto-sharding using vBuckets/li>li>Memory-first architecture reduces the need for an additional caching layer/li>li>Cross-data center replication/li>li>Multiple SDKs/li>li>Database on server or mobile device, with a complete synchronization between them/li>li>Different container orchestration frameworks/li>/ul>p>NoSQL is not a panacea by any means. If you are building a system that needs complex transaction logic or real-time data warehousing, then RDBMS may be a better fit. However it addresses your scalability and agility concerns and simplifies database DevOps./p>p>Here is a great video on migrating from relational database to NoSQL:/p>p>iframe width604 height340 srchttps://www.youtube.com/embed/xlYSgyHLur8?featureoembed frameborder0 allowfullscreenallowfullscreen>/iframe>/p>p>Here is another interesting video that shows why Marriott transitioned from Relational to NoSQL:/p>p>iframe width604 height340 srchttps://www.youtube.com/embed/UPiSVuOiz9g?featureoembed frameborder0 allowfullscreenallowfullscreen>/iframe>/p>p>A lot more videos are available on Couchbase Connect 2016./p>p>And some more relevant blogs:/p>ul>li>Making the Shift from Relational to NoSQL: How to Get Started (whitepaper)/li>li>Moving from Oracle database to Couchbase/li>li>Moving from MySQL to Couchbase/li>li>Moving from SQL Server to Couchbase – Part 1 (data modeling), Part 2 (data migration), Part 3 (coming)/li>li>Moving from MongoDB to Couchbase/li>li>Migrate your MongoDB with Mongoose REST API to Couchbase with Ottoman/li>li>Migrating from Relational Database to Couchbase/li>li>Top 5 reasons companies replace Oracle with Couchbase/li>/ul>p>Talk to us:/p>ul>li>Couchbase Developer Portal/li>li>Couchbase Forums/li>li>@couchhasedev and @couchbase/li>/ul>p>Source: blog.couchbase.com/nosql-simplifies-database-devops//p>/div>footer classentry-meta>div classcomments-link>a href/nosql-simplifies-database-devops-2/#comments>View all 8 comments/a>/div>/footer>/article>article idpost-14648 classpost-14648 post type-post status-publish format-standard hentry category-containers category-couchbase>header classentry-header>h1 classentry-title>a href/stateful-containers-using-portworx-couchbase/ relbookmark>Stateful Containers using Portworx and Couchbase/a>/h1>div classentry-meta>span classdate>a href/stateful-containers-using-portworx-couchbase/ titlePermalink to Stateful Containers using Portworx and Couchbase relbookmark>time classentry-date datetime2017-03-09T13:15:13+00:00>March 9, 2017/time>/a>/span>span classcategories-links>a href/topics/containers/ relcategory tag>containers/a>, a href/topics/couchbase/ relcategory tag>couchbase/a>/span>span classauthor vcard>a classurl fn n href/author/admin/ titleView all posts by arungupta relauthor>arungupta/a>/span>/div>/header>div classentry-content>p>img classalignnone size-medium wp-image-2691 srchttp://blog.couchbase.com/wp-content/uploads/2017/02/px-logo-300x110.png altPortworx Logo width300 height110 /> img classalignnone size-medium wp-image-1109 srchttp://blog.couchbase.com/wp-content/uploads/2017/02/logo-300x69.png altCouchbase Logo width300 height69 />/p>p>Containers are meant to be ephemeral and so scale pretty well for stateless applications. Stateful containers, such as Couchbase, need to be treated differently. Managing Persistence for Docker Containers provide a great overview of how to manage persistence for stateful containers./p>p>This blog will explain how to use Docker Volume Plugins and Portworx to create a stateful container./p>h2 iduser-content-why-a-href-https-portworx-com-portworx-a>Why Portworx?/h2>p>Portworx is an easy-to-deploy container data services that provide persistence, replication, snapshots, encryption, secure RBAC and much more. Some of the benefits are:/p>ol classarabic>li>strong>Container granular volumes/strong> – Portworx can take multiple EBS volumes per host and aggregate the capacity and derive container granular virtual (soft) volumes per container./li>li>strong>Cross Availability Zone HA/strong> – Portworx will protect the data, at block level, across multiple compute instances across availability zones. As replication controllers restart pods on different nodes, the data will still be highly available on those nodes./li>li>strong>Support for enterprise data operations/strong> – Portworx implements container granular snapshots, class of service, tiering on top of the available physical volumes./li>li>strong>Ease of deployment and provisioning/strong> – Portworx itself is deployed as a container and integrated with the orchestration tools. DevOps can programmatically provision container granular storage with any property such as size, class of service, encryption key etc./li>/ol>h2>Setup AWS EC2 Instance/h2>p>Portworx runs only on Linux or CoreOS. Setup an Ubuntu instance on AWS EC2:/p>ol classarabic>li>Start Ubuntu 14.04 instance with code>m3.medium/code> instance type. Make sure to add port 8091 to inbound security rules. This allows Couchbase Web Console to be accessible afterwards./li>li>Login to the EC2 instance using the command: code>ssh -i ~/.ssh/arun-cb-west1.pem ubuntu@<public-ip>/code>/li>li>Update the Ubuntu instance: code>sudo apt-get update/code>/li>li>Install Docker: code>curl -sSL https://get.docker.com/ | sh/code>. More detailed instructions are available at Get Docker for Ubuntu./li>li>Enable non-root access for the docker command: code>sudo usermod -aG docker ubuntu/code>/li>li>Logout from the EC2 instance and log back in/li>/ol>h2>Create AWS EBS Volume/h2>ol classarabic>li>Create an EBS volume for 10GB using EC2 console as explained in docs./li>li>Get the instance id from the EC2 console. Attach this volume to EC2 instance using this instance id, use the default device name code>/dev/sdf.br /> img classalignnone size-medium wp-image-2690 srchttp://blog.couchbase.com/wp-content/uploads/2017/02/portworx-create-ec2-volume-300x138.png altPortworx EC2 Create Volume width300 height138 />br />/code>/li>li>Use code>lsblk/code> command in EC2 instance to verify that the volume is attached to the instance:br />div idcrayon-5cfd1e54aee44137707358 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTxvda 202:0 0 8G 0 disk└─xvda1 202:1 0 8G 0 part /xvdb 202:16 0 30G 0 disk /mntxvdf 202:80 0 10G 0 disk/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aee44137707358-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee44137707358-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aee44137707358-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee44137707358-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54aee44137707358-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee44137707358-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54aee44137707358-7>7/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aee44137707358-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee44137707358-2>span classcrayon-e>NAME /span>span classcrayon-v>MAJ/span>span classcrayon-o>:/span>span classcrayon-e>MIN/span> span classcrayon-e>RM/span> span classcrayon-e>SIZE/span> span classcrayon-e>RO/span> span classcrayon-e>TYPE/span> span classcrayon-e>MOUNTPOINT/span>/div>div classcrayon-line idcrayon-5cfd1e54aee44137707358-3>span classcrayon-i>xvda/span>span classcrayon-h> /span>span classcrayon-cn>202/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-h> /span>span classcrayon-cn>0/span>span classcrayon-h> /span> span classcrayon-cn>8G/span>span classcrayon-h> /span>span classcrayon-cn>0/span> span classcrayon-h>/span>span classcrayon-i>disk/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee44137707358-4>└─span classcrayon-i>xvda1/span> span classcrayon-h>/span>span classcrayon-cn>202/span>span classcrayon-o>:/span>span classcrayon-cn>1/span>span classcrayon-h> /span>span classcrayon-cn>0/span>span classcrayon-h> /span> span classcrayon-cn>8G/span>span classcrayon-h> /span>span classcrayon-cn>0/span> span classcrayon-h>/span>span classcrayon-v>part/span> span classcrayon-h>/span>span classcrayon-o>//span>/div>div classcrayon-line idcrayon-5cfd1e54aee44137707358-5>span classcrayon-i>xvdb/span>span classcrayon-h> /span>span classcrayon-cn>202/span>span classcrayon-o>:/span>span classcrayon-cn>16/span>span classcrayon-h> /span> span classcrayon-cn>0/span>span classcrayon-h> /span>span classcrayon-cn>30G/span>span classcrayon-h> /span>span classcrayon-cn>0/span> span classcrayon-h>/span>span classcrayon-v>disk/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-e>mnt/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee44137707358-6>span classcrayon-i>xvdf/span>span classcrayon-h> /span>span classcrayon-cn>202/span>span classcrayon-o>:/span>span classcrayon-cn>80/span>span classcrayon-h> /span> span classcrayon-cn>0/span>span classcrayon-h> /span>span classcrayon-cn>10G/span>span classcrayon-h> /span>span classcrayon-cn>0/span> span classcrayon-h>/span>span classcrayon-i>disk/span>/div>div classcrayon-line idcrayon-5cfd1e54aee44137707358-7> /div>/div>/td>/tr>/tbody>/table>/div>/div>/li>/ol>h2>Portworx Container/h2>ol>li>Physical storage makeup of each node, all the provisioned volumes in the cluster as well as their container mappings is stored in an etcd cluster. Start an etcd cluster:br />div idcrayon-5cfd1e54aee5d302456975 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker run -v \ /data/varlib/etcd \ -p 4001:4001 \ -d \ portworx/etcd:latest/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aee5d302456975-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee5d302456975-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aee5d302456975-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee5d302456975-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54aee5d302456975-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee5d302456975-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54aee5d302456975-7>7/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aee5d302456975-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee5d302456975-2>span classcrayon-e>docker/span> span classcrayon-v>run/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>v/span> span classcrayon-h>/span>span classcrayon-sy>\/span>/div>div classcrayon-line idcrayon-5cfd1e54aee5d302456975-3>span classcrayon-h> /span>span classcrayon-o>//span>span classcrayon-v>data/span>span classcrayon-o>//span>span classcrayon-v>varlib/span>span classcrayon-o>//span>span classcrayon-i>etcd/span> span classcrayon-h>/span>span classcrayon-sy>\/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee5d302456975-4>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-i>p/span> span classcrayon-h>/span>span classcrayon-cn>4001/span>span classcrayon-o>:/span>span classcrayon-cn>4001/span> span classcrayon-h>/span>span classcrayon-sy>\/span>/div>div classcrayon-line idcrayon-5cfd1e54aee5d302456975-5>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-i>d/span> span classcrayon-h>/span>span classcrayon-sy>\/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee5d302456975-6>span classcrayon-h> /span>span classcrayon-v>portworx/span>span classcrayon-o>//span>span classcrayon-v>etcd/span>span classcrayon-o>:/span>span classcrayon-i>latest/span>/div>div classcrayon-line idcrayon-5cfd1e54aee5d302456975-7> /div>/div>/td>/tr>/tbody>/table>/div>/div>/li>li>By default root mounted volumes are not allowed to be shared. Enable this using the command:br />div idcrayon-5cfd1e54aee6c104744230 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>sudo mount --make-shared //textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aee6c104744230-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee6c104744230-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aee6c104744230-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aee6c104744230-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee6c104744230-2>span classcrayon-e>sudo/span> span classcrayon-v>mount/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>make/span>span classcrayon-o>-/span>span classcrayon-v>shared/span> span classcrayon-h>/span>span classcrayon-o>//span>/div>div classcrayon-line idcrayon-5cfd1e54aee6c104744230-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>This is explained more at Ubuntu Configuration and Shared Mounts./li>li>PX-Developer (px-dev) container on a server with Docker Engine turns that server into a scale-out storage node. PX-Enterprise, on the other hand, provides multi-cluster and multi-cloud support, where storage under management can be on-premise or in a public cloud like AWS.br />For this blog, we’ll start a px-dev container:br />div idcrayon-5cfd1e54aee7b707004707 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker run --restartalways --name px -d --nethost \ --privilegedtrue \ -v /run/docker/plugins:/run/docker/plugins \ -v /var/lib/osd:/var/lib/osd:shared \ -v /dev:/dev \ -v /etc/pwx:/etc/pwx \ -v /opt/pwx/bin:/export_bin:shared \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /var/cores:/var/cores \ -v /usr/src:/usr/src \ --ipchost \ portworx/px-dev -daemon -k etcd://localhost:4001 -c cluster1 -s /dev/xvdf/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aee7b707004707-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee7b707004707-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aee7b707004707-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee7b707004707-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54aee7b707004707-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee7b707004707-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54aee7b707004707-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee7b707004707-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54aee7b707004707-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee7b707004707-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54aee7b707004707-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee7b707004707-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54aee7b707004707-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee7b707004707-14>14/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aee7b707004707-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee7b707004707-2>span classcrayon-e>docker/span> span classcrayon-v>run/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>restart/span>span classcrayon-o>/span>span classcrayon-v>always/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-e>name/span> span classcrayon-v>px/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>d/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>net/span>span classcrayon-o>/span>span classcrayon-i>host/span> span classcrayon-h>/span>span classcrayon-sy>\/span>/div>div classcrayon-line idcrayon-5cfd1e54aee7b707004707-3>span classcrayon-h> /span>span classcrayon-o>--/span>span classcrayon-v>privileged/span>span classcrayon-o>/span>span classcrayon-t>true/span>span classcrayon-h> /span> span classcrayon-sy>\/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee7b707004707-4>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-v>v/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>run/span>span classcrayon-o>//span>span classcrayon-v>docker/span>span classcrayon-o>//span>span classcrayon-v>plugins/span>span classcrayon-o>:/span>span classcrayon-o>//span>span classcrayon-v>run/span>span classcrayon-o>//span>span classcrayon-v>docker/span>span classcrayon-o>//span>span classcrayon-i>plugins/span>span classcrayon-h> /span>span classcrayon-sy>\/span>/div>div classcrayon-line idcrayon-5cfd1e54aee7b707004707-5>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-v>v/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-t>var/span>span classcrayon-o>//span>span classcrayon-v>lib/span>span classcrayon-o>//span>span classcrayon-v>osd/span>span classcrayon-o>:/span>span classcrayon-o>//span>span classcrayon-t>var/span>span classcrayon-o>//span>span classcrayon-v>lib/span>span classcrayon-o>//span>span classcrayon-v>osd/span>span classcrayon-o>:/span>span classcrayon-i>shared/span>span classcrayon-h> /span> span classcrayon-sy>\/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee7b707004707-6>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-v>v/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>dev/span>span classcrayon-o>:/span>span classcrayon-o>//span>span classcrayon-i>dev/span>span classcrayon-h> /span>span classcrayon-sy>\/span>/div>div classcrayon-line idcrayon-5cfd1e54aee7b707004707-7>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-v>v/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>etc/span>span classcrayon-o>//span>span classcrayon-v>pwx/span>span classcrayon-o>:/span>span classcrayon-o>//span>span classcrayon-v>etc/span>span classcrayon-o>//span>span classcrayon-i>pwx/span>span classcrayon-h> /span>span classcrayon-sy>\/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee7b707004707-8>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-v>v/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>opt/span>span classcrayon-o>//span>span classcrayon-v>pwx/span>span classcrayon-o>//span>span classcrayon-v>bin/span>span classcrayon-o>:/span>span classcrayon-o>//span>span classcrayon-v>export_bin/span>span classcrayon-o>:/span>span classcrayon-i>shared/span>span classcrayon-h> /span>span classcrayon-sy>\/span>/div>div classcrayon-line idcrayon-5cfd1e54aee7b707004707-9>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-v>v/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-t>var/span>span classcrayon-o>//span>span classcrayon-v>run/span>span classcrayon-o>//span>span classcrayon-v>docker/span>span classcrayon-sy>./span>span classcrayon-v>sock/span>span classcrayon-o>:/span>span classcrayon-o>//span>span classcrayon-t>var/span>span classcrayon-o>//span>span classcrayon-v>run/span>span classcrayon-o>//span>span classcrayon-v>docker/span>span classcrayon-sy>./span>span classcrayon-i>sock/span>span classcrayon-h> /span>span classcrayon-sy>\/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee7b707004707-10>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-v>v/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-t>var/span>span classcrayon-o>//span>span classcrayon-v>cores/span>span classcrayon-o>:/span>span classcrayon-o>//span>span classcrayon-t>var/span>span classcrayon-o>//span>span classcrayon-i>cores/span>span classcrayon-h> /span>span classcrayon-sy>\/span>/div>div classcrayon-line idcrayon-5cfd1e54aee7b707004707-11>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-v>v/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>usr/span>span classcrayon-o>//span>span classcrayon-v>src/span>span classcrayon-o>:/span>span classcrayon-o>//span>span classcrayon-v>usr/span>span classcrayon-o>//span>span classcrayon-i>src/span>span classcrayon-h> /span> span classcrayon-sy>\/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee7b707004707-12>span classcrayon-h> /span>span classcrayon-o>--/span>span classcrayon-v>ipc/span>span classcrayon-o>/span>span classcrayon-i>host/span>span classcrayon-h> /span>span classcrayon-sy>\/span>/div>div classcrayon-line idcrayon-5cfd1e54aee7b707004707-13>span classcrayon-h> /span>span classcrayon-v>portworx/span>span classcrayon-o>//span>span classcrayon-v>px/span>span classcrayon-o>-/span>span classcrayon-v>dev/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>daemon/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>k/span> span classcrayon-h>/span>span classcrayon-v>etcd/span>span classcrayon-o>:/span>span classcrayon-c>//localhost:4001 -c cluster1 -s /dev/xvdf/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee7b707004707-14> /div>/div>/td>/tr>/tbody>/table>/div>/div>Complete details about this command are available at Run PX with Docker./li>li>Look for logs using code>docker container logs -f px/code> and watch out for the following statements:br />div idcrayon-5cfd1e54aee8a904178188 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>time2017-02-16T05:33:26Z levelinfo msgInitialize the scheduler client and the scheduler watch time2017-02-16T05:33:26Z levelinfo msgStarted a kvdb watch on key : scheduler/containers time2017-02-16T05:33:26Z levelinfo msgStarted a kvdb watch on key : scheduler/volumes time2017-02-16T05:33:26Z levelinfo msgStarted a kvdb watch on key : scheduler/nodes/list/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aee8a904178188-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee8a904178188-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aee8a904178188-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee8a904178188-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54aee8a904178188-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee8a904178188-6>6/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aee8a904178188-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee8a904178188-2>span classcrayon-v>time/span>span classcrayon-o>/span>span classcrayon-s>2017-02-16T05:33:26Z/span> span classcrayon-h>/span>span classcrayon-v>level/span>span classcrayon-o>/span>span classcrayon-e>info/span> span classcrayon-v>msg/span>span classcrayon-o>/span>span classcrayon-s>Initialize the scheduler client and the scheduler watch/span> span classcrayon-h>/span>/div>div classcrayon-line idcrayon-5cfd1e54aee8a904178188-3>span classcrayon-v>time/span>span classcrayon-o>/span>span classcrayon-s>2017-02-16T05:33:26Z/span> span classcrayon-h>/span>span classcrayon-v>level/span>span classcrayon-o>/span>span classcrayon-e>info/span> span classcrayon-v>msg/span>span classcrayon-o>/span>span classcrayon-s>Started a kvdb watch on key : scheduler/containers/span> span classcrayon-h>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee8a904178188-4>span classcrayon-v>time/span>span classcrayon-o>/span>span classcrayon-s>2017-02-16T05:33:26Z/span> span classcrayon-h>/span>span classcrayon-v>level/span>span classcrayon-o>/span>span classcrayon-e>info/span> span classcrayon-v>msg/span>span classcrayon-o>/span>span classcrayon-s>Started a kvdb watch on key : scheduler/volumes/span> span classcrayon-h>/span>/div>div classcrayon-line idcrayon-5cfd1e54aee8a904178188-5>span classcrayon-v>time/span>span classcrayon-o>/span>span classcrayon-s>2017-02-16T05:33:26Z/span> span classcrayon-h>/span>span classcrayon-v>level/span>span classcrayon-o>/span>span classcrayon-e>info/span> span classcrayon-v>msg/span>span classcrayon-o>/span>span classcrayon-s>Started a kvdb watch on key : scheduler/nodes/list/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee8a904178188-6> /div>/div>/td>/tr>/tbody>/table>/div>/div>/li>li>Check the status of attached volumes that are available to Portworx using code>sudo /opt/pwx/bin/pxctl status/code> to see the output:br />div idcrayon-5cfd1e54aee98156033068 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>Status: PX is operationalNode ID: 679b79b1-f4c3-413e-a8e0-c527348647c9 IP: 172.31.25.21 Local Storage Pool: 1 pool Pool IO_Priority Size Used Status Zone Region 0 LOW 10 GiB 266 MiB Online a us-west-1 Local Storage Devices: 1 device Device Path Media Type Size Last-Scan 0:1 /dev/xvdf STORAGE_MEDIUM_SSD 10 GiB 16 Feb 17 05:33 UTC total - 10 GiBCluster Summary Cluster ID: cluster1 Node IP: 172.31.25.21 - Capacity: 266 MiB/10 GiB Online (This node)Global Storage Pool Total Used : 266 MiB Total Capacity : 10 GiB/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aee98156033068-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee98156033068-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aee98156033068-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee98156033068-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54aee98156033068-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee98156033068-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54aee98156033068-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee98156033068-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54aee98156033068-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee98156033068-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54aee98156033068-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee98156033068-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54aee98156033068-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee98156033068-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54aee98156033068-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee98156033068-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54aee98156033068-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aee98156033068-18>18/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aee98156033068-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee98156033068-2>span classcrayon-v>Status/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>PX/span> span classcrayon-st>is/span> span classcrayon-h>/span>span classcrayon-e>operational/span>/div>div classcrayon-line idcrayon-5cfd1e54aee98156033068-3>span classcrayon-e>Node/span> span classcrayon-v>ID/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>679b79b1/span>span classcrayon-o>-/span>span classcrayon-v>f4c3/span>span classcrayon-o>-/span>span classcrayon-cn>413e/span>span classcrayon-o>-/span>span classcrayon-v>a8e0/span>span classcrayon-o>-/span>span classcrayon-e>c527348647c9/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee98156033068-4>span classcrayon-e> /span>span classcrayon-v>IP/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>172.31.25.21/span> span classcrayon-h>/span>/div>div classcrayon-line idcrayon-5cfd1e54aee98156033068-5>span classcrayon-h> /span>span classcrayon-e>Local/span> span classcrayon-e>Storage/span> span classcrayon-v>Pool/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span> span classcrayon-h>/span>span classcrayon-e>pool/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee98156033068-6>span classcrayon-e> /span>span classcrayon-e>Pool /span>span classcrayon-e>IO_Priority /span>span classcrayon-e>Size /span>span classcrayon-e>Used /span>span classcrayon-e>Status /span>span classcrayon-e>Zone /span>span classcrayon-i>Region/span>/div>div classcrayon-line idcrayon-5cfd1e54aee98156033068-7>span classcrayon-h> /span>span classcrayon-cn>0/span>span classcrayon-h> /span>span classcrayon-i>LOW/span>span classcrayon-h> /span>span classcrayon-cn>10/span> span classcrayon-h>/span>span classcrayon-i>GiB/span>span classcrayon-h> /span>span classcrayon-cn>266/span> span classcrayon-h>/span>span classcrayon-e>MiB /span>span classcrayon-i>Online/span>span classcrayon-h> /span>span classcrayon-i>a/span>span classcrayon-h> /span>span classcrayon-v>us/span>span classcrayon-o>-/span>span classcrayon-v>west/span>span classcrayon-o>-/span>span classcrayon-cn>1/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee98156033068-8>span classcrayon-h> /span>span classcrayon-e>Local/span> span classcrayon-e>Storage/span> span classcrayon-v>Devices/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span> span classcrayon-h>/span>span classcrayon-e>device/span>/div>div classcrayon-line idcrayon-5cfd1e54aee98156033068-9>span classcrayon-e> /span>span classcrayon-e>Device /span>span classcrayon-e>Path /span>span classcrayon-e>Media/span> span classcrayon-e>Type /span>span classcrayon-e>Size /span>span classcrayon-v>Last/span>span classcrayon-o>-/span>span classcrayon-i>Scan/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee98156033068-10>span classcrayon-h> /span>span classcrayon-cn>0/span>span classcrayon-o>:/span>span classcrayon-cn>1/span>span classcrayon-h> /span>span classcrayon-o>//span>span classcrayon-v>dev/span>span classcrayon-o>//span>span classcrayon-e>xvdf /span>span classcrayon-v>STORAGE_MEDIUM/span>span classcrayon-sy>_/span>SSDspan classcrayon-h> /span>span classcrayon-cn>10/span> span classcrayon-h>/span>span classcrayon-i>GiB/span>span classcrayon-h> /span>span classcrayon-cn>16/span> span classcrayon-h>/span>span classcrayon-i>Feb/span> span classcrayon-h>/span>span classcrayon-cn>17/span> span classcrayon-h>/span>span classcrayon-cn>05/span>span classcrayon-o>:/span>span classcrayon-cn>33/span> span classcrayon-h>/span>span classcrayon-e>UTC/span>/div>div classcrayon-line idcrayon-5cfd1e54aee98156033068-11>span classcrayon-e> /span>span classcrayon-v>total/span>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-h> /span>span classcrayon-cn>10/span> span classcrayon-h>/span>span classcrayon-e>GiB/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee98156033068-12>span classcrayon-e>Cluster/span> span classcrayon-e>Summary/span>/div>div classcrayon-line idcrayon-5cfd1e54aee98156033068-13>span classcrayon-e> /span>span classcrayon-e>Cluster/span> span classcrayon-v>ID/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>cluster1/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee98156033068-14>span classcrayon-e> /span>span classcrayon-e>Node/span> span classcrayon-v>IP/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>172.31.25.21/span> span classcrayon-h>/span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-v>Capacity/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>266/span> span classcrayon-h>/span>span classcrayon-v>MiB/span>span classcrayon-o>//span>span classcrayon-cn>10/span> span classcrayon-h>/span>span classcrayon-e>GiB/span> span classcrayon-e>Online/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-r>This/span> span classcrayon-h>/span>span classcrayon-v>node/span>span classcrayon-sy>)/span>/div>div classcrayon-line idcrayon-5cfd1e54aee98156033068-15>span classcrayon-m>Global/span> span classcrayon-h>/span>span classcrayon-e>Storage/span> span classcrayon-e>Pool/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee98156033068-16>span classcrayon-e> /span>span classcrayon-e>Total/span> span classcrayon-v>Used/span>span classcrayon-h> /span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-cn>266/span> span classcrayon-h>/span>span classcrayon-e>MiB/span>/div>div classcrayon-line idcrayon-5cfd1e54aee98156033068-17>span classcrayon-e> /span>span classcrayon-e>Total/span> span classcrayon-v>Capacity/span>span classcrayon-h> /span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-cn>10/span> span classcrayon-h>/span>span classcrayon-i>GiB/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aee98156033068-18> /div>/div>/td>/tr>/tbody>/table>/div>/div>It shows the total capacity available and used./li>/ol>h2>Docker Volume/h2>ol>li>Let’s create a Docker volume:br />div idcrayon-5cfd1e54aeea7678358110 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker volume create -d pxd -o size10G -o fsext4 --name cbvol/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aeea7678358110-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aeea7678358110-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aeea7678358110-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aeea7678358110-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aeea7678358110-2>span classcrayon-e>docker/span> span classcrayon-e>volume/span> span classcrayon-v>create/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>d/span> span classcrayon-h>/span>span classcrayon-v>pxd/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>o/span> span classcrayon-h>/span>span classcrayon-v>size/span>span classcrayon-o>/span>span classcrayon-cn>10G/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>o/span> span classcrayon-h>/span>span classcrayon-v>fs/span>span classcrayon-o>/span>span classcrayon-v>ext4/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-e>name/span> span classcrayon-i>cbvol/span>/div>div classcrayon-line idcrayon-5cfd1e54aeea7678358110-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>More details about this command are at Create Volumes with Docker./li>li>Check the list of volumes available using code>docker volume ls/code> command:br />div idcrayon-5cfd1e54aeeb5354305202 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>DRIVER VOLUME NAMElocal 70f7b9a356df4c1f0c08e13a4e813f1ef3e174a91001f277a63b62d683a27159pxd cbvollocal f7bc5fa455a88638c106881f1bce98244b670e094d5fdc47917b53a88e46c073/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aeeb5354305202-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aeeb5354305202-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aeeb5354305202-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aeeb5354305202-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54aeeb5354305202-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aeeb5354305202-6>6/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aeeb5354305202-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aeeb5354305202-2>span classcrayon-e>DRIVER /span>span classcrayon-e>VOLUME/span> span classcrayon-e>NAME/span>/div>div classcrayon-line idcrayon-5cfd1e54aeeb5354305202-3>span classcrayon-i>local/span>span classcrayon-h> /span> span classcrayon-cn>70f7b9a356df4c1f0c08e13a4e813f1ef3e174a91001f277a63b62d683a27159/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aeeb5354305202-4>span classcrayon-e>pxd /span> span classcrayon-e>cbvol/span>/div>div classcrayon-line idcrayon-5cfd1e54aeeb5354305202-5>span classcrayon-e>local /span> span classcrayon-i>f7bc5fa455a88638c106881f1bce98244b670e094d5fdc47917b53a88e46c073/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aeeb5354305202-6> /div>/div>/td>/tr>/tbody>/table>/div>/div>As shown, code>cbvol/code> is created with code>pxd/code> driver./li>/ol>h2>Couchbase with Portworx Volume/h2>ol>li>Create a Couchbase container using the Portworx volume:br />div idcrayon-5cfd1e54aeec3979731688 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker container run \ -d \ --name db \ -v cbvol:/opt/couchbase/var \ -p 8091-8094:8091-8094 \ -p 11210:11210 \ arungupta/couchbase/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aeec3979731688-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aeec3979731688-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aeec3979731688-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aeec3979731688-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54aeec3979731688-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aeec3979731688-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54aeec3979731688-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aeec3979731688-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54aeec3979731688-9>9/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aeec3979731688-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aeec3979731688-2>span classcrayon-e>docker/span> span classcrayon-e>container/span> span classcrayon-i>run/span> span classcrayon-h>/span>span classcrayon-sy>\/span>/div>div classcrayon-line idcrayon-5cfd1e54aeec3979731688-3>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-i>d/span> span classcrayon-h>/span>span classcrayon-sy>\/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aeec3979731688-4>span classcrayon-h> /span>span classcrayon-o>--/span>span classcrayon-e>name/span> span classcrayon-i>db/span> span classcrayon-h>/span>span classcrayon-sy>\/span>/div>div classcrayon-line idcrayon-5cfd1e54aeec3979731688-5>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-i>v/span> span classcrayon-h>/span>span classcrayon-v>cbvol/span>span classcrayon-o>:/span>span classcrayon-o>//span>span classcrayon-v>opt/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>//span>span classcrayon-t>var/span> span classcrayon-h>/span>span classcrayon-sy>\/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aeec3979731688-6>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-i>p/span> span classcrayon-h>/span>span classcrayon-cn>8091/span>span classcrayon-o>-/span>span classcrayon-cn>8094/span>span classcrayon-o>:/span>span classcrayon-cn>8091/span>span classcrayon-o>-/span>span classcrayon-cn>8094/span> span classcrayon-h>/span>span classcrayon-sy>\/span>/div>div classcrayon-line idcrayon-5cfd1e54aeec3979731688-7>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-i>p/span> span classcrayon-h>/span>span classcrayon-cn>11210/span>span classcrayon-o>:/span>span classcrayon-cn>11210/span> span classcrayon-h>/span>span classcrayon-sy>\/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aeec3979731688-8>span classcrayon-h> /span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-i>couchbase/span>/div>div classcrayon-line idcrayon-5cfd1e54aeec3979731688-9> /div>/div>/td>/tr>/tbody>/table>/div>/div>Notice how code>/opt/couchbase/var/code> where all Couchbase data is stored in the container is mapped to the code>cbvol/code> volume on the host. This volume is mapped by Portworx./li>li>Login to Couchbase Web Console at http://<public-ip>:8091, use the login code>Administrator/code> and code>password/code> as password./li>li>Go to Data Buckets and create a new data bucket pwx:br />img classalignnone size-medium wp-image-2692 srchttp://blog.couchbase.com/wp-content/uploads/2017/02/portworx-pwx-bucket-1-300x84.png altCouchbase Bucket with Portworx />/li>li>In EC2 instance, see the list of containers:br />div idcrayon-5cfd1e54aeed2436534418 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>ubuntu@ip-172-31-25-21:~$ docker container lsCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES8ae763d9d53b arungupta/couchbase /entrypoint.sh /o... 5 minutes ago Up 5 minutes 0.0.0.0:8091-8094->8091-8094/tcp, 11207/tcp, 11211/tcp, 0.0.0.0:11210->11210/tcp, 18091-18093/tcp db5423bcd9b426 portworx/px-dev /docker-entry-poi... 14 minutes ago Up 14 minutes pxcf3c779a4459 portworx/etcd:latest /entrypoint.sh /b... 21 minutes ago Up 21 minutes 2379-2380/tcp, 7001/tcp, 0.0.0.0:4001->4001/tcp youthful_jepsen/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aeed2436534418-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aeed2436534418-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aeed2436534418-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aeed2436534418-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54aeed2436534418-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aeed2436534418-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54aeed2436534418-7>7/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aeed2436534418-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aeed2436534418-2>span classcrayon-v>ubuntu/span>span classcrayon-sy>@/span>span classcrayon-v>ip/span>span classcrayon-o>-/span>span classcrayon-cn>172/span>span classcrayon-o>-/span>span classcrayon-cn>31/span>span classcrayon-o>-/span>span classcrayon-cn>25/span>span classcrayon-o>-/span>span classcrayon-cn>21/span>span classcrayon-o>:/span>span classcrayon-o>~/span>span classcrayon-sy>$/span> span classcrayon-h>/span>span classcrayon-e>docker/span> span classcrayon-e>container/span> span classcrayon-e>ls/span>/div>div classcrayon-line idcrayon-5cfd1e54aeed2436534418-3>span classcrayon-e>CONTAINER/span> span classcrayon-e>ID /span>span classcrayon-e>IMAGE /span>span classcrayon-e>COMMAND /span>span classcrayon-e>CREATED /span> span classcrayon-e>STATUS /span>span classcrayon-e>PORTS /span> span classcrayon-i>NAMES/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aeed2436534418-4>span classcrayon-cn>8ae763d9d53b/span>span classcrayon-h> /span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-i>couchbase/span>span classcrayon-h> /span>span classcrayon-s>/entrypoint.sh /o.../span>span classcrayon-h> /span> span classcrayon-cn>5/span> span classcrayon-h>/span>span classcrayon-e>minutes/span> span classcrayon-e>ago /span> span classcrayon-i>Up/span> span classcrayon-h>/span>span classcrayon-cn>5/span> span classcrayon-h>/span>span classcrayon-i>minutes/span>span classcrayon-h> /span>span classcrayon-cn>0.0.0.0/span>span classcrayon-o>:/span>span classcrayon-cn>8091/span>span classcrayon-o>-/span>span classcrayon-cn>8094/span>span classcrayon-o>->/span>span classcrayon-cn>8091/span>span classcrayon-o>-/span>span classcrayon-cn>8094/span>span classcrayon-o>//span>span classcrayon-v>tcp/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>11207/span>span classcrayon-o>//span>span classcrayon-v>tcp/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>11211/span>span classcrayon-o>//span>span classcrayon-v>tcp/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>0.0.0.0/span>span classcrayon-o>:/span>span classcrayon-cn>11210/span>span classcrayon-o>->/span>span classcrayon-cn>11210/span>span classcrayon-o>//span>span classcrayon-v>tcp/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>18091/span>span classcrayon-o>-/span>span classcrayon-cn>18093/span>span classcrayon-o>//span>span classcrayon-e>tcp /span> span classcrayon-i>db/span>/div>div classcrayon-line idcrayon-5cfd1e54aeed2436534418-5>span classcrayon-cn>5423bcd9b426/span>span classcrayon-h> /span>span classcrayon-v>portworx/span>span classcrayon-o>//span>span classcrayon-v>px/span>span classcrayon-o>-/span>span classcrayon-i>dev/span>span classcrayon-h> /span>span classcrayon-s>/docker-entry-poi.../span>span classcrayon-h> /span> span classcrayon-cn>14/span> span classcrayon-h>/span>span classcrayon-e>minutes/span> span classcrayon-e>ago /span>span classcrayon-i>Up/span> span classcrayon-h>/span>span classcrayon-cn>14/span> span classcrayon-h>/span>span classcrayon-e>minutes /span> span classcrayon-e>px/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aeed2436534418-6>span classcrayon-e>cf3c779a4459 /span>span classcrayon-v>portworx/span>span classcrayon-o>//span>span classcrayon-v>etcd/span>span classcrayon-o>:/span>span classcrayon-i>latest/span>span classcrayon-h> /span> span classcrayon-s>/entrypoint.sh /b.../span>span classcrayon-h> /span> span classcrayon-cn>21/span> span classcrayon-h>/span>span classcrayon-e>minutes/span> span classcrayon-e>ago /span>span classcrayon-i>Up/span> span classcrayon-h>/span>span classcrayon-cn>21/span> span classcrayon-h>/span>span classcrayon-i>minutes/span>span classcrayon-h> /span> span classcrayon-cn>2379/span>span classcrayon-o>-/span>span classcrayon-cn>2380/span>span classcrayon-o>//span>span classcrayon-v>tcp/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>7001/span>span classcrayon-o>//span>span classcrayon-v>tcp/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>0.0.0.0/span>span classcrayon-o>:/span>span classcrayon-cn>4001/span>span classcrayon-o>->/span>span classcrayon-cn>4001/span>span classcrayon-o>//span>span classcrayon-e>tcp /span> span classcrayon-v>youthful/span>span classcrayon-sy>_/span>jepsen/div>div classcrayon-line idcrayon-5cfd1e54aeed2436534418-7> /div>/div>/td>/tr>/tbody>/table>/div>/div>code>etcd/code>, code>px-dev/code> and code>db/code> containers are running./li>li>Kill the code>db/code> container:br />div idcrayon-5cfd1e54aeee1867601691 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker container rm -f db/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aeee1867601691-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aeee1867601691-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aeee1867601691-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aeee1867601691-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aeee1867601691-2>span classcrayon-e>docker/span> span classcrayon-e>container/span> span classcrayon-v>rm/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>f/span> span classcrayon-h>/span>span classcrayon-i>db/span>/div>div classcrayon-line idcrayon-5cfd1e54aeee1867601691-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>/li>li>Restart the database container as:br />div idcrayon-5cfd1e54aeeef644710158 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker container run \ -d \ --name db \ -v cbvol:/opt/couchbase/var \ -p 8091-8094:8091-8094 \ -p 11210:11210 \ arungupta/couchbase/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54aeeef644710158-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aeeef644710158-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54aeeef644710158-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aeeef644710158-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54aeeef644710158-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aeeef644710158-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54aeeef644710158-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54aeeef644710158-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54aeeef644710158-9>9/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54aeeef644710158-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aeeef644710158-2>span classcrayon-e>docker/span> span classcrayon-e>container/span> span classcrayon-i>run/span> span classcrayon-h>/span>span classcrayon-sy>\/span>/div>div classcrayon-line idcrayon-5cfd1e54aeeef644710158-3>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-i>d/span> span classcrayon-h>/span>span classcrayon-sy>\/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aeeef644710158-4>span classcrayon-h> /span>span classcrayon-o>--/span>span classcrayon-e>name/span> span classcrayon-i>db/span> span classcrayon-h>/span>span classcrayon-sy>\/span>/div>div classcrayon-line idcrayon-5cfd1e54aeeef644710158-5>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-i>v/span> span classcrayon-h>/span>span classcrayon-v>cbvol/span>span classcrayon-o>:/span>span classcrayon-o>//span>span classcrayon-v>opt/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>//span>span classcrayon-t>var/span> span classcrayon-h>/span>span classcrayon-sy>\/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aeeef644710158-6>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-i>p/span> span classcrayon-h>/span>span classcrayon-cn>8091/span>span classcrayon-o>-/span>span classcrayon-cn>8094/span>span classcrayon-o>:/span>span classcrayon-cn>8091/span>span classcrayon-o>-/span>span classcrayon-cn>8094/span> span classcrayon-h>/span>span classcrayon-sy>\/span>/div>div classcrayon-line idcrayon-5cfd1e54aeeef644710158-7>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-i>p/span> span classcrayon-h>/span>span classcrayon-cn>11210/span>span classcrayon-o>:/span>span classcrayon-cn>11210/span> span classcrayon-h>/span>span classcrayon-sy>\/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54aeeef644710158-8>span classcrayon-h> /span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-i>couchbase/span>/div>div classcrayon-line idcrayon-5cfd1e54aeeef644710158-9> /div>/div>/td>/tr>/tbody>/table>/div>/div>Now, because code>cbvol/code> is mapped to code>/opt/couchbase/var/code> again, the data is preserved across restarts. This can be verified by accessing the Couchbase Web Consoleand checking on the code>pwx/code> bucket created earlier./li>/ol>p>Another interesting perspective is also at why database are not for containers?. Just because there is Docker, does not mean all your database needs should be Dockerized. But if you need to, then there are plenty of options and can be used in production-grade applications./p>p>Want to learn more about running Couchbase in containers?/p>ul>li>Couchbase on Containers/li>li>Couchbase Developer Portal/li>li>@couchhasedev and @couchbase/li>/ul>p>Source: blog.couchbase.com/stateful-docker-containers-portworx-couchbase//p>/div>footer classentry-meta>div classcomments-link>a href/stateful-containers-using-portworx-couchbase/#comments>View all 5 comments/a>/div>/footer>/article>article idpost-14646 classpost-14646 post type-post status-publish format-standard hentry category-containers category-couchbase>header classentry-header>h1 classentry-title>a href/start-couchbase-using-docker-compose-2/ relbookmark>Start Couchbase Using Docker Compose/a>/h1>div classentry-meta>span classdate>a href/start-couchbase-using-docker-compose-2/ titlePermalink to Start Couchbase Using Docker Compose relbookmark>time classentry-date datetime2017-03-09T13:13:40+00:00>March 9, 2017/time>/a>/span>span classcategories-links>a href/topics/containers/ relcategory tag>containers/a>, a href/topics/couchbase/ relcategory tag>couchbase/a>/span>span classauthor vcard>a classurl fn n href/author/admin/ titleView all posts by arungupta relauthor>arungupta/a>/span>/div>/header>div classentry-content>p>Couchbase Forums has a question Can’t use N1QL on docker-compose. This blog will show how to run Couchbase using Docker Compose and run a N1QL query./p>p>img classalignnone size-medium wp-image-2559 srchttp://blog.couchbase.com/wp-content/uploads/2017/02/docker-compose-300x295.png altDocker Compose width300 height295 />img classalignnone size-medium wp-image-2560 srchttp://blog.couchbase.com/wp-content/uploads/2017/02/n1ql-300x300.png altN1QL width300 height300 />/p>h2>What is Docker Compose?/h2>p>Docker Compose allows you to define your multi-container application with all of its dependencies in a single file, then spin your application up in a single command./p>p>Docker Compose introduced v3 in Docker 1.13. How do you know what version of Docker are you running?/p>p>code>docker version/code> command gives you that information:/p>div idcrayon-5cfd1e54b03b9180268316 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>Client: Version: 1.13.1 API version: 1.26 Go version: go1.7.5 Git commit: 092cba3 Built: Wed Feb 8 08:47:51 2017 OS/Arch: darwin/amd64Server: Version: 1.13.1 API version: 1.26 (minimum version 1.12) Go version: go1.7.5 Git commit: 092cba3 Built: Wed Feb 8 08:47:51 2017 OS/Arch: linux/amd64 Experimental: true/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b03b9180268316-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03b9180268316-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b03b9180268316-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03b9180268316-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b03b9180268316-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03b9180268316-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b03b9180268316-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03b9180268316-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b03b9180268316-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03b9180268316-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b03b9180268316-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03b9180268316-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b03b9180268316-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03b9180268316-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b03b9180268316-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03b9180268316-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b03b9180268316-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03b9180268316-18>18/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b03b9180268316-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03b9180268316-2>span classcrayon-v>Client/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54b03b9180268316-3>span classcrayon-h>/span>span classcrayon-v>Version/span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-cn>1.13.1/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03b9180268316-4>span classcrayon-h>/span>span classcrayon-e>API/span> span classcrayon-v>version/span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-cn>1.26/span>/div>div classcrayon-line idcrayon-5cfd1e54b03b9180268316-5>span classcrayon-h>/span>span classcrayon-e>Go/span> span classcrayon-v>version/span>span classcrayon-o>:/span>span classcrayon-h> /span> span classcrayon-v>go1/span>span classcrayon-sy>./span>span classcrayon-cn>7.5/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03b9180268316-6>span classcrayon-h>/span>span classcrayon-e>Git/span> span classcrayon-v>commit/span>span classcrayon-o>:/span>span classcrayon-h> /span> span classcrayon-cn>092cba3/span>/div>div classcrayon-line idcrayon-5cfd1e54b03b9180268316-7>span classcrayon-h>/span>span classcrayon-v>Built/span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-e>Wed/span> span classcrayon-i>Feb/span>span classcrayon-h> /span>span classcrayon-cn>8/span> span classcrayon-h>/span>span classcrayon-cn>08/span>span classcrayon-o>:/span>span classcrayon-cn>47/span>span classcrayon-o>:/span>span classcrayon-cn>51/span> span classcrayon-h>/span>span classcrayon-cn>2017/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03b9180268316-8>span classcrayon-h>/span>span classcrayon-v>OS/span>span classcrayon-o>//span>span classcrayon-v>Arch/span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-v>darwin/span>span classcrayon-o>//span>span classcrayon-e>amd64/span>/div>div classcrayon-line idcrayon-5cfd1e54b03b9180268316-9> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03b9180268316-10>span classcrayon-v>Server/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54b03b9180268316-11>span classcrayon-h>/span>span classcrayon-v>Version/span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-cn>1.13.1/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03b9180268316-12>span classcrayon-h>/span>span classcrayon-e>API/span> span classcrayon-v>version/span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-cn>1.26/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-e>minimum/span> span classcrayon-i>version/span> span classcrayon-h>/span>span classcrayon-cn>1.12/span>span classcrayon-sy>)/span>/div>div classcrayon-line idcrayon-5cfd1e54b03b9180268316-13>span classcrayon-h>/span>span classcrayon-e>Go/span> span classcrayon-v>version/span>span classcrayon-o>:/span>span classcrayon-h> /span> span classcrayon-v>go1/span>span classcrayon-sy>./span>span classcrayon-cn>7.5/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03b9180268316-14>span classcrayon-h>/span>span classcrayon-e>Git/span> span classcrayon-v>commit/span>span classcrayon-o>:/span>span classcrayon-h> /span> span classcrayon-cn>092cba3/span>/div>div classcrayon-line idcrayon-5cfd1e54b03b9180268316-15>span classcrayon-h>/span>span classcrayon-v>Built/span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-e>Wed/span> span classcrayon-i>Feb/span>span classcrayon-h> /span>span classcrayon-cn>8/span> span classcrayon-h>/span>span classcrayon-cn>08/span>span classcrayon-o>:/span>span classcrayon-cn>47/span>span classcrayon-o>:/span>span classcrayon-cn>51/span> span classcrayon-h>/span>span classcrayon-cn>2017/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03b9180268316-16>span classcrayon-h>/span>span classcrayon-v>OS/span>span classcrayon-o>//span>span classcrayon-v>Arch/span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-v>linux/span>span classcrayon-o>//span>span classcrayon-e>amd64/span>/div>div classcrayon-line idcrayon-5cfd1e54b03b9180268316-17>span classcrayon-e>/span>span classcrayon-v>Experimental/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>true/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03b9180268316-18> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>br />/p>h2>Couchbase Docker Compose File/h2>p>Now if you see this version of Docker, then you can use the following Compose file:/p>div idcrayon-5cfd1e54b03d4284498694 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>version: 3services: db: image: arungupta/couchbase deploy: replicas: 1 ports: - 8091:8091 - 8092:8092 - 8093:8093 - 8094:8094 - 11210:11210/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b03d4284498694-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03d4284498694-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b03d4284498694-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03d4284498694-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b03d4284498694-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03d4284498694-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b03d4284498694-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03d4284498694-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b03d4284498694-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03d4284498694-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b03d4284498694-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03d4284498694-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b03d4284498694-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03d4284498694-14>14/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b03d4284498694-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03d4284498694-2>span classcrayon-v>version/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>3/span>/div>div classcrayon-line idcrayon-5cfd1e54b03d4284498694-3>span classcrayon-v>services/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03d4284498694-4>span classcrayon-h> /span>span classcrayon-v>db/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54b03d4284498694-5>span classcrayon-h> /span>span classcrayon-v>image/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-e>couchbase/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03d4284498694-6>span classcrayon-e> /span>span classcrayon-v>deploy/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54b03d4284498694-7>span classcrayon-h> /span>span classcrayon-v>replicas/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03d4284498694-8>span classcrayon-h> /span>span classcrayon-v>ports/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54b03d4284498694-9>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>8091/span>span classcrayon-o>:/span>span classcrayon-cn>8091/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03d4284498694-10>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>8092/span>span classcrayon-o>:/span>span classcrayon-cn>8092/span>/div>div classcrayon-line idcrayon-5cfd1e54b03d4284498694-11>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>8093/span>span classcrayon-o>:/span>span classcrayon-cn>8093/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03d4284498694-12>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>8094/span>span classcrayon-o>:/span>span classcrayon-cn>8094/span>/div>div classcrayon-line idcrayon-5cfd1e54b03d4284498694-13>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>11210/span>span classcrayon-o>:/span>span classcrayon-cn>11210/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03d4284498694-14> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>In this Compose file:/p>ul>li>v3 version of Compose file. If you are using an older version of Docker, then you can consider using v2 version of Compose file./li>li>code>arungupta/couchbase/code> Docker image is used to start Couchbase server. This image is created as explained at github.com/arun-gupta/docker-images/tree/master/couchbase. It uses Couchbase REST API to pre-configure the Couchbase server./li>li>Ports 8091, 8092, 8093, 8094, 11210 are exposed./li>li>Only a single replica of Couchbase server is started./li>/ul>p>Couchbase can be started in a couple of ways using this Compose file./p>h2>Couchbase using Docker Compose on Single Docker Host/h2>p>If you want to start Couchbase on a single host (such as provisioned by Docker for Mac or a single Docker Machine), then use the command:/p>div idcrayon-5cfd1e54b03e4035274542 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker-compose up -d/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b03e4035274542-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03e4035274542-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b03e4035274542-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b03e4035274542-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03e4035274542-2>span classcrayon-v>docker/span>span classcrayon-o>-/span>span classcrayon-e>compose/span> span classcrayon-v>up/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>d/span>/div>div classcrayon-line idcrayon-5cfd1e54b03e4035274542-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>This will show the warning message but starts Couchbase server:/p>div idcrayon-5cfd1e54b03f2476079515 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>WARNING: Some services (db) use the deploy key, which will be ignored. Compose does not support deploy configuration - use `docker stack deploy` to deploy to a swarm.Creating couchbase_db_1/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b03f2476079515-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03f2476079515-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b03f2476079515-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b03f2476079515-4>4/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b03f2476079515-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03f2476079515-2>span classcrayon-v>WARNING/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>Some/span> span classcrayon-e>services/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-v>db/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-st>use/span> span classcrayon-h>/span>span classcrayon-i>the/span> span classcrayon-h>/span>span classcrayon-s>deploy/span> span classcrayon-h>/span>span classcrayon-v>key/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-e>which/span> span classcrayon-e>will/span> span classcrayon-e>be/span> span classcrayon-v>ignored/span>span classcrayon-sy>./span> span classcrayon-h>/span>span classcrayon-e>Compose/span> span classcrayon-e>does/span> span classcrayon-st>not/span> span classcrayon-h>/span>span classcrayon-e>support/span> span classcrayon-e>deploy/span> span classcrayon-v>configuration/span> span classcrayon-h>/span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-st>use/span> span classcrayon-h>/span>span classcrayon-sy>`/span>span classcrayon-e>docker/span> span classcrayon-e>stack/span> span classcrayon-v>deploy/span>span classcrayon-sy>`/span> span classcrayon-h>/span>span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>deploy/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-i>a/span> span classcrayon-h>/span>span classcrayon-v>swarm/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b03f2476079515-3>span classcrayon-e>Creating/span> span classcrayon-v>couchbase_db/span>span classcrayon-sy>_/span>1/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b03f2476079515-4> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Check the status of started service using the command code>docker-compose ps/code>:/p>div idcrayon-5cfd1e54b0400971250038 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>Name Command State Ports -----------------------------------------------------------------------------------------------------------------couchbase_db_1 /entrypoint.sh /opt/couchb Up 11207/tcp, ... 0.0.0.0:11210->11210/tcp, 11211/tcp, 18091/tcp, 18092/tcp, 18093/tcp, 0.0.0.0:8091->8091/tcp, 0.0.0.0:8092->8092/tcp, 0.0.0.0:8093->8093/tcp, 0.0.0.0:8094->8094/tcp/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b0400971250038-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0400971250038-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b0400971250038-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0400971250038-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b0400971250038-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0400971250038-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b0400971250038-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0400971250038-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b0400971250038-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0400971250038-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b0400971250038-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0400971250038-12>12/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b0400971250038-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0400971250038-2>span classcrayon-h> /span> span classcrayon-e>Name /span> span classcrayon-e>Command /span> span classcrayon-e>State /span>span classcrayon-v>Ports/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54b0400971250038-3>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>--/span>span classcrayon-o>-/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0400971250038-4>span classcrayon-v>couchbase_db_1/span>span classcrayon-h> /span> span classcrayon-o>//span>span classcrayon-v>entrypoint/span>span classcrayon-sy>./span>span classcrayon-v>sh/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>opt/span>span classcrayon-o>//span>span classcrayon-e>couchb /span> span classcrayon-i>Up/span>span classcrayon-h> /span> span classcrayon-cn>11207/span>span classcrayon-o>//span>span classcrayon-v>tcp/span>span classcrayon-sy>,/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54b0400971250038-5>span classcrayon-h> /span> span classcrayon-sy>./span>span classcrayon-sy>./span>span classcrayon-sy>./span>span classcrayon-h> /span> span classcrayon-cn>0.0.0.0/span>span classcrayon-o>:/span>span classcrayon-cn>11210/span>span classcrayon-o>->/span>span classcrayon-cn>11210/span>span classcrayon-o>//span>span classcrayon-v>tcp/span>span classcrayon-sy>,/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0400971250038-6>span classcrayon-h> /span> span classcrayon-cn>11211/span>span classcrayon-o>//span>span classcrayon-v>tcp/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>18091/span>span classcrayon-o>//span>span classcrayon-v>tcp/span>span classcrayon-sy>,/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54b0400971250038-7>span classcrayon-h> /span> span classcrayon-cn>18092/span>span classcrayon-o>//span>span classcrayon-v>tcp/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>18093/span>span classcrayon-o>//span>span classcrayon-v>tcp/span>span classcrayon-sy>,/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0400971250038-8>span classcrayon-h> /span> span classcrayon-cn>0.0.0.0/span>span classcrayon-o>:/span>span classcrayon-cn>8091/span>span classcrayon-o>->/span>span classcrayon-cn>8091/span>span classcrayon-o>//span>span classcrayon-v>tcp/span>span classcrayon-sy>,/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54b0400971250038-9>span classcrayon-h> /span> span classcrayon-cn>0.0.0.0/span>span classcrayon-o>:/span>span classcrayon-cn>8092/span>span classcrayon-o>->/span>span classcrayon-cn>8092/span>span classcrayon-o>//span>span classcrayon-v>tcp/span>span classcrayon-sy>,/span>span classcrayon-h> /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0400971250038-10>span classcrayon-h> /span> span classcrayon-cn>0.0.0.0/span>span classcrayon-o>:/span>span classcrayon-cn>8093/span>span classcrayon-o>->/span>span classcrayon-cn>8093/span>span classcrayon-o>//span>span classcrayon-v>tcp/span>span classcrayon-sy>,/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54b0400971250038-11>span classcrayon-h> /span> span classcrayon-cn>0.0.0.0/span>span classcrayon-o>:/span>span classcrayon-cn>8094/span>span classcrayon-o>->/span>span classcrayon-cn>8094/span>span classcrayon-o>//span>span classcrayon-i>tcp/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0400971250038-12> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>All the exposed ports are shown and Couchbase is accessible at http://localhost:8091. Use the credentials Administrator/password to access the web console./p>p>Now you can create buckets and connect from CBQ and run N1QL queries. For example:/p>div idcrayon-5cfd1e54b0410799543526 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>/Users/arungupta/tools/couchbase/Couchbase\ Server\ 4.5\ EE.app/Contents/Resources/couchbase-core/bin/cbq -u Administrator -p password --engine http://localhost:8093 Connected to : http://localhost:8093/. Type Ctrl-D or \QUIT to exit. Path to history file for the shell : /Users/arungupta/.cbq_history cbq> select now_str();{ requestID: d28280ab-49a4-4254-9f00-06bd1d2b4695, signature: { $1: string }, results: { $1: 2017-02-13T21:36:57.248Z } , status: success, metrics: { elapsedTime: 2.916653ms, executionTime: 2.829056ms, resultCount: 1, resultSize: 56 }}cbq> select version();{ requestID: 51091fa6-dcc5-40f6-9c2b-1eb6732630bb, signature: { $1: string }, results: { $1: 1.6.0 } , status: success, metrics: { elapsedTime: 4.599365ms, executionTime: 4.525552ms, resultCount: 1, resultSize: 37 }}/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-24>24/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-25>25/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-26>26/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-27>27/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-28>28/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-29>29/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-30>30/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-31>31/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-32>32/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-33>33/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-34>34/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-35>35/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-36>36/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-37>37/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-38>38/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-39>39/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-40>40/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-41>41/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-42>42/div>div classcrayon-num data-linecrayon-5cfd1e54b0410799543526-43>43/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0410799543526-44>44/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b0410799543526-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-2>span classcrayon-o>//span>span classcrayon-v>Users/span>span classcrayon-o>//span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>tools/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>//span>span classcrayon-v>Couchbase/span>span classcrayon-sy>\/span> span classcrayon-h>/span>span classcrayon-v>Server/span>span classcrayon-sy>\/span> span classcrayon-h>/span>span classcrayon-cn>4.5/span>span classcrayon-sy>\/span> span classcrayon-h>/span>span classcrayon-v>EE/span>span classcrayon-sy>./span>span classcrayon-v>app/span>span classcrayon-o>//span>span classcrayon-v>Contents/span>span classcrayon-o>//span>span classcrayon-v>Resources/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-v>core/span>span classcrayon-o>//span>span classcrayon-v>bin/span>span classcrayon-o>//span>span classcrayon-v>cbq/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>u/span> span classcrayon-h>/span>span classcrayon-v>Administrator/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>p/span> span classcrayon-h>/span>span classcrayon-v>password/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-e>engine/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//localhost:8093/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-3>span classcrayon-h>/span>span classcrayon-e>Connected/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//localhost:8093/. Type Ctrl-D or \QUIT to exit./span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-4> /div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-5>span classcrayon-h>/span>span classcrayon-e>Path/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>history/span> span classcrayon-e>file/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-e>the/span> span classcrayon-v>shell/span> span classcrayon-h>/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>Users/span>span classcrayon-o>//span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-sy>./span>span classcrayon-e>cbq_history/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-6>span classcrayon-v>cbq/span>span classcrayon-o>>/span> span classcrayon-h>/span>span classcrayon-e>select/span> span classcrayon-e>now_str/span>span classcrayon-sy>(/span>span classcrayon-sy>)/span>span classcrayon-sy>;/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-7>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-8>span classcrayon-h> /span>span classcrayon-s>requestID/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>d28280ab-49a4-4254-9f00-06bd1d2b4695/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-9>span classcrayon-h> /span>span classcrayon-s>signature/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-10>span classcrayon-h> /span>span classcrayon-s>$1/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>string/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-11>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-12>span classcrayon-h> /span>span classcrayon-s>results/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-13>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-14>span classcrayon-h> /span>span classcrayon-s>$1/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>2017-02-13T21:36:57.248Z/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-15>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-16>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-17>span classcrayon-h> /span>span classcrayon-s>status/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>success/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-18>span classcrayon-h> /span>span classcrayon-s>metrics/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>{/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-19>span classcrayon-h> /span>span classcrayon-s>elapsedTime/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>2.916653ms/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-20>span classcrayon-h> /span>span classcrayon-s>executionTime/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>2.829056ms/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-21>span classcrayon-h> /span>span classcrayon-s>resultCount/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-22>span classcrayon-h> /span>span classcrayon-s>resultSize/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>56/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-23>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-24>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-25>span classcrayon-v>cbq/span>span classcrayon-o>>/span> span classcrayon-h>/span>span classcrayon-e>select/span> span classcrayon-e>version/span>span classcrayon-sy>(/span>span classcrayon-sy>)/span>span classcrayon-sy>;/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-26>span classcrayon-sy>{/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-27>span classcrayon-h> /span>span classcrayon-s>requestID/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>51091fa6-dcc5-40f6-9c2b-1eb6732630bb/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-28>span classcrayon-h> /span>span classcrayon-s>signature/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>{/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-29>span classcrayon-h> /span>span classcrayon-s>$1/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>string/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-30>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-31>span classcrayon-h> /span>span classcrayon-s>results/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-32>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-33>span classcrayon-h> /span>span classcrayon-s>$1/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>1.6.0/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-34>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-35>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-36>span classcrayon-h> /span>span classcrayon-s>status/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>success/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-37>span classcrayon-h> /span>span classcrayon-s>metrics/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-38>span classcrayon-h> /span>span classcrayon-s>elapsedTime/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>4.599365ms/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-39>span classcrayon-h> /span>span classcrayon-s>executionTime/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>4.525552ms/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-40>span classcrayon-h> /span>span classcrayon-s>resultCount/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-41>span classcrayon-h> /span>span classcrayon-s>resultSize/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>37/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-42>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54b0410799543526-43>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0410799543526-44> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Typically, you may be able to scale the services started by Docker Compose using code>docker-compose scale/code> command. But this will not be possible in our case as the ports are exposed. Scaling a service will cause port conflict./p>p>The container can be brought down using the command code>docker-compose down/code>./p>h2>Couchbase using Docker Compose on Multi-host Swarm-mode Cluster/h2>p>Docker allows multiple hosts to be configured in a cluster using Swarm-mode. This can be configured using the command code>docker swarm init/code>./p>p>Once the cluster is initialized, then the Compose file can be used to start the cluster:/p>div idcrayon-5cfd1e54b0420477028750 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker deploy --compose-filedocker-compose.yml couchbase/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b0420477028750-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0420477028750-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b0420477028750-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b0420477028750-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0420477028750-2>span classcrayon-e>docker/span> span classcrayon-v>deploy/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>compose/span>span classcrayon-o>-/span>span classcrayon-v>file/span>span classcrayon-o>/span>span classcrayon-v>docker/span>span classcrayon-o>-/span>span classcrayon-v>compose/span>span classcrayon-sy>./span>span classcrayon-e>yml/span> span classcrayon-i>couchbase/span>/div>div classcrayon-line idcrayon-5cfd1e54b0420477028750-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>It shows the output:/p>div idcrayon-5cfd1e54b042e071485267 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>Creating network couchbase_defaultCreating service couchbase_db/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b042e071485267-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b042e071485267-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b042e071485267-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b042e071485267-4>4/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b042e071485267-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b042e071485267-2>span classcrayon-e>Creating/span> span classcrayon-e>network/span> span classcrayon-e>couchbase_default/span>/div>div classcrayon-line idcrayon-5cfd1e54b042e071485267-3>span classcrayon-e>Creating/span> span classcrayon-e>service/span> span classcrayon-v>couchbase/span>span classcrayon-sy>_/span>db/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b042e071485267-4> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>This creates a Docker service and the status can be seen using the command code>docker service ls/code>:/p>div idcrayon-5cfd1e54b043c914333715 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>ID NAME MODE REPLICAS IMAGE0zls1k4mgrry couchbase_db replicated 1/1 arungupta/couchbase:latest/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b043c914333715-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b043c914333715-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b043c914333715-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b043c914333715-4>4/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b043c914333715-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b043c914333715-2>span classcrayon-e>ID /span>span classcrayon-e>NAME /span>span classcrayon-e>MODE /span>span classcrayon-e>REPLICAS /span>span classcrayon-i>IMAGE/span>/div>div classcrayon-line idcrayon-5cfd1e54b043c914333715-3>span classcrayon-cn>0zls1k4mgrry/span>span classcrayon-h> /span>span classcrayon-e>couchbase_db /span>span classcrayon-i>replicated/span>span classcrayon-h> /span>span classcrayon-cn>1/span>span classcrayon-o>//span>span classcrayon-cn>1/span>span classcrayon-h> /span> span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>:/span>span classcrayon-i>latest/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b043c914333715-4> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Check the tasks/containers running inside the service using the command code>docker service ps couchbase_db/code>:/p>div idcrayon-5cfd1e54b044a101386320 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTSvf5zicu4mhei couchbase_db.1 arungupta/couchbase:latest moby Running Running 3 hours ago/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b044a101386320-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b044a101386320-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b044a101386320-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b044a101386320-4>4/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b044a101386320-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b044a101386320-2>span classcrayon-e>ID /span>span classcrayon-e>NAME /span>span classcrayon-e>IMAGE /span> span classcrayon-e>NODE /span>span classcrayon-e>DESIRED/span> span classcrayon-e>STATE /span>span classcrayon-e>CURRENT/span> span classcrayon-e>STATE /span>span classcrayon-e>ERROR /span>span classcrayon-e>PORTS/span>/div>div classcrayon-line idcrayon-5cfd1e54b044a101386320-3>span classcrayon-e>vf5zicu4mhei /span>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>1/span>span classcrayon-h> /span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>:/span>span classcrayon-e>latest /span>span classcrayon-e>moby /span>span classcrayon-e>Running /span>span classcrayon-i>Running/span> span classcrayon-h>/span>span classcrayon-cn>3/span> span classcrayon-h>/span>span classcrayon-e>hours/span> span classcrayon-i>ago/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b044a101386320-4> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Here again, you can connect to the Couchbase server and run N1QL queries:/p>div idcrayon-5cfd1e54b0458236758870 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>/Users/arungupta/tools/couchbase/Couchbase\ Server\ 4.5\ EE.app/Contents/Resources/couchbase-core/bin/cbq -u Administrator -p password --engine http://localhost:8093 Connected to : http://localhost:8093/. Type Ctrl-D or \QUIT to exit. Path to history file for the shell : /Users/arungupta/.cbq_history cbq> select version();{ requestID: 12c5581e-44ee-4ea7-9017-6a017bb60a58, signature: { $1: string }, results: { $1: 1.6.0 } , status: success, metrics: { elapsedTime: 3.725498ms, executionTime: 3.678153ms, resultCount: 1, resultSize: 37 }}cbq> select now_str();{ requestID: efe034fa-6d00-4327-9fc9-da8f6d15d95c, signature: { $1: string }, results: { $1: 2017-02-13T21:38:33.502Z } , status: success, metrics: { elapsedTime: 853.491µs, executionTime: 800.154µs, resultCount: 1, resultSize: 56 }}/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-24>24/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-25>25/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-26>26/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-27>27/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-28>28/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-29>29/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-30>30/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-31>31/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-32>32/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-33>33/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-34>34/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-35>35/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-36>36/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-37>37/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-38>38/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-39>39/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-40>40/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-41>41/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-42>42/div>div classcrayon-num data-linecrayon-5cfd1e54b0458236758870-43>43/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b0458236758870-44>44/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b0458236758870-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-2>span classcrayon-o>//span>span classcrayon-v>Users/span>span classcrayon-o>//span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>tools/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>//span>span classcrayon-v>Couchbase/span>span classcrayon-sy>\/span> span classcrayon-h>/span>span classcrayon-v>Server/span>span classcrayon-sy>\/span> span classcrayon-h>/span>span classcrayon-cn>4.5/span>span classcrayon-sy>\/span> span classcrayon-h>/span>span classcrayon-v>EE/span>span classcrayon-sy>./span>span classcrayon-v>app/span>span classcrayon-o>//span>span classcrayon-v>Contents/span>span classcrayon-o>//span>span classcrayon-v>Resources/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-v>core/span>span classcrayon-o>//span>span classcrayon-v>bin/span>span classcrayon-o>//span>span classcrayon-v>cbq/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>u/span> span classcrayon-h>/span>span classcrayon-v>Administrator/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>p/span> span classcrayon-h>/span>span classcrayon-v>password/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-e>engine/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//localhost:8093/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-3>span classcrayon-h>/span>span classcrayon-e>Connected/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//localhost:8093/. Type Ctrl-D or \QUIT to exit./span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-4> /div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-5>span classcrayon-h>/span>span classcrayon-e>Path/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>history/span> span classcrayon-e>file/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-e>the/span> span classcrayon-v>shell/span> span classcrayon-h>/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>Users/span>span classcrayon-o>//span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-sy>./span>span classcrayon-e>cbq_history/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-6>span classcrayon-v>cbq/span>span classcrayon-o>>/span> span classcrayon-h>/span>span classcrayon-e>select/span> span classcrayon-e>version/span>span classcrayon-sy>(/span>span classcrayon-sy>)/span>span classcrayon-sy>;/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-7>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-8>span classcrayon-h> /span>span classcrayon-s>requestID/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>12c5581e-44ee-4ea7-9017-6a017bb60a58/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-9>span classcrayon-h> /span>span classcrayon-s>signature/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-10>span classcrayon-h> /span>span classcrayon-s>$1/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>string/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-11>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-12>span classcrayon-h> /span>span classcrayon-s>results/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-13>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-14>span classcrayon-h> /span>span classcrayon-s>$1/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>1.6.0/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-15>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-16>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-17>span classcrayon-h> /span>span classcrayon-s>status/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>success/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-18>span classcrayon-h> /span>span classcrayon-s>metrics/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>{/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-19>span classcrayon-h> /span>span classcrayon-s>elapsedTime/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>3.725498ms/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-20>span classcrayon-h> /span>span classcrayon-s>executionTime/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>3.678153ms/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-21>span classcrayon-h> /span>span classcrayon-s>resultCount/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-22>span classcrayon-h> /span>span classcrayon-s>resultSize/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>37/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-23>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-24>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-25>span classcrayon-v>cbq/span>span classcrayon-o>>/span> span classcrayon-h>/span>span classcrayon-e>select/span> span classcrayon-e>now_str/span>span classcrayon-sy>(/span>span classcrayon-sy>)/span>span classcrayon-sy>;/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-26>span classcrayon-sy>{/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-27>span classcrayon-h> /span>span classcrayon-s>requestID/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>efe034fa-6d00-4327-9fc9-da8f6d15d95c/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-28>span classcrayon-h> /span>span classcrayon-s>signature/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>{/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-29>span classcrayon-h> /span>span classcrayon-s>$1/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>string/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-30>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-31>span classcrayon-h> /span>span classcrayon-s>results/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-32>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-33>span classcrayon-h> /span>span classcrayon-s>$1/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>2017-02-13T21:38:33.502Z/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-34>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-35>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-36>span classcrayon-h> /span>span classcrayon-s>status/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>success/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-37>span classcrayon-h> /span>span classcrayon-s>metrics/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-38>span classcrayon-h> /span>span classcrayon-s>elapsedTime/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>853.491µs/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-39>span classcrayon-h> /span>span classcrayon-s>executionTime/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>800.154µs/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-40>span classcrayon-h> /span>span classcrayon-s>resultCount/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-41>span classcrayon-h> /span>span classcrayon-s>resultSize/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>56/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-42>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54b0458236758870-43>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b0458236758870-44> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>The service, and thus the container running in the service, can be terminated using the command code>docker service couchbase_db/code>./p>p>Any more questions? Catch us on Couchbase Forums./p>p>You may also consider running Couchbase Cluster using Docker or read more about Deploying Docker Services to Swarm./p>p>Want to learn more about running Couchbase in containers?/p>ul>li>Couchbase on Containers/li>li>Couchbase Developer Portal/li>li>@couchhasedev and @couchbase/li>/ul>p>Source: blog.couchbase.com/couchbase-using-docker-compose//p>/div>footer classentry-meta>div classcomments-link>a href/start-couchbase-using-docker-compose-2/#comments>View all 3 comments/a>/div>/footer>/article>article idpost-14607 classpost-14607 post type-post status-publish format-standard hentry category-containers category-couchbase tag-cloud tag-containers tag-oracle>header classentry-header>h1 classentry-title>a href/getting-started-oracle-container-cloud-service/ relbookmark>Getting Started with Oracle Container Cloud Service/a>/h1>div classentry-meta>span classdate>a href/getting-started-oracle-container-cloud-service/ titlePermalink to Getting Started with Oracle Container Cloud Service relbookmark>time classentry-date datetime2017-02-08T18:19:57+00:00>February 8, 2017/time>/a>/span>span classcategories-links>a href/topics/containers/ relcategory tag>containers/a>, a href/topics/couchbase/ relcategory tag>couchbase/a>/span>span classtags-links>a href/tag/cloud/ reltag>cloud/a>, a href/tag/containers/ reltag>containers/a>, a href/tag/oracle/ reltag>oracle/a>/span>span classauthor vcard>a classurl fn n href/author/admin/ titleView all posts by arungupta relauthor>arungupta/a>/span>/div>/header>div classentry-content>p>img classalignnone wp-image-14622 src/wp-content/uploads/2017/02/oracle-cloud-container-logo.png altOracle Cloud Container Logo width307 height233 />/p>p>Oracle Container Cloud Service is Oracle’s entry into the the world of managed container service. There are plenty of existing options:/p>ul>li>Docker for AWS or Azure/li>li>Amazon Elastic Container Service/li>li>Google Container Engine/li>li>Azure Container Service/li>li>DC/OS by Mesosphere/li>li>OpenShift by Red Hat/li>/ul>p>This blog will explain how to get started with Oracle Container Cloud Service. A comparison of different managed services is started at Managed Container Service./p>p>Before we jump into all the details, let’s try to clarify a couple of things about this offering from Oracle./p>p>First, a bit about the name. “Oracle Cloud Container Service” seems more natural and intuitive since its a Container Service in Oracle Cloud. Wonder why is it called “Oracle Container Cloud Service”? Is it because “Oracle Container” is Oracle’s container orchestration framework and its a Cloud Service? Could that mean other orchestration frameworks be offered as a service as well?/p>p>Second, don’t confuse it with Oracle Application Container Cloud Service that allows to build cloud-native 12-factor applications using polyglot platform. Now, that confuses me further. Can the Container Service not be used to build 12-factor apps? Are cloud-native and containers mutually exclusive?/p>p>Anyway, this is causing more confusion than clarification img src/wp-includes/images/smilies/simple-smile.png alt:) classwp-smiley styleheight: 1em; max-height: 1em; /> Let’s move on!/p>p>One last thing before we dig in. Many thanks to Bruno Borges (@brunoborges) for pushing the buttons for cloud service activation. I don’t know the normal time for the free trial to be activated otherwise. And a much bigger thank to Mike Raab (@mikeraab) for helping me understand the details of Container Service./p>p>Let’s get started!/p>ol>li>Get a Free Trial for Oracle Cloud. It takes a few days for the trial to be activated. The trial time bombs after 30 days so make sure you’ve time planned for evaluation. Each free trial comes with 6 OC3 nodes. OC3 is one of the compute node types available on Oracle Cloud. OC3 particularly is 1 OCPU (think vCPU on Amazon Web Services) and 7.5 GB RAM./li>li>Once the account is activated, you get an email as shown:a href/wp-content/uploads/2017/02/oracle-cloud-welcome-email.png>img classalignnone size-large wp-image-14608 src/wp-content/uploads/2017/02/oracle-cloud-welcome-email-1018x1024.png altoracle-cloud-welcome-email width604 height608 />/a>The important piece of information is code>username/code>, code>temporary password/code>, code>identity domain/code> and code>My Services URL/code>. The code>My Account URL/code> link is only for account administration./li>li>Click on My Service URL, login using the values from email:a href/wp-content/uploads/2017/02/oracle-cloud-services-login.png>img classalignnone size-large wp-image-14609 src/wp-content/uploads/2017/02/oracle-cloud-services-login-1024x816.png altoracle-cloud-services-login width604 height481 />br />/a> You get an opportunity to change your password afterwards/li>li>Oracle Cloud dashboard shows up after logging in:a href/wp-content/uploads/2017/02/oracle-cloud-services-dashboard.png>img classalignnone size-large wp-image-14610 src/wp-content/uploads/2017/02/oracle-cloud-services-dashboard-1024x699.png altoracle-cloud-services-dashboard width604 height412 />/a>A default set of services and their status is shown. The dashboard can also be customized by clicking on code>Customize Dashboard/code> button on the top right./li>li>Getting to Oracle Container Cloud Service Console is a bit non-intuitive but you get it once you know it. Select Container Cloud Service tab, click on top-right corner and select code>Open Service Console/code>:a href/wp-content/uploads/2017/02/oracle-cloud-container-service-console-access.png>img classalignnone size-large wp-image-14611 src/wp-content/uploads/2017/02/oracle-cloud-container-service-console-access-1024x409.png altoracle-cloud-container-service-console-access width604 height241 />/a>Or you can directly click on the link for Oracle Container Cloud Service Console in the welcome email. Service console looks like:a href/wp-content/uploads/2017/02/oracle-cloud-container-service-console.png>img classalignnone size-large wp-image-14612 src/wp-content/uploads/2017/02/oracle-cloud-container-service-console-1024x488.png altoracle-cloud-container-service-console width604 height288 />/a>/li>li>Click on Create Service:a href/wp-content/uploads/2017/02/oracle-cloud-container-service-definition.png>img classalignnone size-large wp-image-14613 src/wp-content/uploads/2017/02/oracle-cloud-container-service-definition-1024x571.png altoracle-cloud-container-service-definition width604 height337 />/a>Oracle Container Container Service Instance Details provide more details about each of the field.What is a worker node? We’ll talk about it a bit later. But essentially this is where the container runs. We are asking for only one worker node.p>Its worth noting different capacities for the worker node:br />a href/wp-content/uploads/2017/02/oracle-cloud-cpus.png>img classalignnone size-large wp-image-14614 src/wp-content/uploads/2017/02/oracle-cloud-cpus-1024x336.png altOracle Cloud CPUs width604 height198 />/a>/p>p>Confirm all the settings:/p>p>a href/wp-content/uploads/2017/02/oracle-cloud-container-service-definition-confirmation.png>img classalignnone size-large wp-image-14615 src/wp-content/uploads/2017/02/oracle-cloud-container-service-definition-confirmation-1024x483.png altoracle-cloud-container-service-definition-confirmation width604 height285 />/a>/p>p>and click on code>Create>/code> to start the service creation./p>/li>li>Wait for about 30 minutes for the service to be created. After that the Service Console looks like:br />a href/wp-content/uploads/2017/02/oracle-cloud-container-service-console-with-service.png>img classalignnone size-large wp-image-14616 src/wp-content/uploads/2017/02/oracle-cloud-container-service-console-with-service-1024x747.png altoracle-cloud-container-service-console-with-service width604 height441 />/a>Wait, we asked for one worker node and how come two OCPUs are being consumed.Each Oracle Container Cloud Service has at least two nodes – a em>manager/em> node and one or more em>worker/em> nodes. Manager node is responsible for administration of all the workers and and orchestrate containers on different worker nodes. Worker nodes can be organized in different resource pools to meet different workflow needs.p>br />/p>p>And, so ~30 minutes are spent provisioning two nodes and installing container service components on each node. This is also evident in the service logs shown in code>Service Create and Delete History/code> shown in the main Console page:/p>div idcrayon-5cfd1e54b1428747566995 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>Activity SubmittedActivity StartedStarted operation to create service couchbase in identity domain arungupta.Creating service couchbase resources couchbase-occs-mgr-1,couchbase-occs-wkr-1.Completed creating service couchbase in domain arungupta.Started operation to establish security on VMs for component MANAGER.Completed operation to establish security on VMs for component MANAGERStarted operation to establish security on VMs for component WORKER.Completed operation to establish security on VMs for component WORKERStarted operation to check provisioning status on the VMs for MANAGERStarted operation to check provisioning status on the VMs for WORKERProvisioning Succeeded on all hosts for component WORKERProvisioning Succeeded on all hosts for component MANAGERProvisioning of MANAGER succeeded.Provisioning of WORKER succeeded.Provisioning of all components completed.Started service reachability check operation for MANAGER.Started service reachability check operation for WORKER.Reachability Succeeded on all hosts for component MANAGERSuccessfully completed service reachability check for MANAGERSuccessfully completed service reachability check for WORKERReachability Succeeded on all hosts for component WORKERService reachability check of WORKER succeeded.Service reachability check of all components completed.Service reachability check of MANAGER succeeded.Activity EndedActivity Ended/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-24>24/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-25>25/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-26>26/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-27>27/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-28>28/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-29>29/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-30>30/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-31>31/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-32>32/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-33>33/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-34>34/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-35>35/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-36>36/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-37>37/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-38>38/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-39>39/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-40>40/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-41>41/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-42>42/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-43>43/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-44>44/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-45>45/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-46>46/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-47>47/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-48>48/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-49>49/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-50>50/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-51>51/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-52>52/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-53>53/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b1428747566995-54>54/div>div classcrayon-num data-linecrayon-5cfd1e54b1428747566995-55>55/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b1428747566995-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-2>span classcrayon-e>Activity/span> span classcrayon-e>Submitted/span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-3> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-4>span classcrayon-e>Activity/span> span classcrayon-e>Started/span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-5> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-6>span classcrayon-e>Started/span> span classcrayon-e>operation/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>create/span> span classcrayon-i>service/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>couchbase/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-st>in/span> span classcrayon-h>/span>span classcrayon-e>identity/span> span classcrayon-i>domain/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>arungupta/span>span classcrayon-sy>/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-7> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-8>span classcrayon-e>Creating/span> span classcrayon-i>service/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>couchbase/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-i>resources/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-v>occs/span>span classcrayon-o>-/span>span classcrayon-v>mgr/span>span classcrayon-o>-/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-v>occs/span>span classcrayon-o>-/span>span classcrayon-v>wkr/span>span classcrayon-o>-/span>span classcrayon-cn>1/span>span classcrayon-sy>/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-9> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-10>span classcrayon-e>Completed/span> span classcrayon-e>creating/span> span classcrayon-i>service/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>couchbase/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-st>in/span> span classcrayon-h>/span>span classcrayon-i>domain/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>arungupta/span>span classcrayon-sy>/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-11> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-12>span classcrayon-e>Started/span> span classcrayon-e>operation/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>establish/span> span classcrayon-e>security/span> span classcrayon-e>on/span> span classcrayon-e>VMs/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-i>component/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>MANAGER/span>span classcrayon-sy>/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-13> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-14>span classcrayon-e>Completed/span> span classcrayon-e>operation/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>establish/span> span classcrayon-e>security/span> span classcrayon-e>on/span> span classcrayon-e>VMs/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-i>component/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>MANAGER/span>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-15> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-16>span classcrayon-e>Started/span> span classcrayon-e>operation/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>establish/span> span classcrayon-e>security/span> span classcrayon-e>on/span> span classcrayon-e>VMs/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-i>component/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>WORKER/span>span classcrayon-sy>/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-17> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-18>span classcrayon-e>Completed/span> span classcrayon-e>operation/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>establish/span> span classcrayon-e>security/span> span classcrayon-e>on/span> span classcrayon-e>VMs/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-i>component/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>WORKER/span>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-19> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-20>span classcrayon-e>Started/span> span classcrayon-e>operation/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>check/span> span classcrayon-e>provisioning/span> span classcrayon-e>status/span> span classcrayon-e>on/span> span classcrayon-e>the/span> span classcrayon-e>VMs/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>MANAGER/span>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-21> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-22>span classcrayon-e>Started/span> span classcrayon-e>operation/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>check/span> span classcrayon-e>provisioning/span> span classcrayon-e>status/span> span classcrayon-e>on/span> span classcrayon-e>the/span> span classcrayon-e>VMs/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>WORKER/span>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-23> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-24>span classcrayon-e>Provisioning/span> span classcrayon-e>Succeeded/span> span classcrayon-e>on/span> span classcrayon-e>all/span> span classcrayon-e>hosts/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-i>component/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>WORKER/span>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-25> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-26>span classcrayon-e>Provisioning/span> span classcrayon-e>Succeeded/span> span classcrayon-e>on/span> span classcrayon-e>all/span> span classcrayon-e>hosts/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-i>component/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>MANAGER/span>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-27> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-28>span classcrayon-e>Provisioning/span> span classcrayon-i>of/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>MANAGER/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-v>succeeded/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-29> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-30>span classcrayon-e>Provisioning/span> span classcrayon-i>of/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>WORKER/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-v>succeeded/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-31> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-32>span classcrayon-e>Provisioning/span> span classcrayon-e>of/span> span classcrayon-e>all/span> span classcrayon-e>components/span> span classcrayon-v>completed/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-33> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-34>span classcrayon-e>Started/span> span classcrayon-e>service/span> span classcrayon-e>reachability/span> span classcrayon-e>check/span> span classcrayon-e>operation/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>MANAGER/span>span classcrayon-sy>/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-35> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-36>span classcrayon-e>Started/span> span classcrayon-e>service/span> span classcrayon-e>reachability/span> span classcrayon-e>check/span> span classcrayon-e>operation/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>WORKER/span>span classcrayon-sy>/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-37> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-38>span classcrayon-e>Reachability/span> span classcrayon-e>Succeeded/span> span classcrayon-e>on/span> span classcrayon-e>all/span> span classcrayon-e>hosts/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-i>component/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>MANAGER/span>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-39> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-40>span classcrayon-e>Successfully/span> span classcrayon-e>completed/span> span classcrayon-e>service/span> span classcrayon-e>reachability/span> span classcrayon-e>check/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>MANAGER/span>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-41> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-42>span classcrayon-e>Successfully/span> span classcrayon-e>completed/span> span classcrayon-e>service/span> span classcrayon-e>reachability/span> span classcrayon-e>check/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>WORKER/span>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-43> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-44>span classcrayon-e>Reachability/span> span classcrayon-e>Succeeded/span> span classcrayon-e>on/span> span classcrayon-e>all/span> span classcrayon-e>hosts/span> span classcrayon-st>for/span> span classcrayon-h>/span>span classcrayon-i>component/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>WORKER/span>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-45> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-46>span classcrayon-e>Service/span> span classcrayon-e>reachability/span> span classcrayon-e>check/span> span classcrayon-i>of/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>WORKER/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-v>succeeded/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-47> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-48>span classcrayon-e>Service/span> span classcrayon-e>reachability/span> span classcrayon-e>check/span> span classcrayon-e>of/span> span classcrayon-e>all/span> span classcrayon-e>components/span> span classcrayon-v>completed/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-49> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-50>span classcrayon-e>Service/span> span classcrayon-e>reachability/span> span classcrayon-e>check/span> span classcrayon-i>of/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-v>MANAGER/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-v>succeeded/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-51> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-52>span classcrayon-e>Activity/span> span classcrayon-e>Ended/span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-53> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b1428747566995-54>span classcrayon-e>Activity/span> span classcrayon-i>Ended/span>/div>div classcrayon-line idcrayon-5cfd1e54b1428747566995-55> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>No timestamp in the activity feels a bit too clean./p>/li>li>One main question that I kept wondering all along is “em>when am I ready to deploy the containers?/em>“. Apparently, not yet!A couple of more steps so hang in there …p>In your service, click on the top-right icon to select another menu:br />a href/wp-content/uploads/2017/02/oracle-cloud-container-console-open.png>img classalignnone size-large wp-image-14618 src/wp-content/uploads/2017/02/oracle-cloud-container-console-open-1024x657.png altoracle-cloud-container-console-open width604 height388 />/a>/p>p>Select code>Container Console/code>. So, now you are transitioning from code>Oracle Container Cloud Service Console/code> to code>Container Console/code>. Make sure to use the right terminology otherwise it gets confusing fast./p>/li>li>This attempts to open Container Console but prompts the usual warninga href/wp-content/uploads/2017/02/oracle-cloud-container-console-open-warning.png>img classalignnone size-large wp-image-14619 src/wp-content/uploads/2017/02/oracle-cloud-container-console-open-warning-1024x865.png altoracle-cloud-container-console-open-warning width604 height510 />/a>p>Just click on code>Proceed/code> link. In a typical production setup, this will setup correctly using certificates and so this warning would not happen./p>/li>li>This brings up a login screen:a href/wp-content/uploads/2017/02/oracle-cloud-container-console-login.png>img classalignnone size-large wp-image-14620 src/wp-content/uploads/2017/02/oracle-cloud-container-console-login-1024x947.png altoracle-cloud-container-console-login width604 height559 />/a>/li>li>Use the username and password specified during service creation earlier. Click on code>Login/code> to see Container Console:a href/wp-content/uploads/2017/02/oracle-cloud-container-console-default.png>img classalignnone size-large wp-image-14621 src/wp-content/uploads/2017/02/oracle-cloud-container-console-default-1024x636.png altoracle-cloud-container-console-default width604 height375 />/a>/li>/ol>p>Are we there yet?/p>p>Yes, now is the time to deploy containers. But we’ll cover that in a subsequent blog!/p>p>Just to recap on what is needed to get started with Oracle Container Cloud Service …/p>ol>li>Register for Oracle Cloud trial/li>li>Login to main Oracle Cloud Dashboard/li>li>Create a Oracle Container Cloud Service Instance/li>li>Oracle Container Cloud Service Instance Console/li>li>Container Console/li>/ol>p>All the steps need to be done once but a console inside a console inside a dashboard feels like Inception. The good thing is that the IP address of Container Console is a public IP address served by Oracle Cloud and can be used from anywhere./p>p>Oracle Container Cloud Service Docs have lot more details about building and deploying applications using this Console./p>p>In the next blog, we’ll see what it takes to run a Couchbase container using this console? Possibly a cluster of Couchbase across multiple hosts?/p>p>Want to learn more about running Couchbase in containers?/p>ul>li>Couchbase on Containers/li>li>Couchbase Forums/li>li>Couchbase Developer Portal/li>li>@couchhasedev and @couchbase/li>/ul>p>Source: https://blog.couchbase.com/2017/february/getting-started-oracle-container-cloud-service/p>/div>footer classentry-meta>div classcomments-link>a href/getting-started-oracle-container-cloud-service/#comments>View all 8 comments/a>/div>/footer>/article>article idpost-14596 classpost-14596 post type-post status-publish format-standard hentry category-containers category-couchbase category-wildfly tag-couchbase tag-javaee tag-microservice tag-wildfly>header classentry-header>h1 classentry-title>a href/microservice-docker-stack-deploy-wildfly-javaee-couchbase/ relbookmark>Microservice using Docker stack deploy – WildFly, Java EE and Couchbase/a>/h1>div classentry-meta>span classdate>a href/microservice-docker-stack-deploy-wildfly-javaee-couchbase/ titlePermalink to Microservice using Docker stack deploy – WildFly, Java EE and Couchbase relbookmark>time classentry-date datetime2017-02-03T10:48:01+00:00>February 3, 2017/time>/a>/span>span classcategories-links>a href/topics/containers/ relcategory tag>containers/a>, a href/topics/couchbase/ relcategory tag>couchbase/a>, a href/topics/redhat/wildfly/ relcategory tag>wildfly/a>/span>span classtags-links>a href/tag/couchbase/ reltag>couchbase/a>, a href/tag/javaee/ reltag>javaee/a>, a href/tag/microservice/ reltag>microservice/a>, a href/tag/wildfly/ reltag>wildfly/a>/span>span classauthor vcard>a classurl fn n href/author/admin/ titleView all posts by arungupta relauthor>arungupta/a>/span>/div>/header>div classentry-content>p>There is plenty of material on microservices, just google it! I gave a presentation on refactoring monolith to microservices at Devoxx Belgium a couple of years back and it has good reviews:/p>p>iframe width853 height480 srchttps://www.youtube.com/embed/iJVW7v8O9BU frameborder0 allowfullscreenallowfullscreen>/iframe>/p>p>This blog will show how Docker simplifies creation and shutting down of a microservice./p>p>All code used in this blog is at github.com/arun-gupta/couchbase-javaee./p>h2>Microservice Definition using Compose/h2>p>Docker 1.13 introduced a v3 of Docker Compose. The changes in the syntax are minimal but the key difference is addition of deploy attribute. This attribute allows to specify replicas, rolling update and restart policy for the container./p>p>Our microservice will start a WldFly application server with a Java EE application pre-deployed. This application will talk to a Couchbase database to CRUD application data./p>p>Here is the Compose definition:/p>div idcrayon-5cfd1e54b2480947328475 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>version: 3services: web: image: arungupta/couchbase-javaee:travel environment: - COUCHBASE_URIdb ports: - 8080:8080 - 9990:9990 depends_on: - db db: image: arungupta/couchbase:travel ports: - 8091:8091 - 8092:8092 - 8093:8093 - 11210:11210/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b2480947328475-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b2480947328475-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b2480947328475-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b2480947328475-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b2480947328475-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b2480947328475-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b2480947328475-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b2480947328475-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b2480947328475-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b2480947328475-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b2480947328475-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b2480947328475-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b2480947328475-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b2480947328475-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b2480947328475-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b2480947328475-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b2480947328475-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b2480947328475-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54b2480947328475-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b2480947328475-20>20/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b2480947328475-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b2480947328475-2>span classcrayon-v>version/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>3/span>/div>div classcrayon-line idcrayon-5cfd1e54b2480947328475-3>span classcrayon-v>services/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b2480947328475-4>span classcrayon-h> /span>span classcrayon-v>web/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54b2480947328475-5>span classcrayon-h> /span>span classcrayon-v>image/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-v>javaee/span>span classcrayon-o>:/span>span classcrayon-e>travel/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b2480947328475-6>span classcrayon-e> /span>span classcrayon-v>environment/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54b2480947328475-7>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-v>COUCHBASE_URI/span>span classcrayon-o>/span>span classcrayon-e>db/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b2480947328475-8>span classcrayon-e> /span>span classcrayon-v>ports/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54b2480947328475-9>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>8080/span>span classcrayon-o>:/span>span classcrayon-cn>8080/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b2480947328475-10>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>9990/span>span classcrayon-o>:/span>span classcrayon-cn>9990/span>/div>div classcrayon-line idcrayon-5cfd1e54b2480947328475-11>span classcrayon-h> /span>span classcrayon-v>depends_on/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b2480947328475-12>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-e>db/span>/div>div classcrayon-line idcrayon-5cfd1e54b2480947328475-13>span classcrayon-e> /span>span classcrayon-v>db/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b2480947328475-14>span classcrayon-h> /span>span classcrayon-v>image/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>:/span>span classcrayon-e>travel/span>/div>div classcrayon-line idcrayon-5cfd1e54b2480947328475-15>span classcrayon-e> /span>span classcrayon-v>ports/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b2480947328475-16>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>8091/span>span classcrayon-o>:/span>span classcrayon-cn>8091/span>/div>div classcrayon-line idcrayon-5cfd1e54b2480947328475-17>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>8092/span>span classcrayon-o>:/span>span classcrayon-cn>8092/span> span classcrayon-h>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b2480947328475-18>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>8093/span>span classcrayon-o>:/span>span classcrayon-cn>8093/span> span classcrayon-h>/span>/div>div classcrayon-line idcrayon-5cfd1e54b2480947328475-19>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>11210/span>span classcrayon-o>:/span>span classcrayon-cn>11210/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b2480947328475-20> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>In this Compose file:/p>ol>li>Two services in this Compose are defined by the name code>db/code> and code>web/code> attributes/li>li>Image name for each service defined using code>image/code> attribute/li>li>The code>arungupta/couchbase:travel/code> image starts Couchbase server, configures it using Couchbase REST API, and loads code>travel-sample/code> bucket with ~32k JSON documents./li>li>The code>arungupta/couchbase-javaee:travel/code> image starts WildFly and deploys application WAR file built from https://github.com/arun-gupta/couchbase-javaee. Clone that project if you want to build your own image./li>li>code>envrionment/code> attribute defines environment variables accessible by the application deployed in WildFly. code>COUCHBASE_URI/code> refers to the database service. This is used in the application code as shown at https://github.com/arun-gupta/couchbase-javaee/blob/master/src/main/java/org/couchbase/sample/javaee/Database.java./li>li>Port forwarding is achieved using code>ports/code> attribute/li>li>div>p>code>depends_on/code> attribute in Compose definition file ensures the container start up order. But application-level start up needs to be ensured by the applications running inside container. In our case, WildFly starts up rather quickly but takes a few seconds for the database to start up. This means the Java EE application deployed in WildFly is not able to communicate with the database. This outlines a best practice when building micro services applications: you must code defensively and ensure in your application initialization that the micro services you depend on have started, without assuming startup order. This is shown in the database initialization code at https://github.com/arun-gupta/couchbase-javaee/blob/master/src/main/java/org/couchbase/sample/javaee/Database.java. It performs the following checks:/p>ol>li>Bucket exists/li>li>Query service of Couchbase is up and running/li>li>Sample bucket is fully loaded/li>/ol>/div>/li>/ol>p>This application can be started using code>docker-compose up -d/code> command on a single host. Or a cluster of Docker engines in swarm-mode using code>docker stack deploy/code> command./p>h2>Setup Docker Swarm-mode/h2>p>Initialize Swarm mode using the following command:/p>div idcrayon-5cfd1e54b249a632069175 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker swarm init/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b249a632069175-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b249a632069175-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b249a632069175-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b249a632069175-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b249a632069175-2>span classcrayon-e>docker/span> span classcrayon-e>swarm/span> span classcrayon-i>init/span>/div>div classcrayon-line idcrayon-5cfd1e54b249a632069175-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>br />/p>div>p>This starts a Swarm Manager. By default, manager node are also worker but can be configured to be manager-only./p>/div>div>p>Find some information about this one-node cluster using the command code>docker info/code> command:/p>div idcrayon-5cfd1e54b24a8993513278 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>Containers: 0 Running: 0 Paused: 0 Stopped: 0Images: 17Server Version: 1.13.0Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: trueLogging Driver: json-fileCgroup Driver: cgroupfsPlugins: Volume: local Network: bridge host ipvlan macvlan null overlaySwarm: active NodeID: 92mydh0e09ba5hx3wtmcmvktz Is Manager: true ClusterID: v68ikyaff7rdxpaw1j0c9i60s Managers: 1 Nodes: 1 Orchestration: Task History Retention Limit: 5 Raft: Snapshot Interval: 10000 Number of Old Snapshots to Retain: 0 Heartbeat Tick: 1 Election Tick: 3 Dispatcher: Heartbeat Period: 5 seconds CA Configuration: Expiry Duration: 3 months Node Address: 192.168.65.2 Manager Addresses: 192.168.65.2:2377Runtimes: runcDefault Runtime: runcInit Binary: docker-initcontainerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090erunc version: 2f7393a47307a16f8cee44a37b262e8b81021e3einit version: 949e6faSecurity Options: seccomp Profile: defaultKernel Version: 4.9.5-mobyOperating System: Alpine Linux v3.5OSType: linuxArchitecture: x86_64CPUs: 4Total Memory: 1.952 GiBName: mobyID: SGCM:KDRD:G3M7:PZHN:J4RL:VFFR:G2SR:EKD5:JV4J:RL3X:LF7T:XF6VDocker Root Dir: /var/lib/dockerDebug Mode (client): falseDebug Mode (server): true File Descriptors: 31 Goroutines: 124 System Time: 2017-01-27T08:25:58.032295342Z EventsListeners: 1No Proxy: *.local, 169.254/16Username: arunguptaRegistry: https://index.docker.io/v1/Experimental: trueInsecure Registries: 127.0.0.0/8Live Restore Enabled: false/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-24>24/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-25>25/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-26>26/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-27>27/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-28>28/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-29>29/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-30>30/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-31>31/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-32>32/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-33>33/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-34>34/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-35>35/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-36>36/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-37>37/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-38>38/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-39>39/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-40>40/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-41>41/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-42>42/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-43>43/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-44>44/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-45>45/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-46>46/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-47>47/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-48>48/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-49>49/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-50>50/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-51>51/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-52>52/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-53>53/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-54>54/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-55>55/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-56>56/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-57>57/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-58>58/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-59>59/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-60>60/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-61>61/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-62>62/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-63>63/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-64>64/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-65>65/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-66>66/div>div classcrayon-num data-linecrayon-5cfd1e54b24a8993513278-67>67/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24a8993513278-68>68/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-2>span classcrayon-v>Containers/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>0/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-3>span classcrayon-h>/span>span classcrayon-v>Running/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>0/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-4>span classcrayon-h>/span>span classcrayon-v>Paused/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>0/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-5>span classcrayon-h>/span>span classcrayon-v>Stopped/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>0/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-6>span classcrayon-v>Images/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>17/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-7>span classcrayon-e>Server/span> span classcrayon-v>Version/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1.13.0/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-8>span classcrayon-e>Storage/span> span classcrayon-v>Driver/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>overlay2/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-9>span classcrayon-e>/span>span classcrayon-e>Backing/span> span classcrayon-v>Filesystem/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>extfs/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-10>span classcrayon-e>/span>span classcrayon-e>Supports/span> span classcrayon-v>d_type/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>true/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-11>span classcrayon-h>/span>span classcrayon-m>Native/span> span classcrayon-h>/span>span classcrayon-e>Overlay/span> span classcrayon-v>Diff/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>true/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-12>span classcrayon-e>Logging/span> span classcrayon-v>Driver/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>json/span>span classcrayon-o>-/span>span classcrayon-e>file/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-13>span classcrayon-e>Cgroup/span> span classcrayon-v>Driver/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>cgroupfs/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-14>span classcrayon-v>Plugins/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-15>span classcrayon-h>/span>span classcrayon-v>Volume/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>local/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-16>span classcrayon-e>/span>span classcrayon-v>Network/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>bridge/span> span classcrayon-e>host/span> span classcrayon-e>ipvlan/span> span classcrayon-e>macvlan/span> span classcrayon-t>null/span> span classcrayon-h>/span>span classcrayon-e>overlay/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-17>span classcrayon-v>Swarm/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>active/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-18>span classcrayon-e>/span>span classcrayon-v>NodeID/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>92mydh0e09ba5hx3wtmcmvktz/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-19>span classcrayon-h>/span>span classcrayon-st>Is/span> span classcrayon-h>/span>span classcrayon-v>Manager/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>true/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-20>span classcrayon-h>/span>span classcrayon-v>ClusterID/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>v68ikyaff7rdxpaw1j0c9i60s/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-21>span classcrayon-e>/span>span classcrayon-v>Managers/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-22>span classcrayon-h>/span>span classcrayon-v>Nodes/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-23>span classcrayon-h>/span>span classcrayon-v>Orchestration/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-24>span classcrayon-h> /span>span classcrayon-e>Task/span> span classcrayon-e>History/span> span classcrayon-e>Retention/span> span classcrayon-v>Limit/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>5/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-25>span classcrayon-h>/span>span classcrayon-v>Raft/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-26>span classcrayon-h> /span>span classcrayon-e>Snapshot/span> span classcrayon-v>Interval/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>10000/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-27>span classcrayon-h> /span>span classcrayon-e>Number/span> span classcrayon-e>of/span> span classcrayon-e>Old/span> span classcrayon-e>Snapshots/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-v>Retain/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>0/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-28>span classcrayon-h> /span>span classcrayon-e>Heartbeat/span> span classcrayon-v>Tick/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-29>span classcrayon-h> /span>span classcrayon-e>Election/span> span classcrayon-v>Tick/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>3/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-30>span classcrayon-h>/span>span classcrayon-v>Dispatcher/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-31>span classcrayon-h> /span>span classcrayon-e>Heartbeat/span> span classcrayon-v>Period/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>5/span> span classcrayon-h>/span>span classcrayon-e>seconds/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-32>span classcrayon-e>/span>span classcrayon-e>CA/span> span classcrayon-v>Configuration/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-33>span classcrayon-h> /span>span classcrayon-e>Expiry/span> span classcrayon-v>Duration/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>3/span> span classcrayon-h>/span>span classcrayon-e>months/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-34>span classcrayon-e>/span>span classcrayon-e>Node/span> span classcrayon-v>Address/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>192.168.65.2/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-35>span classcrayon-h>/span>span classcrayon-e>Manager/span> span classcrayon-v>Addresses/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-36>span classcrayon-h> /span>span classcrayon-cn>192.168.65.2/span>span classcrayon-o>:/span>span classcrayon-cn>2377/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-37>span classcrayon-v>Runtimes/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>runc/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-38>span classcrayon-st>Default/span> span classcrayon-h>/span>span classcrayon-v>Runtime/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>runc/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-39>span classcrayon-e>Init/span> span classcrayon-v>Binary/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>docker/span>span classcrayon-o>-/span>span classcrayon-e>init/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-40>span classcrayon-e>containerd/span> span classcrayon-v>version/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>03e5862ec0d8d3b3f750e19fca3ee367e13c090e/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-41>span classcrayon-e>runc/span> span classcrayon-v>version/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>2f7393a47307a16f8cee44a37b262e8b81021e3e/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-42>span classcrayon-e>init/span> span classcrayon-v>version/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>949e6fa/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-43>span classcrayon-e>Security/span> span classcrayon-v>Options/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-44>span classcrayon-h>/span>span classcrayon-e>seccomp/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-45>span classcrayon-e> /span>span classcrayon-v>Profile/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-st>default/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-46>span classcrayon-e>Kernel/span> span classcrayon-v>Version/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>4.9.5/span>span classcrayon-o>-/span>span classcrayon-e>moby/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-47>span classcrayon-e>Operating/span> span classcrayon-v>System/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>Alpine/span> span classcrayon-e>Linux/span> span classcrayon-v>v3/span>span classcrayon-sy>./span>span classcrayon-cn>5/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-48>span classcrayon-v>OSType/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>linux/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-49>span classcrayon-v>Architecture/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>x86_64/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-50>span classcrayon-v>CPUs/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>4/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-51>span classcrayon-e>Total/span> span classcrayon-v>Memory/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1.952/span> span classcrayon-h>/span>span classcrayon-e>GiB/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-52>span classcrayon-v>Name/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>moby/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-53>span classcrayon-v>ID/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>SGCM/span>span classcrayon-o>:/span>span classcrayon-v>KDRD/span>span classcrayon-o>:/span>span classcrayon-v>G3M7/span>span classcrayon-o>:/span>span classcrayon-v>PZHN/span>span classcrayon-o>:/span>span classcrayon-v>J4RL/span>span classcrayon-o>:/span>span classcrayon-v>VFFR/span>span classcrayon-o>:/span>span classcrayon-v>G2SR/span>span classcrayon-o>:/span>span classcrayon-v>EKD5/span>span classcrayon-o>:/span>span classcrayon-v>JV4J/span>span classcrayon-o>:/span>span classcrayon-v>RL3X/span>span classcrayon-o>:/span>span classcrayon-v>LF7T/span>span classcrayon-o>:/span>span classcrayon-e>XF6V/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-54>span classcrayon-e>Docker/span> span classcrayon-e>Root/span> span classcrayon-v>Dir/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-t>var/span>span classcrayon-o>//span>span classcrayon-v>lib/span>span classcrayon-o>//span>span classcrayon-e>docker/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-55>span classcrayon-e>Debug/span> span classcrayon-e>Mode/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-v>client/span>span classcrayon-sy>)/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>false/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-56>span classcrayon-e>Debug/span> span classcrayon-e>Mode/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-v>server/span>span classcrayon-sy>)/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>true/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-57>span classcrayon-h>/span>span classcrayon-e>File/span> span classcrayon-v>Descriptors/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>31/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-58>span classcrayon-h>/span>span classcrayon-v>Goroutines/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>124/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-59>span classcrayon-h>/span>span classcrayon-e>System/span> span classcrayon-v>Time/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>2017/span>span classcrayon-o>-/span>span classcrayon-cn>01/span>span classcrayon-o>-/span>span classcrayon-cn>27T08/span>span classcrayon-o>:/span>span classcrayon-cn>25/span>span classcrayon-o>:/span>span classcrayon-cn>58.032295342Z/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-60>span classcrayon-h>/span>span classcrayon-v>EventsListeners/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-61>span classcrayon-e>No/span> span classcrayon-v>Proxy/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-o>*/span>span classcrayon-sy>./span>span classcrayon-v>local/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>169.254/span>span classcrayon-o>//span>span classcrayon-cn>16/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-62>span classcrayon-v>Username/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>arungupta/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-63>span classcrayon-v>Registry/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>https/span>span classcrayon-o>:/span>span classcrayon-c>//index.docker.io/v1//span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-64>span classcrayon-v>Experimental/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>true/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-65>span classcrayon-e>Insecure/span> span classcrayon-v>Registries/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-66>span classcrayon-h>/span>span classcrayon-cn>127.0.0.0/span>span classcrayon-o>//span>span classcrayon-cn>8/span>/div>div classcrayon-line idcrayon-5cfd1e54b24a8993513278-67>span classcrayon-e>Live/span> span classcrayon-e>Restore/span> span classcrayon-v>Enabled/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>false/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24a8993513278-68> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>This cluster has 1 node, and that is manager./p>p>Alternatively, a multi-host cluster can be easily setup using Docker for AWS./p>h2>Deploy Microservice/h2>p>The microservice can be started as:/p>div idcrayon-5cfd1e54b24b9662115826 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker stack deploy --compose-filedocker-compose.yml webapp/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b24b9662115826-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24b9662115826-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b24b9662115826-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b24b9662115826-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24b9662115826-2>span classcrayon-e>docker/span> span classcrayon-e>stack/span> span classcrayon-v>deploy/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>compose/span>span classcrayon-o>-/span>span classcrayon-v>file/span>span classcrayon-o>/span>span classcrayon-v>docker/span>span classcrayon-o>-/span>span classcrayon-v>compose/span>span classcrayon-sy>./span>span classcrayon-e>yml/span> span classcrayon-i>webapp/span>/div>div classcrayon-line idcrayon-5cfd1e54b24b9662115826-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>This shows the output:/p>/div>div idcrayon-5cfd1e54b24c6317451768 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>Creating network webapp_defaultCreating service webapp_webCreating service webapp_db/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b24c6317451768-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24c6317451768-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b24c6317451768-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24c6317451768-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b24c6317451768-5>5/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b24c6317451768-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24c6317451768-2>span classcrayon-e>Creating/span> span classcrayon-e>network/span> span classcrayon-e>webapp_default/span>/div>div classcrayon-line idcrayon-5cfd1e54b24c6317451768-3>span classcrayon-e>Creating/span> span classcrayon-e>service/span> span classcrayon-e>webapp_web/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24c6317451768-4>span classcrayon-e>Creating/span> span classcrayon-e>service/span> span classcrayon-v>webapp/span>span classcrayon-sy>_/span>db/div>div classcrayon-line idcrayon-5cfd1e54b24c6317451768-5> /div>/div>/td>/tr>/tbody>/table>/div>/div>div>p>WildFly and Couchbase services are started on this node. Each service has a single container. If the Swarm mode is enabled on multiple nodes then the containers will be distributed across multiple nodes./p>/div>div>p>A new overlay network is created. This allows multiple containers on different hosts to communicate with each other./p>/div>p>Verify that the WildFly and Couchbase services are running using code>docker service ls/code>:/p>div idcrayon-5cfd1e54b24d5094136195 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>ID NAME MODE REPLICAS IMAGEa9pkiziw3vgw webapp_db replicated 1/1 arungupta/couchbase:travelhr5s6ue54kwj webapp_web replicated 1/1 arungupta/couchbase-javaee:travel/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b24d5094136195-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24d5094136195-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b24d5094136195-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24d5094136195-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b24d5094136195-5>5/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b24d5094136195-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24d5094136195-2>span classcrayon-e>ID /span>span classcrayon-e>NAME /span>span classcrayon-e>MODE /span>span classcrayon-e>REPLICAS /span>span classcrayon-e>IMAGE/span>/div>div classcrayon-line idcrayon-5cfd1e54b24d5094136195-3>span classcrayon-e>a9pkiziw3vgw /span>span classcrayon-e>webapp_db /span> span classcrayon-i>replicated/span>span classcrayon-h> /span>span classcrayon-cn>1/span>span classcrayon-o>//span>span classcrayon-cn>1/span>span classcrayon-h> /span> span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>:/span>span classcrayon-e>travel/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24d5094136195-4>span classcrayon-e>hr5s6ue54kwj /span>span classcrayon-e>webapp_web /span>span classcrayon-i>replicated/span>span classcrayon-h> /span>span classcrayon-cn>1/span>span classcrayon-o>//span>span classcrayon-cn>1/span>span classcrayon-h> /span> span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-v>javaee/span>span classcrayon-o>:/span>span classcrayon-i>travel/span>/div>div classcrayon-line idcrayon-5cfd1e54b24d5094136195-5> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>br />/p>div>p>Logs for the service can be seen using code>docker service logs -f webapp_web/code>:/p>/div>div>div idcrayon-5cfd1e54b24ef908085892 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>webapp_web.1.wby0b04t7bap@moby | webapp_web.1.wby0b04t7bap@moby |webapp_web.1.wby0b04t7bap@moby | JBoss Bootstrap Environmentwebapp_web.1.wby0b04t7bap@moby |webapp_web.1.wby0b04t7bap@moby | JBOSS_HOME: /opt/jboss/wildflywebapp_web.1.wby0b04t7bap@moby |webapp_web.1.wby0b04t7bap@moby | JAVA: /usr/lib/jvm/java/bin/javawebapp_web.1.wby0b04t7bap@moby |webapp_web.1.wby0b04t7bap@moby | JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MetaspaceSize96M -XX:MaxMetaspaceSize256m -Djava.net.preferIPv4Stacktrue -Djboss.modules.system.pkgsorg.jboss.byteman -Djava.awt.headlesstruewebapp_web.1.wby0b04t7bap@moby |webapp_web.1.wby0b04t7bap@moby | . . .webapp_web.1.wby0b04t7bap@moby | 23:14:15,811 INFO org.jboss.as.server (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed airlines.war (runtime-name : airlines.war)webapp_web.1.wby0b04t7bap@moby | 23:14:16,076 INFO org.jboss.as (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/managementwebapp_web.1.wby0b04t7bap@moby | 23:14:16,077 INFO org.jboss.as (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990webapp_web.1.wby0b04t7bap@moby | 23:14:16,077 INFO org.jboss.as (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started in 98623ms - Started 443 of 691 services (404 services are lazy, passive or on-demand)/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b24ef908085892-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24ef908085892-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b24ef908085892-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24ef908085892-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b24ef908085892-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24ef908085892-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b24ef908085892-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24ef908085892-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b24ef908085892-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24ef908085892-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b24ef908085892-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24ef908085892-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b24ef908085892-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24ef908085892-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b24ef908085892-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24ef908085892-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b24ef908085892-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24ef908085892-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54b24ef908085892-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24ef908085892-20>20/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b24ef908085892-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24ef908085892-2>span classcrayon-v>webapp_web/span>span classcrayon-sy>./span>span classcrayon-cn>1.wby0b04t7bap/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>/div>div classcrayon-line idcrayon-5cfd1e54b24ef908085892-3>span classcrayon-v>webapp_web/span>span classcrayon-sy>./span>span classcrayon-cn>1.wby0b04t7bap/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24ef908085892-4>span classcrayon-v>webapp_web/span>span classcrayon-sy>./span>span classcrayon-cn>1.wby0b04t7bap/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span>span classcrayon-h> /span> span classcrayon-e>JBoss/span> span classcrayon-e>Bootstrap/span> span classcrayon-e>Environment/span>/div>div classcrayon-line idcrayon-5cfd1e54b24ef908085892-5>span classcrayon-v>webapp_web/span>span classcrayon-sy>./span>span classcrayon-cn>1.wby0b04t7bap/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24ef908085892-6>span classcrayon-v>webapp_web/span>span classcrayon-sy>./span>span classcrayon-cn>1.wby0b04t7bap/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span>span classcrayon-h> /span> span classcrayon-v>JBOSS_HOME/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>opt/span>span classcrayon-o>//span>span classcrayon-v>jboss/span>span classcrayon-o>//span>span classcrayon-e>wildfly/span>/div>div classcrayon-line idcrayon-5cfd1e54b24ef908085892-7>span classcrayon-v>webapp_web/span>span classcrayon-sy>./span>span classcrayon-cn>1.wby0b04t7bap/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24ef908085892-8>span classcrayon-v>webapp_web/span>span classcrayon-sy>./span>span classcrayon-cn>1.wby0b04t7bap/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span>span classcrayon-h> /span> span classcrayon-v>JAVA/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>usr/span>span classcrayon-o>//span>span classcrayon-v>lib/span>span classcrayon-o>//span>span classcrayon-v>jvm/span>span classcrayon-o>//span>span classcrayon-v>java/span>span classcrayon-o>//span>span classcrayon-v>bin/span>span classcrayon-o>//span>span classcrayon-e>java/span>/div>div classcrayon-line idcrayon-5cfd1e54b24ef908085892-9>span classcrayon-v>webapp_web/span>span classcrayon-sy>./span>span classcrayon-cn>1.wby0b04t7bap/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24ef908085892-10>span classcrayon-v>webapp_web/span>span classcrayon-sy>./span>span classcrayon-cn>1.wby0b04t7bap/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span>span classcrayon-h> /span> span classcrayon-v>JAVA_OPTS/span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-o>-/span>span classcrayon-v>server/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>Xms64m/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>Xmx512m/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>XX/span>span classcrayon-o>:/span>span classcrayon-v>MetaspaceSize/span>span classcrayon-o>/span>span classcrayon-cn>96M/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>XX/span>span classcrayon-o>:/span>span classcrayon-v>MaxMetaspaceSize/span>span classcrayon-o>/span>span classcrayon-cn>256m/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>Djava/span>span classcrayon-sy>./span>span classcrayon-v>net/span>span classcrayon-sy>./span>span classcrayon-v>preferIPv4Stack/span>span classcrayon-o>/span>span classcrayon-t>true/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>Djboss/span>span classcrayon-sy>./span>span classcrayon-v>modules/span>span classcrayon-sy>./span>span classcrayon-v>system/span>span classcrayon-sy>./span>span classcrayon-v>pkgs/span>span classcrayon-o>/span>span classcrayon-v>org/span>span classcrayon-sy>./span>span classcrayon-v>jboss/span>span classcrayon-sy>./span>span classcrayon-v>byteman/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>Djava/span>span classcrayon-sy>./span>span classcrayon-v>awt/span>span classcrayon-sy>./span>span classcrayon-v>headless/span>span classcrayon-o>/span>span classcrayon-t>true/span>/div>div classcrayon-line idcrayon-5cfd1e54b24ef908085892-11>span classcrayon-v>webapp_web/span>span classcrayon-sy>./span>span classcrayon-cn>1.wby0b04t7bap/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24ef908085892-12>span classcrayon-v>webapp_web/span>span classcrayon-sy>./span>span classcrayon-cn>1.wby0b04t7bap/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>span classcrayon-o>/span>/div>div classcrayon-line idcrayon-5cfd1e54b24ef908085892-13> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24ef908085892-14>span classcrayon-sy>./span> span classcrayon-h>/span>span classcrayon-sy>./span> span classcrayon-h>/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b24ef908085892-15> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24ef908085892-16>span classcrayon-v>webapp_web/span>span classcrayon-sy>./span>span classcrayon-cn>1.wby0b04t7bap/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-cn>23/span>span classcrayon-o>:/span>span classcrayon-cn>14/span>span classcrayon-o>:/span>span classcrayon-cn>15/span>span classcrayon-sy>,/span>span classcrayon-cn>811/span> span classcrayon-h>/span>span classcrayon-i>INFO/span>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-v>org/span>span classcrayon-sy>./span>span classcrayon-v>jboss/span>span classcrayon-sy>./span>span classcrayon-st>as/span>span classcrayon-sy>./span>span classcrayon-v>server/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-e>ServerService/span> span classcrayon-e>Thread/span> span classcrayon-v>Pool/span> span classcrayon-h>/span>span classcrayon-o>--/span> span classcrayon-h>/span>span classcrayon-cn>34/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>WFLYSRV0010/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-i>Deployed/span> span classcrayon-h>/span>span classcrayon-s>airlines.war/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-v>runtime/span>span classcrayon-o>-/span>span classcrayon-v>name/span> span classcrayon-h>/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>airlines.war/span>span classcrayon-sy>)/span>/div>div classcrayon-line idcrayon-5cfd1e54b24ef908085892-17>span classcrayon-v>webapp_web/span>span classcrayon-sy>./span>span classcrayon-cn>1.wby0b04t7bap/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-cn>23/span>span classcrayon-o>:/span>span classcrayon-cn>14/span>span classcrayon-o>:/span>span classcrayon-cn>16/span>span classcrayon-sy>,/span>span classcrayon-cn>076/span> span classcrayon-h>/span>span classcrayon-i>INFO/span>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-v>org/span>span classcrayon-sy>./span>span classcrayon-v>jboss/span>span classcrayon-sy>./span>span classcrayon-st>as/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-e>Controller/span> span classcrayon-e>Boot/span> span classcrayon-v>Thread/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>WFLYSRV0060/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>Http/span> span classcrayon-e>management/span> span classcrayon-t>interface/span> span classcrayon-h>/span>span classcrayon-e>listening/span> span classcrayon-e>on/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//127.0.0.1:9990/management/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24ef908085892-18>span classcrayon-v>webapp_web/span>span classcrayon-sy>./span>span classcrayon-cn>1.wby0b04t7bap/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-cn>23/span>span classcrayon-o>:/span>span classcrayon-cn>14/span>span classcrayon-o>:/span>span classcrayon-cn>16/span>span classcrayon-sy>,/span>span classcrayon-cn>077/span> span classcrayon-h>/span>span classcrayon-i>INFO/span>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-v>org/span>span classcrayon-sy>./span>span classcrayon-v>jboss/span>span classcrayon-sy>./span>span classcrayon-st>as/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-e>Controller/span> span classcrayon-e>Boot/span> span classcrayon-v>Thread/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>WFLYSRV0051/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>Admin/span> span classcrayon-e>console/span> span classcrayon-e>listening/span> span classcrayon-e>on/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//127.0.0.1:9990/span>/div>div classcrayon-line idcrayon-5cfd1e54b24ef908085892-19>span classcrayon-v>webapp_web/span>span classcrayon-sy>./span>span classcrayon-cn>1.wby0b04t7bap/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-cn>23/span>span classcrayon-o>:/span>span classcrayon-cn>14/span>span classcrayon-o>:/span>span classcrayon-cn>16/span>span classcrayon-sy>,/span>span classcrayon-cn>077/span> span classcrayon-h>/span>span classcrayon-i>INFO/span>span classcrayon-h> /span>span classcrayon-sy>/span>span classcrayon-v>org/span>span classcrayon-sy>./span>span classcrayon-v>jboss/span>span classcrayon-sy>./span>span classcrayon-st>as/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-e>Controller/span> span classcrayon-e>Boot/span> span classcrayon-v>Thread/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>WFLYSRV0025/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>WildFly/span> span classcrayon-i>Full/span> span classcrayon-h>/span>span classcrayon-cn>10.1.0.Final/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-e>WildFly/span> span classcrayon-i>Core/span> span classcrayon-h>/span>span classcrayon-cn>2.2.0.Final/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-e>started/span> span classcrayon-st>in/span> span classcrayon-h>/span>span classcrayon-cn>98623ms/span> span classcrayon-h>/span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-i>Started/span> span classcrayon-h>/span>span classcrayon-cn>443/span> span classcrayon-h>/span>span classcrayon-i>of/span> span classcrayon-h>/span>span classcrayon-cn>691/span> span classcrayon-h>/span>span classcrayon-e>services/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-cn>404/span> span classcrayon-h>/span>span classcrayon-e>services/span> span classcrayon-e>are/span> span classcrayon-v>lazy/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-e>passive/span> span classcrayon-st>or/span> span classcrayon-h>/span>span classcrayon-v>on/span>span classcrayon-o>-/span>span classcrayon-v>demand/span>span classcrayon-sy>)/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24ef908085892-20> /div>/div>/td>/tr>/tbody>/table>/div>/div>Make sure to wait for the last log statement to show.p>br />/p>/div>h2>Access Microservice/h2>p>Get 10 airlines from the microservice:/p>div idcrayon-5cfd1e54b24ff662140317 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>curl -v http://localhost:8080/airlines/resources/airline/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b24ff662140317-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b24ff662140317-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b24ff662140317-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b24ff662140317-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b24ff662140317-2>span classcrayon-v>curl/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>v/span> span classcrayon-h>/span>span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//localhost:8080/airlines/resources/airline/span>/div>div classcrayon-line idcrayon-5cfd1e54b24ff662140317-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>This shows the results as:/p>div idcrayon-5cfd1e54b250d867214071 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>* Trying ::1...* Connected to localhost (::1) port 8080 (#0)> GET /airlines/resources/airline HTTP/1.1> Host: localhost:8080> User-Agent: curl/7.43.0> Accept: */*> < HTTP/1.1 200 OK< Connection: keep-alive< X-Powered-By: Undertow/1< Server: WildFly/10< Content-Type: application/octet-stream< Content-Length: 1402< Date: Fri, 03 Feb 2017 17:02:45 GMT< * Connection #0 to host localhost left intact{travel-sample:{country:United States,iata:Q5,callsign:MILE-AIR,name:40-Mile Air,icao:MLA,id:10,type:airline}}, {travel-sample:{country:United States,iata:TQ,callsign:TXW,name:Texas Wings,icao:TXW,id:10123,type:airline}}, {travel-sample:{country:United States,iata:A1,callsign:atifly,name:Atifly,icao:A1F,id:10226,type:airline}}, {travel-sample:{country:United Kingdom,iata:null,callsign:null,name:Jc royal.britannica,icao:JRB,id:10642,type:airline}}, {travel-sample:{country:United States,iata:ZQ,callsign:LOCAIR,name:Locair,icao:LOC,id:10748,type:airline}}, {travel-sample:{country:United States,iata:K5,callsign:SASQUATCH,name:SeaPort Airlines,icao:SQH,id:10765,type:airline}}, {travel-sample:{country:United States,iata:KO,callsign:ACE AIR,name:Alaska Central Express,icao:AER,id:109,type:airline}}, {travel-sample:{country:United Kingdom,iata:5W,callsign:FLYSTAR,name:Astraeus,icao:AEU,id:112,type:airline}}, {travel-sample:{country:France,iata:UU,callsign:REUNION,name:Air Austral,icao:REU,id:1191,type:airline}}, {travel-sample:{country:France,iata:A5,callsign:AIRLINAIR,name:Airlinair,icao:RLA,id:1203,type:airline}}/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b250d867214071-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b250d867214071-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b250d867214071-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b250d867214071-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b250d867214071-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b250d867214071-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b250d867214071-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b250d867214071-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b250d867214071-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b250d867214071-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b250d867214071-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b250d867214071-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b250d867214071-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b250d867214071-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b250d867214071-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b250d867214071-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b250d867214071-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b250d867214071-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54b250d867214071-19>19/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b250d867214071-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b250d867214071-2>span classcrayon-o>*/span>span classcrayon-h> /span> span classcrayon-v>Trying/span> span classcrayon-h>/span>span classcrayon-o>::/span>span classcrayon-cn>1.../span>/div>div classcrayon-line idcrayon-5cfd1e54b250d867214071-3>span classcrayon-o>*/span> span classcrayon-h>/span>span classcrayon-e>Connected/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>localhost/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-o>::/span>span classcrayon-cn>1/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-i>port/span> span classcrayon-h>/span>span classcrayon-cn>8080/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-p>#0)/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b250d867214071-4>span classcrayon-o>>/span> span classcrayon-h>/span>span classcrayon-v>GET/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>airlines/span>span classcrayon-o>//span>span classcrayon-v>resources/span>span classcrayon-o>//span>span classcrayon-e>airline/span> span classcrayon-v>HTTP/span>span classcrayon-o>//span>span classcrayon-cn>1.1/span>/div>div classcrayon-line idcrayon-5cfd1e54b250d867214071-5>span classcrayon-o>>/span> span classcrayon-h>/span>span classcrayon-v>Host/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>localhost/span>span classcrayon-o>:/span>span classcrayon-cn>8080/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b250d867214071-6>span classcrayon-o>>/span> span classcrayon-h>/span>span classcrayon-v>User/span>span classcrayon-o>-/span>span classcrayon-v>Agent/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>curl/span>span classcrayon-o>//span>span classcrayon-cn>7.43.0/span>/div>div classcrayon-line idcrayon-5cfd1e54b250d867214071-7>span classcrayon-o>>/span> span classcrayon-h>/span>span classcrayon-v>Accept/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-o>*/span>span classcrayon-o>//span>span classcrayon-o>*/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b250d867214071-8>span classcrayon-o>>/span> span classcrayon-h>/span>/div>div classcrayon-line idcrayon-5cfd1e54b250d867214071-9>span classcrayon-o></span> span classcrayon-h>/span>span classcrayon-v>HTTP/span>span classcrayon-o>//span>span classcrayon-cn>1.1/span> span classcrayon-h>/span>span classcrayon-cn>200/span> span classcrayon-h>/span>span classcrayon-v>OK/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b250d867214071-10>span classcrayon-o></span> span classcrayon-h>/span>span classcrayon-v>Connection/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>keep/span>span classcrayon-o>-/span>span classcrayon-v>alive/span>/div>div classcrayon-line idcrayon-5cfd1e54b250d867214071-11>span classcrayon-o></span> span classcrayon-h>/span>span classcrayon-v>X/span>span classcrayon-o>-/span>span classcrayon-v>Powered/span>span classcrayon-o>-/span>span classcrayon-v>By/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>Undertow/span>span classcrayon-o>//span>span classcrayon-cn>1/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b250d867214071-12>span classcrayon-o></span> span classcrayon-h>/span>span classcrayon-v>Server/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>WildFly/span>span classcrayon-o>//span>span classcrayon-cn>10/span>/div>div classcrayon-line idcrayon-5cfd1e54b250d867214071-13>span classcrayon-o></span> span classcrayon-h>/span>span classcrayon-v>Content/span>span classcrayon-o>-/span>span classcrayon-v>Type/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>application/span>span classcrayon-o>//span>span classcrayon-v>octet/span>span classcrayon-o>-/span>span classcrayon-v>stream/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b250d867214071-14>span classcrayon-o></span> span classcrayon-h>/span>span classcrayon-v>Content/span>span classcrayon-o>-/span>span classcrayon-v>Length/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1402/span>/div>div classcrayon-line idcrayon-5cfd1e54b250d867214071-15>span classcrayon-o></span> span classcrayon-h>/span>span classcrayon-v>Date/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>Fri/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>03/span> span classcrayon-h>/span>span classcrayon-i>Feb/span> span classcrayon-h>/span>span classcrayon-cn>2017/span> span classcrayon-h>/span>span classcrayon-cn>17/span>span classcrayon-o>:/span>span classcrayon-cn>02/span>span classcrayon-o>:/span>span classcrayon-cn>45/span> span classcrayon-h>/span>span classcrayon-e>GMT/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b250d867214071-16>span classcrayon-o></span> span classcrayon-h>/span>/div>div classcrayon-line idcrayon-5cfd1e54b250d867214071-17>span classcrayon-o>*/span> span classcrayon-h>/span>span classcrayon-e>Connection/span> span classcrayon-h>/span>span classcrayon-p>#0 to host localhost left intact/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b250d867214071-18>span classcrayon-sy>/span>span classcrayon-sy>{/span>span classcrayon-s>travel-sample/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-s>country/span>span classcrayon-o>:/span>span classcrayon-s>United States/span>span classcrayon-sy>,/span>span classcrayon-s>iata/span>span classcrayon-o>:/span>span classcrayon-s>Q5/span>span classcrayon-sy>,/span>span classcrayon-s>callsign/span>span classcrayon-o>:/span>span classcrayon-s>MILE-AIR/span>span classcrayon-sy>,/span>span classcrayon-s>name/span>span classcrayon-o>:/span>span classcrayon-s>40-Mile Air/span>span classcrayon-sy>,/span>span classcrayon-s>icao/span>span classcrayon-o>:/span>span classcrayon-s>MLA/span>span classcrayon-sy>,/span>span classcrayon-s>id/span>span classcrayon-o>:/span>span classcrayon-cn>10/span>span classcrayon-sy>,/span>span classcrayon-s>type/span>span classcrayon-o>:/span>span classcrayon-s>airline/span>span classcrayon-sy>}/span>span classcrayon-sy>}/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-sy>{/span>span classcrayon-s>travel-sample/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-s>country/span>span classcrayon-o>:/span>span classcrayon-s>United States/span>span classcrayon-sy>,/span>span classcrayon-s>iata/span>span classcrayon-o>:/span>span classcrayon-s>TQ/span>span classcrayon-sy>,/span>span classcrayon-s>callsign/span>span classcrayon-o>:/span>span classcrayon-s>TXW/span>span classcrayon-sy>,/span>span classcrayon-s>name/span>span classcrayon-o>:/span>span classcrayon-s>Texas Wings/span>span classcrayon-sy>,/span>span classcrayon-s>icao/span>span classcrayon-o>:/span>span classcrayon-s>TXW/span>span classcrayon-sy>,/span>span classcrayon-s>id/span>span classcrayon-o>:/span>span classcrayon-cn>10123/span>span classcrayon-sy>,/span>span classcrayon-s>type/span>span classcrayon-o>:/span>span classcrayon-s>airline/span>span classcrayon-sy>}/span>span classcrayon-sy>}/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-sy>{/span>span classcrayon-s>travel-sample/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-s>country/span>span classcrayon-o>:/span>span classcrayon-s>United States/span>span classcrayon-sy>,/span>span classcrayon-s>iata/span>span classcrayon-o>:/span>span classcrayon-s>A1/span>span classcrayon-sy>,/span>span classcrayon-s>callsign/span>span classcrayon-o>:/span>span classcrayon-s>atifly/span>span classcrayon-sy>,/span>span classcrayon-s>name/span>span classcrayon-o>:/span>span classcrayon-s>Atifly/span>span classcrayon-sy>,/span>span classcrayon-s>icao/span>span classcrayon-o>:/span>span classcrayon-s>A1F/span>span classcrayon-sy>,/span>span classcrayon-s>id/span>span classcrayon-o>:/span>span classcrayon-cn>10226/span>span classcrayon-sy>,/span>span classcrayon-s>type/span>span classcrayon-o>:/span>span classcrayon-s>airline/span>span classcrayon-sy>}/span>span classcrayon-sy>}/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-sy>{/span>span classcrayon-s>travel-sample/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-s>country/span>span classcrayon-o>:/span>span classcrayon-s>United Kingdom/span>span classcrayon-sy>,/span>span classcrayon-s>iata/span>span classcrayon-o>:/span>span classcrayon-t>null/span>span classcrayon-sy>,/span>span classcrayon-s>callsign/span>span classcrayon-o>:/span>span classcrayon-t>null/span>span classcrayon-sy>,/span>span classcrayon-s>name/span>span classcrayon-o>:/span>span classcrayon-s>Jc royal.britannica/span>span classcrayon-sy>,/span>span classcrayon-s>icao/span>span classcrayon-o>:/span>span classcrayon-s>JRB/span>span classcrayon-sy>,/span>span classcrayon-s>id/span>span classcrayon-o>:/span>span classcrayon-cn>10642/span>span classcrayon-sy>,/span>span classcrayon-s>type/span>span classcrayon-o>:/span>span classcrayon-s>airline/span>span classcrayon-sy>}/span>span classcrayon-sy>}/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-sy>{/span>span classcrayon-s>travel-sample/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-s>country/span>span classcrayon-o>:/span>span classcrayon-s>United States/span>span classcrayon-sy>,/span>span classcrayon-s>iata/span>span classcrayon-o>:/span>span classcrayon-s>ZQ/span>span classcrayon-sy>,/span>span classcrayon-s>callsign/span>span classcrayon-o>:/span>span classcrayon-s>LOCAIR/span>span classcrayon-sy>,/span>span classcrayon-s>name/span>span classcrayon-o>:/span>span classcrayon-s>Locair/span>span classcrayon-sy>,/span>span classcrayon-s>icao/span>span classcrayon-o>:/span>span classcrayon-s>LOC/span>span classcrayon-sy>,/span>span classcrayon-s>id/span>span classcrayon-o>:/span>span classcrayon-cn>10748/span>span classcrayon-sy>,/span>span classcrayon-s>type/span>span classcrayon-o>:/span>span classcrayon-s>airline/span>span classcrayon-sy>}/span>span classcrayon-sy>}/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-sy>{/span>span classcrayon-s>travel-sample/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-s>country/span>span classcrayon-o>:/span>span classcrayon-s>United States/span>span classcrayon-sy>,/span>span classcrayon-s>iata/span>span classcrayon-o>:/span>span classcrayon-s>K5/span>span classcrayon-sy>,/span>span classcrayon-s>callsign/span>span classcrayon-o>:/span>span classcrayon-s>SASQUATCH/span>span classcrayon-sy>,/span>span classcrayon-s>name/span>span classcrayon-o>:/span>span classcrayon-s>SeaPort Airlines/span>span classcrayon-sy>,/span>span classcrayon-s>icao/span>span classcrayon-o>:/span>span classcrayon-s>SQH/span>span classcrayon-sy>,/span>span classcrayon-s>id/span>span classcrayon-o>:/span>span classcrayon-cn>10765/span>span classcrayon-sy>,/span>span classcrayon-s>type/span>span classcrayon-o>:/span>span classcrayon-s>airline/span>span classcrayon-sy>}/span>span classcrayon-sy>}/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-sy>{/span>span classcrayon-s>travel-sample/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-s>country/span>span classcrayon-o>:/span>span classcrayon-s>United States/span>span classcrayon-sy>,/span>span classcrayon-s>iata/span>span classcrayon-o>:/span>span classcrayon-s>KO/span>span classcrayon-sy>,/span>span classcrayon-s>callsign/span>span classcrayon-o>:/span>span classcrayon-s>ACE AIR/span>span classcrayon-sy>,/span>span classcrayon-s>name/span>span classcrayon-o>:/span>span classcrayon-s>Alaska Central Express/span>span classcrayon-sy>,/span>span classcrayon-s>icao/span>span classcrayon-o>:/span>span classcrayon-s>AER/span>span classcrayon-sy>,/span>span classcrayon-s>id/span>span classcrayon-o>:/span>span classcrayon-cn>109/span>span classcrayon-sy>,/span>span classcrayon-s>type/span>span classcrayon-o>:/span>span classcrayon-s>airline/span>span classcrayon-sy>}/span>span classcrayon-sy>}/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-sy>{/span>span classcrayon-s>travel-sample/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-s>country/span>span classcrayon-o>:/span>span classcrayon-s>United Kingdom/span>span classcrayon-sy>,/span>span classcrayon-s>iata/span>span classcrayon-o>:/span>span classcrayon-s>5W/span>span classcrayon-sy>,/span>span classcrayon-s>callsign/span>span classcrayon-o>:/span>span classcrayon-s>FLYSTAR/span>span classcrayon-sy>,/span>span classcrayon-s>name/span>span classcrayon-o>:/span>span classcrayon-s>Astraeus/span>span classcrayon-sy>,/span>span classcrayon-s>icao/span>span classcrayon-o>:/span>span classcrayon-s>AEU/span>span classcrayon-sy>,/span>span classcrayon-s>id/span>span classcrayon-o>:/span>span classcrayon-cn>112/span>span classcrayon-sy>,/span>span classcrayon-s>type/span>span classcrayon-o>:/span>span classcrayon-s>airline/span>span classcrayon-sy>}/span>span classcrayon-sy>}/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-sy>{/span>span classcrayon-s>travel-sample/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-s>country/span>span classcrayon-o>:/span>span classcrayon-s>France/span>span classcrayon-sy>,/span>span classcrayon-s>iata/span>span classcrayon-o>:/span>span classcrayon-s>UU/span>span classcrayon-sy>,/span>span classcrayon-s>callsign/span>span classcrayon-o>:/span>span classcrayon-s>REUNION/span>span classcrayon-sy>,/span>span classcrayon-s>name/span>span classcrayon-o>:/span>span classcrayon-s>Air Austral/span>span classcrayon-sy>,/span>span classcrayon-s>icao/span>span classcrayon-o>:/span>span classcrayon-s>REU/span>span classcrayon-sy>,/span>span classcrayon-s>id/span>span classcrayon-o>:/span>span classcrayon-cn>1191/span>span classcrayon-sy>,/span>span classcrayon-s>type/span>span classcrayon-o>:/span>span classcrayon-s>airline/span>span classcrayon-sy>}/span>span classcrayon-sy>}/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-sy>{/span>span classcrayon-s>travel-sample/span>span classcrayon-o>:/span>span classcrayon-sy>{/span>span classcrayon-s>country/span>span classcrayon-o>:/span>span classcrayon-s>France/span>span classcrayon-sy>,/span>span classcrayon-s>iata/span>span classcrayon-o>:/span>span classcrayon-s>A5/span>span classcrayon-sy>,/span>span classcrayon-s>callsign/span>span classcrayon-o>:/span>span classcrayon-s>AIRLINAIR/span>span classcrayon-sy>,/span>span classcrayon-s>name/span>span classcrayon-o>:/span>span classcrayon-s>Airlinair/span>span classcrayon-sy>,/span>span classcrayon-s>icao/span>span classcrayon-o>:/span>span classcrayon-s>RLA/span>span classcrayon-sy>,/span>span classcrayon-s>id/span>span classcrayon-o>:/span>span classcrayon-cn>1203/span>span classcrayon-sy>,/span>span classcrayon-s>type/span>span classcrayon-o>:/span>span classcrayon-s>airline/span>span classcrayon-sy>}/span>span classcrayon-sy>}/span>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b250d867214071-19> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Docker for Java Developers workshop is a self-paced hands-on lab and allows you to get started with Docker easily./p>p>Get a single resource:/p>div idcrayon-5cfd1e54b251e083925061 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>curl -v http://localhost:8080/airlines/resources/airline/137/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b251e083925061-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b251e083925061-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b251e083925061-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b251e083925061-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b251e083925061-2>span classcrayon-v>curl/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>v/span> span classcrayon-h>/span>span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//localhost:8080/airlines/resources/airline/137/span>/div>div classcrayon-line idcrayon-5cfd1e54b251e083925061-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Create a new resource:/p>div idcrayon-5cfd1e54b252b794757372 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>curl -v -H Content-Type: application/json -X POST -d {country:France,iata:A5,callsign:AIRLINAIR,name:Airlinair,icao:RLA,type:airline} http://localhost:8080/airlines/resources/airline/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b252b794757372-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b252b794757372-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b252b794757372-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b252b794757372-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b252b794757372-2>span classcrayon-v>curl/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>v/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>H/span> span classcrayon-h>/span>span classcrayon-s>Content-Type: application/json/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>X/span> span classcrayon-h>/span>span classcrayon-v>POST/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>d/span> span classcrayon-h>/span>span classcrayon-s>{country:France,iata:A5,callsign:AIRLINAIR,name:Airlinair,icao:RLA,type:airline}/span> span classcrayon-h>/span>span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//localhost:8080/airlines/resources/airline/span>/div>div classcrayon-line idcrayon-5cfd1e54b252b794757372-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Update a resource:/p>div idcrayon-5cfd1e54b2539410838770 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>curl -v -H Content-Type: application/json -X PUT -d {country:France,iata:A5,callsign:AIRLINAIR,name:Airlin Air,icao:RLA,type:airline,id: 19810} http://localhost:8080/airlines/resources/airline/19810/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b2539410838770-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b2539410838770-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b2539410838770-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b2539410838770-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b2539410838770-2>span classcrayon-v>curl/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>v/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>H/span> span classcrayon-h>/span>span classcrayon-s>Content-Type: application/json/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>X/span> span classcrayon-h>/span>span classcrayon-v>PUT/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>d/span> span classcrayon-h>/span>span classcrayon-s>{country:France,iata:A5,callsign:AIRLINAIR,name:Airlin Air,icao:RLA,type:airline,id: 19810}/span> span classcrayon-h>/span>span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//localhost:8080/airlines/resources/airline/19810/span>/div>div classcrayon-line idcrayon-5cfd1e54b2539410838770-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Delete a resource:/p>div idcrayon-5cfd1e54b2547119779711 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>curl -v -X DELETE http://localhost:8080/airlines/resources/airline/19810/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b2547119779711-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b2547119779711-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b2547119779711-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b2547119779711-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b2547119779711-2>span classcrayon-v>curl/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>v/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>X/span> span classcrayon-h>/span>span classcrayon-e>DELETE/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//localhost:8080/airlines/resources/airline/19810/span>/div>div classcrayon-line idcrayon-5cfd1e54b2547119779711-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Detailed output from each of these commands is at github.com/arun-gupta/couchbase-javaee./p>h2>Delete Microservice/h2>p>The microservice can be removed using the command span classs1>code>docker stack rm webapp/code>:/span>/p>div idcrayon-5cfd1e54b2555737756772 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>Removing service webapp_webRemoving service webapp_dbRemoving network webapp_default/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b2555737756772-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b2555737756772-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b2555737756772-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b2555737756772-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b2555737756772-5>5/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b2555737756772-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b2555737756772-2>span classcrayon-e>Removing/span> span classcrayon-e>service/span> span classcrayon-e>webapp_web/span>/div>div classcrayon-line idcrayon-5cfd1e54b2555737756772-3>span classcrayon-e>Removing/span> span classcrayon-e>service/span> span classcrayon-e>webapp_db/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b2555737756772-4>span classcrayon-e>Removing/span> span classcrayon-e>network/span> span classcrayon-v>webapp/span>span classcrayon-sy>_/span>default/div>div classcrayon-line idcrayon-5cfd1e54b2555737756772-5> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Want to get started with Couchbase? Look at Couchbase Starter Kits./p>p>Want to learn more about running Couchbase in containers?/p>ul>li>Couchbase on Containers/li>li>Couchbase Forums/li>li>Couchbase Developer Portal/li>li>@couchhasedev and @couchbase/li>/ul>p>Source: https://blog.couchbase.com/2017/february/microservice-using-docker-stack-deploy-wildfly-javaee-couchbase/p>/div>footer classentry-meta>div classcomments-link>a href/microservice-docker-stack-deploy-wildfly-javaee-couchbase/#comments>View all 5 comments/a>/div>/footer>/article>article idpost-14585 classpost-14585 post type-post status-publish format-standard hentry category-containers category-couchbase category-techtip tag-compose tag-couchbase tag-docker tag-service>header classentry-header>h1 classentry-title>a href/deploy-docker-compose-services-swarm/ relbookmark>Deploy Docker Compose Services to Swarm/a>/h1>div classentry-meta>span classdate>a href/deploy-docker-compose-services-swarm/ titlePermalink to Deploy Docker Compose Services to Swarm relbookmark>time classentry-date datetime2017-01-22T18:36:21+00:00>January 22, 2017/time>/a>/span>span classcategories-links>a href/topics/containers/ relcategory tag>containers/a>, a href/topics/couchbase/ relcategory tag>couchbase/a>, a href/topics/techtip/ relcategory tag>techtip/a>/span>span classtags-links>a href/tag/compose/ reltag>compose/a>, a href/tag/couchbase/ reltag>couchbase/a>, a href/tag/docker/ reltag>docker/a>, a href/tag/service/ reltag>service/a>/span>span classauthor vcard>a classurl fn n href/author/admin/ titleView all posts by arungupta relauthor>arungupta/a>/span>/div>/header>div classentry-content>p>Docker 1.13 introduced a new version of Docker Compose. The main feature of this release is that it allow services defined using Docker Compose files to be directly deployed to Docker Engine enabled with Swarm mode. This enables simplified deployment of multi-container application on multi-host./p>p>a href/wp-content/uploads/2017/01/docker-1.13.jpg>img classalignnone size-large wp-image-14575 src/wp-content/uploads/2017/01/docker-1.13-1024x512.jpg altDocker 1.13 width604 height302 />/a>/p>p>This blog will show use a simple Docker Compose file to show how services are created and deployed in Docker 1.13./p>p>Here is a Docker Compose v2 definition for starting a Couchbase database node:/p>div idcrayon-5cfd1e54b381f598537557 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>version: 2services: db: image: arungupta/couchbase:latest ports: - 8091:8091 - 8092:8092 - 8093:8093 - 11210:11210/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b381f598537557-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b381f598537557-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b381f598537557-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b381f598537557-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b381f598537557-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b381f598537557-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b381f598537557-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b381f598537557-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b381f598537557-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b381f598537557-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b381f598537557-11>11/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b381f598537557-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b381f598537557-2>span classcrayon-v>version/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>2/span>/div>div classcrayon-line idcrayon-5cfd1e54b381f598537557-3>span classcrayon-v>services/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b381f598537557-4>span classcrayon-h> /span>span classcrayon-v>db/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54b381f598537557-5>span classcrayon-h> /span>span classcrayon-v>image/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>:/span>span classcrayon-e>latest/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b381f598537557-6>span classcrayon-e> /span>span classcrayon-v>ports/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54b381f598537557-7>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>8091/span>span classcrayon-o>:/span>span classcrayon-cn>8091/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b381f598537557-8>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>8092/span>span classcrayon-o>:/span>span classcrayon-cn>8092/span>/div>div classcrayon-line idcrayon-5cfd1e54b381f598537557-9>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>8093/span>span classcrayon-o>:/span>span classcrayon-cn>8093/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b381f598537557-10>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>11210/span>span classcrayon-o>:/span>span classcrayon-cn>11210/span>/div>div classcrayon-line idcrayon-5cfd1e54b381f598537557-11> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>This definition can be started on a Docker Engine without Swarm mode as:/p>div idcrayon-5cfd1e54b3835676898942 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker-compose up/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b3835676898942-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b3835676898942-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b3835676898942-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b3835676898942-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b3835676898942-2>span classcrayon-v>docker/span>span classcrayon-o>-/span>span classcrayon-e>compose/span> span classcrayon-i>up/span>/div>div classcrayon-line idcrayon-5cfd1e54b3835676898942-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>This will start a single replica of the service define in the Compose file. This service can be scaled as:/p>div idcrayon-5cfd1e54b3843792985213 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker-compose scale db2/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b3843792985213-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b3843792985213-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b3843792985213-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b3843792985213-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b3843792985213-2>span classcrayon-v>docker/span>span classcrayon-o>-/span>span classcrayon-e>compose/span> span classcrayon-e>scale/span> span classcrayon-v>db/span>span classcrayon-o>/span>span classcrayon-cn>2/span>/div>div classcrayon-line idcrayon-5cfd1e54b3843792985213-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>If the ports are not exposed then this would work fine on a single host. If swarm mode is enabled on on Docker Engine, then it shows the message:/p>div idcrayon-5cfd1e54b3851981445510 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>WARNING: The Docker Engine youre using is running in swarm mode.Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.To deploy your application across the swarm, use `docker stack deploy`./textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b3851981445510-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b3851981445510-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b3851981445510-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b3851981445510-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b3851981445510-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b3851981445510-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b3851981445510-7>7/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b3851981445510-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b3851981445510-2>span classcrayon-v>WARNING/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-e>The/span> span classcrayon-e>Docker/span> span classcrayon-e>Engine/span> span classcrayon-i>you/span>span classcrayon-e>re/span> span classcrayon-e>using/span> span classcrayon-st>is/span> span classcrayon-h>/span>span classcrayon-e>running/span> span classcrayon-st>in/span> span classcrayon-h>/span>span classcrayon-e>swarm/span> span classcrayon-v>mode/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b3851981445510-3> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b3851981445510-4>span classcrayon-e>Compose/span> span classcrayon-e>does/span> span classcrayon-st>not/span> span classcrayon-h>/span>span classcrayon-st>use/span> span classcrayon-h>/span>span classcrayon-e>swarm/span> span classcrayon-e>mode/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>deploy/span> span classcrayon-e>services/span> span classcrayon-st>to/span> span classcrayon-h>/span>span classcrayon-e>multiple/span> span classcrayon-e>nodes/span> span classcrayon-st>in/span> span classcrayon-h>/span>span classcrayon-i>a/span> span classcrayon-h>/span>span classcrayon-v>swarm/span>span classcrayon-sy>./span> span classcrayon-h>/span>span classcrayon-e>All/span> span classcrayon-e>containers/span> span classcrayon-e>will/span> span classcrayon-e>be/span> span classcrayon-e>scheduled/span> span classcrayon-e>on/span> span classcrayon-e>the/span> span classcrayon-e>current/span> span classcrayon-v>node/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b3851981445510-5> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b3851981445510-6>span classcrayon-st>To/span> span classcrayon-h>/span>span classcrayon-e>deploy/span> span classcrayon-e>your/span> span classcrayon-e>application/span> span classcrayon-e>across/span> span classcrayon-e>the/span> span classcrayon-v>swarm/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-st>use/span> span classcrayon-h>/span>span classcrayon-sy>`/span>span classcrayon-e>docker/span> span classcrayon-e>stack/span> span classcrayon-v>deploy/span>span classcrayon-sy>`/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b3851981445510-7> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Docker Compose gives us multi-container applications but the applications are still restricted to a single host. And that is a single point of failure./p>p>Swarm mode allows to create a cluster of Docker Engines. With 1.13, code>docker stack deploy/code> command can be used to deploy a Compose file to Swarm mode./p>p>Here is a Docker Compose v3 definition:/p>div idcrayon-5cfd1e54b3867221082773 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>version: 3services: db: image: arungupta/couchbase:latest ports: - 8091:8091 - 8092:8092 - 8093:8093 - 11210:11210/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b3867221082773-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b3867221082773-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b3867221082773-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b3867221082773-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b3867221082773-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b3867221082773-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b3867221082773-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b3867221082773-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b3867221082773-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b3867221082773-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b3867221082773-11>11/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b3867221082773-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b3867221082773-2>span classcrayon-v>version/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>3/span>/div>div classcrayon-line idcrayon-5cfd1e54b3867221082773-3>span classcrayon-v>services/span>span classcrayon-o>:/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b3867221082773-4>span classcrayon-h> /span>span classcrayon-v>db/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54b3867221082773-5>span classcrayon-h> /span>span classcrayon-v>image/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>:/span>span classcrayon-e>latest/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b3867221082773-6>span classcrayon-e> /span>span classcrayon-v>ports/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54b3867221082773-7>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>8091/span>span classcrayon-o>:/span>span classcrayon-cn>8091/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b3867221082773-8>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>8092/span>span classcrayon-o>:/span>span classcrayon-cn>8092/span>/div>div classcrayon-line idcrayon-5cfd1e54b3867221082773-9>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>8093/span>span classcrayon-o>:/span>span classcrayon-cn>8093/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b3867221082773-10>span classcrayon-h> /span>span classcrayon-o>-/span> span classcrayon-h>/span>span classcrayon-cn>11210/span>span classcrayon-o>:/span>span classcrayon-cn>11210/span>/div>div classcrayon-line idcrayon-5cfd1e54b3867221082773-11> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>As you can see, the only change is the value of code>version/code> attribute. There are other changes in Docker Compose v3. Also, read about different Docker Compose versions and how to upgrade from v2 to v3./p>p>Enable swarm mode:/p>div idcrayon-5cfd1e54b3877431502316 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker swarm init/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b3877431502316-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b3877431502316-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b3877431502316-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b3877431502316-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b3877431502316-2>span classcrayon-e>docker/span> span classcrayon-e>swarm/span> span classcrayon-i>init/span>/div>div classcrayon-line idcrayon-5cfd1e54b3877431502316-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Other nodes can join this swarm cluster and this would easily allow to deploy the multi-container application to a multi-host as well./p>p>Deploy the services defined in Compose file as:/p>div idcrayon-5cfd1e54b3885743713158 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker stack deploy --compose-filedocker-compose.yml couchbase/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b3885743713158-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b3885743713158-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b3885743713158-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b3885743713158-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b3885743713158-2>span classcrayon-e>docker/span> span classcrayon-e>stack/span> span classcrayon-v>deploy/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-v>compose/span>span classcrayon-o>-/span>span classcrayon-v>file/span>span classcrayon-o>/span>span classcrayon-v>docker/span>span classcrayon-o>-/span>span classcrayon-v>compose/span>span classcrayon-sy>./span>span classcrayon-e>yml/span> span classcrayon-i>couchbase/span>/div>div classcrayon-line idcrayon-5cfd1e54b3885743713158-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>A default value of Compose file here would make the command a bit shorter. #30352 should take care of that./p>p>List of services running can be verified using code>docker service ls/code> command:/p>div idcrayon-5cfd1e54b3893895285675 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>ID NAME MODE REPLICAS IMAGE05wa4y2he9w5 couchbase_db replicated 1/1 arungupta/couchbase:latest/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b3893895285675-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b3893895285675-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b3893895285675-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b3893895285675-4>4/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b3893895285675-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b3893895285675-2>span classcrayon-e>ID /span>span classcrayon-e>NAME /span>span classcrayon-e>MODE /span>span classcrayon-e>REPLICAS /span>span classcrayon-i>IMAGE/span>/div>div classcrayon-line idcrayon-5cfd1e54b3893895285675-3>span classcrayon-cn>05wa4y2he9w5/span>span classcrayon-h> /span>span classcrayon-e>couchbase_db /span>span classcrayon-i>replicated/span>span classcrayon-h> /span>span classcrayon-cn>1/span>span classcrayon-o>//span>span classcrayon-cn>1/span>span classcrayon-h> /span> span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>:/span>span classcrayon-i>latest/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b3893895285675-4> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>The list of containers running within the service can be seen using code>docker service ps/code> command:/p>div idcrayon-5cfd1e54b38a1461965976 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTSrchu2uykeuuj couchbase_db.1 arungupta/couchbase:latest moby Running Running 52 seconds ago/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b38a1461965976-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38a1461965976-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b38a1461965976-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38a1461965976-4>4/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b38a1461965976-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38a1461965976-2>span classcrayon-e>ID /span>span classcrayon-e>NAME /span>span classcrayon-e>IMAGE /span> span classcrayon-e>NODE /span>span classcrayon-e>DESIRED/span> span classcrayon-e>STATE /span>span classcrayon-e>CURRENT/span> span classcrayon-e>STATE /span> span classcrayon-e>ERROR /span>span classcrayon-e>PORTS/span>/div>div classcrayon-line idcrayon-5cfd1e54b38a1461965976-3>span classcrayon-e>rchu2uykeuuj /span>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>1/span>span classcrayon-h> /span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>:/span>span classcrayon-e>latest /span>span classcrayon-e>moby /span>span classcrayon-e>Running /span>span classcrayon-i>Running/span> span classcrayon-h>/span>span classcrayon-cn>52/span> span classcrayon-h>/span>span classcrayon-e>seconds/span> span classcrayon-i>ago/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38a1461965976-4> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>In this case, a single container is running as part of the service. The node is listed as code>moby/code> which is the default name of Docker Engine running using Docker for Mac./p>p>The service can now be scaled as:/p>div idcrayon-5cfd1e54b38af353347057 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker service scale couchbase_db2/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b38af353347057-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38af353347057-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b38af353347057-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b38af353347057-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38af353347057-2>span classcrayon-e>docker/span> span classcrayon-e>service/span> span classcrayon-e>scale/span> span classcrayon-v>couchbase_db/span>span classcrayon-o>/span>span classcrayon-cn>2/span>/div>div classcrayon-line idcrayon-5cfd1e54b38af353347057-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>The list of container can then be seen again as:/p>div idcrayon-5cfd1e54b38bd938191838 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTSrchu2uykeuuj couchbase_db.1 arungupta/couchbase:latest moby Running Running 3 minutes ago kjy7l14weao8 couchbase_db.2 arungupta/couchbase:latest moby Running Running 23 seconds ago/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b38bd938191838-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38bd938191838-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b38bd938191838-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38bd938191838-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b38bd938191838-5>5/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b38bd938191838-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38bd938191838-2>span classcrayon-e>ID /span>span classcrayon-e>NAME /span>span classcrayon-e>IMAGE /span> span classcrayon-e>NODE /span>span classcrayon-e>DESIRED/span> span classcrayon-e>STATE /span>span classcrayon-e>CURRENT/span> span classcrayon-e>STATE /span> span classcrayon-e>ERROR /span>span classcrayon-e>PORTS/span>/div>div classcrayon-line idcrayon-5cfd1e54b38bd938191838-3>span classcrayon-e>rchu2uykeuuj /span>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>1/span>span classcrayon-h> /span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>:/span>span classcrayon-e>latest /span>span classcrayon-e>moby /span>span classcrayon-e>Running /span>span classcrayon-i>Running/span> span classcrayon-h>/span>span classcrayon-cn>3/span> span classcrayon-h>/span>span classcrayon-e>minutes/span> span classcrayon-e>ago /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38bd938191838-4>span classcrayon-e>kjy7l14weao8 /span>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>2/span>span classcrayon-h> /span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-v>couchbase/span>span classcrayon-o>:/span>span classcrayon-e>latest /span>span classcrayon-e>moby /span>span classcrayon-e>Running /span>span classcrayon-i>Running/span> span classcrayon-h>/span>span classcrayon-cn>23/span> span classcrayon-h>/span>span classcrayon-e>seconds/span> span classcrayon-i>ago/span>/div>div classcrayon-line idcrayon-5cfd1e54b38bd938191838-5> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Note that the containers are given the name using the format code><service-name>_n/code>. Both the containers are running on the same host./p>p>Also note, the two containers are independent Couchbase nodes and are not configured in a cluster yet. This has already been explained at Couchbase Cluster using Docker and a refresh of the steps is coming soon./p>p>A service will typically have multiple containers running spread across multiple hosts. Docker 1.13 introduces a new command code>docker service logs <service-name>/code> to stream the log of service across all the containers on all hosts to your console. In our case, this can be seen using the command code>docker service logs couchbase_db/code> and looks like:/p>div idcrayon-5cfd1e54b38cc042127529 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>couchbase_db.1.rchu2uykeuuj@moby | ++ set -mcouchbase_db.1.rchu2uykeuuj@moby | ++ sleep 15couchbase_db.1.rchu2uykeuuj@moby | ++ /entrypoint.sh couchbase-servercouchbase_db.2.kjy7l14weao8@moby | ++ set -mcouchbase_db.2.kjy7l14weao8@moby | ++ sleep 15couchbase_db.1.rchu2uykeuuj@moby | Starting Couchbase Server -- Web UI available at http://:8091 and logs available in /opt/couchbase/var/lib/couchbase/logscouchbase_db.1.rchu2uykeuuj@moby | ++ curl -v -X POST http://127.0.0.1:8091/pools/default -d memoryQuota300 -d indexMemoryQuota300couchbase_db.2.kjy7l14weao8@moby | ++ /entrypoint.sh couchbase-servercouchbase_db.2.kjy7l14weao8@moby | Starting Couchbase Server -- Web UI available at http://:8091 and logs available in /opt/couchbase/var/lib/couchbase/logs. . .couchbase_db.1.rchu2uykeuuj@moby | ++ WORKER couchbase_db.2.kjy7l14weao8@moby | Content-Type: application/jsoncouchbase_db.1.rchu2uykeuuj@moby | ++ fg 1couchbase_db.2.kjy7l14weao8@moby | Content-Length: 152couchbase_db.1.rchu2uykeuuj@moby | /entrypoint.sh couchbase-servercouchbase_db.2.kjy7l14weao8@moby | Cache-Control: no-cachecouchbase_db.2.kjy7l14weao8@moby | couchbase_db.2.kjy7l14weao8@moby | ++ echo Type: couchbase_db.2.kjy7l14weao8@moby | ++ WORKER couchbase_db.2.kjy7l14weao8@moby | ++ fg 1couchbase_db.2.kjy7l14weao8@moby | {storageMode:memory_optimized,indexerThreads:0,memorySnapshotInterval:200,stableSnapshotInterval:5000,maxRollbackPoints:5,logLevel:info}Type: couchbase_db.2.kjy7l14weao8@moby | /entrypoint.sh couchbase-server/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b38cc042127529-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38cc042127529-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b38cc042127529-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38cc042127529-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b38cc042127529-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38cc042127529-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b38cc042127529-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38cc042127529-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b38cc042127529-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38cc042127529-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b38cc042127529-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38cc042127529-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b38cc042127529-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38cc042127529-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b38cc042127529-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38cc042127529-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b38cc042127529-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38cc042127529-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54b38cc042127529-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38cc042127529-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54b38cc042127529-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38cc042127529-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54b38cc042127529-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38cc042127529-24>24/div>div classcrayon-num data-linecrayon-5cfd1e54b38cc042127529-25>25/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b38cc042127529-26>26/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b38cc042127529-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38cc042127529-2>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>1.rchu2uykeuuj/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-v>set/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>m/span>/div>div classcrayon-line idcrayon-5cfd1e54b38cc042127529-3>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>1.rchu2uykeuuj/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-i>sleep/span> span classcrayon-h>/span>span classcrayon-cn>15/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38cc042127529-4>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>1.rchu2uykeuuj/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>entrypoint/span>span classcrayon-sy>./span>span classcrayon-e>sh/span> span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-e>server/span>/div>div classcrayon-line idcrayon-5cfd1e54b38cc042127529-5>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>2.kjy7l14weao8/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-v>set/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>m/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38cc042127529-6>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>2.kjy7l14weao8/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-i>sleep/span> span classcrayon-h>/span>span classcrayon-cn>15/span>/div>div classcrayon-line idcrayon-5cfd1e54b38cc042127529-7>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>1.rchu2uykeuuj/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-e>Starting/span> span classcrayon-e>Couchbase/span> span classcrayon-v>Server/span> span classcrayon-h>/span>span classcrayon-o>--/span> span classcrayon-h>/span>span classcrayon-e>Web/span> span classcrayon-e>UI/span> span classcrayon-e>available/span> span classcrayon-e>at/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//:8091 and logs available in /opt/couchbase/var/lib/couchbase/logs/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38cc042127529-8>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>1.rchu2uykeuuj/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-v>curl/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>v/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>X/span> span classcrayon-h>/span>span classcrayon-e>POST/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//127.0.0.1:8091/pools/default -d memoryQuota300 -d indexMemoryQuota300/span>/div>div classcrayon-line idcrayon-5cfd1e54b38cc042127529-9>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>2.kjy7l14weao8/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>entrypoint/span>span classcrayon-sy>./span>span classcrayon-e>sh/span> span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-e>server/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38cc042127529-10>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>2.kjy7l14weao8/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-e>Starting/span> span classcrayon-e>Couchbase/span> span classcrayon-v>Server/span> span classcrayon-h>/span>span classcrayon-o>--/span> span classcrayon-h>/span>span classcrayon-e>Web/span> span classcrayon-e>UI/span> span classcrayon-e>available/span> span classcrayon-e>at/span> span classcrayon-v>http/span>span classcrayon-o>:/span>span classcrayon-c>//:8091 and logs available in /opt/couchbase/var/lib/couchbase/logs/span>/div>div classcrayon-line idcrayon-5cfd1e54b38cc042127529-11> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38cc042127529-12>span classcrayon-sy>./span> span classcrayon-h>/span>span classcrayon-sy>./span> span classcrayon-h>/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b38cc042127529-13> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38cc042127529-14>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>1.rchu2uykeuuj/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-s>/span> span classcrayon-h>/span>span classcrayon-s>/span> span classcrayon-h>/span>span classcrayon-o>/span> span classcrayon-h>/span>span classcrayon-i>WORKER/span> span classcrayon-h>/span>span classcrayon-s>/span>/div>div classcrayon-line idcrayon-5cfd1e54b38cc042127529-15>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>2.kjy7l14weao8/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-v>Content/span>span classcrayon-o>-/span>span classcrayon-v>Type/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>application/span>span classcrayon-o>//span>span classcrayon-e>json/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38cc042127529-16>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>1.rchu2uykeuuj/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-i>fg/span> span classcrayon-h>/span>span classcrayon-cn>1/span>/div>div classcrayon-line idcrayon-5cfd1e54b38cc042127529-17>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>2.kjy7l14weao8/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-v>Content/span>span classcrayon-o>-/span>span classcrayon-v>Length/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>152/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38cc042127529-18>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>1.rchu2uykeuuj/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>entrypoint/span>span classcrayon-sy>./span>span classcrayon-e>sh/span> span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-e>server/span>/div>div classcrayon-line idcrayon-5cfd1e54b38cc042127529-19>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>2.kjy7l14weao8/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-v>Cache/span>span classcrayon-o>-/span>span classcrayon-v>Control/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-v>no/span>span classcrayon-o>-/span>span classcrayon-e>cache/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38cc042127529-20>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>2.kjy7l14weao8/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>/div>div classcrayon-line idcrayon-5cfd1e54b38cc042127529-21>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>2.kjy7l14weao8/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-i>echo/span> span classcrayon-h>/span>span classcrayon-s>Type: /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38cc042127529-22>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>2.kjy7l14weao8/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-s>/span> span classcrayon-h>/span>span classcrayon-s>/span> span classcrayon-h>/span>span classcrayon-o>/span> span classcrayon-h>/span>span classcrayon-i>WORKER/span> span classcrayon-h>/span>span classcrayon-s>/span>/div>div classcrayon-line idcrayon-5cfd1e54b38cc042127529-23>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>2.kjy7l14weao8/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-o>++/span> span classcrayon-h>/span>span classcrayon-i>fg/span> span classcrayon-h>/span>span classcrayon-cn>1/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38cc042127529-24>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>2.kjy7l14weao8/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-sy>{/span>span classcrayon-s>storageMode/span>span classcrayon-o>:/span>span classcrayon-s>memory_optimized/span>span classcrayon-sy>,/span>span classcrayon-s>indexerThreads/span>span classcrayon-o>:/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>span classcrayon-s>memorySnapshotInterval/span>span classcrayon-o>:/span>span classcrayon-cn>200/span>span classcrayon-sy>,/span>span classcrayon-s>stableSnapshotInterval/span>span classcrayon-o>:/span>span classcrayon-cn>5000/span>span classcrayon-sy>,/span>span classcrayon-s>maxRollbackPoints/span>span classcrayon-o>:/span>span classcrayon-cn>5/span>span classcrayon-sy>,/span>span classcrayon-s>logLevel/span>span classcrayon-o>:/span>span classcrayon-s>info/span>span classcrayon-sy>}/span>span classcrayon-v>Type/span>span classcrayon-o>:/span> span classcrayon-h>/span>/div>div classcrayon-line idcrayon-5cfd1e54b38cc042127529-25>span classcrayon-v>couchbase_db/span>span classcrayon-sy>./span>span classcrayon-cn>2.kjy7l14weao8/span>span classcrayon-sy>@/span>span classcrayon-v>moby/span>span classcrayon-h> /span>span classcrayon-o>|/span> span classcrayon-h>/span>span classcrayon-o>//span>span classcrayon-v>entrypoint/span>span classcrayon-sy>./span>span classcrayon-e>sh/span> span classcrayon-v>couchbase/span>span classcrayon-o>-/span>span classcrayon-i>server/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b38cc042127529-26> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>The preamble of the log statement uses the format code><container-name>.<container-id>@<host>/code>. And then actual log message from your container shows up./p>p>At first instance, attaching container id may seem redundant. But Docker services are self-healing. This means that if a container dies then the Docker Engine will start another container to ensure the specified number of replicas at a given time. This new container will have a new id. And thus it allows to attach the log message from the right container./p>p>So a quick comparison of commands:/p>table>tbody>tr>th>/th>th> Docker Compose v2/th>th> Docker compose v3/th>/tr>tr>td> Start services/td>td>code>docker-compose up -d/code>/td>td>code>docker stack deploy --compose-filedocker-compose.yml <stack-name> /code>/td>/tr>tr>td> Scale service/td>td>code>docker-compose scale <service><replicas>/code>/td>td>code>docker service scale <service><replicas>/code>/td>/tr>tr>td> Shutdown/td>td>code>docker-compose down/code>/td>td>code>docker stack rm <stack-name>/code>/td>/tr>tr>td> Multi-host/td>td>No/td>td>Yes/td>/tr>/tbody>/table>p>Want to get started with Couchbase? Look at Couchbase Starter Kits./p>p>Want to learn more about running Couchbase in containers?/p>ul>li>Couchbase on Containers/li>li>Couchbase Forums/li>li>Couchbase Developer Portal/li>li>@couchhasedev and @couchbase/li>/ul>p>Source: https://blog.couchbase.com/2017/deploy-docker-compose-services-swarm/p>/div>footer classentry-meta>div classcomments-link>a href/deploy-docker-compose-services-swarm/#comments>View all 14 comments/a>/div>/footer>/article>article idpost-14442 classpost-14442 post type-post status-publish format-standard hentry category-containers tag-docker>header classentry-header>h1 classentry-title>a href/docker-1-13-management-commands/ relbookmark>Docker 1.13 Management Commands/a>/h1>div classentry-meta>span classdate>a href/docker-1-13-management-commands/ titlePermalink to Docker 1.13 Management Commands relbookmark>time classentry-date datetime2017-01-20T20:28:05+00:00>January 20, 2017/time>/a>/span>span classcategories-links>a href/topics/containers/ relcategory tag>containers/a>/span>span classtags-links>a href/tag/docker/ reltag>docker/a>/span>span classauthor vcard>a classurl fn n href/author/admin/ titleView all posts by arungupta relauthor>arungupta/a>/span>/div>/header>div classentry-content>p>Docker 1.13 was released yesterday, congratulations!/p>p>img classalignnone size-large wp-image-14575 src/wp-content/uploads/2017/01/docker-1.13-1024x512.jpg altDocker 1.13 width604 height302 />/p>p>A quick summary of the key features:/p>ul>li>Compose file to deploy Swarm mode services/li>li>Improved CLI backwards compatibility/li>li>Clean-up commands/li>li>CLI restructured/li>li>Monitoring and Build improvements/li>/ul>p>Learn more details about these features in this video by @manomarks:/p>p>iframe width853 height480 srchttps://www.youtube.com/embed/y_RiG_9jEJ0 frameborder0 allowfullscreenallowfullscreen>/iframe>/p>h2>Getting Started with Docker 1.13/h2>p>Use Docker for Mac or Windows to get started. Once installed, the version information looks like:/p>div idcrayon-5cfd1e54b4ec5688182786 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>Client: Version: 1.13.0 API version: 1.25 Go version: go1.7.3 Git commit: 49bf474 Built: Wed Jan 18 16:20:26 2017 OS/Arch: darwin/amd64Server: Version: 1.13.0 API version: 1.25 (minimum version 1.12) Go version: go1.7.3 Git commit: 49bf474 Built: Wed Jan 18 16:20:26 2017 OS/Arch: linux/amd64 Experimental: true/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b4ec5688182786-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4ec5688182786-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b4ec5688182786-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4ec5688182786-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b4ec5688182786-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4ec5688182786-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b4ec5688182786-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4ec5688182786-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b4ec5688182786-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4ec5688182786-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b4ec5688182786-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4ec5688182786-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b4ec5688182786-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4ec5688182786-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b4ec5688182786-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4ec5688182786-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b4ec5688182786-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4ec5688182786-18>18/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b4ec5688182786-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4ec5688182786-2>span classcrayon-v>Client/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54b4ec5688182786-3>span classcrayon-h>/span>span classcrayon-v>Version/span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-cn>1.13.0/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4ec5688182786-4>span classcrayon-h>/span>span classcrayon-e>API/span> span classcrayon-v>version/span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-cn>1.25/span>/div>div classcrayon-line idcrayon-5cfd1e54b4ec5688182786-5>span classcrayon-h>/span>span classcrayon-e>Go/span> span classcrayon-v>version/span>span classcrayon-o>:/span>span classcrayon-h> /span> span classcrayon-v>go1/span>span classcrayon-sy>./span>span classcrayon-cn>7.3/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4ec5688182786-6>span classcrayon-h>/span>span classcrayon-e>Git/span> span classcrayon-v>commit/span>span classcrayon-o>:/span>span classcrayon-h> /span> span classcrayon-cn>49bf474/span>/div>div classcrayon-line idcrayon-5cfd1e54b4ec5688182786-7>span classcrayon-h>/span>span classcrayon-v>Built/span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-e>Wed/span> span classcrayon-i>Jan/span> span classcrayon-h>/span>span classcrayon-cn>18/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>20/span>span classcrayon-o>:/span>span classcrayon-cn>26/span> span classcrayon-h>/span>span classcrayon-cn>2017/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4ec5688182786-8>span classcrayon-h>/span>span classcrayon-v>OS/span>span classcrayon-o>//span>span classcrayon-v>Arch/span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-v>darwin/span>span classcrayon-o>//span>span classcrayon-e>amd64/span>/div>div classcrayon-line idcrayon-5cfd1e54b4ec5688182786-9> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4ec5688182786-10>span classcrayon-v>Server/span>span classcrayon-o>:/span>/div>div classcrayon-line idcrayon-5cfd1e54b4ec5688182786-11>span classcrayon-h>/span>span classcrayon-v>Version/span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-cn>1.13.0/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4ec5688182786-12>span classcrayon-h>/span>span classcrayon-e>API/span> span classcrayon-v>version/span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-cn>1.25/span> span classcrayon-h>/span>span classcrayon-sy>(/span>span classcrayon-e>minimum/span> span classcrayon-i>version/span> span classcrayon-h>/span>span classcrayon-cn>1.12/span>span classcrayon-sy>)/span>/div>div classcrayon-line idcrayon-5cfd1e54b4ec5688182786-13>span classcrayon-h>/span>span classcrayon-e>Go/span> span classcrayon-v>version/span>span classcrayon-o>:/span>span classcrayon-h> /span> span classcrayon-v>go1/span>span classcrayon-sy>./span>span classcrayon-cn>7.3/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4ec5688182786-14>span classcrayon-h>/span>span classcrayon-e>Git/span> span classcrayon-v>commit/span>span classcrayon-o>:/span>span classcrayon-h> /span> span classcrayon-cn>49bf474/span>/div>div classcrayon-line idcrayon-5cfd1e54b4ec5688182786-15>span classcrayon-h>/span>span classcrayon-v>Built/span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-e>Wed/span> span classcrayon-i>Jan/span> span classcrayon-h>/span>span classcrayon-cn>18/span> span classcrayon-h>/span>span classcrayon-cn>16/span>span classcrayon-o>:/span>span classcrayon-cn>20/span>span classcrayon-o>:/span>span classcrayon-cn>26/span> span classcrayon-h>/span>span classcrayon-cn>2017/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4ec5688182786-16>span classcrayon-h>/span>span classcrayon-v>OS/span>span classcrayon-o>//span>span classcrayon-v>Arch/span>span classcrayon-o>:/span>span classcrayon-h> /span>span classcrayon-v>linux/span>span classcrayon-o>//span>span classcrayon-e>amd64/span>/div>div classcrayon-line idcrayon-5cfd1e54b4ec5688182786-17>span classcrayon-e>/span>span classcrayon-v>Experimental/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>true/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4ec5688182786-18> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>br />/p>h2>Problems with Docker CLI/h2>p>Docker 1.12 CLI has about ~40 top-level solo commands. While these commands wokred very well but they had a few issues:/p>ol>li>The commands are listed in one list without any organization. That makes it difficult for newbies to get started and learn the commands. (#8756)/li>li>The command, such as code>docker inspect/code>, also does not provide enough context whether they are operating on image or container. This mixing of image and container commands can cause confusion. (#13509)/li>li>There is no consistency of command names. For example code>docker images/code> is a plural and gives the list of images where as code>docker ps/code> is singular and gives the list of containers. And they of course have the naming inconsistency issue. (#8829)/li>li>Some of the commands like code>build/code> and code>run/code> are used heavily and then some arcane ones like code>pause/code> and code>wait/code> not so often. It does not seem fair to keep all the commands at the same level./li>/ol>p>Docker 1.13 fixes this problem!/p>h2>Docker Management Commands/h2>p>Docker 1.13 groups the commands logically into management commands./p>p>Here are the top-level solo commands now:/p>div idcrayon-5cfd1e54b4ee5144667713 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>checkpoint Manage checkpointscontainer Manage containersimage Manage imagesnetwork Manage networksnode Manage Swarm nodesplugin Manage pluginssecret Manage Docker secretsservice Manage servicesstack Manage Docker stacksswarm Manage Swarmsystem Manage Dockervolume Manage volumes/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b4ee5144667713-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4ee5144667713-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b4ee5144667713-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4ee5144667713-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b4ee5144667713-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4ee5144667713-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b4ee5144667713-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4ee5144667713-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b4ee5144667713-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4ee5144667713-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b4ee5144667713-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4ee5144667713-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b4ee5144667713-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4ee5144667713-14>14/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b4ee5144667713-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4ee5144667713-2>span classcrayon-e>checkpoint /span>span classcrayon-e>Manage/span> span classcrayon-e>checkpoints/span>/div>div classcrayon-line idcrayon-5cfd1e54b4ee5144667713-3>span classcrayon-e>container /span> span classcrayon-e>Manage/span> span classcrayon-e>containers/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4ee5144667713-4>span classcrayon-e>image /span> span classcrayon-e>Manage/span> span classcrayon-e>images/span>/div>div classcrayon-line idcrayon-5cfd1e54b4ee5144667713-5>span classcrayon-e>network /span> span classcrayon-e>Manage/span> span classcrayon-e>networks/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4ee5144667713-6>span classcrayon-e>node /span>span classcrayon-e>Manage/span> span classcrayon-e>Swarm/span> span classcrayon-e>nodes/span>/div>div classcrayon-line idcrayon-5cfd1e54b4ee5144667713-7>span classcrayon-e>plugin /span>span classcrayon-e>Manage/span> span classcrayon-e>plugins/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4ee5144667713-8>span classcrayon-e>secret /span>span classcrayon-e>Manage/span> span classcrayon-e>Docker/span> span classcrayon-e>secrets/span>/div>div classcrayon-line idcrayon-5cfd1e54b4ee5144667713-9>span classcrayon-e>service /span> span classcrayon-e>Manage/span> span classcrayon-e>services/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4ee5144667713-10>span classcrayon-e>stack /span> span classcrayon-e>Manage/span> span classcrayon-e>Docker/span> span classcrayon-e>stacks/span>/div>div classcrayon-line idcrayon-5cfd1e54b4ee5144667713-11>span classcrayon-e>swarm /span> span classcrayon-e>Manage/span> span classcrayon-e>Swarm/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4ee5144667713-12>span classcrayon-e>system /span>span classcrayon-e>Manage/span> span classcrayon-e>Docker/span>/div>div classcrayon-line idcrayon-5cfd1e54b4ee5144667713-13>span classcrayon-e>volume /span>span classcrayon-e>Manage/span> span classcrayon-i>volumes/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4ee5144667713-14> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Now a list of images is obtained using code>docker image ls/code> command instead of code>docker images/code> command. Similar code>docker container ls/code> shows the list of containers instead of code>docker ls/code>. This brings a lot of consistency across the commands and that would make it intuitive and easier for newbie and pros to remember the commands./p>p>Each management command has some similar set of sub-commands where they perform the operation on the command category:/p>table>tbody>tr>th>Sub-command/th>th>Purpose/th>/tr>tr>td>code>ls/code>/td>td>List <category> (image, container, volume, secret, etc)/td>/tr>tr>td>code>rm/code>/td>td>Remove <category>/td>/tr>tr>td>code>inspect/code>/td>td>Inspect <category>/td>/tr>/tbody>/table>p>And there are other sub-commands based upon the management category./p>p>Some of the heavily used commands are still at the top level./p>p>By default, all the top-level commands are also shown. But you can set the code>DOCKER_HIDE_LEGACY_COMMANDS/code> environment variable to show only the management commands. So even though code>docker --help/code> will show all the solo and management commands. But the following commands will only show the new management commands:/p>div idcrayon-5cfd1e54b4ef6493671977 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>DOCKER_HIDE_LEGACY_COMMANDStrue docker --help/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b4ef6493671977-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4ef6493671977-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b4ef6493671977-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b4ef6493671977-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4ef6493671977-2>span classcrayon-v>DOCKER_HIDE_LEGACY_COMMANDS/span>span classcrayon-o>/span>span classcrayon-t>true/span> span classcrayon-h>/span>span classcrayon-v>docker/span> span classcrayon-h>/span>span classcrayon-o>--/span>span classcrayon-i>help/span>/div>div classcrayon-line idcrayon-5cfd1e54b4ef6493671977-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>The old syntax is still supported but it recommended to start moving to new commands./p>p>A new Couchbase container can be started as:/p>div idcrayon-5cfd1e54b4f04816417325 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker container run -d -p 8091-8094:8091-8094 -p 11210:11210 arungupta/couchbase/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b4f04816417325-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4f04816417325-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b4f04816417325-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b4f04816417325-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4f04816417325-2>span classcrayon-e>docker/span> span classcrayon-e>container/span> span classcrayon-v>run/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-v>d/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>p/span> span classcrayon-h>/span>span classcrayon-cn>8091/span>span classcrayon-o>-/span>span classcrayon-cn>8094/span>span classcrayon-o>:/span>span classcrayon-cn>8091/span>span classcrayon-o>-/span>span classcrayon-cn>8094/span> span classcrayon-h>/span>span classcrayon-o>-/span>span classcrayon-i>p/span> span classcrayon-h>/span>span classcrayon-cn>11210/span>span classcrayon-o>:/span>span classcrayon-cn>11210/span> span classcrayon-h>/span>span classcrayon-v>arungupta/span>span classcrayon-o>//span>span classcrayon-i>couchbase/span>/div>div classcrayon-line idcrayon-5cfd1e54b4f04816417325-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>The list of images can be seen as:/p>div idcrayon-5cfd1e54b4f13028233128 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>docker image ls/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b4f13028233128-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b4f13028233128-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b4f13028233128-3>3/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b4f13028233128-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b4f13028233128-2>span classcrayon-e>docker/span> span classcrayon-e>image/span> span classcrayon-i>ls/span>/div>div classcrayon-line idcrayon-5cfd1e54b4f13028233128-3> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>br />/p>h2>Mapping Docker Solo to Management Commands/h2>p>Let’s look at how the existing top-level commands match to the management commands:/p>table>tbody>tr>th>1.12/th>th>1.13/th>th>Purpose/th>/tr>tr>td>code>attach/code>/td>td>code>container attach/code>/td>td>Attach to a running container/td>/tr>tr>td>code>build/code>/td>td>code>image build/code>/td>td>Build an image from a Dockerfile/td>/tr>tr>td>code>commit/code>/td>td>code>container commit/code>/td>td>Create a new image from a container’s changes/td>/tr>tr>td>code>cp/code>/td>td>code>container cp/code>/td>td>Copy files/folders between a container and the local filesystem/td>/tr>tr>td>code>create/code>/td>td>code>container create/code>/td>td>Create a new container/td>/tr>tr>td>code>diff/code>/td>td>code>container diff/code>/td>td>Inspect changes on a container’s filesystem/td>/tr>tr>td>code>events/code>/td>td>code>system events/code>/td>td>Get real time events from the server/td>/tr>tr>td>code>exec/code>/td>td>code>container exec/code>/td>td>Run a command in a running container/td>/tr>tr>td>code>export/code>/td>td>code>container export/code>/td>td>Export a container’s filesystem as a tar archive/td>/tr>tr>td>code>history/code>/td>td>code>image history/code>/td>td>Show the history of an image/td>/tr>tr>td>code>images/code>/td>td>code>image ls/code>/td>td>List images/td>/tr>tr>td>code>import/code>/td>td>code>image import/code>/td>td>Import the contents from a tarball to create a filesystem image/td>/tr>tr>td>code>info/code>/td>td>code>system info/code>/td>td>Display system-wide information/td>/tr>tr>td>code>inspect/code>/td>td>code>container inspect/code>/td>td>Return low-level information on a container, image or task/td>/tr>tr>td>code>kill/code>/td>td>code>container kill/code>/td>td>Kill one or more running containers/td>/tr>tr>td>code>load/code>/td>td>code>image load/code>/td>td>Load an image from a tar archive or STDIN/td>/tr>tr>td>code>login/code>/td>td>code>login/code>/td>td>Log in to a Docker registry./td>/tr>tr>td>code>logout/code>/td>td>code>logout/code>/td>td>Log out from a Docker registry./td>/tr>tr>td>code>logs/code>/td>td>code>container logs/code>/td>td>Fetch the logs of a container/td>/tr>tr>td>code>network/code>/td>td>code>network/code>/td>td>Manage Docker networks/td>/tr>tr>td>code>node/code>/td>td>code>node/code>/td>td>Manage Docker Swarm nodes/td>/tr>tr>td>code>pause/code>/td>td>code>container pause/code>/td>td>Pause all processes within one or more containers/td>/tr>tr>td>code>port/code>/td>td>code>container port/code>/td>td>List port mappings or a specific mapping for the container/td>/tr>tr>td>code>ps/code>/td>td>code>container ls/code>/td>td>List containers/td>/tr>tr>td>code>pull/code>/td>td>code>image pull/code>/td>td>Pull an image or a repository from a registry/td>/tr>tr>td>code>push/code>/td>td>code>image push/code>/td>td>Push an image or a repository to a registry/td>/tr>tr>td>code>rename/code>/td>td>code>container rename/code>/td>td>Rename a container/td>/tr>tr>td>code>restart/code>/td>td>code>container restart/code>/td>td>Restart a container/td>/tr>tr>td>code>rm/code>/td>td>code>container rm/code>/td>td>Remove one or more containers/td>/tr>tr>td>code>rmi/code>/td>td>code>image rm/code>/td>td>Remove one or more images/td>/tr>tr>td>code>run/code>/td>td>code>container run/code>/td>td>Run a command in a new container/td>/tr>tr>td>code>save/code>/td>td>code>image save/code>/td>td>Save one or more images to a tar archive (streamed to STDOUT by default)/td>/tr>tr>td>code>search/code>/td>td>code>search/code>/td>td>Search the Docker Hub for images/td>/tr>tr>td>code>service/code>/td>td>code>service/code>/td>td>Manage Docker services/td>/tr>tr>td>code>start/code>/td>td>code>container start/code>/td>td>Start one or more stopped containers/td>/tr>tr>td>code>stats/code>/td>td>code>container stats/code>/td>td>Display a live stream of container(s) resource usage statistics/td>/tr>tr>td>code>stop/code>/td>td>code>container stop/code>/td>td>Stop one or more running containers/td>/tr>tr>td>code>swarm/code>/td>td>code>swarm/code>/td>td>Manage Docker Swarm/td>/tr>tr>td>code>tag/code>/td>td>code>image tag/code>/td>td>Tag an image into a repository/td>/tr>tr>td>code>top/code>/td>td>code>container top/code>/td>td>Display the running processes of a container/td>/tr>tr>td>code>unpause/code>/td>td>code>container unpause/code>/td>td>Unpause all processes within one or more containers/td>/tr>tr>td>code>update/code>/td>td>code>container update/code>/td>td>Update configuration of one or more containers/td>/tr>tr>td>code>version/code>/td>td>code>version/code>/td>td>Show the Docker version information/td>/tr>tr>td>code>volume/code>/td>td>code>volume/code>/td>td>Manage Docker volumes/td>/tr>tr>td>code>wait/code>/td>td>code>container wait/code>/td>td>Block until a container stops, then print its exit code/td>/tr>/tbody>/table>p>Sign up for Docker Online Meetup on 1/25 at 10am PST for more details on Docker 1.13./p>p>Use Docker for Mac or Windows to get started with Docker 1.13./p>p>And of course, you can learn more about how to run Couchbase on Containers./p>p>Source: https://blog.couchbase.com/2017/docker-1-13-management-commands/p>/div>footer classentry-meta>div classcomments-link>a href/docker-1-13-management-commands/#comments>View all 8 comments/a>/div>/footer>/article>article idpost-14563 classpost-14563 post type-post status-publish format-standard hentry category-couchbase tag-aws tag-couchbase tag-lambda tag-n1ql tag-serverless>header classentry-header>h1 classentry-title>a href/analyze-donald-trump-tweets-n1ql/ relbookmark>Analyze Donald Trump Tweets with Couchbase and N1QL/a>/h1>div classentry-meta>span classdate>a href/analyze-donald-trump-tweets-n1ql/ titlePermalink to Analyze Donald Trump Tweets with Couchbase and N1QL relbookmark>time classentry-date datetime2017-01-19T22:51:33+00:00>January 19, 2017/time>/a>/span>span classcategories-links>a href/topics/couchbase/ relcategory tag>couchbase/a>/span>span classtags-links>a href/tag/aws/ reltag>aws/a>, a href/tag/couchbase/ reltag>couchbase/a>, a href/tag/lambda/ reltag>lambda/a>, a href/tag/n1ql/ reltag>n1ql/a>, a href/tag/serverless/ reltag>serverless/a>/span>span classauthor vcard>a classurl fn n href/author/admin/ titleView all posts by arungupta relauthor>arungupta/a>/span>/div>/header>div classentry-content>p>AWS Serverless Lambda Scheduled Events to Store Tweets in Couchbase explained how to store tweets in Couchbase using AWS Serverless Lambda. Now, this Lambda Function has been running for a few days and has collected 269 tweets from @realDonaldTrump. This blog , inspired by SQL on Twitter: Analysis Made Easy Using N1QL, will show how these tweets can be analyzed using N1QL./p>p>a href/wp-content/uploads/2017/01/trump-tweets.jpg>img classalignnone size-full wp-image-14569 src/wp-content/uploads/2017/01/trump-tweets.jpg alttrump-tweets width625 height415 />br />/a> N1QL is a SQL-like query language from Couchbase that operates on JSON documents. N1QL and SQL Differences provide differences between N1QL and SQL. Let’s use N1QL to reveal some interesting information from @realDonaldTrump‘s tweets./p>p>Many thanks to Sitaram from N1QL team to help hack the queries./p>h2>How Many Tweets/h2>p>First query is to find out how many tweets are available in the database. The query is pretty simple:/p>p>strong>Query:/strong>/p>div idcrayon-5cfd1e54b69ec567905548 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>SELECT COUNT(*) tweet_count FROM twitter;/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b69ec567905548-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b69ec567905548-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b69ec567905548-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b69ec567905548-4>4/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b69ec567905548-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b69ec567905548-2>span classcrayon-e>SELECT/span> span classcrayon-e>COUNT/span>span classcrayon-sy>(/span>span classcrayon-o>*/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-e>tweet_count/span>/div>div classcrayon-line idcrayon-5cfd1e54b69ec567905548-3>span classcrayon-e>FROM/span> span classcrayon-v>twitter/span>span classcrayon-sy>;/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b69ec567905548-4> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>As you notice, the syntax is very similar to SQL. code>SELECT/code>, code>COUNT/code> and code>FROM/code> clauses are what you are already familiar with from SQL syntax. code>tweet_count/code> is an alias defined for the returned result. code>twitter/code> is the bucket where all the JSON documents are stored./p>p>strong>Results:/strong>/p>div idcrayon-5cfd1e54b6a0a143012485 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>span classcrayon-language>JavaScript/span>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;> { tweet_count: 269 }/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6a0a143012485-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a0a143012485-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6a0a143012485-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a0a143012485-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6a0a143012485-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a0a143012485-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6a0a143012485-7>7/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6a0a143012485-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a0a143012485-2>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a0a143012485-3>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a0a143012485-4>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>269/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a0a143012485-5>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a0a143012485-6>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a0a143012485-7> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>The result is a JSON document as well./p>h2>Tweet Sample JSON Document/h2>p>In order to write queries on a JSON document, you need to know the structure of the document. The next query will give you that./p>p>strong>Query:/strong>/p>div idcrayon-5cfd1e54b6a19881746541 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>SELECT * FROM twitter LIMIT 1;/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6a19881746541-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a19881746541-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6a19881746541-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a19881746541-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6a19881746541-5>5/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6a19881746541-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a19881746541-2>span classcrayon-e>SELECT */span> span classcrayon-h>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a19881746541-3>span classcrayon-e>FROM/span> span classcrayon-e>twitter/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a19881746541-4>span classcrayon-i>LIMIT/span> span classcrayon-h>/span>span classcrayon-cn>1/span>span classcrayon-sy>;/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a19881746541-5> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>The new clause introduced here is code>LIMIT/code>. This allows to restrict the number of objects that are returned in a result set of code>SELECT/code>./p>p>strong>Results:/strong>/p>div idcrayon-5cfd1e54b6a27221587572 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;> { twitter: { accessLevel: 0, contributors: , createdAt: 1480828438000, currentUserRetweetId: -1, displayTextRangeEnd: -1, displayTextRangeStart: -1, favoriteCount: 116356, favorited: false, geoLocation: null, hashtagEntities: , id: 805278955150471168, inReplyToScreenName: null, inReplyToStatusId: -1, inReplyToUserId: -1, lang: en, mediaEntities: , place: null, possiblySensitive: false, quotedStatus: null, quotedStatusId: -1, rateLimitStatus: null, retweet: false, retweetCount: 28330, retweeted: false, retweetedByMe: false, retweetedStatus: null, scopes: null, source: <a href\http://twitter.com/download/android\ rel\nofollow\>Twitter for Android</a>, symbolEntities: , text: Just tried watching Saturday Night Live - unwatchable! Totally biased, not funny and the Baldwin impersonation just cant get any worse. Sad, truncated: false, urlentities: , user: { accessLevel: 0, biggerProfileImageURL: http://pbs.twimg.com/profile_images/1980294624/DJT_Headshot_V2_bigger.jpg, biggerProfileImageURLHttps: https://pbs.twimg.com/profile_images/1980294624/DJT_Headshot_V2_bigger.jpg, contributorsEnabled: false, createdAt: 1237383998000, defaultProfile: false, defaultProfileImage: false, description: President-elect of the United States, descriptionURLEntities: , email: null, favouritesCount: 46, followRequestSent: false, followersCount: 19294404, friendsCount: 42, geoEnabled: true, id: 25073877, lang: en, listedCount: 52499, location: New York, NY, miniProfileImageURL: http://pbs.twimg.com/profile_images/1980294624/DJT_Headshot_V2_mini.jpg, miniProfileImageURLHttps: https://pbs.twimg.com/profile_images/1980294624/DJT_Headshot_V2_mini.jpg, name: Donald J. Trump, originalProfileImageURL: http://pbs.twimg.com/profile_images/1980294624/DJT_Headshot_V2.jpg, originalProfileImageURLHttps: https://pbs.twimg.com/profile_images/1980294624/DJT_Headshot_V2.jpg, profileBackgroundColor: 6D5C18, profileBackgroundImageURL: http://pbs.twimg.com/profile_background_images/530021613/trump_scotland__43_of_70_cc.jpg, profileBackgroundImageUrlHttps: https://pbs.twimg.com/profile_background_images/530021613/trump_scotland__43_of_70_cc.jpg, profileBackgroundTiled: true, profileBannerIPadRetinaURL: https://pbs.twimg.com/profile_banners/25073877/1479776952/ipad_retina, profileBannerIPadURL: https://pbs.twimg.com/profile_banners/25073877/1479776952/ipad, profileBannerMobileRetinaURL: https://pbs.twimg.com/profile_banners/25073877/1479776952/mobile_retina, profileBannerMobileURL: https://pbs.twimg.com/profile_banners/25073877/1479776952/mobile, profileBannerRetinaURL: https://pbs.twimg.com/profile_banners/25073877/1479776952/web_retina, profileBannerURL: https://pbs.twimg.com/profile_banners/25073877/1479776952/web, profileImageURL: http://pbs.twimg.com/profile_images/1980294624/DJT_Headshot_V2_normal.jpg, profileImageURLHttps: https://pbs.twimg.com/profile_images/1980294624/DJT_Headshot_V2_normal.jpg, profileLinkColor: 0D5B73, profileSidebarBorderColor: BDDCAD, profileSidebarFillColor: C5CEC0, profileTextColor: 333333, profileUseBackgroundImage: true, protected: false, rateLimitStatus: null, screenName: realDonaldTrump, showAllInlineMedia: false, status: null, statusesCount: 34269, timeZone: Eastern Time (US & Canada), translator: false, url: https://t.co/mZB2hymxC9, urlentity: { displayURL: https://t.co/mZB2hymxC9, end: 23, expandedURL: https://t.co/mZB2hymxC9, start: 0, text: https://t.co/mZB2hymxC9, url: https://t.co/mZB2hymxC9 }, utcOffset: -18000, verified: true, withheldInCountries: null }, userMentionEntities: , withheldInCountries: null } }/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-24>24/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-25>25/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-26>26/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-27>27/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-28>28/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-29>29/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-30>30/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-31>31/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-32>32/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-33>33/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-34>34/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-35>35/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-36>36/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-37>37/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-38>38/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-39>39/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-40>40/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-41>41/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-42>42/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-43>43/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-44>44/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-45>45/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-46>46/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-47>47/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-48>48/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-49>49/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-50>50/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-51>51/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-52>52/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-53>53/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-54>54/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-55>55/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-56>56/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-57>57/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-58>58/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-59>59/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-60>60/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-61>61/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-62>62/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-63>63/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-64>64/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-65>65/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-66>66/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-67>67/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-68>68/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-69>69/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-70>70/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-71>71/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-72>72/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-73>73/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-74>74/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-75>75/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-76>76/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-77>77/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-78>78/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-79>79/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-80>80/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-81>81/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-82>82/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-83>83/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-84>84/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-85>85/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-86>86/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-87>87/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-88>88/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-89>89/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-90>90/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-91>91/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-92>92/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-93>93/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-94>94/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-95>95/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-96>96/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-97>97/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-98>98/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-99>99/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-100>100/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-101>101/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-102>102/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-103>103/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a27221587572-104>104/div>div classcrayon-num data-linecrayon-5cfd1e54b6a27221587572-105>105/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-2>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-3>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-4>span classcrayon-h> /span>span classcrayon-s>twitter/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>{/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-5>span classcrayon-h> /span>span classcrayon-s>accessLevel/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-6>span classcrayon-h> /span>span classcrayon-s>contributors/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-7>span classcrayon-h> /span>span classcrayon-s>createdAt/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>1480828438000/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-8>span classcrayon-h> /span>span classcrayon-s>currentUserRetweetId/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>-1/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-9>span classcrayon-h> /span>span classcrayon-s>displayTextRangeEnd/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>-1/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-10>span classcrayon-h> /span>span classcrayon-s>displayTextRangeStart/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>-1/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-11>span classcrayon-h> /span>span classcrayon-s>favoriteCount/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>116356/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-12>span classcrayon-h> /span>span classcrayon-s>favorited/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>false/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-13>span classcrayon-h> /span>span classcrayon-s>geoLocation/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>null/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-14>span classcrayon-h> /span>span classcrayon-s>hashtagEntities/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-15>span classcrayon-h> /span>span classcrayon-s>id/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>805278955150471168/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-16>span classcrayon-h> /span>span classcrayon-s>inReplyToScreenName/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>null/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-17>span classcrayon-h> /span>span classcrayon-s>inReplyToStatusId/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>-1/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-18>span classcrayon-h> /span>span classcrayon-s>inReplyToUserId/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>-1/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-19>span classcrayon-h> /span>span classcrayon-s>lang/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>en/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-20>span classcrayon-h> /span>span classcrayon-s>mediaEntities/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-21>span classcrayon-h> /span>span classcrayon-s>place/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>null/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-22>span classcrayon-h> /span>span classcrayon-s>possiblySensitive/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>false/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-23>span classcrayon-h> /span>span classcrayon-s>quotedStatus/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>null/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-24>span classcrayon-h> /span>span classcrayon-s>quotedStatusId/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>-1/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-25>span classcrayon-h> /span>span classcrayon-s>rateLimitStatus/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>null/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-26>span classcrayon-h> /span>span classcrayon-s>retweet/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>false/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-27>span classcrayon-h> /span>span classcrayon-s>retweetCount/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>28330/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-28>span classcrayon-h> /span>span classcrayon-s>retweeted/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>false/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-29>span classcrayon-h> /span>span classcrayon-s>retweetedByMe/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>false/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-30>span classcrayon-h> /span>span classcrayon-s>retweetedStatus/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>null/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-31>span classcrayon-h> /span>span classcrayon-s>scopes/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>null/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-32>span classcrayon-h> /span>span classcrayon-s>source/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s><a href\http://twitter.com/download/android\ rel\nofollow\>Twitter for Android</a>/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-33>span classcrayon-h> /span>span classcrayon-s>symbolEntities/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-34>span classcrayon-h> /span>span classcrayon-s>text/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>Just tried watching Saturday Night Live - unwatchable! Totally biased, not funny and the Baldwin impersonation just cant get any worse. Sad/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-35>span classcrayon-h> /span>span classcrayon-s>truncated/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>false/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-36>span classcrayon-h> /span>span classcrayon-s>urlentities/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-37>span classcrayon-h> /span>span classcrayon-s>user/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-38>span classcrayon-h> /span>span classcrayon-s>accessLevel/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-39>span classcrayon-h> /span>span classcrayon-s>biggerProfileImageURL/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>http://pbs.twimg.com/profile_images/1980294624/DJT_Headshot_V2_bigger.jpg/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-40>span classcrayon-h> /span>span classcrayon-s>biggerProfileImageURLHttps/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>https://pbs.twimg.com/profile_images/1980294624/DJT_Headshot_V2_bigger.jpg/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-41>span classcrayon-h> /span>span classcrayon-s>contributorsEnabled/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>false/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-42>span classcrayon-h> /span>span classcrayon-s>createdAt/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>1237383998000/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-43>span classcrayon-h> /span>span classcrayon-s>defaultProfile/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>false/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-44>span classcrayon-h> /span>span classcrayon-s>defaultProfileImage/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>false/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-45>span classcrayon-h> /span>span classcrayon-s>description/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>President-elect of the United States/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-46>span classcrayon-h> /span>span classcrayon-s>descriptionURLEntities/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-47>span classcrayon-h> /span>span classcrayon-s>email/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>null/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-48>span classcrayon-h> /span>span classcrayon-s>favouritesCount/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>46/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-49>span classcrayon-h> /span>span classcrayon-s>followRequestSent/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>false/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-50>span classcrayon-h> /span>span classcrayon-s>followersCount/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>19294404/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-51>span classcrayon-h> /span>span classcrayon-s>friendsCount/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>42/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-52>span classcrayon-h> /span>span classcrayon-s>geoEnabled/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>true/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-53>span classcrayon-h> /span>span classcrayon-s>id/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>25073877/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-54>span classcrayon-h> /span>span classcrayon-s>lang/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>en/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-55>span classcrayon-h> /span>span classcrayon-s>listedCount/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>52499/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-56>span classcrayon-h> /span>span classcrayon-s>location/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>New York, NY/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-57>span classcrayon-h> /span>span classcrayon-s>miniProfileImageURL/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>http://pbs.twimg.com/profile_images/1980294624/DJT_Headshot_V2_mini.jpg/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-58>span classcrayon-h> /span>span classcrayon-s>miniProfileImageURLHttps/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>https://pbs.twimg.com/profile_images/1980294624/DJT_Headshot_V2_mini.jpg/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-59>span classcrayon-h> /span>span classcrayon-s>name/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>Donald J. Trump/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-60>span classcrayon-h> /span>span classcrayon-s>originalProfileImageURL/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>http://pbs.twimg.com/profile_images/1980294624/DJT_Headshot_V2.jpg/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-61>span classcrayon-h> /span>span classcrayon-s>originalProfileImageURLHttps/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>https://pbs.twimg.com/profile_images/1980294624/DJT_Headshot_V2.jpg/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-62>span classcrayon-h> /span>span classcrayon-s>profileBackgroundColor/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>6D5C18/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-63>span classcrayon-h> /span>span classcrayon-s>profileBackgroundImageURL/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>http://pbs.twimg.com/profile_background_images/530021613/trump_scotland__43_of_70_cc.jpg/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-64>span classcrayon-h> /span>span classcrayon-s>profileBackgroundImageUrlHttps/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>https://pbs.twimg.com/profile_background_images/530021613/trump_scotland__43_of_70_cc.jpg/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-65>span classcrayon-h> /span>span classcrayon-s>profileBackgroundTiled/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>true/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-66>span classcrayon-h> /span>span classcrayon-s>profileBannerIPadRetinaURL/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>https://pbs.twimg.com/profile_banners/25073877/1479776952/ipad_retina/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-67>span classcrayon-h> /span>span classcrayon-s>profileBannerIPadURL/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>https://pbs.twimg.com/profile_banners/25073877/1479776952/ipad/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-68>span classcrayon-h> /span>span classcrayon-s>profileBannerMobileRetinaURL/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>https://pbs.twimg.com/profile_banners/25073877/1479776952/mobile_retina/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-69>span classcrayon-h> /span>span classcrayon-s>profileBannerMobileURL/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>https://pbs.twimg.com/profile_banners/25073877/1479776952/mobile/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-70>span classcrayon-h> /span>span classcrayon-s>profileBannerRetinaURL/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>https://pbs.twimg.com/profile_banners/25073877/1479776952/web_retina/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-71>span classcrayon-h> /span>span classcrayon-s>profileBannerURL/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>https://pbs.twimg.com/profile_banners/25073877/1479776952/web/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-72>span classcrayon-h> /span>span classcrayon-s>profileImageURL/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>http://pbs.twimg.com/profile_images/1980294624/DJT_Headshot_V2_normal.jpg/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-73>span classcrayon-h> /span>span classcrayon-s>profileImageURLHttps/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>https://pbs.twimg.com/profile_images/1980294624/DJT_Headshot_V2_normal.jpg/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-74>span classcrayon-h> /span>span classcrayon-s>profileLinkColor/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>0D5B73/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-75>span classcrayon-h> /span>span classcrayon-s>profileSidebarBorderColor/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>BDDCAD/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-76>span classcrayon-h> /span>span classcrayon-s>profileSidebarFillColor/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>C5CEC0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-77>span classcrayon-h> /span>span classcrayon-s>profileTextColor/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>333333/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-78>span classcrayon-h> /span>span classcrayon-s>profileUseBackgroundImage/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>true/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-79>span classcrayon-h> /span>span classcrayon-s>protected/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>false/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-80>span classcrayon-h> /span>span classcrayon-s>rateLimitStatus/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>null/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-81>span classcrayon-h> /span>span classcrayon-s>screenName/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>realDonaldTrump/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-82>span classcrayon-h> /span>span classcrayon-s>showAllInlineMedia/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>false/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-83>span classcrayon-h> /span>span classcrayon-s>status/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>null/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-84>span classcrayon-h> /span>span classcrayon-s>statusesCount/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>34269/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-85>span classcrayon-h> /span>span classcrayon-s>timeZone/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>Eastern Time (US & Canada)/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-86>span classcrayon-h> /span>span classcrayon-s>translator/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>false/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-87>span classcrayon-h> /span>span classcrayon-s>url/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>https://t.co/mZB2hymxC9/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-88>span classcrayon-h> /span>span classcrayon-s>urlentity/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>{/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-89>span classcrayon-h> /span>span classcrayon-s>displayURL/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>https://t.co/mZB2hymxC9/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-90>span classcrayon-h> /span>span classcrayon-s>end/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>23/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-91>span classcrayon-h> /span>span classcrayon-s>expandedURL/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>https://t.co/mZB2hymxC9/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-92>span classcrayon-h> /span>span classcrayon-s>start/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-93>span classcrayon-h> /span>span classcrayon-s>text/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>https://t.co/mZB2hymxC9/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-94>span classcrayon-h> /span>span classcrayon-s>url/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>https://t.co/mZB2hymxC9/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-95>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-96>span classcrayon-h> /span>span classcrayon-s>utcOffset/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>-18000/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-97>span classcrayon-h> /span>span classcrayon-s>verified/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>true/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-98>span classcrayon-h> /span>span classcrayon-s>withheldInCountries/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>null/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-99>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-100>span classcrayon-h> /span>span classcrayon-s>userMentionEntities/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-sy>/span>span classcrayon-sy>/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-101>span classcrayon-h> /span>span classcrayon-s>withheldInCountries/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>null/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-102>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-103>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a27221587572-104>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a27221587572-105> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>br />/p>h2>Top 5 Tweeting Days/h2>p>After the basic queries are out of the way, let’s look at some interesting data now./p>p>What are the top 5 days on which @realDonaldTrump tweeted and the tweet count?/p>p>strong>Query:/strong>/p>div idcrayon-5cfd1e54b6a3d392263521 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>SELECT SUBSTR(MILLIS_TO_STR(TO_NUM(createdAt)), 0, 10) tweet_date, COUNT(1) tweet_countFROM twitter GROUP BY SUBSTR(MILLIS_TO_STR(TO_NUM(createdAt)), 0, 10) ORDER BY COUNT(1) DESC LIMIT 5;/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6a3d392263521-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a3d392263521-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6a3d392263521-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a3d392263521-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6a3d392263521-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a3d392263521-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6a3d392263521-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a3d392263521-8>8/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6a3d392263521-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a3d392263521-2>span classcrayon-e>SELECT/span> span classcrayon-e>SUBSTR/span>span classcrayon-sy>(/span>span classcrayon-e>MILLIS_TO_STR/span>span classcrayon-sy>(/span>span classcrayon-e>TO_NUM/span>span classcrayon-sy>(/span>span classcrayon-v>createdAt/span>span classcrayon-sy>)/span>span classcrayon-sy>)/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>10/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>tweet_date/span>span classcrayon-sy>,/span> span classcrayon-h>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a3d392263521-3>span classcrayon-h> /span> span classcrayon-e>COUNT/span>span classcrayon-sy>(/span>span classcrayon-cn>1/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-e>tweet_count/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a3d392263521-4>span classcrayon-e>FROM /span> span classcrayon-e>twitter/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a3d392263521-5>span classcrayon-e>GROUP /span>span classcrayon-e>BY/span> span classcrayon-e>SUBSTR/span>span classcrayon-sy>(/span>span classcrayon-e>MILLIS_TO_STR/span>span classcrayon-sy>(/span>span classcrayon-e>TO_NUM/span>span classcrayon-sy>(/span>span classcrayon-v>createdAt/span>span classcrayon-sy>)/span>span classcrayon-sy>)/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>10/span>span classcrayon-sy>)/span> span classcrayon-h>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a3d392263521-6>span classcrayon-e>ORDER /span>span classcrayon-e>BY/span> span classcrayon-e>COUNT/span>span classcrayon-sy>(/span>span classcrayon-cn>1/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-e>DESC/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a3d392263521-7>span classcrayon-i>LIMIT/span>span classcrayon-h> /span>span classcrayon-cn>5/span>span classcrayon-sy>;/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a3d392263521-8> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Usual code>GROUP BY/code> and code>ORDER BY/code> SQL clauses perform the same function./p>p>N1QL Functions apply a function to values. The code>createdAt/code> field is returned a number as a String. code>TO_NUM/code> function converts the String to a number. code>MILLIS_TO_STR/code> function converts the String to a date. Finally, code>SUBSTR/code> function extracts the relevant part of the date./p>p>strong>Results:/strong>/p>div idcrayon-5cfd1e54b6a4d165692310 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;> { tweet_count: 13, tweet_date: 2017-01-17 }, { tweet_count: 12, tweet_date: 2017-01-06 }, { tweet_count: 11, tweet_date: 2016-12-04 }, { tweet_count: 10, tweet_date: 2017-01-03 }, { tweet_count: 10, tweet_date: 2017-01-04 }/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6a4d165692310-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a4d165692310-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6a4d165692310-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a4d165692310-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6a4d165692310-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a4d165692310-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6a4d165692310-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a4d165692310-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b6a4d165692310-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a4d165692310-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b6a4d165692310-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a4d165692310-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b6a4d165692310-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a4d165692310-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b6a4d165692310-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a4d165692310-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b6a4d165692310-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a4d165692310-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54b6a4d165692310-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a4d165692310-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54b6a4d165692310-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a4d165692310-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54b6a4d165692310-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a4d165692310-24>24/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6a4d165692310-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a4d165692310-2>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a4d165692310-3>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a4d165692310-4>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>13/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a4d165692310-5>span classcrayon-h> /span>span classcrayon-s>tweet_date/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>2017-01-17/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a4d165692310-6>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a4d165692310-7>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a4d165692310-8>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>12/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a4d165692310-9>span classcrayon-h> /span>span classcrayon-s>tweet_date/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>2017-01-06/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a4d165692310-10>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a4d165692310-11>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a4d165692310-12>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>11/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a4d165692310-13>span classcrayon-h> /span>span classcrayon-s>tweet_date/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>2016-12-04/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a4d165692310-14>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a4d165692310-15>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a4d165692310-16>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>10/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a4d165692310-17>span classcrayon-h> /span>span classcrayon-s>tweet_date/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>2017-01-03/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a4d165692310-18>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a4d165692310-19>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a4d165692310-20>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>10/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a4d165692310-21>span classcrayon-h> /span>span classcrayon-s>tweet_date/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>2017-01-04/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a4d165692310-22>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a4d165692310-23>span classcrayon-sy>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a4d165692310-24> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Jan 17th, 2017 is the most tweeted day. Now, this result is of course restricted to the data from the JSON documents stored in the database./p>p>Does anybody have a more comprehensive database of @realDonaldTrump tweets?/p>h2>Tweet Frequency/h2>p>OK, our database shows that that maximum number of tweets in a day were 13. How do I find out how many days @realDonaldTrump tweeted a certain number of times?/p>p>strong>Query:/strong>/p>div idcrayon-5cfd1e54b6a5c117568132 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>SELECT a.tweet_count, count(1) days FROM (SELECT SUBSTR(millis_to_str(to_num(createdAt)), 0, 10) tweet_date, COUNT(1) tweet_countFROM twitter GROUP BY SUBSTR(millis_to_str(to_num(createdAt)), 0, 10)) aGROUP BY a.tweet_countORDER BY a.tweet_count DESC;/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6a5c117568132-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a5c117568132-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6a5c117568132-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a5c117568132-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6a5c117568132-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a5c117568132-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6a5c117568132-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a5c117568132-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b6a5c117568132-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a5c117568132-10>10/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6a5c117568132-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a5c117568132-2>span classcrayon-i>SELECT/span> span classcrayon-h>/span>span classcrayon-v>a/span>span classcrayon-sy>./span>span classcrayon-v>tweet_count/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-e>count/span>span classcrayon-sy>(/span>span classcrayon-cn>1/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-e>days/span> span classcrayon-e>FROM/span> span classcrayon-h>/span>span classcrayon-sy>(/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a5c117568132-3>span classcrayon-e>SELECT/span> span classcrayon-e>SUBSTR/span>span classcrayon-sy>(/span>span classcrayon-e>millis_to_str/span>span classcrayon-sy>(/span>span classcrayon-e>to_num/span>span classcrayon-sy>(/span>span classcrayon-v>createdAt/span>span classcrayon-sy>)/span>span classcrayon-sy>)/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>10/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>tweet_date/span>span classcrayon-sy>,/span> span classcrayon-h>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a5c117568132-4>span classcrayon-h> /span> span classcrayon-e>COUNT/span>span classcrayon-sy>(/span>span classcrayon-cn>1/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-e>tweet_count/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a5c117568132-5>span classcrayon-e>FROM /span> span classcrayon-e>twitter/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a5c117568132-6>span classcrayon-e>GROUP /span>span classcrayon-e>BY/span> span classcrayon-e>SUBSTR/span>span classcrayon-sy>(/span>span classcrayon-e>millis_to_str/span>span classcrayon-sy>(/span>span classcrayon-e>to_num/span>span classcrayon-sy>(/span>span classcrayon-v>createdAt/span>span classcrayon-sy>)/span>span classcrayon-sy>)/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>10/span>span classcrayon-sy>)/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a5c117568132-7>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-i>a/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a5c117568132-8>span classcrayon-e>GROUP/span> span classcrayon-i>BY/span> span classcrayon-h>/span>span classcrayon-v>a/span>span classcrayon-sy>./span>span classcrayon-e>tweet_count/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a5c117568132-9>span classcrayon-e>ORDER/span> span classcrayon-i>BY/span> span classcrayon-h>/span>span classcrayon-v>a/span>span classcrayon-sy>./span>span classcrayon-e>tweet_count/span> span classcrayon-v>DESC/span>span classcrayon-sy>;/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a5c117568132-10> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>This is easily achieved using N1QL nested queries./p>p>strong>Results:/strong>/p>div idcrayon-5cfd1e54b6a6b513549933 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;> { days: 1, tweet_count: 13 }, { days: 1, tweet_count: 12 }, { days: 1, tweet_count: 11 }, { days: 2, tweet_count: 10 }, { days: 1, tweet_count: 9 }, { days: 7, tweet_count: 8 }, { days: 3, tweet_count: 7 }, { days: 7, tweet_count: 6 }, { days: 5, tweet_count: 5 }, { days: 5, tweet_count: 4 }, { days: 11, tweet_count: 3 }, { days: 3, tweet_count: 2 }, { days: 1, tweet_count: 1 }/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-24>24/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-25>25/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-26>26/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-27>27/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-28>28/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-29>29/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-30>30/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-31>31/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-32>32/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-33>33/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-34>34/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-35>35/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-36>36/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-37>37/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-38>38/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-39>39/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-40>40/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-41>41/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-42>42/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-43>43/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-44>44/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-45>45/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-46>46/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-47>47/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-48>48/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-49>49/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-50>50/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-51>51/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-52>52/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-53>53/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-54>54/div>div classcrayon-num data-linecrayon-5cfd1e54b6a6b513549933-55>55/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a6b513549933-56>56/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-2>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-3>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-4>span classcrayon-h> /span>span classcrayon-s>days/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-5>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>13/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-6>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-7>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-8>span classcrayon-h> /span>span classcrayon-s>days/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-9>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>12/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-10>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-11>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-12>span classcrayon-h> /span>span classcrayon-s>days/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-13>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>11/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-14>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-15>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-16>span classcrayon-h> /span>span classcrayon-s>days/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>2/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-17>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>10/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-18>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-19>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-20>span classcrayon-h> /span>span classcrayon-s>days/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-21>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>9/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-22>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-23>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-24>span classcrayon-h> /span>span classcrayon-s>days/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>7/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-25>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>8/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-26>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-27>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-28>span classcrayon-h> /span>span classcrayon-s>days/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>3/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-29>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>7/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-30>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-31>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-32>span classcrayon-h> /span>span classcrayon-s>days/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>7/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-33>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>6/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-34>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-35>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-36>span classcrayon-h> /span>span classcrayon-s>days/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>5/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-37>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>5/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-38>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-39>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-40>span classcrayon-h> /span>span classcrayon-s>days/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>5/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-41>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>4/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-42>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-43>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-44>span classcrayon-h> /span>span classcrayon-s>days/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>11/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-45>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>3/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-46>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-47>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-48>span classcrayon-h> /span>span classcrayon-s>days/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>3/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-49>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>2/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-50>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-51>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-52>span classcrayon-h> /span>span classcrayon-s>days/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-53>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-54>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a6b513549933-55>span classcrayon-sy>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a6b513549933-56> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>In 47 days, there is only one day with a single tweet. A sum total of code>tweet_count/code> shows that there is no single day without a tweet img src/wp-includes/images/smilies/simple-smile.png alt:) classwp-smiley styleheight: 1em; max-height: 1em; />/p>h2>Most Common Hour In a Day To Tweet/h2>p>@realDonaldTrump is known to tweet at 3am. Let’s take a look what are the most common hours for him to tweet./p>p>strong>Query:/strong>/p>div idcrayon-5cfd1e54b6a7a280610210 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>SELECT SUBSTR(MILLIS_TO_STR(TO_NUM(createdAt)), 11, 2) tweet_hour, COUNT(1) tweet_countFROM twitter GROUP BY SUBSTR(MILLIS_TO_STR(TO_NUM(createdAt)), 11, 2) ORDER BY tweet_count DESC LIMIT 5;/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6a7a280610210-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a7a280610210-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6a7a280610210-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a7a280610210-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6a7a280610210-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a7a280610210-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6a7a280610210-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a7a280610210-8>8/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6a7a280610210-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a7a280610210-2>span classcrayon-e>SELECT/span> span classcrayon-e>SUBSTR/span>span classcrayon-sy>(/span>span classcrayon-e>MILLIS_TO_STR/span>span classcrayon-sy>(/span>span classcrayon-e>TO_NUM/span>span classcrayon-sy>(/span>span classcrayon-v>createdAt/span>span classcrayon-sy>)/span>span classcrayon-sy>)/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>11/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>2/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>tweet_hour/span>span classcrayon-sy>,/span> span classcrayon-h>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a7a280610210-3>span classcrayon-h> /span> span classcrayon-e>COUNT/span>span classcrayon-sy>(/span>span classcrayon-cn>1/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-e>tweet_count/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a7a280610210-4>span classcrayon-e>FROM /span> span classcrayon-e>twitter/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a7a280610210-5>span classcrayon-e>GROUP /span>span classcrayon-e>BY/span> span classcrayon-e>SUBSTR/span>span classcrayon-sy>(/span>span classcrayon-e>MILLIS_TO_STR/span>span classcrayon-sy>(/span>span classcrayon-e>TO_NUM/span>span classcrayon-sy>(/span>span classcrayon-v>createdAt/span>span classcrayon-sy>)/span>span classcrayon-sy>)/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>11/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-cn>2/span>span classcrayon-sy>)/span> span classcrayon-h>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a7a280610210-6>span classcrayon-e>ORDER /span>span classcrayon-e>BY/span> span classcrayon-e>tweet_count/span> span classcrayon-e>DESC/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a7a280610210-7>span classcrayon-i>LIMIT/span>span classcrayon-h> /span>span classcrayon-cn>5/span>span classcrayon-sy>;/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a7a280610210-8> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>strong>Results:/strong>/p>div idcrayon-5cfd1e54b6a89420526675 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;> { tweet_count: 39, tweet_hour: 13 }, { tweet_count: 27, tweet_hour: 12 }, { tweet_count: 26, tweet_hour: 11 }, { tweet_count: 20, tweet_hour: 14 }, { tweet_count: 15, tweet_hour: 00 }/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6a89420526675-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a89420526675-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6a89420526675-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a89420526675-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6a89420526675-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a89420526675-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6a89420526675-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a89420526675-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b6a89420526675-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a89420526675-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b6a89420526675-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a89420526675-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b6a89420526675-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a89420526675-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b6a89420526675-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a89420526675-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b6a89420526675-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a89420526675-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54b6a89420526675-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a89420526675-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54b6a89420526675-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a89420526675-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54b6a89420526675-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a89420526675-24>24/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6a89420526675-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a89420526675-2>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a89420526675-3>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a89420526675-4>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>39/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a89420526675-5>span classcrayon-h> /span>span classcrayon-s>tweet_hour/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>13/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a89420526675-6>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a89420526675-7>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a89420526675-8>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>27/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a89420526675-9>span classcrayon-h> /span>span classcrayon-s>tweet_hour/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>12/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a89420526675-10>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a89420526675-11>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a89420526675-12>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>26/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a89420526675-13>span classcrayon-h> /span>span classcrayon-s>tweet_hour/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>11/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a89420526675-14>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a89420526675-15>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a89420526675-16>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>20/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a89420526675-17>span classcrayon-h> /span>span classcrayon-s>tweet_hour/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>14/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a89420526675-18>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a89420526675-19>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a89420526675-20>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>15/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a89420526675-21>span classcrayon-h> /span>span classcrayon-s>tweet_hour/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>00/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a89420526675-22>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a89420526675-23>span classcrayon-sy>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a89420526675-24> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Now seems like the controversial tweets come at 3am. But 39 tweets are coming at 1pm ET, likely right after lunch and while having a dessert 😉/p>h2>Common Day of The Week to Tweet/h2>p>Let’s find out what are the most common day of the week to tweet./p>p>strong>Query:/strong>/p>div idcrayon-5cfd1e54b6a99991067114 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>SELECT DATE_PART_STR(MILLIS_TO_STR(TO_NUM(createdAt)), day_of_week) day_of_week, COUNT(1) tweet_countFROM twitter GROUP BY DATE_PART_STR(MILLIS_TO_STR(TO_NUM(createdAt)), day_of_week)ORDER BY tweet_count DESC;/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6a99991067114-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a99991067114-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6a99991067114-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a99991067114-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6a99991067114-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6a99991067114-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6a99991067114-7>7/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6a99991067114-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a99991067114-2>span classcrayon-e>SELECT/span> span classcrayon-e>DATE_PART_STR/span>span classcrayon-sy>(/span>span classcrayon-e>MILLIS_TO_STR/span>span classcrayon-sy>(/span>span classcrayon-e>TO_NUM/span>span classcrayon-sy>(/span>span classcrayon-v>createdAt/span>span classcrayon-sy>)/span>span classcrayon-sy>)/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-s>day_of_week/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>day_of_week/span>span classcrayon-sy>,/span> span classcrayon-h>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a99991067114-3>span classcrayon-h> /span> span classcrayon-e>COUNT/span>span classcrayon-sy>(/span>span classcrayon-cn>1/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-e>tweet_count/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a99991067114-4>span classcrayon-e>FROM /span> span classcrayon-e>twitter/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a99991067114-5>span classcrayon-e>GROUP /span>span classcrayon-e>BY/span> span classcrayon-e>DATE_PART_STR/span>span classcrayon-sy>(/span>span classcrayon-e>MILLIS_TO_STR/span>span classcrayon-sy>(/span>span classcrayon-e>TO_NUM/span>span classcrayon-sy>(/span>span classcrayon-v>createdAt/span>span classcrayon-sy>)/span>span classcrayon-sy>)/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-s>day_of_week/span>span classcrayon-sy>)/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6a99991067114-6>span classcrayon-e>ORDER /span>span classcrayon-e>BY/span> span classcrayon-e>tweet_count/span> span classcrayon-v>DESC/span>span classcrayon-sy>;/span>/div>div classcrayon-line idcrayon-5cfd1e54b6a99991067114-7> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>code>DATE_PART_STR/code> is a new function returns date part of the date. Further code>day_of_week/code> attribute is used to get day of the week./p>p>strong>Results:/strong>/p>div idcrayon-5cfd1e54b6aa8877687414 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;> { day_of_week: 2, tweet_count: 49 }, { day_of_week: 3, tweet_count: 40 }, { day_of_week: 0, tweet_count: 40 }, { day_of_week: 5, tweet_count: 38 }, { day_of_week: 4, tweet_count: 36 }, { day_of_week: 6, tweet_count: 33 }, { day_of_week: 1, tweet_count: 33 }/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6aa8877687414-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6aa8877687414-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6aa8877687414-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6aa8877687414-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6aa8877687414-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6aa8877687414-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6aa8877687414-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6aa8877687414-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b6aa8877687414-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6aa8877687414-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b6aa8877687414-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6aa8877687414-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b6aa8877687414-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6aa8877687414-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b6aa8877687414-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6aa8877687414-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b6aa8877687414-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6aa8877687414-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54b6aa8877687414-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6aa8877687414-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54b6aa8877687414-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6aa8877687414-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54b6aa8877687414-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6aa8877687414-24>24/div>div classcrayon-num data-linecrayon-5cfd1e54b6aa8877687414-25>25/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6aa8877687414-26>26/div>div classcrayon-num data-linecrayon-5cfd1e54b6aa8877687414-27>27/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6aa8877687414-28>28/div>div classcrayon-num data-linecrayon-5cfd1e54b6aa8877687414-29>29/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6aa8877687414-30>30/div>div classcrayon-num data-linecrayon-5cfd1e54b6aa8877687414-31>31/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6aa8877687414-32>32/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6aa8877687414-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6aa8877687414-2>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6aa8877687414-3>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6aa8877687414-4>span classcrayon-h> /span>span classcrayon-s>day_of_week/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>2/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6aa8877687414-5>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>49/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6aa8877687414-6>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6aa8877687414-7>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6aa8877687414-8>span classcrayon-h> /span>span classcrayon-s>day_of_week/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>3/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6aa8877687414-9>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>40/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6aa8877687414-10>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6aa8877687414-11>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6aa8877687414-12>span classcrayon-h> /span>span classcrayon-s>day_of_week/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>0/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6aa8877687414-13>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>40/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6aa8877687414-14>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6aa8877687414-15>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6aa8877687414-16>span classcrayon-h> /span>span classcrayon-s>day_of_week/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>5/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6aa8877687414-17>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>38/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6aa8877687414-18>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6aa8877687414-19>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6aa8877687414-20>span classcrayon-h> /span>span classcrayon-s>day_of_week/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>4/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6aa8877687414-21>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>36/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6aa8877687414-22>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6aa8877687414-23>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6aa8877687414-24>span classcrayon-h> /span>span classcrayon-s>day_of_week/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>6/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6aa8877687414-25>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>33/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6aa8877687414-26>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6aa8877687414-27>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6aa8877687414-28>span classcrayon-h> /span>span classcrayon-s>day_of_week/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6aa8877687414-29>span classcrayon-h> /span>span classcrayon-s>tweet_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>33/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6aa8877687414-30>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54b6aa8877687414-31>span classcrayon-sy>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6aa8877687414-32> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Seems like Tuesday is the most common day to tweet. Then comes Sunday and Wednesday at the same level. The performance tends to fizzle out closer to the weekend./p>p>Here is a nice chart that shows the same trend:/p>p>a href/wp-content/uploads/2017/01/realdonaldtrump-tweets-per-day.png>img classalignnone size-full wp-image-14568 src/wp-content/uploads/2017/01/realdonaldtrump-tweets-per-day.png altrealdonaldtrump-tweets-per-day width814 height677 />/a>/p>p>#22417 should allow to report the weekday part in English./p>h2>Top 5 Mentions in Tweets/h2>p>strong>Query:/strong>/p>div idcrayon-5cfd1e54b6ab7869802866 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>SELECT COUNT(1) user_count, ue.screenName FROM twitter UNNEST userMentionEntities ue GROUP by ue.screenName ORDER by user_count DESC LIMIT 5;/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6ab7869802866-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ab7869802866-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6ab7869802866-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ab7869802866-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6ab7869802866-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ab7869802866-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6ab7869802866-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ab7869802866-8>8/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6ab7869802866-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ab7869802866-2>span classcrayon-e>SELECT/span> span classcrayon-e>COUNT/span>span classcrayon-sy>(/span>span classcrayon-cn>1/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>user_count/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-v>ue/span>span classcrayon-sy>./span>span classcrayon-e>screenName/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ab7869802866-3>span classcrayon-e> /span>span classcrayon-e>FROM/span> span classcrayon-e>twitter/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ab7869802866-4>span classcrayon-e> /span>span classcrayon-e>UNNEST/span> span classcrayon-e>userMentionEntities/span> span classcrayon-e>ue/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ab7869802866-5>span classcrayon-e> /span>span classcrayon-e>GROUP/span> span classcrayon-e>by/span> span classcrayon-v>ue/span>span classcrayon-sy>./span>span classcrayon-e>screenName/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ab7869802866-6>span classcrayon-e> /span>span classcrayon-e>ORDER/span> span classcrayon-e>by/span> span classcrayon-e>user_count/span> span classcrayon-e>DESC/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ab7869802866-7>span classcrayon-e> /span>span classcrayon-i>LIMIT/span> span classcrayon-h>/span>span classcrayon-cn>5/span>span classcrayon-sy>;/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ab7869802866-8> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>code>userMentionEntities/code> is a nested array in the JSON document. code>UNNEST/code> conceptually performs a join of the nested array with its parent object. Each resulting joined object becomes an input to the query./p>p>strong>Results:/strong>/p>div idcrayon-5cfd1e54b6ac6452056175 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;> { screenName: realDonaldTrump, user_count: 11 }, { screenName: FoxNews, user_count: 7 }, { screenName: CNN, user_count: 6 }, { screenName: NBCNews, user_count: 5 }, { screenName: DanScavino, user_count: 5 }/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6ac6452056175-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ac6452056175-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6ac6452056175-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ac6452056175-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6ac6452056175-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ac6452056175-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6ac6452056175-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ac6452056175-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b6ac6452056175-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ac6452056175-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b6ac6452056175-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ac6452056175-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b6ac6452056175-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ac6452056175-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b6ac6452056175-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ac6452056175-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b6ac6452056175-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ac6452056175-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54b6ac6452056175-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ac6452056175-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54b6ac6452056175-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ac6452056175-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54b6ac6452056175-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ac6452056175-24>24/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6ac6452056175-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ac6452056175-2>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ac6452056175-3>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ac6452056175-4>span classcrayon-h> /span>span classcrayon-s>screenName/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>realDonaldTrump/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ac6452056175-5>span classcrayon-h> /span>span classcrayon-s>user_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>11/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ac6452056175-6>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ac6452056175-7>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ac6452056175-8>span classcrayon-h> /span>span classcrayon-s>screenName/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>FoxNews/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ac6452056175-9>span classcrayon-h> /span>span classcrayon-s>user_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>7/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ac6452056175-10>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ac6452056175-11>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ac6452056175-12>span classcrayon-h> /span>span classcrayon-s>screenName/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>CNN/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ac6452056175-13>span classcrayon-h> /span>span classcrayon-s>user_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>6/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ac6452056175-14>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ac6452056175-15>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ac6452056175-16>span classcrayon-h> /span>span classcrayon-s>screenName/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>NBCNews/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ac6452056175-17>span classcrayon-h> /span>span classcrayon-s>user_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>5/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ac6452056175-18>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ac6452056175-19>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ac6452056175-20>span classcrayon-h> /span>span classcrayon-s>screenName/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>DanScavino/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ac6452056175-21>span classcrayon-h> /span>span classcrayon-s>user_count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>5/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ac6452056175-22>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ac6452056175-23>span classcrayon-sy>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ac6452056175-24> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Needless to say, he mentions his own name the most in tweets! And his two favorite TV stations Fox News and CNN./p>h2>Top 5 Tweets with RTs/h2>p>Lambda Function wakes up every 3 hours and fetches the latest tweets. So the database is a snapshot of tweets and associated information such as RTs and Favorites. So depending upon when the tweet was archived, the RTs and Favorites may not be an accurate representation. But given this information, let’s take a look at the tweets with most RTs./p>p>strong>Query:/strong>/p>div idcrayon-5cfd1e54b6ad6264297668 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>SELECT retweetCount, textFROM twitterORDER BY retweetCountLIMIT 5;/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6ad6264297668-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ad6264297668-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6ad6264297668-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ad6264297668-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6ad6264297668-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ad6264297668-6>6/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6ad6264297668-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ad6264297668-2>span classcrayon-e>SELECT/span> span classcrayon-v>retweetCount/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-e>text/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ad6264297668-3>span classcrayon-e>FROM/span> span classcrayon-e>twitter/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ad6264297668-4>span classcrayon-e>ORDER/span> span classcrayon-e>BY/span> span classcrayon-e>retweetCount/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ad6264297668-5>span classcrayon-i>LIMIT/span> span classcrayon-h>/span>span classcrayon-cn>5/span>span classcrayon-sy>;/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ad6264297668-6> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Pretty straight forward query./p>p>strong>Results:/strong>/p>div idcrayon-5cfd1e54b6ae4574699377 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;> { retweetCount: 10110, text: the American people. I have no doubt that we will, together, MAKE AMERICA GREAT AGAIN! }, { retweetCount: 10140, text: Thank you to all of the men and women who protect & serve our communities 24/7/365! \n#LawEnforcementAppreciationDay… https://t.co/aqUbDipSgv }, { retweetCount: 10370, text: We had a great News Conference at Trump Tower today. A couple of FAKE NEWS organizations were there but the people truly get whats going on }, { retweetCount: 10414, text: these companies are able to move between all 50 states, with no tax or tariff being charged. Please be forewarned prior to making a very ... }, { retweetCount: 10416, text: Somebody hacked the DNC but why did they not have \hacking defense\ like the RNC has and why have they not responded to the terrible...... }/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6ae4574699377-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ae4574699377-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6ae4574699377-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ae4574699377-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6ae4574699377-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ae4574699377-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6ae4574699377-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ae4574699377-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b6ae4574699377-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ae4574699377-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b6ae4574699377-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ae4574699377-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b6ae4574699377-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ae4574699377-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b6ae4574699377-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ae4574699377-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b6ae4574699377-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ae4574699377-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54b6ae4574699377-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ae4574699377-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54b6ae4574699377-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ae4574699377-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54b6ae4574699377-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6ae4574699377-24>24/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6ae4574699377-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ae4574699377-2>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ae4574699377-3>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ae4574699377-4>span classcrayon-h> /span>span classcrayon-s>retweetCount/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>10110/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ae4574699377-5>span classcrayon-h> /span>span classcrayon-s>text/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>the American people. I have no doubt that we will, together, MAKE AMERICA GREAT AGAIN!/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ae4574699377-6>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ae4574699377-7>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ae4574699377-8>span classcrayon-h> /span>span classcrayon-s>retweetCount/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>10140/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ae4574699377-9>span classcrayon-h> /span>span classcrayon-s>text/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>Thank you to all of the men and women who protect & serve our communities 24/7/365! \n#LawEnforcementAppreciationDay… https://t.co/aqUbDipSgv/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ae4574699377-10>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ae4574699377-11>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ae4574699377-12>span classcrayon-h> /span>span classcrayon-s>retweetCount/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>10370/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ae4574699377-13>span classcrayon-h> /span>span classcrayon-s>text/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>We had a great News Conference at Trump Tower today. A couple of FAKE NEWS organizations were there but the people truly get whats going on/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ae4574699377-14>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ae4574699377-15>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ae4574699377-16>span classcrayon-h> /span>span classcrayon-s>retweetCount/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>10414/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ae4574699377-17>span classcrayon-h> /span>span classcrayon-s>text/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>these companies are able to move between all 50 states, with no tax or tariff being charged. Please be forewarned prior to making a very .../span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ae4574699377-18>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ae4574699377-19>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ae4574699377-20>span classcrayon-h> /span>span classcrayon-s>retweetCount/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>10416/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ae4574699377-21>span classcrayon-h> /span>span classcrayon-s>text/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>Somebody hacked the DNC but why did they not have \hacking defense\ like the RNC has and why have they not responded to the terrible....../span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ae4574699377-22>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54b6ae4574699377-23>span classcrayon-sy>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6ae4574699377-24> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>br />/p>h2>Original vs RTs/h2>p>How many of tweets were written vs retweeted?/p>p>strong>Query:/strong>/p>div idcrayon-5cfd1e54b6af5091687544 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>SELECT retweet, count(1) countFROM twitterGROUP BY retweet;/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6af5091687544-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6af5091687544-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6af5091687544-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6af5091687544-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6af5091687544-5>5/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6af5091687544-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6af5091687544-2>span classcrayon-e>SELECT/span> span classcrayon-v>retweet/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-e>count/span>span classcrayon-sy>(/span>span classcrayon-cn>1/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-e>count/span>/div>div classcrayon-line idcrayon-5cfd1e54b6af5091687544-3>span classcrayon-e>FROM/span> span classcrayon-e>twitter/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6af5091687544-4>span classcrayon-e>GROUP/span> span classcrayon-e>BY/span> span classcrayon-v>retweet/span>span classcrayon-sy>;/span>/div>div classcrayon-line idcrayon-5cfd1e54b6af5091687544-5> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>strong>Results:/strong>/p>div idcrayon-5cfd1e54b6b04965048296 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;> { count: 253, retweet: false }, { count: 15, retweet: true }/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6b04965048296-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b04965048296-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6b04965048296-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b04965048296-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6b04965048296-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b04965048296-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6b04965048296-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b04965048296-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b6b04965048296-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b04965048296-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b6b04965048296-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b04965048296-12>12/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6b04965048296-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b04965048296-2>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b04965048296-3>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b04965048296-4>span classcrayon-h> /span>span classcrayon-s>count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>253/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b04965048296-5>span classcrayon-h> /span>span classcrayon-s>retweet/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>false/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b04965048296-6>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b04965048296-7>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b04965048296-8>span classcrayon-h> /span>span classcrayon-s>count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>15/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b04965048296-9>span classcrayon-h> /span>span classcrayon-s>retweet/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-t>true/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b04965048296-10>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b04965048296-11>span classcrayon-sy>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b04965048296-12> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Most of the tweets are original with only a few RTs./p>h2>Most Common Words in Tweet/h2>p>strong>Query:/strong>/p>div idcrayon-5cfd1e54b6b13609006841 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>SELECT COUNT(1) count, word FROM twitter UNNEST SPLIT(text) wordGROUP BY wordORDER BY count DESC;/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6b13609006841-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b13609006841-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6b13609006841-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b13609006841-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6b13609006841-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b13609006841-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6b13609006841-7>7/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6b13609006841-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b13609006841-2>span classcrayon-e>SELECT/span> span classcrayon-e>COUNT/span>span classcrayon-sy>(/span>span classcrayon-cn>1/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>count/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-t>word/span> span classcrayon-h>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b13609006841-3>span classcrayon-e>FROM/span> span classcrayon-e>twitter/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b13609006841-4>span classcrayon-e>UNNEST/span> span classcrayon-e>SPLIT/span>span classcrayon-sy>(/span>span classcrayon-v>text/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-t>word/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b13609006841-5>span classcrayon-e>GROUP/span> span classcrayon-e>BY/span> span classcrayon-t>word/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b13609006841-6>span classcrayon-e>ORDER/span> span classcrayon-e>BY/span> span classcrayon-e>count/span> span classcrayon-v>DESC/span>span classcrayon-sy>;/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b13609006841-7> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>This query uses code>SPLIT/code> function that/p>p>Results:/p>div idcrayon-5cfd1e54b6b22948568176 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;> { count: 189, word: the }, { count: 151, word: to }, { count: 115, word: and }, . . . { count: 1, word: presented...Trumps }, { count: 1, word: jobs. }, { count: 1, word: Doing }/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6b22948568176-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b22948568176-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6b22948568176-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b22948568176-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6b22948568176-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b22948568176-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6b22948568176-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b22948568176-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b6b22948568176-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b22948568176-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b6b22948568176-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b22948568176-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b6b22948568176-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b22948568176-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b6b22948568176-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b22948568176-16>16/div>div classcrayon-num data-linecrayon-5cfd1e54b6b22948568176-17>17/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b22948568176-18>18/div>div classcrayon-num data-linecrayon-5cfd1e54b6b22948568176-19>19/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b22948568176-20>20/div>div classcrayon-num data-linecrayon-5cfd1e54b6b22948568176-21>21/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b22948568176-22>22/div>div classcrayon-num data-linecrayon-5cfd1e54b6b22948568176-23>23/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b22948568176-24>24/div>div classcrayon-num data-linecrayon-5cfd1e54b6b22948568176-25>25/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b22948568176-26>26/div>div classcrayon-num data-linecrayon-5cfd1e54b6b22948568176-27>27/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b22948568176-28>28/div>div classcrayon-num data-linecrayon-5cfd1e54b6b22948568176-29>29/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b22948568176-30>30/div>div classcrayon-num data-linecrayon-5cfd1e54b6b22948568176-31>31/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6b22948568176-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b22948568176-2>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b22948568176-3>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b22948568176-4>span classcrayon-h> /span>span classcrayon-s>count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>189/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b22948568176-5>span classcrayon-h> /span>span classcrayon-s>word/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>the/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b22948568176-6>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b22948568176-7>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b22948568176-8>span classcrayon-h> /span>span classcrayon-s>count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>151/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b22948568176-9>span classcrayon-h> /span>span classcrayon-s>word/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>to/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b22948568176-10>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b22948568176-11>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b22948568176-12>span classcrayon-h> /span>span classcrayon-s>count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>115/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b22948568176-13>span classcrayon-h> /span>span classcrayon-s>word/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>and/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b22948568176-14>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b22948568176-15> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b22948568176-16>span classcrayon-h> /span>span classcrayon-sy>./span> span classcrayon-h>/span>span classcrayon-sy>./span> span classcrayon-h>/span>span classcrayon-sy>./span>/div>div classcrayon-line idcrayon-5cfd1e54b6b22948568176-17> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b22948568176-18>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b22948568176-19>span classcrayon-h> /span>span classcrayon-s>count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b22948568176-20>span classcrayon-h> /span>span classcrayon-s>word/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>presented...Trumps/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b22948568176-21>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b22948568176-22>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b22948568176-23>span classcrayon-h> /span>span classcrayon-s>count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b22948568176-24>span classcrayon-h> /span>span classcrayon-s>word/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>jobs./span>/div>div classcrayon-line idcrayon-5cfd1e54b6b22948568176-25>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b22948568176-26>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b22948568176-27>span classcrayon-h> /span>span classcrayon-s>count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>1/span>span classcrayon-sy>,/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b22948568176-28>span classcrayon-h> /span>span classcrayon-s>word/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>Doing/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b22948568176-29>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b22948568176-30>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b22948568176-31> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>br />/p>h2>Frequency of words “media”, “fake” and “America” in tweets/h2>p>strong>Query:/strong>/p>div idcrayon-5cfd1e54b6b47030736252 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;>SELECT COUNT(1) count, LOWER(w) wordFROM twitter UNNEST SPLIT(text) w WHERE LOWER(w) IN media, fake, america GROUP by LOWER(w) ORDER BY count DESC;/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6b47030736252-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b47030736252-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6b47030736252-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b47030736252-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6b47030736252-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b47030736252-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6b47030736252-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b47030736252-8>8/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6b47030736252-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b47030736252-2>span classcrayon-e>SELECT/span> span classcrayon-e>COUNT/span>span classcrayon-sy>(/span>span classcrayon-cn>1/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-v>count/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-e>LOWER/span>span classcrayon-sy>(/span>span classcrayon-v>w/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-t>word/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b47030736252-3>span classcrayon-e>FROM/span> span classcrayon-e>twitter /span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b47030736252-4>span classcrayon-e>UNNEST/span> span classcrayon-e>SPLIT/span>span classcrayon-sy>(/span>span classcrayon-v>text/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-i>w/span>span classcrayon-h> /span>/div>div classcrayon-line idcrayon-5cfd1e54b6b47030736252-5>span classcrayon-e>WHERE/span> span classcrayon-e>LOWER/span>span classcrayon-sy>(/span>span classcrayon-v>w/span>span classcrayon-sy>)/span> span classcrayon-h>/span>span classcrayon-st>IN/span> span classcrayon-h>/span>span classcrayon-sy>/span> span classcrayon-h>/span>span classcrayon-s>media/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-s>fake/span>span classcrayon-sy>,/span> span classcrayon-h>/span>span classcrayon-s>america/span>span classcrayon-sy>/span> span classcrayon-h>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b47030736252-6>span classcrayon-e>GROUP/span> span classcrayon-e>by/span> span classcrayon-e>LOWER/span>span classcrayon-sy>(/span>span classcrayon-v>w/span>span classcrayon-sy>)/span> span classcrayon-h>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b47030736252-7>span classcrayon-e>ORDER/span> span classcrayon-e>BY/span> span classcrayon-e>count/span> span classcrayon-v>DESC/span>span classcrayon-sy>;/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b47030736252-8> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>code>LOWER/code> function is used to compare words independent of the case./p>p>strong>Result:/strong>/p>div idcrayon-5cfd1e54b6b57898334474 classcrayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate data-settingsminimize scroll-mouseover wrap stylemargin-top: 20px; margin-bottom: 20px; font-size: 12px !important; line-height: 15px !important;>div classcrayon-toolbar data-settingsmouseover overlay hide delay stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>span classcrayon-title>/span>div classcrayon-tools stylefont-size: 12px !important; height: 18px !important; line-height: 18px !important;>div classcrayon-button crayon-nums-button titleToggle Line Numbers>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-plain-button titleToggle Plain Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-wrap-button titleToggle Line Wrap>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-expand-button titleExpand Code>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-copy-button titleCopy>div classcrayon-button-icon>br />/div>/div>div classcrayon-button crayon-popup-button titleOpen Code In New Window>div classcrayon-button-icon>br />/div>/div>/div>/div>div classcrayon-info stylemin-height: 16.8px !important; line-height: 16.8px !important;>br />/div>div classcrayon-plain-wrap>textarea classcrayon-plain print-no data-settingsdblclick readonlyreadonly style-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4; font-size: 12px !important; line-height: 15px !important;> { count: 12, word: media }, { count: 9, word: fake }, { count: 8, word: america }/textarea>/div>div classcrayon-main>table classcrayon-table>tbody>tr classcrayon-row>td classcrayon-nums data-settingshide>div classcrayon-nums-content stylefont-size: 12px !important; line-height: 15px !important;>div classcrayon-num data-linecrayon-5cfd1e54b6b57898334474-1>1/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b57898334474-2>2/div>div classcrayon-num data-linecrayon-5cfd1e54b6b57898334474-3>3/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b57898334474-4>4/div>div classcrayon-num data-linecrayon-5cfd1e54b6b57898334474-5>5/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b57898334474-6>6/div>div classcrayon-num data-linecrayon-5cfd1e54b6b57898334474-7>7/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b57898334474-8>8/div>div classcrayon-num data-linecrayon-5cfd1e54b6b57898334474-9>9/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b57898334474-10>10/div>div classcrayon-num data-linecrayon-5cfd1e54b6b57898334474-11>11/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b57898334474-12>12/div>div classcrayon-num data-linecrayon-5cfd1e54b6b57898334474-13>13/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b57898334474-14>14/div>div classcrayon-num data-linecrayon-5cfd1e54b6b57898334474-15>15/div>div classcrayon-num crayon-striped-num data-linecrayon-5cfd1e54b6b57898334474-16>16/div>/div>/td>td classcrayon-code>div classcrayon-pre stylefont-size: 12px !important; line-height: 15px !important; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; tab-size: 4;>div classcrayon-line idcrayon-5cfd1e54b6b57898334474-1> /div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b57898334474-2>span classcrayon-sy>/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b57898334474-3>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b57898334474-4>span classcrayon-h> /span>span classcrayon-s>count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>12/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b57898334474-5>span classcrayon-h> /span>span classcrayon-s>word/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>media/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b57898334474-6>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b57898334474-7>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b57898334474-8>span classcrayon-h> /span>span classcrayon-s>count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>9/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b57898334474-9>span classcrayon-h> /span>span classcrayon-s>word/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>fake/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b57898334474-10>span classcrayon-h> /span>span classcrayon-sy>}/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b57898334474-11>span classcrayon-h> /span>span classcrayon-sy>{/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b57898334474-12>span classcrayon-h> /span>span classcrayon-s>count/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-cn>8/span>span classcrayon-sy>,/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b57898334474-13>span classcrayon-h> /span>span classcrayon-s>word/span>span classcrayon-o>:/span> span classcrayon-h>/span>span classcrayon-s>america/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b57898334474-14>span classcrayon-h> /span>span classcrayon-sy>}/span>/div>div classcrayon-line idcrayon-5cfd1e54b6b57898334474-15>span classcrayon-sy>/span>/div>div classcrayon-line crayon-striped-line idcrayon-5cfd1e54b6b57898334474-16> /div>/div>/td>/tr>/tbody>/table>/div>/div>p>Lambda function will continue to store tweets in the database./p>h2>Try these queries yourself?/h2>ul>li>Start a Couchbase Server/li>li>Use the archive a href/wp-content/uploads/2017/01/twitter-backups-2017-01-20-06-07-49.tar.gz>twitter-backups-2017-01-20-06-07-49.tar/a> as explained at Restore Data To Couchbase/li>li>Use Query Workbench to fire the queries/li>/ul>h2>N1QL References/h2>ul>li>N1QL Interactive Tutorial/li>li>N1QL Cheatsheet/li>li>N1QL Language Reference/li>li>Run Your First N1QL Query/li>/ul>p>Source: https://blog.couchbase.com/2017/january/analyze-donald-trump-tweets-couchbase-n1qlbr />br />/p>p stylemargin-left: 36.0pt; text-indent: -18.0pt; mso-list: l0 level1 lfo1;>!--if !supportLists-->span langEN-US stylefont-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-ansi-language: EN-US;>·span stylefont-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: Times New Roman;> /span>/span>!--endif-->span langEN-US>Boosty Labs leverages /span>span langRU>a hrefhttps://boostylabs.com/blockchain/solana>span langEN-US>Solana blockchain developers/span>/a>/span>span langEN-US> to develop cutting-edge solutions across multiple industries. o:p>/o:p>/span>/p>p stylemargin-left: 36.0pt; text-indent: -18.0pt; mso-list: l0 level1 lfo1;>!--if !supportLists-->span langEN-US stylefont-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-ansi-language: EN-US;>·span stylefont-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: Times New Roman;> /span>/span>!--endif-->span langRU>a hrefhttps://immediate-edge.it/>span langEN-US>https://immediate-edge.it//span>/a>/span>span langEN-US> excels in optimizing oil trading strategies through detailed market insights and analytics, ensuring maximum profitability. o:p>/o:p>/span>/p>p stylemargin-left: 36.0pt; text-indent: -18.0pt; mso-list: l0 level1 lfo1;>!--if !supportLists-->span langEN-US stylefont-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-ansi-language: EN-US;>·span stylefont-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: Times New Roman;> /span>/span>!--endif-->span langRU>a hrefhttps://bitqt.app/>span langEN-US>BitQT.app/span>/a>/span>span langEN-US> enhances cryptocurrency trading by providing advanced analytics and user-friendly tools suitable for both novice and experienced traders. o:p>/o:p>/span>/p>p stylemargin-left: 36.0pt; text-indent: -18.0pt; mso-list: l0 level1 lfo1;>!--if !supportLists-->span langEN-US stylefont-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-ansi-language: EN-US;>·span stylefont-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: Times New Roman;> /span>/span>!--endif-->span langRU>a hrefhttps://tesler-inc.trade/>span langEN-US>Tesler Inc/span>/a>/span>span langEN-US>. Trade offers strong investment opportunities backed by thorough market analysis and strategic planning. o:p>/o:p>/span>/p>p>/p>p stylemargin-left: 36.0pt; text-indent: -18.0pt; mso-list: l0 level1 lfo1;>!--if !supportLists-->span langEN-US stylefont-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-ansi-language: EN-US;>·span stylefont-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-variant-position: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: Times New Roman;> /span>/span>!--endif-->span langEN-US>Azucarbet provides a diverse catalog of casino games, including /span>span langRU>a hrefhttps://azucarbet.com/bono-casino>span langEN-US>Bono sin Deposito/span>/a>/span>span langEN-US>, specifically designed for the Latin American market, offering a wide range of gaming options.o:p>/o:p>/span>/p>/div>footer classentry-meta>div classcomments-link>a href/analyze-donald-trump-tweets-n1ql/#comments>View all 28 comments/a>/div>/footer>/article>nav classnavigation paging-navigation rolenavigation>h1 classscreen-reader-text>Posts navigation/h1>div classnav-links>div classnav-previous>a href/page/2/>span classmeta-nav>←/span> Older posts/a>/div>/div>/nav>/div>/div>/div>footer idcolophon classsite-footer rolecontentinfo>div classsite-info>Proudly powered by WordPress/div>/footer>/div>script typetext/javascript> var colomatduration fast; var colomatslideEffect slideFade; /script>script typetext/javascript> /* !CDATA */ r3f5x9JSescape(documentreferrer); hf4Nca5357dfdb2ba7017077f9dae2426b25; hf4Vfe29aa0142c55b537ee00404b3215d0d; jQuery(document).ready(function($){var e#commentform, .comment-respond form, .comment-form, #lostpasswordform, #registerform, #loginform, #login_form, #wpss_contact_form;$(e).submit(function(){$(input>).attr(type,hidden).attr(name,r3f5x9JS).attr(value,r3f5x9JS).appendTo(e);$(input>).attr(type,hidden).attr(name,hf4N).attr(value,hf4V).appendTo(e);return true;});$(#comment).attr({minlength:15,maxlength:15360})}); /* > */ /script>script typetext/javascript src/wp-includes/js/jquery/ui/core.min.js?ver1.11.4>/script>script typetext/javascript src/wp-includes/js/jquery/ui/widget.min.js?ver1.11.4>/script>script typetext/javascript src/wp-includes/js/jquery/ui/position.min.js?ver1.11.4>/script>script typetext/javascript src/wp-includes/js/jquery/ui/menu.min.js?ver1.11.4>/script>script typetext/javascript src/wp-includes/js/jquery/ui/autocomplete.min.js?ver1.11.4>/script>script typetext/javascript src/wp-includes/js/jquery/ui/mouse.min.js?ver1.11.4>/script>script typetext/javascript src/wp-includes/js/jquery/ui/sortable.min.js?ver1.11.4>/script>script typetext/javascript src/wp-content/plugins/jquery-collapse-o-matic/js/collapse.js?ver1.6.6>/script>script typetext/javascript src/wp-content/themes/twentythirteen/js/functions.js?ver20150330>/script>script typetext/javascript src/wp-content/plugins/wp-spamshield/js/jscripts-ftr-min.js>/script>/body>/html>
View on OTX
|
View on ThreatMiner
Please enable JavaScript to view the
comments powered by Disqus.
Data with thanks to
AlienVault OTX
,
VirusTotal
,
Malwr
and
others
. [
Sitemap
]