vzctl questions about hooking [message #31322] |
Tue, 24 June 2008 18:39 |
jleggett
Messages: 2 Registered: June 2008
|
Junior Member |
|
|
Hi...
We're trying to interface some configuration management tools with OpenVZ to streamline creation and use of containers.
I am making some assumptions here that when making a container with vzctl it does some parsing of the template.tar.gz to try and determine the OS being used as said template. For example for my test I used a centos-5-i386-minimal example so from that I assume it reads the centos.conf file to determine what shell scripts to execute? These map too:
ADD_IP=redhat-add_ip.sh
DEL_IP=redhat-del_ip.sh
SET_HOSTNAME=redhat-set_hostname.sh
SET_DNS=set_dns.sh
SET_USERPASS=set_userpass.sh
SET_UGID_QUOTA=set_ugid_quota.sh
POST_CREATE=postcreate.sh
My first question: Can I replace these shell scripts with any executable program to garner the same data as long as my return values match up to what vzctl expects? Is there any documentation for this interfacing?
I modifed the redhat-add_ip.sh script to call #!/bin/bash -x to output bash debug lines, and expected them to be either to STDOUT or /var/log/vzctl.log but I see that output in neither, so where is it called and when?
Does the OpenVZ community consider it better to directly manipulate the container data under /vz/private/CTID or is their a prime imperative to use the built in OpenVZ provided tools?
It *seems* like I could just use standard configuration management (cfengine, puppet, etc) tools to configure the container since I can write to the area of the filesystem, but
I am worried about what i don't know at this point before executing that.
Thanks in advance to replies, suggestions, comments, pointers.
Jeff Leggett
|
|
|