YADT - an Augmented Deployment Tool
- It's easy to start and stop services on clients
- Install operating system updates on multiple machines
- Reboot client after kernel updates
In this guide we want to show you how to set up a minimal YADT system, on two
hosts with real world services to play with. The yadtshell
on the first
server is the "remote control", the yadt-minion
is the client component.
- Two RHEL based system version 6.x or 7.x
- Python >= 2.6
- A user with sufficient rights to:
- Install/remove packages via
sudo yum
- Start and stop services via
sudo service ...
- Install/remove packages via
- All hosts to be controlled are accessible passwordless via ssh from the yadtshell server
- EPEL has to be installed. You will find the rpm on The newest version of 'epel-release' for EL6, for example
this adds our repository to your RHEL based system: (yum-config-manager is part of yum-utils
)
sudo yum-config-manager --add-repo https://raw.githubusercontent.com/yadt/try-it-yourself/master/yadt.repo
or this on RedHat 7 machines:
sudo yum-config-manager --add-repo https://raw.githubusercontent.com/yadt/try-it-yourself/master/yadt-7.repo
let's have a look into the file:
cat /etc/yum.repos.d/yadt.repo
[yadt]
name=yadt repo
baseurl=http://dl.bintray.com/yadt/rpm
gpgcheck=0
check the repository with:
$ sudo yum repolist
you will see something like this:
...
extras CentOS-6 - Extras 14
updates CentOS-6 - Updates 1.104
yadt yadt repo 4
repolist: 18.467
Now you can use yum
to install the yadt components on your servers
on the "master" server:
[vagrant@yadtshell-testmachine ~]$ sudo yum install yadtshell
on the client server:
[vagrant@minion-testmachine ~]$ sudo yum install yadt-minion
save this snipplet as /etc/yadt.conf.d/10_postfix.yaml
(4 blanks no
tabs)
services:
postfix:
Please check if the postfix process is up and running on minion side. sudo service postfix status
. You can use any process you want but avoid using
the sshd
process :-) .
The yadt-minion gets configured via *.yaml
files in the
/etc/yadt.conf.d/
directory; they get merged in alphanumeric
order. Please note Indented blocks have to start with 4 blanks.
The yadt-minion rpm provides its default configuration as
00_defaults.yaml
. Please check the
wiki or
cheatsheet for further
information about service configuration.
You can run yadtshell
commands on targets, a target is a set of hosts
which belong together. Check the
wiki or the
cheatsheet for further
information.
save this snipplet as a file named target
(e.g in your home folder)
hosts:
- minion-testmachine
please note "minion-testmachine" ist the hostname of the minion server.
change your directory to the folder with the target file and enter
init-yadtshell
you will see something like this:
starting yadt session
yadt | home target hosts: *unknown, call status first*
now call status
Now try to start and stop your service on the machine, please check the wiki and the cheatsheet for further commands and usefull information.
stop service://minion-testmachine/postfix
start service://minion-testmachine/postfix
As you can see we found an update of postfix, we can update the machine by
calling update
.