{"id":387,"date":"2019-12-11T10:25:32","date_gmt":"2019-12-11T10:25:32","guid":{"rendered":"http:\/\/blog.tricoda.com\/?p=387"},"modified":"2020-06-02T08:24:09","modified_gmt":"2020-06-02T08:24:09","slug":"automate-your-centos-patch-management","status":"publish","type":"post","link":"http:\/\/blog.tricoda.com\/index.php\/2019\/12\/11\/automate-your-centos-patch-management\/","title":{"rendered":"Automate Your Patch Management With Recipes"},"content":{"rendered":"\n<p>As with all our plans, including our <a href=\"http:\/\/blog.tricoda.com\/index.php\/2019\/10\/15\/free-developer-plan-launched\/\">free for life developer plan<\/a> , we include access to our powerful recipes engine. Currently supporting bash, PHP, perl, python, ruby, go, or node.js. you can utilizes our recipe engine to automate the more mundane parts of the system administration.<\/p>\n\n\n\n<p>Servers are constantly requiring patches to fix latest bugs and add the latest features. Managing servers across multiple providers with multiple logins is time consuming for such a constant task. By using our recipe engine you can now patch all servers once a week or once a month or even once per day completely automatically.<\/p>\n\n\n\n<p>For this example we are using a BASH script to patch centos servers.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"916\" height=\"678\" src=\"http:\/\/blog.tricoda.com\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-10.20.19.png\" alt=\"\" class=\"wp-image-391\" srcset=\"http:\/\/blog.tricoda.com\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-10.20.19.png 916w, http:\/\/blog.tricoda.com\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-10.20.19-300x222.png 300w, http:\/\/blog.tricoda.com\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-10.20.19-768x568.png 768w\" sizes=\"(max-width: 916px) 100vw, 916px\" \/><\/figure>\n\n\n\n<p>Click on the recipes icon in your tricoda control panel and click add new, Enter a name that describe what the script is and more detailed in the description box. Select type BASH and copy and paste the following code into the recipe box.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;code>\n#!\/bin\/bash\n\n# Just yum updates\n\nyum clean all\nyum -y update\n\n# Reboot if we get a kernel installed\nif grep \"$(date '+%b %d')\" \/var\/log\/yum.log | grep -E \"(Installed|Updated): kernel-(&#91;0-9].+|headers)\"; then\nlogger \"Kernel updated, server rebooted\"\nshutdown -r now\nfi \n&lt;\/code><\/code><\/pre>\n\n\n\n<p>Once completed click on confirm. You can now execute the script from within an individual machine, a group of machines, or all machines in your Tricoda control panel if all running Centos.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"803\" height=\"593\" src=\"http:\/\/blog.tricoda.com\/wp-content\/uploads\/2019\/12\/Screenshot_2019-12-11_at_10_43_05.png\" alt=\"\" class=\"wp-image-403\" srcset=\"http:\/\/blog.tricoda.com\/wp-content\/uploads\/2019\/12\/Screenshot_2019-12-11_at_10_43_05.png 803w, http:\/\/blog.tricoda.com\/wp-content\/uploads\/2019\/12\/Screenshot_2019-12-11_at_10_43_05-300x222.png 300w, http:\/\/blog.tricoda.com\/wp-content\/uploads\/2019\/12\/Screenshot_2019-12-11_at_10_43_05-768x567.png 768w\" sizes=\"(max-width: 803px) 100vw, 803px\" \/><\/figure>\n\n\n\n<p>A full log of when the script ran, when it finished, and who excuted it is provided in your Tricoda control panel.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"865\" height=\"480\" src=\"http:\/\/blog.tricoda.com\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-10.33.30.png\" alt=\"\" class=\"wp-image-393\" srcset=\"http:\/\/blog.tricoda.com\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-10.33.30.png 865w, http:\/\/blog.tricoda.com\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-10.33.30-300x166.png 300w, http:\/\/blog.tricoda.com\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-10.33.30-768x426.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/figure>\n\n\n\n<p>Sign up today and start making your life easier with the power of Tricoda <a href=\"https:\/\/dashboard.tricoda.com\/auth\/register\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/dashboard.tricoda.com\/auth\/register<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As with all our plans, including our free for life developer plan , we include access to our powerful recipes engine. Currently supporting bash, PHP, perl, python, ruby, go, or node.js. you can utilizes our recipe engine to automate the more mundane parts of the system administration. Servers are constantly requiring patches to fix latest [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":388,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.tricoda.com\/index.php\/wp-json\/wp\/v2\/posts\/387"}],"collection":[{"href":"http:\/\/blog.tricoda.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.tricoda.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.tricoda.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.tricoda.com\/index.php\/wp-json\/wp\/v2\/comments?post=387"}],"version-history":[{"count":14,"href":"http:\/\/blog.tricoda.com\/index.php\/wp-json\/wp\/v2\/posts\/387\/revisions"}],"predecessor-version":[{"id":409,"href":"http:\/\/blog.tricoda.com\/index.php\/wp-json\/wp\/v2\/posts\/387\/revisions\/409"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/blog.tricoda.com\/index.php\/wp-json\/wp\/v2\/media\/388"}],"wp:attachment":[{"href":"http:\/\/blog.tricoda.com\/index.php\/wp-json\/wp\/v2\/media?parent=387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.tricoda.com\/index.php\/wp-json\/wp\/v2\/categories?post=387"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.tricoda.com\/index.php\/wp-json\/wp\/v2\/tags?post=387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}