Congratulations!

[Valid RSS] This is a valid RSS feed.

Recommendations

This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

Source: http://www.qtzar.com/feed/

  1. <?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
  2. xmlns:content="http://purl.org/rss/1.0/modules/content/"
  3. xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  4. xmlns:dc="http://purl.org/dc/elements/1.1/"
  5. xmlns:atom="http://www.w3.org/2005/Atom"
  6. xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
  7. xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  8. xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
  9. >
  10.  
  11. <channel>
  12. <title>Dec&#039;s Dom Blog</title>
  13. <atom:link href="https://qtzar.com/feed/" rel="self" type="application/rss+xml" />
  14. <link>https://qtzar.com</link>
  15. <description>Domino, Java, DevOps and more...</description>
  16. <lastBuildDate>Mon, 22 May 2017 12:01:34 +0000</lastBuildDate>
  17. <language>en</language>
  18. <sy:updatePeriod>
  19. hourly </sy:updatePeriod>
  20. <sy:updateFrequency>
  21. 1 </sy:updateFrequency>
  22. <generator>http://wordpress.com/</generator>
  23. <cloud domain='qtzar.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
  24. <image>
  25. <url>https://s0.wp.com/i/buttonw-com.png</url>
  26. <title>Dec&#039;s Dom Blog</title>
  27. <link>https://qtzar.com</link>
  28. </image>
  29. <atom:link rel="search" type="application/opensearchdescription+xml" href="https://qtzar.com/osd.xml" title="Dec&#039;s Dom Blog" />
  30. <atom:link rel='hub' href='https://qtzar.com/?pushpress=hub'/>
  31. <item>
  32. <title>Building the Release Definition</title>
  33. <link>https://qtzar.com/2017/04/05/building-the-release-definition/</link>
  34. <dc:creator><![CDATA[qtzar]]></dc:creator>
  35. <pubDate>Wed, 05 Apr 2017 12:30:00 +0000</pubDate>
  36. <category><![CDATA[None]]></category>
  37. <guid isPermaLink="false">http://www.qtzar.com/?p=1928</guid>
  38.  
  39. <description><![CDATA[The Release definition in VSTS allows you to define the steps needed to be taken to deploy a build of your application to your deployment environments. On the Releases tab of your project you click on the &#8216;New Definition&#8217; button<span class="ellipsis">&#8230;</span><div class="read-more"><a href="https://qtzar.com/2017/04/05/building-the-release-definition/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
  40. <content:encoded><![CDATA[<p>The Release definition in VSTS allows you to define the steps needed to be taken to deploy a build of your application to your deployment environments. On the Releases tab of your project you click on the &#8216;New Definition&#8217; button and then select the &#8216;Empty&#8217; profile. On the next screen it will automatically fill in your current VSTS project and the VSTS build definition so you can just go ahead and click Create.</p>
  41. <p><img data-attachment-id="1929" data-permalink="https://qtzar.com/2017/04/05/building-the-release-definition/2017-03-19_14-49-03/" data-orig-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-49-03.png" data-orig-size="984,451" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-03-19_14-49-03" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-49-03.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-49-03.png?w=605" class="alignnone size-full wp-image-1929" src="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-49-03.png?w=605" alt="2017-03-19_14-49-03"   srcset="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-49-03.png 984w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-49-03.png?w=150&amp;h=69 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-49-03.png?w=300&amp;h=138 300w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-49-03.png?w=768&amp;h=352 768w" sizes="(max-width: 984px) 100vw, 984px" /></p>
  42. <p>First things first is rename the autogenerated definition name in to something a little easier to work with. I&#8217;m going with the same name as my build definition to keep them in sync. Then we need to make sure that the release agent is the same one that we used for the build process. Click on the &#8216;Run On Agent&#8217; section and then make sure you set the agent queue to be &#8216;Default&#8217; and add in a demand of RANCHER_CLI exists.</p>
  43. <p><img data-attachment-id="1930" data-permalink="https://qtzar.com/2017/04/05/building-the-release-definition/2017-03-19_15-03-53/" data-orig-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-03-53.png" data-orig-size="950,404" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-03-19_15-03-53" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-03-53.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-03-53.png?w=605" class="alignnone size-full wp-image-1930" src="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-03-53.png?w=605" alt="2017-03-19_15-03-53"   srcset="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-03-53.png 950w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-03-53.png?w=150&amp;h=64 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-03-53.png?w=300&amp;h=128 300w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-03-53.png?w=768&amp;h=327 768w" sizes="(max-width: 950px) 100vw, 950px" /></p>
  44. <p>The script that I use has a set of variables that need to be passed in to it, some variables are unique to the environment and some are available to the entire release definition. To setup the common variables you go to the Variables section and fill in the following with your details. ( Note : the value for DOCKER_HOST should actually read docker.io and not hub.docker.com as in the screenshot )</p>
  45. <p><img data-attachment-id="1931" data-permalink="https://qtzar.com/2017/04/05/building-the-release-definition/2017-03-19_15-28-53/" data-orig-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png" data-orig-size="1073,419" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-03-19_15-28-53" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png?w=605" class="alignnone size-full wp-image-1931" src="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png?w=605" alt="2017-03-19_15-28-53"   srcset="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png 1073w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png?w=150&amp;h=59 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png?w=300&amp;h=117 300w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png?w=768&amp;h=300 768w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png?w=1024&amp;h=400 1024w" sizes="(max-width: 1073px) 100vw, 1073px" /></p>
  46. <p>Next we come to the environment. The first thing I do is click on the environment name and rename it to reflect the environment that it is for. In this case I&#8217;m working on the environment for the development system so I rename it Development. Once renamed click on the three dots in the upper right of teh environment box and select the option to edit the environment variables.</p>
  47. <p><img loading="lazy" data-attachment-id="1932" data-permalink="https://qtzar.com/2017/04/05/building-the-release-definition/2017-03-19_15-41-14/" data-orig-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png" data-orig-size="1103,390" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-03-19_15-41-14" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png?w=605" class="alignnone size-full wp-image-1932" src="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png?w=605" alt="2017-03-19_15-41-14"   srcset="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png 1103w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png?w=150&amp;h=53 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png?w=300&amp;h=106 300w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png?w=768&amp;h=272 768w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png?w=1024&amp;h=362 1024w" sizes="(max-width: 1103px) 100vw, 1103px" /></p>
  48. <p>Fill in your Rancher API endpoint and Rancher API keys for this environment and then also add in the Service ID for the dummy service that you setup in the previous blog post and then click OK to close the dialog box.</p>
  49. <p>All that is left now is to add the deployment script which I&#8217;ll do in the next post.</p>
  50. ]]></content:encoded>
  51. <media:content url="https://2.gravatar.com/avatar/e44532b2f22707be76d0901ce36d8b0168b4d480a6dc063d2e2a96591fb76e4b?s=96&#38;d=identicon&#38;r=G" medium="image">
  52. <media:title type="html">qtzar</media:title>
  53. </media:content>
  54.  
  55. <media:content url="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-49-03.png" medium="image">
  56. <media:title type="html">2017-03-19_14-49-03</media:title>
  57. </media:content>
  58.  
  59. <media:content url="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-03-53.png" medium="image">
  60. <media:title type="html">2017-03-19_15-03-53</media:title>
  61. </media:content>
  62.  
  63. <media:content url="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png" medium="image">
  64. <media:title type="html">2017-03-19_15-28-53</media:title>
  65. </media:content>
  66.  
  67. <media:content url="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png" medium="image">
  68. <media:title type="html">2017-03-19_15-41-14</media:title>
  69. </media:content>
  70. </item>
  71. <item>
  72. <title>Creating A Dummy Service In Rancher</title>
  73. <link>https://qtzar.com/2017/04/04/creating-a-dummy-service-in-rancher/</link>
  74. <dc:creator><![CDATA[qtzar]]></dc:creator>
  75. <pubDate>Tue, 04 Apr 2017 12:30:00 +0000</pubDate>
  76. <category><![CDATA[Domino To Spring]]></category>
  77. <category><![CDATA[Rancher]]></category>
  78. <guid isPermaLink="false">http://www.qtzar.com/?p=1922</guid>
  79.  
  80. <description><![CDATA[The last thing that we need to do before we can create the deployment scripts is to create a dummy service in Rancher that we can then replace with our deployed application. We need to do this because our deployment<span class="ellipsis">&#8230;</span><div class="read-more"><a href="https://qtzar.com/2017/04/04/creating-a-dummy-service-in-rancher/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
  81. <content:encoded><![CDATA[<p>The last thing that we need to do before we can create the deployment scripts is to create a dummy service in Rancher that we can then replace with our deployed application. We need to do this because our deployment scripts need to reference a service id and will fail if the id doesn&#8217;t exist yet.</p>
  82. <p>In the Rancher interface create a new &#8216;Stack&#8217; for your applications. Stacks are a way to organize different applications together.</p>
  83. <p><img loading="lazy" data-attachment-id="1923" data-permalink="https://qtzar.com/2017/04/04/creating-a-dummy-service-in-rancher/2017-03-19_14-26-45/" data-orig-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-26-45.png" data-orig-size="832,112" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-03-19_14-26-45" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-26-45.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-26-45.png?w=605" class="alignnone size-full wp-image-1923" src="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-26-45.png?w=605" alt="2017-03-19_14-26-45"   srcset="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-26-45.png 832w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-26-45.png?w=150&amp;h=20 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-26-45.png?w=300&amp;h=40 300w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-26-45.png?w=768&amp;h=103 768w" sizes="(max-width: 832px) 100vw, 832px" /></p>
  84. <p>Give your stack a name and click on the create button. You will end up with  empty stack with no services running. In Rancher a service is one or more containers running a single docker image. Click on the Add Service button.</p>
  85. <p><img loading="lazy" data-attachment-id="1924" data-permalink="https://qtzar.com/2017/04/04/creating-a-dummy-service-in-rancher/2017-03-19_14-29-36/" data-orig-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-29-36.png" data-orig-size="980,168" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-03-19_14-29-36" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-29-36.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-29-36.png?w=605" class="alignnone size-full wp-image-1924" src="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-29-36.png?w=605" alt="2017-03-19_14-29-36"   srcset="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-29-36.png 980w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-29-36.png?w=150&amp;h=26 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-29-36.png?w=300&amp;h=51 300w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-29-36.png?w=768&amp;h=132 768w" sizes="(max-width: 980px) 100vw, 980px" /></p>
  86. <p>Give your service a name ( single word lowercase is the best practice ) and then for the Select Image section enter in &#8216;busybox&#8217;. This is just a very small linux distribution that does an excellent job as a temporary standin for our deployment scripts</p>
  87. <p><img loading="lazy" data-attachment-id="1925" data-permalink="https://qtzar.com/2017/04/04/creating-a-dummy-service-in-rancher/2017-03-19_14-33-40/" data-orig-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-33-40.png" data-orig-size="978,617" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-03-19_14-33-40" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-33-40.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-33-40.png?w=605" class="alignnone size-full wp-image-1925" src="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-33-40.png?w=605" alt="2017-03-19_14-33-40"   srcset="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-33-40.png 978w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-33-40.png?w=150&amp;h=95 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-33-40.png?w=300&amp;h=189 300w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-33-40.png?w=768&amp;h=485 768w" sizes="(max-width: 978px) 100vw, 978px" /></p>
  88. <p>I am also adding a single environment variable called spring.profiles.active and setting the value to dev. In your other environments I would set the value to &#8216;test&#8217; and &#8216;prod&#8217; as needed. This is used to select to correct spring profile at a later stage in the process.</p>
  89. <p>Click on create button and then when the service has been created click on the service name and take a look at the URL in your browser.</p>
  90. <p><img loading="lazy" data-attachment-id="1926" data-permalink="https://qtzar.com/2017/04/04/creating-a-dummy-service-in-rancher/2017-03-19_14-41-31/" data-orig-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-41-31.png" data-orig-size="730,38" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-03-19_14-41-31" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-41-31.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-41-31.png?w=605" class="alignnone size-full wp-image-1926" src="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-41-31.png?w=605" alt="2017-03-19_14-41-31"   srcset="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-41-31.png 730w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-41-31.png?w=150&amp;h=8 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-41-31.png?w=300&amp;h=16 300w" sizes="(max-width: 730px) 100vw, 730px" /></p>
  91. <p>In the URL there are three IDs. The first is the environment ID, the next is the Stack ID and the last one is the Service ID. You will need to take a note of the last one for the deployment scripts.</p>
  92. <p>We are now ready to create the deployment definition in VSTS.</p>
  93. ]]></content:encoded>
  94. <media:content url="https://2.gravatar.com/avatar/e44532b2f22707be76d0901ce36d8b0168b4d480a6dc063d2e2a96591fb76e4b?s=96&#38;d=identicon&#38;r=G" medium="image">
  95. <media:title type="html">qtzar</media:title>
  96. </media:content>
  97.  
  98. <media:content url="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-26-45.png" medium="image">
  99. <media:title type="html">2017-03-19_14-26-45</media:title>
  100. </media:content>
  101.  
  102. <media:content url="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-29-36.png" medium="image">
  103. <media:title type="html">2017-03-19_14-29-36</media:title>
  104. </media:content>
  105.  
  106. <media:content url="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-33-40.png" medium="image">
  107. <media:title type="html">2017-03-19_14-33-40</media:title>
  108. </media:content>
  109.  
  110. <media:content url="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-41-31.png" medium="image">
  111. <media:title type="html">2017-03-19_14-41-31</media:title>
  112. </media:content>
  113. </item>
  114. <item>
  115. <title>Adding A Dockerfile to the project</title>
  116. <link>https://qtzar.com/2017/04/03/adding-a-dockerfile-to-the-project/</link>
  117. <dc:creator><![CDATA[qtzar]]></dc:creator>
  118. <pubDate>Mon, 03 Apr 2017 12:30:00 +0000</pubDate>
  119. <category><![CDATA[Domino To Spring]]></category>
  120. <category><![CDATA[Docker]]></category>
  121. <guid isPermaLink="false">http://www.qtzar.com/?p=1917</guid>
  122.  
  123. <description><![CDATA[Before we can deploy anything to Rancher it needs to be in a docker image so I&#8217;ll be asking my VSTS scripts to build a docker image that can then be uploaded to a Docker container/image repository before being deployed<span class="ellipsis">&#8230;</span><div class="read-more"><a href="https://qtzar.com/2017/04/03/adding-a-dockerfile-to-the-project/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
  124. <content:encoded><![CDATA[<p>Before we can deploy anything to Rancher it needs to be in a docker image so I&#8217;ll be asking my VSTS scripts to build a docker image that can then be uploaded to a Docker container/image repository before being deployed to the Rancher server.</p>
  125. <p>To create the Docker image I need a Dockerfile added to the project and I need to also tell my build script to copy it to a location that the release script can access.</p>
  126. <p>First I will create a new folder in my project under src/main called &#8216;docker&#8217;.</p>
  127. <p><img loading="lazy" data-attachment-id="1918" data-permalink="https://qtzar.com/2017/04/03/adding-a-dockerfile-to-the-project/2017-03-19_14-04-05/" data-orig-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-04-05.png" data-orig-size="266,134" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-03-19_14-04-05" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-04-05.png?w=266" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-04-05.png?w=266" class="alignnone size-full wp-image-1918" src="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-04-05.png?w=605" alt="2017-03-19_14-04-05"   srcset="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-04-05.png 266w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-04-05.png?w=150&amp;h=76 150w" sizes="(max-width: 266px) 100vw, 266px" /></p>
  128. <p>To that folder I will add a new file called &#8216;Dockerfile&#8217;. Make sure you get the case right. It is not camel-case and does not have a capital F in the middle of the filename.</p>
  129. <p>In this file I will add what is probably the simplest Dockerfile instructions you have ever seen.</p>
  130. <p><img loading="lazy" data-attachment-id="1981" data-permalink="https://qtzar.com/2017/04/03/adding-a-dockerfile-to-the-project/2017-05-22_07-48-45/" data-orig-file="https://qtzar.files.wordpress.com/2017/04/2017-05-22_07-48-45.png" data-orig-size="386,110" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-05-22_07-48-45" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-05-22_07-48-45.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-05-22_07-48-45.png?w=386" class="alignnone size-full wp-image-1981" src="https://qtzar.files.wordpress.com/2017/04/2017-05-22_07-48-45.png?w=605" alt="2017-05-22_07-48-45"   srcset="https://qtzar.files.wordpress.com/2017/04/2017-05-22_07-48-45.png 386w, https://qtzar.files.wordpress.com/2017/04/2017-05-22_07-48-45.png?w=150&amp;h=43 150w, https://qtzar.files.wordpress.com/2017/04/2017-05-22_07-48-45.png?w=300&amp;h=85 300w" sizes="(max-width: 386px) 100vw, 386px" /></p>
  131. <p>Basically I&#8217;m starting with the openJDK Java runtime environment running on Alpine Linux which is a very small distribution of Linux that can run java apps. I then setup my tmp volume, I copy my jar file in to the image, setup what port should be exposed and then tell it how to run the jar file. The resulting image will be about 60Mb plus the size of your jar file.</p>
  132. <p>You will also need to update the build definition so that it will copy the Dockerfile to the artifact store which will be used during the release process. Back in VSTS find your Build definition and open it for editing.</p>
  133. <p><img loading="lazy" data-attachment-id="1920" data-permalink="https://qtzar.com/2017/04/03/adding-a-dockerfile-to-the-project/2017-03-19_14-21-09/" data-orig-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png" data-orig-size="1234,444" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-03-19_14-21-09" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png?w=605" class="alignnone size-full wp-image-1920" src="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png?w=605" alt="2017-03-19_14-21-09"   srcset="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png 1234w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png?w=150&amp;h=54 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png?w=300&amp;h=108 300w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png?w=768&amp;h=276 768w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png?w=1024&amp;h=368 1024w" sizes="(max-width: 1234px) 100vw, 1234px" /></p>
  134. <p>Select the &#8216;Add Task&#8217; option and select the &#8216;Copy Files&#8217; task to be added to the build process. Make sure you move it up above the final stage of Publish Artifact and then fill in the source folder and target folder options.</p>
  135. <p>If you haven&#8217;t already then make sure you commit the dockerfile to Git and then push the changes to teh VSTS server and run a new build. This will verify that the build process changes have worked.</p>
  136. ]]></content:encoded>
  137. <media:content url="https://2.gravatar.com/avatar/e44532b2f22707be76d0901ce36d8b0168b4d480a6dc063d2e2a96591fb76e4b?s=96&#38;d=identicon&#38;r=G" medium="image">
  138. <media:title type="html">qtzar</media:title>
  139. </media:content>
  140.  
  141. <media:content url="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-04-05.png" medium="image">
  142. <media:title type="html">2017-03-19_14-04-05</media:title>
  143. </media:content>
  144.  
  145. <media:content url="https://qtzar.files.wordpress.com/2017/04/2017-05-22_07-48-45.png" medium="image">
  146. <media:title type="html">2017-05-22_07-48-45</media:title>
  147. </media:content>
  148.  
  149. <media:content url="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png" medium="image">
  150. <media:title type="html">2017-03-19_14-21-09</media:title>
  151. </media:content>
  152. </item>
  153. <item>
  154. <title>Getting Your Rancher API Keys</title>
  155. <link>https://qtzar.com/2017/03/31/getting-your-rancher-api-keys/</link>
  156. <dc:creator><![CDATA[qtzar]]></dc:creator>
  157. <pubDate>Fri, 31 Mar 2017 12:30:00 +0000</pubDate>
  158. <category><![CDATA[Domino To Spring]]></category>
  159. <category><![CDATA[Rancher]]></category>
  160. <guid isPermaLink="false">http://www.qtzar.com/?p=1913</guid>
  161.  
  162. <description><![CDATA[Before we can start the process of automatically deploying our application to Rancher we need to setup the API access keys that will allow you to use the Rancher Command Line Interface and API. Load up Rancher and log in<span class="ellipsis">&#8230;</span><div class="read-more"><a href="https://qtzar.com/2017/03/31/getting-your-rancher-api-keys/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
  163. <content:encoded><![CDATA[<p>Before we can start the process of automatically deploying our application to Rancher we need to setup the API access keys that will allow you to use the Rancher Command Line Interface and API.</p>
  164. <p>Load up Rancher and log in as your administrator account and make sure that you are in the correct environment ( you will need to do this process in each environment that you will be deploying to ) and then go to the API menu.</p>
  165. <p>There are two kinds of API keys in Rancher. There are Account Keys and Environment Keys. The environment api keys are under the advanced settings and you will need to click on that to expand the section. You should also take a note of the API Endpoint URL as you will need this later.</p>
  166. <p><img loading="lazy" data-attachment-id="1914" data-permalink="https://qtzar.com/2017/03/31/getting-your-rancher-api-keys/2017-03-19_13-44-35/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png" data-orig-size="1092,369" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-03-19_13-44-35" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png?w=605" class="alignnone size-full wp-image-1914" src="https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png?w=605" alt="2017-03-19_13-44-35"   srcset="https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png 1092w, https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png?w=150&amp;h=51 150w, https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png?w=300&amp;h=101 300w, https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png?w=768&amp;h=260 768w, https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png?w=1024&amp;h=346 1024w" sizes="(max-width: 1092px) 100vw, 1092px" /></p>
  167. <p>Click on the &#8216;Add Environment API Key&#8217; button and give your new key a name. I&#8217;ve called mine VSTS Access. Then click on the Create button.</p>
  168. <p><img loading="lazy" data-attachment-id="1915" data-permalink="https://qtzar.com/2017/03/31/getting-your-rancher-api-keys/2017-03-19_13-48-25/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-48-25.png" data-orig-size="956,244" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-03-19_13-48-25" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-48-25.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-48-25.png?w=605" class="alignnone size-full wp-image-1915" src="https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-48-25.png?w=605" alt="2017-03-19_13-48-25"   srcset="https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-48-25.png 956w, https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-48-25.png?w=150&amp;h=38 150w, https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-48-25.png?w=300&amp;h=77 300w, https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-48-25.png?w=768&amp;h=196 768w" sizes="(max-width: 956px) 100vw, 956px" /></p>
  169. <p>The new API key will be displayed, it consists of two parts, the access key and the secret key. As noted this is the ONLY time the secret key will ever be displayed so you must take a note of it.</p>
  170. <p>Make sure you do this for all your deployment environments and keep a note of the keys and endpoint urls ( they change per environment also )</p>
  171. ]]></content:encoded>
  172. <media:content url="https://2.gravatar.com/avatar/e44532b2f22707be76d0901ce36d8b0168b4d480a6dc063d2e2a96591fb76e4b?s=96&#38;d=identicon&#38;r=G" medium="image">
  173. <media:title type="html">qtzar</media:title>
  174. </media:content>
  175.  
  176. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png" medium="image">
  177. <media:title type="html">2017-03-19_13-44-35</media:title>
  178. </media:content>
  179.  
  180. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-48-25.png" medium="image">
  181. <media:title type="html">2017-03-19_13-48-25</media:title>
  182. </media:content>
  183. </item>
  184. <item>
  185. <title>Defining Your VSTS Build</title>
  186. <link>https://qtzar.com/2017/03/30/defining-your-vsts-build/</link>
  187. <dc:creator><![CDATA[qtzar]]></dc:creator>
  188. <pubDate>Thu, 30 Mar 2017 12:30:00 +0000</pubDate>
  189. <category><![CDATA[Domino To Spring]]></category>
  190. <category><![CDATA[Maven]]></category>
  191. <category><![CDATA[VSTS]]></category>
  192. <guid isPermaLink="false">http://www.qtzar.com/?p=1897</guid>
  193.  
  194. <description><![CDATA[The build definition in VSTS is designed to build and compile your code and then take the resulting build and save them to an artifact store. You can create build definitions for Visual Studio applications, XCode applications, Android applications and, of course,<span class="ellipsis">&#8230;</span><div class="read-more"><a href="https://qtzar.com/2017/03/30/defining-your-vsts-build/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
  195. <content:encoded><![CDATA[<p>The build definition in VSTS is designed to build and compile your code and then take the resulting build and save them to an artifact store. You can create build definitions for Visual Studio applications, XCode applications, Android applications and, of course, Java applications. In VSTS go to the Build &amp; Release section of your project and then make sure you are on the Builds tab. Click on the New Definition button to get started.</p>
  196. <p><img loading="lazy" data-attachment-id="1898" data-permalink="https://qtzar.com/2017/03/30/defining-your-vsts-build/2017-02-27_08-14-38/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-14-38.png" data-orig-size="736,355" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-27_08-14-38" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-14-38.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-14-38.png?w=605" class="alignnone wp-image-1898 size-full" src="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-14-38.png?w=605"   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-14-38.png 736w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-14-38.png?w=150&amp;h=72 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-14-38.png?w=300&amp;h=145 300w" sizes="(max-width: 736px) 100vw, 736px" /></p>
  197. <p>You should see a list of predefined build templates, the one that we are interested in is the Maven template so I&#8217;m going to go ahead and select that one as my starting point. The default Maven template should pretty much work as is but I&#8217;m going to make a few minor changes so that it will always build on our new VSTS Build Agent.</p>
  198. <p>First lets make sure that we are building the right thing. On the Tasks tab you should see what sources it is building. It should say the name of your repository and the master branch. If not then select the correct branch.</p>
  199. <p><img loading="lazy" data-attachment-id="1899" data-permalink="https://qtzar.com/2017/03/30/defining-your-vsts-build/2017-02-27_08-33-20/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png" data-orig-size="1206,443" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-27_08-33-20" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png?w=605" class="alignnone wp-image-1899 size-full" src="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png?w=605"   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png 1206w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png?w=150&amp;h=55 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png?w=300&amp;h=110 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png?w=768&amp;h=282 768w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png?w=1024&amp;h=376 1024w" sizes="(max-width: 1206px) 100vw, 1206px" /></p>
  200. <p>Over on the Triggers tab you should enable the Continuous Integration section. This will make sure that a build is triggered every time new code is pushed to the master branch. You can also setup scheduled builds so if you have some sort of nightly build process you can automate that here.</p>
  201. <p><img loading="lazy" data-attachment-id="1900" data-permalink="https://qtzar.com/2017/03/30/defining-your-vsts-build/2017-02-27_08-38-04/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-38-04.png" data-orig-size="991,432" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-27_08-38-04" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-38-04.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-38-04.png?w=605" class="alignnone wp-image-1900 size-full" src="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-38-04.png?w=605"   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-38-04.png 991w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-38-04.png?w=150&amp;h=65 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-38-04.png?w=300&amp;h=131 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-38-04.png?w=768&amp;h=335 768w" sizes="(max-width: 991px) 100vw, 991px" /></p>
  202. <p>The Options tab contains the section that we need to specify the build agent. When we started the VSTS Build Agent it was created in the &#8216;Default&#8217; agent queue so make sure you have selected that as your queue and you have not selected either of the hosted options.</p>
  203. <p>If you have multiple private build agents and not all of them are based on the Rancher VSTS Build Agent then you will need to add a &#8216;Demand&#8217;. When the build is queued it will look for a build agent that meets all the required demands, this is how you can make sure that Visual Studio builds run on windows boxes and XCode builds run on OS X boxes.</p>
  204. <p>The Rancher VSTS Build Agent sets an environment variable of RANCHER_CLI_VERSION so I&#8217;m adding a demand to ensure that this exists. I&#8217;m not using any specific Rancher features during the build process but I know that the agent has Maven on it so it is a logical choice to use that agent.</p>
  205. <p><img loading="lazy" data-attachment-id="1901" data-permalink="https://qtzar.com/2017/03/30/defining-your-vsts-build/2017-02-27_08-43-00/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-43-00.png" data-orig-size="798,551" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-27_08-43-00" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-43-00.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-43-00.png?w=605" class="alignnone wp-image-1901 size-full" src="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-43-00.png?w=605"   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-43-00.png 798w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-43-00.png?w=150&amp;h=104 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-43-00.png?w=300&amp;h=207 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-43-00.png?w=768&amp;h=530 768w" sizes="(max-width: 798px) 100vw, 798px" /></p>
  206. <p>I can now save my build definition and run it for the first time. The build process will start on the different stages and your screen will update as each stage completes ( or fails ). Once completed you can select any of the stages on the left side to review the logs for that stage.</p>
  207. <p><img loading="lazy" data-attachment-id="1902" data-permalink="https://qtzar.com/2017/03/30/defining-your-vsts-build/2017-02-27_08-50-05/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-50-05.png" data-orig-size="954,377" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-27_08-50-05" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-50-05.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-50-05.png?w=605" class="alignnone size-full wp-image-1902" src="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-50-05.png?w=605" alt="2017-02-27_08-50-05"   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-50-05.png 954w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-50-05.png?w=150&amp;h=59 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-50-05.png?w=300&amp;h=119 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-50-05.png?w=768&amp;h=303 768w" sizes="(max-width: 954px) 100vw, 954px" /></p>
  208. <p>Now that we have a successful build we can start the process of deployment.</p>
  209. ]]></content:encoded>
  210. <media:content url="https://2.gravatar.com/avatar/e44532b2f22707be76d0901ce36d8b0168b4d480a6dc063d2e2a96591fb76e4b?s=96&#38;d=identicon&#38;r=G" medium="image">
  211. <media:title type="html">qtzar</media:title>
  212. </media:content>
  213.  
  214. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-14-38.png" medium="image" />
  215.  
  216. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png" medium="image" />
  217.  
  218. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-38-04.png" medium="image" />
  219.  
  220. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-43-00.png" medium="image" />
  221.  
  222. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-50-05.png" medium="image">
  223. <media:title type="html">2017-02-27_08-50-05</media:title>
  224. </media:content>
  225. </item>
  226. <item>
  227. <title>A VSTS Build Agent For Rancher</title>
  228. <link>https://qtzar.com/2017/03/29/a-vsts-build-agent-for-rancher/</link>
  229. <dc:creator><![CDATA[qtzar]]></dc:creator>
  230. <pubDate>Wed, 29 Mar 2017 12:30:00 +0000</pubDate>
  231. <category><![CDATA[Domino To Spring]]></category>
  232. <category><![CDATA[Rancher]]></category>
  233. <category><![CDATA[VSTS]]></category>
  234. <guid isPermaLink="false">http://www.qtzar.com/?p=1885</guid>
  235.  
  236. <description><![CDATA[By default Visual Studio Team Services provides you with one hosted pipeline and one private pipeline when you are using the free services. You can add additional pipelines at a cost of $15 a month if you need them however<span class="ellipsis">&#8230;</span><div class="read-more"><a href="https://qtzar.com/2017/03/29/a-vsts-build-agent-for-rancher/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
  237. <content:encoded><![CDATA[<p>By default Visual Studio Team Services provides you with one hosted pipeline and one private pipeline when you are using the free services. You can add additional pipelines at a cost of $15 a month if you need them however a single pipeline should work ok for a small team.</p>
  238. <p>The private pipeline is something that you run on your own infrastructure and Microsoft provides pipeline agents that will run on <a href="https://www.visualstudio.com/en-us/docs/build/actions/agents/v2-windows">Windows</a>, <a href="https://www.visualstudio.com/en-us/docs/build/actions/agents/v2-osx">OS X</a> and <a href="https://www.visualstudio.com/en-us/docs/build/actions/agents/v2-linux">Linux</a> machines. These agents will listen to your VSTS account and accept jobs for running build and releases. For the purposes of the Rancher/Docker infrastructure I am running a private build agent on a Ubuntu Linux box with some additional Rancher API access features added in and I&#8217;m also running it on my Rancher Infrastructure.</p>
  239. <p>First we need to add a stack to run our service in. In the development environment click the Add Stack button. I&#8217;m going to called mine &#8216;tools&#8217; and then just create an empty stack.</p>
  240. <p><img loading="lazy" data-attachment-id="1886" data-permalink="https://qtzar.com/2017/03/29/a-vsts-build-agent-for-rancher/2017-02-26_14-58-55/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_14-58-55.png" data-orig-size="590,160" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-26_14-58-55" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_14-58-55.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_14-58-55.png?w=590" class="alignnone size-full wp-image-1886" src="https://qtzar.files.wordpress.com/2017/03/2017-02-26_14-58-55.png?w=605" alt="2017-02-26_14-58-55"   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-26_14-58-55.png 590w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_14-58-55.png?w=150&amp;h=41 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_14-58-55.png?w=300&amp;h=81 300w" sizes="(max-width: 590px) 100vw, 590px" /></p>
  241. <p>Next I click on the &#8216;Add Service&#8217; button.</p>
  242. <p><img loading="lazy" data-attachment-id="1887" data-permalink="https://qtzar.com/2017/03/29/a-vsts-build-agent-for-rancher/2017-02-26_15-01-22/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-01-22.png" data-orig-size="962,171" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-26_15-01-22" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-01-22.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-01-22.png?w=605" class="alignnone size-full wp-image-1887" src="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-01-22.png?w=605" alt=""   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-01-22.png 962w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-01-22.png?w=150&amp;h=27 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-01-22.png?w=300&amp;h=53 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-01-22.png?w=768&amp;h=137 768w" sizes="(max-width: 962px) 100vw, 962px" /></p>
  243. <p>To save a some time Microsoft already provides their <a href="https://hub.docker.com/r/microsoft/vsts-agent/">Ubuntu VSTS Agent</a> as a docker image so you can easily use this as your starting image. To save even more time, however, I have built my own personal docker image that is based on the Microsoft image and adds in the Rancher Command Line Interface and an addition Rancher API script that can do a few things that the Rancher CLI currently can&#8217;t do.</p>
  244. <p>If you want to look at the DockerFile it is available in my <a href="https://github.com/qtzar/vsts-agent-rancher/blob/master/Dockerfile">GitHub repository</a> and the image is available on <a href="https://hub.docker.com/r/qtzar/vsts-agent-rancher/">Docker Hub</a>.</p>
  245. <p><img loading="lazy" data-attachment-id="1888" data-permalink="https://qtzar.com/2017/03/29/a-vsts-build-agent-for-rancher/2017-02-26_15-05-49/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-05-49.png" data-orig-size="555,117" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-26_15-05-49" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-05-49.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-05-49.png?w=555" class="alignnone size-full wp-image-1888" src="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-05-49.png?w=605" alt=""   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-05-49.png 555w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-05-49.png?w=150&amp;h=32 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-05-49.png?w=300&amp;h=63 300w" sizes="(max-width: 555px) 100vw, 555px" /></p>
  246. <p>Don&#8217;t forget to add your VSTS Environment variables to the container before you start it up or it will fail.</p>
  247. <p><img loading="lazy" data-attachment-id="1889" data-permalink="https://qtzar.com/2017/03/29/a-vsts-build-agent-for-rancher/2017-02-26_15-10-05/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png" data-orig-size="1299,189" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-26_15-10-05" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png?w=605" class="alignnone size-full wp-image-1889" src="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png?w=605" alt=""   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png 1299w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png?w=150&amp;h=22 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png?w=300&amp;h=44 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png?w=768&amp;h=112 768w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png?w=1024&amp;h=149 1024w" sizes="(max-width: 1299px) 100vw, 1299px" /></p>
  248. <p>Once you have it running you will see it listed in the tools stack</p>
  249. <p><img loading="lazy" data-attachment-id="1890" data-permalink="https://qtzar.com/2017/03/29/a-vsts-build-agent-for-rancher/2017-02-26_15-13-55/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-13-55.png" data-orig-size="552,145" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-26_15-13-55" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-13-55.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-13-55.png?w=552" class="alignnone size-full wp-image-1890" src="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-13-55.png?w=605" alt=""   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-13-55.png 552w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-13-55.png?w=150&amp;h=39 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-13-55.png?w=300&amp;h=79 300w" sizes="(max-width: 552px) 100vw, 552px" /></p>
  250. <p>Now we can start getting VSTS to build our application on our private pipeline box.</p>
  251. ]]></content:encoded>
  252. <media:content url="https://2.gravatar.com/avatar/e44532b2f22707be76d0901ce36d8b0168b4d480a6dc063d2e2a96591fb76e4b?s=96&#38;d=identicon&#38;r=G" medium="image">
  253. <media:title type="html">qtzar</media:title>
  254. </media:content>
  255.  
  256. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-26_14-58-55.png" medium="image">
  257. <media:title type="html">2017-02-26_14-58-55</media:title>
  258. </media:content>
  259.  
  260. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-01-22.png" medium="image" />
  261.  
  262. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-05-49.png" medium="image" />
  263.  
  264. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png" medium="image" />
  265.  
  266. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-13-55.png" medium="image" />
  267. </item>
  268. <item>
  269. <title>Extending Your Rancher Environments</title>
  270. <link>https://qtzar.com/2017/03/28/extending-your-rancher-environments/</link>
  271. <dc:creator><![CDATA[qtzar]]></dc:creator>
  272. <pubDate>Tue, 28 Mar 2017 12:30:00 +0000</pubDate>
  273. <category><![CDATA[Domino To Spring]]></category>
  274. <category><![CDATA[Rancher]]></category>
  275. <guid isPermaLink="false">http://www.qtzar.com/?p=1875</guid>
  276.  
  277. <description><![CDATA[In the last post we setup the Rancher server and added our first Rancher Host. One of the nice features of Rancher is that you can setup multiple environments so that you can keep your Development testing system separate from<span class="ellipsis">&#8230;</span><div class="read-more"><a href="https://qtzar.com/2017/03/28/extending-your-rancher-environments/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
  278. <content:encoded><![CDATA[<p>In the last post we setup the Rancher server and added our first Rancher Host. One of the nice features of Rancher is that you can setup multiple environments so that you can keep your Development testing system separate from your QA system and separate from the Production system yet keep a single Rancher server orchestrating it all.</p>
  279. <p>Click on the &#8216;Environment&#8217; tab and select the option to &#8216;Manage Environments&#8217;</p>
  280. <p><img loading="lazy" data-attachment-id="1880" data-permalink="https://qtzar.com/2017/03/28/extending-your-rancher-environments/2017-02-26_12-36-58/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-36-58.png" data-orig-size="353,217" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-26_12-36-58" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-36-58.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-36-58.png?w=353" class="alignnone size-full wp-image-1880" src="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-36-58.png?w=605" alt="2017-02-26_12-36-58"   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-36-58.png 353w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-36-58.png?w=150&amp;h=92 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-36-58.png?w=300&amp;h=184 300w" sizes="(max-width: 353px) 100vw, 353px" /></p>
  281. <p>The first thing I&#8217;m going to do is rename the Default environment to Development by clicking on the &#8216;Edit&#8217; button.</p>
  282. <p><img loading="lazy" data-attachment-id="1881" data-permalink="https://qtzar.com/2017/03/28/extending-your-rancher-environments/2017-02-26_12-38-49/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-38-49.png" data-orig-size="1016,140" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-26_12-38-49" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-38-49.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-38-49.png?w=605" class="alignnone size-full wp-image-1881" src="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-38-49.png?w=605" alt="2017-02-26_12-38-49"   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-38-49.png 1016w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-38-49.png?w=150&amp;h=21 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-38-49.png?w=300&amp;h=41 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-38-49.png?w=768&amp;h=106 768w" sizes="(max-width: 1016px) 100vw, 1016px" /></p>
  283. <p>I will then click on the &#8216;Add Environment&#8217; Button to create my new environments. I&#8217;ll called One Testing and the other Production. In both cases I will leave the Orchestration Type set as Cattle but as you can see Rancher can also manage other types of Orchestration systems making it very powerful.</p>
  284. <p><img loading="lazy" data-attachment-id="1882" data-permalink="https://qtzar.com/2017/03/28/extending-your-rancher-environments/2017-02-26_12-40-40/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-40-40.png" data-orig-size="659,157" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-26_12-40-40" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-40-40.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-40-40.png?w=605" class="alignnone size-full wp-image-1882" src="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-40-40.png?w=605" alt=""   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-40-40.png 659w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-40-40.png?w=150&amp;h=36 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-40-40.png?w=300&amp;h=71 300w" sizes="(max-width: 659px) 100vw, 659px" /></p>
  285. <p>Once the new environments are created you will notice that they are listed as unhealthy. This is because there are no hosts assigned to those environments yet.</p>
  286. <p><img loading="lazy" data-attachment-id="1883" data-permalink="https://qtzar.com/2017/03/28/extending-your-rancher-environments/2017-02-26_12-42-55/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-42-55.png" data-orig-size="465,218" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-26_12-42-55" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-42-55.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-42-55.png?w=465" class="alignnone size-full wp-image-1883" src="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-42-55.png?w=605" alt=""   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-42-55.png 465w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-42-55.png?w=150&amp;h=70 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-42-55.png?w=300&amp;h=141 300w" sizes="(max-width: 465px) 100vw, 465px" /></p>
  287. <p>Select one of your new environments and then add a new host just like you did for the first host. Once you have added a host for all your environments they should all say active.</p>
  288. <p><img loading="lazy" data-attachment-id="1893" data-permalink="https://qtzar.com/2017/03/28/extending-your-rancher-environments/2017-02-27_08-09-22/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-09-22.png" data-orig-size="482,222" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-27_08-09-22" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-09-22.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-09-22.png?w=482" class="alignnone size-full wp-image-1893" src="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-09-22.png?w=605" alt=""   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-09-22.png 482w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-09-22.png?w=150&amp;h=69 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-09-22.png?w=300&amp;h=138 300w" sizes="(max-width: 482px) 100vw, 482px" /></p>
  289. <p>In a real production environment you would probably have multiple hosts per environment depending on your needs for scaling and backup. When you have multiple hosts in a single environment Rancher can look after scaling apps so that you have the same container running on multiple hosts and can also start a container running on a different host if one of the other hosts is down.</p>
  290. ]]></content:encoded>
  291. <media:content url="https://2.gravatar.com/avatar/e44532b2f22707be76d0901ce36d8b0168b4d480a6dc063d2e2a96591fb76e4b?s=96&#38;d=identicon&#38;r=G" medium="image">
  292. <media:title type="html">qtzar</media:title>
  293. </media:content>
  294.  
  295. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-36-58.png" medium="image">
  296. <media:title type="html">2017-02-26_12-36-58</media:title>
  297. </media:content>
  298.  
  299. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-38-49.png" medium="image">
  300. <media:title type="html">2017-02-26_12-38-49</media:title>
  301. </media:content>
  302.  
  303. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-40-40.png" medium="image" />
  304.  
  305. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-42-55.png" medium="image" />
  306.  
  307. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-09-22.png" medium="image" />
  308. </item>
  309. <item>
  310. <title>Setting Up Your Rancher Infrastructure</title>
  311. <link>https://qtzar.com/2017/03/27/setting-up-your-rancher-infrastructure/</link>
  312. <dc:creator><![CDATA[qtzar]]></dc:creator>
  313. <pubDate>Mon, 27 Mar 2017 12:30:00 +0000</pubDate>
  314. <category><![CDATA[Domino To Spring]]></category>
  315. <category><![CDATA[Docker]]></category>
  316. <category><![CDATA[Rancher]]></category>
  317. <category><![CDATA[RancherOS]]></category>
  318. <category><![CDATA[Ubuntu]]></category>
  319. <guid isPermaLink="false">http://www.qtzar.com/?p=1873</guid>
  320.  
  321. <description><![CDATA[Before we can build and deploy our application we will need to first setup the infrastructure. I&#8217;ve decided that I&#8217;m going to be using Docker as the container service and Rancher as the orchestration layer. This blog post is just<span class="ellipsis">&#8230;</span><div class="read-more"><a href="https://qtzar.com/2017/03/27/setting-up-your-rancher-infrastructure/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
  322. <content:encoded><![CDATA[<p>Before we can build and deploy our application we will need to first setup the infrastructure. I&#8217;ve decided that I&#8217;m going to be using <a href="https://www.docker.com/">Docker</a> as the container service and <a href="http://rancher.com/rancher/">Rancher</a> as the orchestration layer. This blog post is just a quick overview of how to create a basic demo Docker/Rancher infrastructure. If you are considering using Docker/Rancher for production that I would highly encourage you to do plenty of additional research beyond this posting before setting anything up.</p>
  323. <p>For the demo I&#8217;ve decided that I&#8217;m going to keep things simple and use a number of VMs running on my host machine to simulate a tiny production environment.  I have setup 4 VMs with 4Gb Ram each and all running <a href="http://rancher.com/rancher-os/">RancherOS</a>. <strong>RancherOS is not needed to run Rancher</strong>, Rancher can run on any host that can run Docker. I&#8217;m just using it for my demo to make it easier as the RancherOS already has Docker all setup for you.</p>
  324. <p>The first of my virtual machines will be dedicated to be the Rancher Server. Setting up the rancher server is as simple as running a quick docker command to start the rancher server container.</p>
  325. <p><code>docker run -d --restart=unless-stopped -p 8080:8080 rancher/server<br />
  326. </code></p>
  327. <p>This will start the download of the rancher server container and start it up. This is the most basic of commands and will setup a simple rancher server with a built in MySQL server. For production you should use an external MySQL server and also setup SSL.</p>
  328. <p>Once the Rancher Server is up and running you should be able to access it in your web browser and access the VMs IP address on port 8080. You will notice that you were not asked to log in. By default Rancher comes with security turned off. In a production environment you should turn it on. A indicator on the admin dropdown will remind you that security is disabled.</p>
  329. <p><img loading="lazy" data-attachment-id="1876" data-permalink="https://qtzar.com/2017/03/27/setting-up-your-rancher-infrastructure/2017-02-26_12-17-12/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-17-12.png" data-orig-size="1014,279" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-26_12-17-12" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-17-12.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-17-12.png?w=605" class="alignnone size-full wp-image-1876" src="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-17-12.png?w=605" alt="2017-02-26_12-17-12"   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-17-12.png 1014w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-17-12.png?w=150&amp;h=41 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-17-12.png?w=300&amp;h=83 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-17-12.png?w=768&amp;h=211 768w" sizes="(max-width: 1014px) 100vw, 1014px" /></p>
  330. <p>Before we can deploy any containers we need to add our first Rancher Host. Typically this is another machine that is running docker, however you can setup your Rancher Server to also be a host if you want but not really recommended for production. I have a second VM that I will run a host on.  After clicking on the Add A Host link you will be brought to a screen to add your first host. I&#8217;m using the Custom Host which is basically any machine running Docker but you may also notice that they have hooks in to Azure, Amazon and other cloud providers to make it easy to create VMs on those systems.</p>
  331. <p><img loading="lazy" data-attachment-id="1877" data-permalink="https://qtzar.com/2017/03/27/setting-up-your-rancher-infrastructure/2017-02-26_12-25-52/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png" data-orig-size="1051,125" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-26_12-25-52" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png?w=605" class="alignnone size-full wp-image-1877" src="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png?w=605" alt="2017-02-26_12-25-52"   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png 1051w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png?w=150&amp;h=18 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png?w=300&amp;h=36 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png?w=768&amp;h=91 768w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png?w=1024&amp;h=122 1024w" sizes="(max-width: 1051px) 100vw, 1051px" /></p>
  332. <p>Run the supplied command to start a Rancher Agent on your selected host machine and then go to the Infrastructure/Hosts tab. After a few minutes your new host will appear and start configuring itself.</p>
  333. <p><img loading="lazy" data-attachment-id="1878" data-permalink="https://qtzar.com/2017/03/27/setting-up-your-rancher-infrastructure/2017-02-26_12-29-43/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-29-43.png" data-orig-size="483,418" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-26_12-29-43" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-29-43.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-29-43.png?w=483" class="alignnone size-full wp-image-1878" src="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-29-43.png?w=605" alt="2017-02-26_12-29-43"   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-29-43.png 483w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-29-43.png?w=150&amp;h=130 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-29-43.png?w=300&amp;h=260 300w" sizes="(max-width: 483px) 100vw, 483px" /></p>
  334. <p>Congratulations, you now have your first Rancher Host and you can start deploying docker containers. In the next post I will extend my rancher system to provide separate environments for Testing and Production.</p>
  335. ]]></content:encoded>
  336. <media:content url="https://2.gravatar.com/avatar/e44532b2f22707be76d0901ce36d8b0168b4d480a6dc063d2e2a96591fb76e4b?s=96&#38;d=identicon&#38;r=G" medium="image">
  337. <media:title type="html">qtzar</media:title>
  338. </media:content>
  339.  
  340. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-17-12.png" medium="image">
  341. <media:title type="html">2017-02-26_12-17-12</media:title>
  342. </media:content>
  343.  
  344. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png" medium="image">
  345. <media:title type="html">2017-02-26_12-25-52</media:title>
  346. </media:content>
  347.  
  348. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-29-43.png" medium="image">
  349. <media:title type="html">2017-02-26_12-29-43</media:title>
  350. </media:content>
  351. </item>
  352. <item>
  353. <title>AJAX and ThymeLeaf For Modal Dialogs</title>
  354. <link>https://qtzar.com/2017/03/24/ajax-and-thymeleaf-for-modal-dialogs/</link>
  355. <dc:creator><![CDATA[qtzar]]></dc:creator>
  356. <pubDate>Fri, 24 Mar 2017 12:30:00 +0000</pubDate>
  357. <category><![CDATA[Domino To Spring]]></category>
  358. <category><![CDATA[Bootstrap]]></category>
  359. <category><![CDATA[Spring MVC]]></category>
  360. <category><![CDATA[ThymeLeaf]]></category>
  361. <guid isPermaLink="false">http://www.qtzar.com/?p=1866</guid>
  362.  
  363. <description><![CDATA[The final part of the basic phonebook application is being able to click on a person and see details about them. For this part I&#8217;ve decided for now not to open a new page but to open the persons details in<span class="ellipsis">&#8230;</span><div class="read-more"><a href="https://qtzar.com/2017/03/24/ajax-and-thymeleaf-for-modal-dialogs/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
  364. <content:encoded><![CDATA[<p>The final part of the basic phonebook application is being able to click on a person and see details about them. For this part I&#8217;ve decided for now not to open a new page but to open the persons details in a modal dialog box on the current screen just so I can demo how to do ajax calls using Spring and Thymeleaf.</p>
  365. <p>First of all I need a PersonController which will populate the modelmap with the selected persons attributes and then return a thymeleaf page.</p>
  366. <p><img loading="lazy" data-attachment-id="1868" data-permalink="https://qtzar.com/2017/03/24/ajax-and-thymeleaf-for-modal-dialogs/2017-02-25_15-42-00/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-42-00.png" data-orig-size="814,312" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-25_15-42-00" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-42-00.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-42-00.png?w=605" class="alignnone size-full wp-image-1868" src="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-42-00.png?w=605" alt="2017-02-25_15-42-00"   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-42-00.png 814w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-42-00.png?w=150&amp;h=57 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-42-00.png?w=300&amp;h=115 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-42-00.png?w=768&amp;h=294 768w" sizes="(max-width: 814px) 100vw, 814px" /></p>
  367. <p>This controller is very simple and very like all the other controllers it will respond on the /person/{Id} path and populate the modelmap with details of the selected person. I&#8217;m also adding in attributes for the person&#8217;s manager and their co-workers. The most important part however is the returned string at the end. In the other controllers I just returned a simple string that would match up to the thymeleaf html page that I wanted to render. This time, however, I have added a fragment name separated from the page name by a double colon. When this controller is called only a spamm portion of the modal/person.html page will be returned to the browser. Here is the corresponding fragment&#8230;</p>
  368. <p><img loading="lazy" data-attachment-id="1869" data-permalink="https://qtzar.com/2017/03/24/ajax-and-thymeleaf-for-modal-dialogs/2017-02-25_15-57-30/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-57-30.png" data-orig-size="721,250" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-25_15-57-30" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-57-30.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-57-30.png?w=605" class="alignnone size-full wp-image-1869" src="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-57-30.png?w=605" alt="2017-02-25_15-57-30"   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-57-30.png 721w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-57-30.png?w=150&amp;h=52 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-57-30.png?w=300&amp;h=104 300w" sizes="(max-width: 721px) 100vw, 721px" /></p>
  369. <p>To get the modal dialog to display I have added an onClick event to the table row which will run a function called openPersonModal and pass in that rows person id number.</p>
  370. <p><img loading="lazy" data-attachment-id="1870" data-permalink="https://qtzar.com/2017/03/24/ajax-and-thymeleaf-for-modal-dialogs/2017-02-25_15-59-11/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-59-11.png" data-orig-size="784,62" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-25_15-59-11" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-59-11.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-59-11.png?w=605" class="alignnone size-full wp-image-1870" src="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-59-11.png?w=605" alt="2017-02-25_15-59-11"   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-59-11.png 784w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-59-11.png?w=150&amp;h=12 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-59-11.png?w=300&amp;h=24 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-59-11.png?w=768&amp;h=61 768w" sizes="(max-width: 784px) 100vw, 784px" /></p>
  371. <p>The function called the Spring MVC controller and is returned just the fragment of html code from Thymeleaf. I then pop this in to an empty div called personModalHolder which I had also added to the page and then I call the bootstrap function to show the modal.</p>
  372. <p><img loading="lazy" data-attachment-id="1871" data-permalink="https://qtzar.com/2017/03/24/ajax-and-thymeleaf-for-modal-dialogs/2017-02-25_16-01-16/" data-orig-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_16-01-16.png" data-orig-size="367,164" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-25_16-01-16" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_16-01-16.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_16-01-16.png?w=367" class="alignnone size-full wp-image-1871" src="https://qtzar.files.wordpress.com/2017/03/2017-02-25_16-01-16.png?w=605" alt="2017-02-25_16-01-16"   srcset="https://qtzar.files.wordpress.com/2017/03/2017-02-25_16-01-16.png 367w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_16-01-16.png?w=150&amp;h=67 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_16-01-16.png?w=300&amp;h=134 300w" sizes="(max-width: 367px) 100vw, 367px" /></p>
  373. <p>At this stage we have a very simple, read only, phonebook using our auto generated test data. For the next few posts I&#8217;m going to take a break from writing code and I&#8217;m going to show how to create a pipeline in VSTS and Rancher and Docker to auto build and deploy our application. After that we will come back to the app to add some additional features to allow for editing and adding new people.</p>
  374. ]]></content:encoded>
  375. <media:content url="https://2.gravatar.com/avatar/e44532b2f22707be76d0901ce36d8b0168b4d480a6dc063d2e2a96591fb76e4b?s=96&#38;d=identicon&#38;r=G" medium="image">
  376. <media:title type="html">qtzar</media:title>
  377. </media:content>
  378.  
  379. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-42-00.png" medium="image">
  380. <media:title type="html">2017-02-25_15-42-00</media:title>
  381. </media:content>
  382.  
  383. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-57-30.png" medium="image">
  384. <media:title type="html">2017-02-25_15-57-30</media:title>
  385. </media:content>
  386.  
  387. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-59-11.png" medium="image">
  388. <media:title type="html">2017-02-25_15-59-11</media:title>
  389. </media:content>
  390.  
  391. <media:content url="https://qtzar.files.wordpress.com/2017/03/2017-02-25_16-01-16.png" medium="image">
  392. <media:title type="html">2017-02-25_16-01-16</media:title>
  393. </media:content>
  394. </item>
  395. <item>
  396. <title>Highlighting The Selected Area With Thymeleaf</title>
  397. <link>https://qtzar.com/2017/03/23/highlighting-the-selected-area-with-thymeleaf/</link>
  398. <dc:creator><![CDATA[qtzar]]></dc:creator>
  399. <pubDate>Thu, 23 Mar 2017 12:30:00 +0000</pubDate>
  400. <category><![CDATA[Domino To Spring]]></category>
  401. <category><![CDATA[ThymeLeaf]]></category>
  402. <guid isPermaLink="false">http://www.qtzar.com/?p=1861</guid>
  403.  
  404. <description><![CDATA[Now that I have pulled the side navigation menu out in to its own reusable code fragment I can now make a small adjustment to it to highlight the currently selected option in the navigator. In the Domino/XPage world this<span class="ellipsis">&#8230;</span><div class="read-more"><a href="https://qtzar.com/2017/03/23/highlighting-the-selected-area-with-thymeleaf/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
  405. <content:encoded><![CDATA[<p>Now that I have pulled the side navigation menu out in to its own reusable code fragment I can now make a small adjustment to it to highlight the currently selected option in the navigator. In the Domino/XPage world this would be the script that you write to add a css class to a menu item using the selected property.</p>
  406. <p>For the bootstrap based side navigator that I am using in this application you can add a background color to the side navigator by adding a css class of &#8216;active&#8217; to the list item tag. Currently our side navigator fragment looks as follows.</p>
  407. <p><img loading="lazy" data-attachment-id="1862" data-permalink="https://qtzar.com/2017/03/23/highlighting-the-selected-area-with-thymeleaf/2017-02-25_13-29-13/" data-orig-file="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-29-13.png" data-orig-size="567,232" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-25_13-29-13" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-29-13.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-29-13.png?w=567" class="alignnone size-full wp-image-1862" src="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-29-13.png?w=605" alt="2017-02-25_13-29-13"   srcset="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-29-13.png 567w, https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-29-13.png?w=150&amp;h=61 150w, https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-29-13.png?w=300&amp;h=123 300w" sizes="(max-width: 567px) 100vw, 567px" /></p>
  408. <p>The list item tags for both the home link and the location links do not have any class associated with them at this stage.</p>
  409. <p>Using Thymeleaf you can use a conditional expression to set the class. A conditional expression if pretty much like a simple If/Then/Else statement like <strong>th:class=&#8221;${row.even}? &#8216;even&#8217; : &#8216;odd'&#8221;</strong>, You can also use nest conditional expressions using parenthesis like <strong>th:class=&#8221;${row.even}? (${row.first}? &#8216;first&#8217; : &#8216;even&#8217;) : &#8216;odd'&#8221;</strong>. You can also leave out the else part if you want which is what I have done in my code.</p>
  410. <p><img loading="lazy" data-attachment-id="1863" data-permalink="https://qtzar.com/2017/03/23/highlighting-the-selected-area-with-thymeleaf/2017-02-25_13-47-15/" data-orig-file="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-47-15.png" data-orig-size="798,237" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-25_13-47-15" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-47-15.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-47-15.png?w=605" class="alignnone size-full wp-image-1863" src="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-47-15.png?w=605" alt="2017-02-25_13-47-15"   srcset="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-47-15.png 798w, https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-47-15.png?w=150&amp;h=45 150w, https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-47-15.png?w=300&amp;h=89 300w, https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-47-15.png?w=768&amp;h=228 768w" sizes="(max-width: 798px) 100vw, 798px" /></p>
  411. <p>To get this working correctly I had to add a new attribute to the model in both my home controller and my location controller called selectedLocation. It is manually set to &#8216;Home&#8217; in the home controller and it is programmatically set to the location name in the location controller.</p>
  412. <p><img loading="lazy" data-attachment-id="1864" data-permalink="https://qtzar.com/2017/03/23/highlighting-the-selected-area-with-thymeleaf/2017-02-25_13-56-54/" data-orig-file="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-56-54.png" data-orig-size="620,279" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2017-02-25_13-56-54" data-image-description="" data-image-caption="" data-medium-file="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-56-54.png?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-56-54.png?w=605" class="alignnone size-full wp-image-1864" src="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-56-54.png?w=605" alt="2017-02-25_13-56-54"   srcset="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-56-54.png 620w, https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-56-54.png?w=150&amp;h=68 150w, https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-56-54.png?w=300&amp;h=135 300w" sizes="(max-width: 620px) 100vw, 620px" /></p>
  413. <p>Now my phonebook correctly shows the currently selected area as highlighted in the side navigator.</p>
  414. ]]></content:encoded>
  415. <media:content url="https://2.gravatar.com/avatar/e44532b2f22707be76d0901ce36d8b0168b4d480a6dc063d2e2a96591fb76e4b?s=96&#38;d=identicon&#38;r=G" medium="image">
  416. <media:title type="html">qtzar</media:title>
  417. </media:content>
  418.  
  419. <media:content url="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-29-13.png" medium="image">
  420. <media:title type="html">2017-02-25_13-29-13</media:title>
  421. </media:content>
  422.  
  423. <media:content url="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-47-15.png" medium="image">
  424. <media:title type="html">2017-02-25_13-47-15</media:title>
  425. </media:content>
  426.  
  427. <media:content url="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-56-54.png" medium="image">
  428. <media:title type="html">2017-02-25_13-56-54</media:title>
  429. </media:content>
  430. </item>
  431. </channel>
  432. </rss>
  433.  

If you would like to create a banner that links to this page (i.e. this validation result), do the following:

  1. Download the "valid RSS" banner.

  2. Upload the image to your own server. (This step is important. Please do not link directly to the image on this server.)

  3. Add this HTML to your page (change the image src attribute if necessary):

If you would like to create a text link instead, here is the URL you can use:

http://www.feedvalidator.org/check.cgi?url=http%3A//www.qtzar.com/feed/

Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda