{"id":40,"date":"2023-03-13T15:33:31","date_gmt":"2023-03-13T23:33:31","guid":{"rendered":"https:\/\/www.dumpsterfirecomputing.com\/?p=40"},"modified":"2023-03-13T15:36:07","modified_gmt":"2023-03-13T23:36:07","slug":"automagical-server-patching","status":"publish","type":"post","link":"https:\/\/www.dumpsterfirecomputing.com\/?p=40","title":{"rendered":"Automagical Server Patching"},"content":{"rendered":"\n<p>You should always patch your servers and keep them up to date.  I&#8217;ve been tinkering with Azure&#8217;s built-in (albeit Preview feature at time of this writing) Update Management Center, and it&#8217;s a really great tool.  On a test server I&#8217;ve had running, you can see the history of patching here:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-1024x238.png\" alt=\"\" class=\"wp-image-41\" width=\"1049\" height=\"243\" srcset=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-1024x238.png 1024w, https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-300x70.png 300w, https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-768x178.png 768w, https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image.png 1533w\" sizes=\"auto, (max-width: 1049px) 100vw, 1049px\" \/><figcaption class=\"wp-element-caption\">History of auto patching<\/figcaption><\/figure>\n\n\n\n<p>These configurations will assess patches periodically and, on a schedule, download \/ install any updates needed.  The above test server is Linux-based, and the updates can be to any package installed on the machine.  A sample operation from above looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-5.png\" alt=\"\" class=\"wp-image-48\" width=\"655\" height=\"470\" srcset=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-5.png 906w, https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-5-300x216.png 300w, https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-5-768x552.png 768w\" sizes=\"auto, (max-width: 655px) 100vw, 655px\" \/><figcaption class=\"wp-element-caption\">Patch update job status<\/figcaption><\/figure>\n\n\n\n<p>Tons of detail here.  Thankfully everything so far has been green \/ successful, but I&#8217;m looking forward to seeing how it behaves with some sort of failed install.<\/p>\n\n\n\n<p>To set this up yourself, you need to define an Azure &#8220;<a rel=\"noreferrer noopener\" href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/virtual-machines\/maintenance-configurations\" target=\"_blank\">Maintenance Configuration<\/a>&#8220;.  <\/p>\n\n\n\n<p>A sample of this is as follows.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-1.png\" alt=\"\" class=\"wp-image-42\" width=\"609\" height=\"600\" srcset=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-1.png 752w, https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-1-300x296.png 300w\" sizes=\"auto, (max-width: 609px) 100vw, 609px\" \/><figcaption class=\"wp-element-caption\">Create new Maintenance Configuration resource<\/figcaption><\/figure>\n\n\n\n<p>The options under Maintenance Scope are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Host (dedicated \/ isolated infrastructure)<\/li>\n\n\n\n<li>OS Image (VMSS)<\/li>\n\n\n\n<li>Guest (Azure VM, Arc-enabled VMs\/servers)<\/li>\n<\/ul>\n\n\n\n<p>For a standard server you&#8217;ll choose the third option (Guest).  On the &#8216;Update&#8217; tab you can select which types of updates get installed:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-2.png\" alt=\"\" class=\"wp-image-43\" width=\"461\" height=\"603\" srcset=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-2.png 563w, https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-2-229x300.png 229w\" sizes=\"auto, (max-width: 461px) 100vw, 461px\" \/><figcaption class=\"wp-element-caption\">Resource Configuration: Specify patch types<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Depending on the type of server (Windows or Linux), you may want to modify the <em>types <\/em>of patches get installed.  By default, these are the type of patches that get installed in each OS:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-3.png\" alt=\"\" class=\"wp-image-44\" width=\"184\" height=\"420\" srcset=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-3.png 219w, https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-3-131x300.png 131w\" sizes=\"auto, (max-width: 184px) 100vw, 184px\" \/><\/figure>\n\n\n\n<p>In my testing I have an Ubuntu server, so I removed all Windows patches and added all the Linux machines.  Azure uses an extension, installed on the server, to manage the communication and installation.<\/p>\n\n\n\n<p>Back on the Update Management Center, you can get a pretty decent overview of the servers that are registered, the status of patches.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"589\" src=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-4-1024x589.png\" alt=\"\" class=\"wp-image-45\" srcset=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-4-1024x589.png 1024w, https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-4-300x173.png 300w, https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-4-768x442.png 768w, https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/03\/image-4.png 1309w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Update Management Center Dashboard<\/figcaption><\/figure>\n\n\n\n<p>I have this now running against one of my production servers and will be watching to see how this evolves.  I love not worrying about patch management, especially for Linux environments.  The first time I get a failed patch installation though, I&#8217;ll document what it looks like.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You should always patch your servers and keep them up to date. I&#8217;ve been tinkering with Azure&#8217;s built-in (albeit Preview feature at time of this writing) Update Management Center, and [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,6,5],"tags":[],"class_list":["post-40","post","type-post","status-publish","format-standard","hentry","category-azure","category-management","category-patching"],"_links":{"self":[{"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=\/wp\/v2\/posts\/40","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=40"}],"version-history":[{"count":5,"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=\/wp\/v2\/posts\/40\/revisions"}],"predecessor-version":[{"id":52,"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=\/wp\/v2\/posts\/40\/revisions\/52"}],"wp:attachment":[{"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}