Re: Service units for web applications

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

 



On Tue, 25.02.14 14:55, Stephen Gallagher (sgallagh@xxxxxxxxxx) wrote:

> There are actually two pieces to this that I'd like to see (and
> hopefully have someone tell me are already possible):
> 
>  1. The ability to add new ExecStartPre commands to the httpd service
>     when installing new sites.

You can do that already, you can extend existing unit files by dropping
a config snippet into httpd.service.d/foobar.conf. systemd will
read httpd.service plus all files named *.conf from httpd.service.d/ and
merge them together. THis can be used by RPMs to change or extend unit
files of other packages as necessary.

>  2. The ability to enable and disable specific apache sites from
>     systemctl. Basically, I'd like to have a symlink added or removed
>     from /etc/httpd/conf.d based on whether httpd-mysite.service was
>     enabled or disabled.

I am pretty sure that systemctl should not be in the business of
managing other packages configuation.

I am not really grokking here what you want to do though. If you want
multiple http instances you should give them a differen config dir/file
each, and expose them using systemd unit templates,
e.g. httpd@xxxxxxxxxx.service and so on. These templates can then build
a command line for apache that includes the "foobar.com" part of this
service name, for example to reference a specific configuration
file. THis is done via specifier expansion ("%i").

If we want to make it simple to run multiple instances of the popular
server packages on the system, then we should really start shipping good
unit file templates like that, so that people don#t have to write them
first. We could provide both non-templated singletons for the common
cases, and templated versions for those who need this, and people then
have the free choice which version they want to use.

Lennart

-- 
Lennart Poettering, Red Hat
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux