[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [sandbox PATCH v2 2/2] Add support for templated unit in virt-sandbox



On Fri, May 03, 2013 at 10:01:23PM +0200, Michael Scherer wrote:
> This permit to create a templated unit inside the sandbox,
> using the sandbox name as a variable and so running the same
> unit with a different configuration without too much hassle.
> 
> For example, someone could have several different configuration of
> website in /etc/nginx/websites.d/ and have each of them started in
> a different sandbox, with a sample templated unit using the sandbox
> name as a option to read the proper configuration file directly.
> 
> One could take the following file in /etc/systemd/system/nginx_lxc  service :
> 
>   [Unit]
>   Description=Test of a specific nginx running in lxc
>   After=syslog.target network.target remote-fs.target nss-lookup.target
> 
>   [Service]
>   PIDFile=/run/nginx.%i.pid
>   ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.%i.conf
>   ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.%i.conf
>   Type=forking
>   ExecReload=/bin/kill -s HUP $MAINPID
>   ExecStop=/bin/kill -s QUIT $MAINPID
> 
>   [Install]
>   WantedBy=multi-user.target
> 
> Then create a container like this:
> 
>   # virt-sandbox-service  create -u nginx_lxc@  test.example.org --package nginx
> 
> And then we will have nginx running in a container, using the specific
> config file /etc/nginx/nginx.test.example.org.conf
> ---
>  bin/virt-sandbox-service            | 14 ++++++++++++++
>  bin/virt-sandbox-service-create.pod |  1 +
>  2 files changed, 15 insertions(+)

ACK, I've applied these patches now

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]