supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* Using runit during development
@ 2004-03-25 23:43 Ian Stokes-Rees
  2004-04-11 17:12 ` Clemens Fischer
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Stokes-Rees @ 2004-03-25 23:43 UTC (permalink / raw)


First, runit is great.  Big thanks to all the developers.  Seems a solid 
improvement on daemontools, which I spent this morning trying to get 
going, and fortunately never quite got there, hence the search which led 
me to runit.

Now, I am in the situation where I am developing a service based 
software system.  I want to be able to:

1. Get all the service startup benefits of runit for "deployed" stable 
software: watchdogs, logging, daemon, setuid, clean environment.  runit 
does this perfectly.

2. Also, be able to have runit scripts checked into CVS, and run in an 
arbitrary directory by an arbitrary user.  This is more complicated!

Imagine Joe and Judy who are both developing a set of services for the 
Bling project, both working on the server loraine:

joe:
loraine:/home/joe/devel/bling/runit/svc1/run
loraine:/home/joe/devel/bling/runit/svc2/run
loraine:/home/joe/devel/bling/svc1/StartServiceOne.py
loraine:/home/joe/devel/bling/svc2/StartServiceTwo.py
loraine:/home/joe/devel/bling/python/
loraine:/home/joe/devel/bling/config/settings.ini

judy:
loraine:/home/judy/cur_code/bling/runit/svc1/run
etc.

Joe, who does not have root access, wants to be able to do:

cd ~/devel/bling
runsvdir scripts

and Judy, who also does not have root access, wants to be able to do:

cd ~/cur_code/bling
runsvdir scripts

where "run" looks something like:

#!/bin/sh
PYTHONPATH=python
exec svc1/StartServiceOne.py config/settings.ini

Right now, this is basically impossible.  Absolute paths are needed in 
most places for runit, so users either need a meta-script which will 
customise/build runit scripts for their personal home directories, or 
they need to each write their own scripts from scratch.  This gets even 
more difficult when these services are being developed and deployed 
simultaneously on multiple machines.

That is to say, cwd will be interpreted as the directory from which 
runsv was executed, so for joe, PYTHONPATH environment passed to the 
service he executes will be his local (and possibly modified) copy of 
the python source code.  Similarly his local copy of svc1/ServiceOne.py 
will be executed, using his copy of config/settings.ini.

Similarly for judy, she wants her own:

environment
executable
parameters

I think this all hangs off of being able to manage CWD and the use of 
relative paths.

Obviously anything with "chpst -u <user>" isn't going to get very far, 
and the runit scripts would need hardcoded paths to be introduced for 
the final deployed version.

I think it is an increasingly common thing that developers, possibly all 
working on the same machine, need to bring up a set of services from 
local development code in order to test/develop other parts of a 
software project.  This is the state I am in now, and I'm looking for a 
solution.

Thanks for any suggestions regarding this.

Ian.

-- 
Ian Stokes-Rees              i.stokes-rees@physics.ox.ac.uk
Particle Physics, Oxford     http://www-pnp.physics.ox.ac.uk/~stokes



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Using runit during development
  2004-03-25 23:43 Using runit during development Ian Stokes-Rees
@ 2004-04-11 17:12 ` Clemens Fischer
  0 siblings, 0 replies; 2+ messages in thread
From: Clemens Fischer @ 2004-04-11 17:12 UTC (permalink / raw)
  Cc: supervision

* 2004-03-26 Ian Stokes-Rees:

> Right now, this is basically impossible.  Absolute paths are needed in
> most places for runit, ...

i don't quite understand.  why don't you simply place symbolic links to
realize "access paths" (which don't change)?  maybe "man ln" for the
command "ln -s /dir /access/path" is your friend?

  clemens


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-11 17:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-25 23:43 Using runit during development Ian Stokes-Rees
2004-04-11 17:12 ` Clemens Fischer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).