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:25:37 +0000</lastBuildDate>
  17. <language>en</language>
  18. <sy:updatePeriod>hourly</sy:updatePeriod>
  19. <sy:updateFrequency>1</sy:updateFrequency>
  20. <generator>http://wordpress.com/</generator>
  21. <cloud domain='qtzar.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
  22. <image>
  23. <url>https://s2.wp.com/i/buttonw-com.png</url>
  24. <title>Dec&#039;s Dom Blog</title>
  25. <link>https://qtzar.com</link>
  26. </image>
  27. <atom:link rel="search" type="application/opensearchdescription+xml" href="https://qtzar.com/osd.xml" title="Dec&#039;s Dom Blog" />
  28. <atom:link rel='hub' href='https://qtzar.com/?pushpress=hub'/>
  29. <item>
  30. <title>Building the Release Definition</title>
  31. <link>https://qtzar.com/2017/04/05/building-the-release-definition/</link>
  32. <pubDate>Wed, 05 Apr 2017 12:30:00 +0000</pubDate>
  33. <dc:creator><![CDATA[qtzar]]></dc:creator>
  34. <category><![CDATA[None]]></category>
  35.  
  36. <guid isPermaLink="false">http://www.qtzar.com/?p=1928</guid>
  37. <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 --><img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1928&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
  38. <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>
  39. <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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-49-03.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-49-03.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-49-03.png?w=150 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-49-03.png?w=300 300w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-49-03.png?w=768 768w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-49-03.png 984w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  40. <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>
  41. <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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-03-53.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-03-53.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-03-53.png?w=150 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-03-53.png?w=300 300w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-03-53.png?w=768 768w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-03-53.png 950w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  42. <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>
  43. <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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png?w=150 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png?w=300 300w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png?w=768 768w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png?w=1024 1024w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png 1073w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  44. <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>
  45. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png?w=150 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png?w=300 300w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png?w=768 768w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png?w=1024 1024w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png 1103w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  46. <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>
  47. <p>All that is left now is to add the deployment script which I&#8217;ll do in the next post.</p><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qtzar.wordpress.com/1928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qtzar.wordpress.com/1928/" /></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1928&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
  48. <media:content url="http://1.gravatar.com/avatar/126d36c5b458c9b16c7ed76d4f00d40b?s=96&#38;d=identicon&#38;r=G" medium="image">
  49. <media:title type="html">qtzar</media:title>
  50. </media:content>
  51.  
  52. <media:content url="http://qtzar.files.wordpress.com/2017/04/2017-03-19_14-49-03.png" medium="image">
  53. <media:title type="html">2017-03-19_14-49-03</media:title>
  54. </media:content>
  55.  
  56. <media:content url="http://qtzar.files.wordpress.com/2017/04/2017-03-19_15-03-53.png" medium="image">
  57. <media:title type="html">2017-03-19_15-03-53</media:title>
  58. </media:content>
  59.  
  60. <media:content url="http://qtzar.files.wordpress.com/2017/04/2017-03-19_15-28-53.png" medium="image">
  61. <media:title type="html">2017-03-19_15-28-53</media:title>
  62. </media:content>
  63.  
  64. <media:content url="http://qtzar.files.wordpress.com/2017/04/2017-03-19_15-41-14.png" medium="image">
  65. <media:title type="html">2017-03-19_15-41-14</media:title>
  66. </media:content>
  67. </item>
  68. <item>
  69. <title>Creating A Dummy Service In Rancher</title>
  70. <link>https://qtzar.com/2017/04/04/creating-a-dummy-service-in-rancher/</link>
  71. <pubDate>Tue, 04 Apr 2017 12:30:00 +0000</pubDate>
  72. <dc:creator><![CDATA[qtzar]]></dc:creator>
  73. <category><![CDATA[Domino To Spring]]></category>
  74. <category><![CDATA[Rancher]]></category>
  75.  
  76. <guid isPermaLink="false">http://www.qtzar.com/?p=1922</guid>
  77. <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 --><img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1922&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
  78. <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>
  79. <p>In the Rancher interface create a new &#8216;Stack&#8217; for your applications. Stacks are a way to organize different applications together.</p>
  80. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-26-45.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-26-45.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-26-45.png?w=150 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-26-45.png?w=300 300w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-26-45.png?w=768 768w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-26-45.png 832w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  81. <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>
  82. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-29-36.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-29-36.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-29-36.png?w=150 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-29-36.png?w=300 300w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-29-36.png?w=768 768w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-29-36.png 980w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  83. <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>
  84. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-33-40.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-33-40.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-33-40.png?w=150 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-33-40.png?w=300 300w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-33-40.png?w=768 768w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-33-40.png 978w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  85. <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>
  86. <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>
  87. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-41-31.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-41-31.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-41-31.png?w=150 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-41-31.png?w=300 300w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-41-31.png 730w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  88. <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>
  89. <p>We are now ready to create the deployment definition in VSTS.</p><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qtzar.wordpress.com/1922/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qtzar.wordpress.com/1922/" /></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1922&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
  90. <media:content url="http://1.gravatar.com/avatar/126d36c5b458c9b16c7ed76d4f00d40b?s=96&#38;d=identicon&#38;r=G" medium="image">
  91. <media:title type="html">qtzar</media:title>
  92. </media:content>
  93.  
  94. <media:content url="http://qtzar.files.wordpress.com/2017/04/2017-03-19_14-26-45.png" medium="image">
  95. <media:title type="html">2017-03-19_14-26-45</media:title>
  96. </media:content>
  97.  
  98. <media:content url="http://qtzar.files.wordpress.com/2017/04/2017-03-19_14-29-36.png" medium="image">
  99. <media:title type="html">2017-03-19_14-29-36</media:title>
  100. </media:content>
  101.  
  102. <media:content url="http://qtzar.files.wordpress.com/2017/04/2017-03-19_14-33-40.png" medium="image">
  103. <media:title type="html">2017-03-19_14-33-40</media:title>
  104. </media:content>
  105.  
  106. <media:content url="http://qtzar.files.wordpress.com/2017/04/2017-03-19_14-41-31.png" medium="image">
  107. <media:title type="html">2017-03-19_14-41-31</media:title>
  108. </media:content>
  109. </item>
  110. <item>
  111. <title>Adding A Dockerfile to the project</title>
  112. <link>https://qtzar.com/2017/04/03/adding-a-dockerfile-to-the-project/</link>
  113. <pubDate>Mon, 03 Apr 2017 12:30:00 +0000</pubDate>
  114. <dc:creator><![CDATA[qtzar]]></dc:creator>
  115. <category><![CDATA[Domino To Spring]]></category>
  116. <category><![CDATA[Docker]]></category>
  117.  
  118. <guid isPermaLink="false">http://www.qtzar.com/?p=1917</guid>
  119. <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 --><img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1917&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
  120. <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>
  121. <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>
  122. <p>First I will create a new folder in my project under src/main called &#8216;docker&#8217;.</p>
  123. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-04-05.png?w=605?w=266" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-04-05.png?w=605?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 150w" sizes="(max-width: 266px) 100vw, 266px"   /></p>
  124. <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>
  125. <p>In this file I will add what is probably the simplest Dockerfile instructions you have ever seen.</p>
  126. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-05-22_07-48-45.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-05-22_07-48-45.png?w=605?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 150w, https://qtzar.files.wordpress.com/2017/04/2017-05-22_07-48-45.png?w=300 300w" sizes="(max-width: 386px) 100vw, 386px"   /></p>
  127. <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>
  128. <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>
  129. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png?w=1210 1210w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png?w=150 150w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png?w=300 300w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png?w=768 768w, https://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png?w=1024 1024w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  130. <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>
  131. <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><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qtzar.wordpress.com/1917/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qtzar.wordpress.com/1917/" /></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1917&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
  132. <media:content url="http://1.gravatar.com/avatar/126d36c5b458c9b16c7ed76d4f00d40b?s=96&#38;d=identicon&#38;r=G" medium="image">
  133. <media:title type="html">qtzar</media:title>
  134. </media:content>
  135.  
  136. <media:content url="http://qtzar.files.wordpress.com/2017/04/2017-03-19_14-04-05.png" medium="image">
  137. <media:title type="html">2017-03-19_14-04-05</media:title>
  138. </media:content>
  139.  
  140. <media:content url="http://qtzar.files.wordpress.com/2017/04/2017-05-22_07-48-45.png" medium="image">
  141. <media:title type="html">2017-05-22_07-48-45</media:title>
  142. </media:content>
  143.  
  144. <media:content url="http://qtzar.files.wordpress.com/2017/04/2017-03-19_14-21-09.png" medium="image">
  145. <media:title type="html">2017-03-19_14-21-09</media:title>
  146. </media:content>
  147. </item>
  148. <item>
  149. <title>Getting Your Rancher API Keys</title>
  150. <link>https://qtzar.com/2017/03/31/getting-your-rancher-api-keys/</link>
  151. <pubDate>Fri, 31 Mar 2017 12:30:00 +0000</pubDate>
  152. <dc:creator><![CDATA[qtzar]]></dc:creator>
  153. <category><![CDATA[Domino To Spring]]></category>
  154. <category><![CDATA[Rancher]]></category>
  155.  
  156. <guid isPermaLink="false">http://www.qtzar.com/?p=1913</guid>
  157. <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 --><img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1913&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
  158. <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>
  159. <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>
  160. <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>
  161. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png?w=150 150w, https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png?w=300 300w, https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png?w=768 768w, https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png?w=1024 1024w, https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png 1092w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  162. <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>
  163. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-48-25.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-48-25.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-48-25.png?w=150 150w, https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-48-25.png?w=300 300w, https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-48-25.png?w=768 768w, https://qtzar.files.wordpress.com/2017/03/2017-03-19_13-48-25.png 956w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  164. <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>
  165. <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><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qtzar.wordpress.com/1913/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qtzar.wordpress.com/1913/" /></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1913&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
  166. <media:content url="http://1.gravatar.com/avatar/126d36c5b458c9b16c7ed76d4f00d40b?s=96&#38;d=identicon&#38;r=G" medium="image">
  167. <media:title type="html">qtzar</media:title>
  168. </media:content>
  169.  
  170. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-03-19_13-44-35.png" medium="image">
  171. <media:title type="html">2017-03-19_13-44-35</media:title>
  172. </media:content>
  173.  
  174. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-03-19_13-48-25.png" medium="image">
  175. <media:title type="html">2017-03-19_13-48-25</media:title>
  176. </media:content>
  177. </item>
  178. <item>
  179. <title>Defining Your VSTS Build</title>
  180. <link>https://qtzar.com/2017/03/30/defining-your-vsts-build/</link>
  181. <pubDate>Thu, 30 Mar 2017 12:30:00 +0000</pubDate>
  182. <dc:creator><![CDATA[qtzar]]></dc:creator>
  183. <category><![CDATA[Domino To Spring]]></category>
  184. <category><![CDATA[Maven]]></category>
  185. <category><![CDATA[VSTS]]></category>
  186.  
  187. <guid isPermaLink="false">http://www.qtzar.com/?p=1897</guid>
  188. <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 --><img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1897&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
  189. <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>
  190. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-14-38.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-14-38.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-14-38.png?w=150 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-14-38.png?w=300 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-14-38.png 736w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  191. <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>
  192. <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>
  193. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png?w=150 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png?w=300 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png?w=768 768w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png?w=1024 1024w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png 1206w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  194. <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>
  195. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-38-04.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-38-04.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-38-04.png?w=150 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-38-04.png?w=300 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-38-04.png?w=768 768w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-38-04.png 991w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  196. <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>
  197. <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>
  198. <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>
  199. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-43-00.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-43-00.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-43-00.png?w=150 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-43-00.png?w=300 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-43-00.png?w=768 768w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-43-00.png 798w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  200. <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>
  201. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-50-05.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-50-05.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-50-05.png?w=150 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-50-05.png?w=300 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-50-05.png?w=768 768w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-50-05.png 954w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  202. <p>Now that we have a successful build we can start the process of deployment.</p><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qtzar.wordpress.com/1897/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qtzar.wordpress.com/1897/" /></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1897&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
  203. <media:content url="http://1.gravatar.com/avatar/126d36c5b458c9b16c7ed76d4f00d40b?s=96&#38;d=identicon&#38;r=G" medium="image">
  204. <media:title type="html">qtzar</media:title>
  205. </media:content>
  206.  
  207. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-27_08-14-38.png" medium="image" />
  208.  
  209. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-27_08-33-20.png" medium="image" />
  210.  
  211. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-27_08-38-04.png" medium="image" />
  212.  
  213. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-27_08-43-00.png" medium="image" />
  214.  
  215. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-27_08-50-05.png" medium="image">
  216. <media:title type="html">2017-02-27_08-50-05</media:title>
  217. </media:content>
  218. </item>
  219. <item>
  220. <title>A VSTS Build Agent For Rancher</title>
  221. <link>https://qtzar.com/2017/03/29/a-vsts-build-agent-for-rancher/</link>
  222. <pubDate>Wed, 29 Mar 2017 12:30:00 +0000</pubDate>
  223. <dc:creator><![CDATA[qtzar]]></dc:creator>
  224. <category><![CDATA[Domino To Spring]]></category>
  225. <category><![CDATA[Rancher]]></category>
  226. <category><![CDATA[VSTS]]></category>
  227.  
  228. <guid isPermaLink="false">http://www.qtzar.com/?p=1885</guid>
  229. <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 --><img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1885&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
  230. <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>
  231. <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>
  232. <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>
  233. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_14-58-55.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_14-58-55.png?w=605?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 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_14-58-55.png?w=300 300w" sizes="(max-width: 590px) 100vw, 590px"   /></p>
  234. <p>Next I click on the &#8216;Add Service&#8217; button.</p>
  235. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-01-22.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-01-22.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-01-22.png?w=150 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-01-22.png?w=300 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-01-22.png?w=768 768w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-01-22.png 962w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  236. <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>
  237. <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>
  238. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-05-49.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-05-49.png?w=605?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 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-05-49.png?w=300 300w" sizes="(max-width: 555px) 100vw, 555px"   /></p>
  239. <p>Don&#8217;t forget to add your VSTS Environment variables to the container before you start it up or it will fail.</p>
  240. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png?w=1210 1210w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png?w=150 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png?w=300 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png?w=768 768w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png?w=1024 1024w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  241. <p>Once you have it running you will see it listed in the tools stack</p>
  242. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-13-55.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-13-55.png?w=605?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 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_15-13-55.png?w=300 300w" sizes="(max-width: 552px) 100vw, 552px"   /></p>
  243. <p>Now we can start getting VSTS to build our application on our private pipeline box.</p><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qtzar.wordpress.com/1885/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qtzar.wordpress.com/1885/" /></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1885&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
  244. <media:content url="http://1.gravatar.com/avatar/126d36c5b458c9b16c7ed76d4f00d40b?s=96&#38;d=identicon&#38;r=G" medium="image">
  245. <media:title type="html">qtzar</media:title>
  246. </media:content>
  247.  
  248. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-26_14-58-55.png" medium="image">
  249. <media:title type="html">2017-02-26_14-58-55</media:title>
  250. </media:content>
  251.  
  252. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-26_15-01-22.png" medium="image" />
  253.  
  254. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-26_15-05-49.png" medium="image" />
  255.  
  256. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-26_15-10-05.png" medium="image" />
  257.  
  258. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-26_15-13-55.png" medium="image" />
  259. </item>
  260. <item>
  261. <title>Extending Your Rancher Environments</title>
  262. <link>https://qtzar.com/2017/03/28/extending-your-rancher-environments/</link>
  263. <pubDate>Tue, 28 Mar 2017 12:30:00 +0000</pubDate>
  264. <dc:creator><![CDATA[qtzar]]></dc:creator>
  265. <category><![CDATA[Domino To Spring]]></category>
  266. <category><![CDATA[Rancher]]></category>
  267.  
  268. <guid isPermaLink="false">http://www.qtzar.com/?p=1875</guid>
  269. <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 --><img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1875&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
  270. <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>
  271. <p>Click on the &#8216;Environment&#8217; tab and select the option to &#8216;Manage Environments&#8217;</p>
  272. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-36-58.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-36-58.png?w=605?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 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-36-58.png?w=300 300w" sizes="(max-width: 353px) 100vw, 353px"   /></p>
  273. <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>
  274. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-38-49.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-38-49.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-38-49.png?w=150 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-38-49.png?w=300 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-38-49.png?w=768 768w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-38-49.png 1016w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  275. <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>
  276. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-40-40.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-40-40.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-40-40.png?w=150 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-40-40.png?w=300 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-40-40.png 659w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  277. <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>
  278. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-42-55.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-42-55.png?w=605?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 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-42-55.png?w=300 300w" sizes="(max-width: 465px) 100vw, 465px"   /></p>
  279. <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>
  280. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-09-22.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-09-22.png?w=605?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 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-27_08-09-22.png?w=300 300w" sizes="(max-width: 482px) 100vw, 482px"   /></p>
  281. <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><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qtzar.wordpress.com/1875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qtzar.wordpress.com/1875/" /></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1875&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
  282. <media:content url="http://1.gravatar.com/avatar/126d36c5b458c9b16c7ed76d4f00d40b?s=96&#38;d=identicon&#38;r=G" medium="image">
  283. <media:title type="html">qtzar</media:title>
  284. </media:content>
  285.  
  286. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-26_12-36-58.png" medium="image">
  287. <media:title type="html">2017-02-26_12-36-58</media:title>
  288. </media:content>
  289.  
  290. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-26_12-38-49.png" medium="image">
  291. <media:title type="html">2017-02-26_12-38-49</media:title>
  292. </media:content>
  293.  
  294. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-26_12-40-40.png" medium="image" />
  295.  
  296. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-26_12-42-55.png" medium="image" />
  297.  
  298. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-27_08-09-22.png" medium="image" />
  299. </item>
  300. <item>
  301. <title>Setting Up Your Rancher Infrastructure</title>
  302. <link>https://qtzar.com/2017/03/27/setting-up-your-rancher-infrastructure/</link>
  303. <pubDate>Mon, 27 Mar 2017 12:30:00 +0000</pubDate>
  304. <dc:creator><![CDATA[qtzar]]></dc:creator>
  305. <category><![CDATA[Domino To Spring]]></category>
  306. <category><![CDATA[Docker]]></category>
  307. <category><![CDATA[Rancher]]></category>
  308. <category><![CDATA[RancherOS]]></category>
  309. <category><![CDATA[Ubuntu]]></category>
  310.  
  311. <guid isPermaLink="false">http://www.qtzar.com/?p=1873</guid>
  312. <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 --><img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1873&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
  313. <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>
  314. <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>
  315. <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>
  316. <p><code>docker run -d --restart=unless-stopped -p 8080:8080 rancher/server<br />
  317. </code></p>
  318. <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>
  319. <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>
  320. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-17-12.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-17-12.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-17-12.png?w=150 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-17-12.png?w=300 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-17-12.png?w=768 768w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-17-12.png 1014w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  321. <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>
  322. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png?w=150 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png?w=300 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png?w=768 768w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png?w=1024 1024w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png 1051w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  323. <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>
  324. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-29-43.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-29-43.png?w=605?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 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-26_12-29-43.png?w=300 300w" sizes="(max-width: 483px) 100vw, 483px"   /></p>
  325. <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><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qtzar.wordpress.com/1873/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qtzar.wordpress.com/1873/" /></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1873&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
  326. <media:content url="http://1.gravatar.com/avatar/126d36c5b458c9b16c7ed76d4f00d40b?s=96&#38;d=identicon&#38;r=G" medium="image">
  327. <media:title type="html">qtzar</media:title>
  328. </media:content>
  329.  
  330. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-26_12-17-12.png" medium="image">
  331. <media:title type="html">2017-02-26_12-17-12</media:title>
  332. </media:content>
  333.  
  334. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-26_12-25-52.png" medium="image">
  335. <media:title type="html">2017-02-26_12-25-52</media:title>
  336. </media:content>
  337.  
  338. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-26_12-29-43.png" medium="image">
  339. <media:title type="html">2017-02-26_12-29-43</media:title>
  340. </media:content>
  341. </item>
  342. <item>
  343. <title>AJAX and ThymeLeaf For Modal Dialogs</title>
  344. <link>https://qtzar.com/2017/03/24/ajax-and-thymeleaf-for-modal-dialogs/</link>
  345. <pubDate>Fri, 24 Mar 2017 12:30:00 +0000</pubDate>
  346. <dc:creator><![CDATA[qtzar]]></dc:creator>
  347. <category><![CDATA[Domino To Spring]]></category>
  348. <category><![CDATA[Bootstrap]]></category>
  349. <category><![CDATA[Spring MVC]]></category>
  350. <category><![CDATA[ThymeLeaf]]></category>
  351.  
  352. <guid isPermaLink="false">http://www.qtzar.com/?p=1866</guid>
  353. <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 --><img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1866&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
  354. <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>
  355. <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>
  356. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-42-00.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-42-00.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-42-00.png?w=150 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-42-00.png?w=300 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-42-00.png?w=768 768w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-42-00.png 814w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  357. <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>
  358. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-57-30.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-57-30.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-57-30.png?w=150 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-57-30.png?w=300 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-57-30.png 721w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  359. <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>
  360. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-59-11.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-59-11.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-59-11.png?w=150 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-59-11.png?w=300 300w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-59-11.png?w=768 768w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_15-59-11.png 784w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  361. <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>
  362. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_16-01-16.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/03/2017-02-25_16-01-16.png?w=605?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 150w, https://qtzar.files.wordpress.com/2017/03/2017-02-25_16-01-16.png?w=300 300w" sizes="(max-width: 367px) 100vw, 367px"   /></p>
  363. <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><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qtzar.wordpress.com/1866/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qtzar.wordpress.com/1866/" /></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1866&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
  364. <media:content url="http://1.gravatar.com/avatar/126d36c5b458c9b16c7ed76d4f00d40b?s=96&#38;d=identicon&#38;r=G" medium="image">
  365. <media:title type="html">qtzar</media:title>
  366. </media:content>
  367.  
  368. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-25_15-42-00.png" medium="image">
  369. <media:title type="html">2017-02-25_15-42-00</media:title>
  370. </media:content>
  371.  
  372. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-25_15-57-30.png" medium="image">
  373. <media:title type="html">2017-02-25_15-57-30</media:title>
  374. </media:content>
  375.  
  376. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-25_15-59-11.png" medium="image">
  377. <media:title type="html">2017-02-25_15-59-11</media:title>
  378. </media:content>
  379.  
  380. <media:content url="http://qtzar.files.wordpress.com/2017/03/2017-02-25_16-01-16.png" medium="image">
  381. <media:title type="html">2017-02-25_16-01-16</media:title>
  382. </media:content>
  383. </item>
  384. <item>
  385. <title>Highlighting The Selected Area With Thymeleaf</title>
  386. <link>https://qtzar.com/2017/03/23/highlighting-the-selected-area-with-thymeleaf/</link>
  387. <pubDate>Thu, 23 Mar 2017 12:30:00 +0000</pubDate>
  388. <dc:creator><![CDATA[qtzar]]></dc:creator>
  389. <category><![CDATA[Domino To Spring]]></category>
  390. <category><![CDATA[ThymeLeaf]]></category>
  391.  
  392. <guid isPermaLink="false">http://www.qtzar.com/?p=1861</guid>
  393. <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 --><img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1861&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
  394. <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>
  395. <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>
  396. <p><img data-attachment-id="1862" data-permalink="https://qtzar.com/2017-02-25_13-29-13/" data-orig-file="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-29-13.png?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-29-13.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-29-13.png?w=605?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 150w, https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-29-13.png?w=300 300w" sizes="(max-width: 567px) 100vw, 567px"   /></p>
  397. <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>
  398. <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>
  399. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-47-15.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-47-15.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-47-15.png?w=150 150w, https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-47-15.png?w=300 300w, https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-47-15.png?w=768 768w, https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-47-15.png 798w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  400. <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>
  401. <p><img 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?w=605" 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-medium-file="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-56-54.png?w=605?w=300" data-large-file="https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-56-54.png?w=605?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?w=605 605w, https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-56-54.png?w=150 150w, https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-56-54.png?w=300 300w, https://qtzar.files.wordpress.com/2017/02/2017-02-25_13-56-54.png 620w" sizes="(max-width: 605px) 100vw, 605px"   /></p>
  402. <p>Now my phonebook correctly shows the currently selected area as highlighted in the side navigator.</p><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qtzar.wordpress.com/1861/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qtzar.wordpress.com/1861/" /></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=qtzar.com&#038;blog=129448668&#038;post=1861&#038;subd=qtzar&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
  403. <media:content url="http://1.gravatar.com/avatar/126d36c5b458c9b16c7ed76d4f00d40b?s=96&#38;d=identicon&#38;r=G" medium="image">
  404. <media:title type="html">qtzar</media:title>
  405. </media:content>
  406.  
  407. <media:content url="http://qtzar.files.wordpress.com/2017/02/2017-02-25_13-29-13.png" medium="image">
  408. <media:title type="html">2017-02-25_13-29-13</media:title>
  409. </media:content>
  410.  
  411. <media:content url="http://qtzar.files.wordpress.com/2017/02/2017-02-25_13-47-15.png" medium="image">
  412. <media:title type="html">2017-02-25_13-47-15</media:title>
  413. </media:content>
  414.  
  415. <media:content url="http://qtzar.files.wordpress.com/2017/02/2017-02-25_13-56-54.png" medium="image">
  416. <media:title type="html">2017-02-25_13-56-54</media:title>
  417. </media:content>
  418. </item>
  419. </channel>
  420. </rss>
  421.  

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