Automate Your Patch Management With Recipes

Dec 11, 2019

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 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.

For this example we are using a BASH script to patch centos servers.

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.

<code>
#!/bin/bash

# Just yum updates

yum clean all
yum -y update

# Reboot if we get a kernel installed
if grep "$(date '+%b %d')" /var/log/yum.log | grep -E "(Installed|Updated): kernel-([0-9].+|headers)"; then
logger "Kernel updated, server rebooted"
shutdown -r now
fi 
</code>

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.

A full log of when the script ran, when it finished, and who excuted it is provided in your Tricoda control panel.

Sign up today and start making your life easier with the power of Tricoda https://dashboard.tricoda.com/auth/register

Try Tricoda Risk-Free with our 14 Day Trial