[jboss-as7-dev] Linux Service Control for AS

Andrig Miller anmiller at redhat.com
Wed May 18 16:08:28 EDT 2011


One very large word of caution:

Fedora 15 has replaced upstart with systemd.

This is the second time they have replaced the init system (System V init, to upstart, and now to systemd).

Fedora 15 comes out in the next couple of weeks or so (at least that was the plan).

Andy

----- Original Message -----
> From: "Andrew Lee Rubinger" <andrew.rubinger at redhat.com>
> To: jboss-as7-dev at lists.jboss.org
> Sent: Wednesday, May 18, 2011 12:40:35 PM
> Subject: [jboss-as7-dev] Linux Service Control for AS
> 
> This email from Dan Allen yesterday:
> 
> ---------------
> 
> One of the *huge* pains for sys admins assuming control of JBoss AS
> for
> the first time is getting it setup as a system service. We provide
> this
> for our EAP RPMs of course, but we just about annoy the crap out of
> system admins and accidental developer admins struggling with
> this seemingly simple task.
> 
> But no more!
> 
> Since one of the main themes of AS 7 is "admin-friendly", then we
> should
> definitely recommend this dead simple recipe for setting up JBoss AS
> as
> an upstart service. The Torquebox guys show how to do this with AS 6
> (which is part of the Torquebox distribution).
> 
> http://torquebox.org/news/2011/05/11/simplify-your-deployment/
> 
> which was inspired by the original article by Heroku
> 
> http://adam.heroku.com/past/2011/5/9/applying_the_unix_process_model_to_web_apps/
> 
> The recipe involves running foreman on a Procfile. foreman is a ruby
> gem. But actually, foreman is really just a means to an end. In the
> end,
> you are just creating three files in /etc/init that look like this:
> 
> */etc/init/jboss-as.conf*
> pre-start script
> 
> bash << "EOF"
>    mkdir -p /var/log/jboss-as
>    chown -R dallen /var/log/jboss-as
> EOF
> 
> end script
> 
> */etc/init/jboss-as-default-1.conf*
> start on starting jboss-as-default
> stop on stopping jboss-as-default
> respawn
> 
> chdir /home/dallen/opt/jboss-as
> exec su dallen -c 'export PORT=5000; ./bin/run.sh >>
> /var/log/jboss-as/default-1.log 2>&1'
> 
> */etc/init/jboss-as-default.conf*
> start on starting jboss-as
> stop on stopping jboss-as
> 
> The it's just:
> 
> start jboss-as
> 
> and
> 
> stop jboss-as
> 
> Ahhhhhh.
> 
> We should definitely include this in the AS documentation (both for
> AS 6
> and AS 7). You can't imagine how many hours this is going to save
> admins.
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
> 


More information about the jboss-as7-dev mailing list