Z
Z
Zante2013-08-30 16:29:44
OpenVZ
Zante, 2013-08-30 16:29:44

OpenVZ Containers

Who can tell me if there is already something ready for remote updating of OpenVZ containers? Because apt-dater is well suited for a node!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Puma Thailand, 2013-08-30
@opium

What's stopping you from using apt-dater for containers?
When there are many servers, I usually use puppet.

I
Ilya Evseev, 2013-08-30
@IlyaEvseev

What exactly do you want to update? package base?
If yes, then it can be done like this:

cd /var/lib/vz/root/
for d in * ; do
if test -d "$d/var/lib/apt"; then
    chroot "$d" apt-get -y update
    chroot "$d" apt-get -y dist-upgrade
elif test -d "$d/var/lib/yum"; then
    chroot "$d" yum -y upgrade
else
    echo "ERROR: unknown packaging system in CT $d"
fi

Naturally, there is a risk that a hacked container will gain control over the entire farm at that moment.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question