Ubic

Manage your process effortless

Thomas Maier

while(1) { ---- while(<socket>) { ---- while True: ---- Ups, wrong workshop.. ---- How to manage such a process? ---- # ./run_program
# ./run_program

# ./run_program &

# ./run_program &

# nohup ./run_program &

# nohup ./run_program &

initd

initd

How I would like to manage my process?

Basic needs

More..

Before you start the Ubic..

ubic-admin

And then... ---- use Ubic::Service::SimpleDaemon; my $process = Ubic::Service::SimpleDaemon->new( bin => "/path/to/run_process", stdout => "/path/ubic/log/run_process.stdout", stderr => "/path/ubic/log/run_process.stderr", user => 'wis', ); ---- Multiple instances of process ---- use Ubic::Multiservice::Simple; use Ubic::Service::SimpleDaemon; my $service = Ubic::Service::SimpleDaemon->new( bin => "/path/to/my_multi_process", ); Ubic::Multiservice::Simple->new({ map{ ("$_" => Ubic::Service::SimpleDaemon->new( bin => "/path/to/my_multi_process", stdout => "/path/to/ubic/log/my_multi_process.stdout", stderr => "/path/to/ubic/log/my_multi_process.stderr", )) } (1..5) }); ---- Manage your Dancer application ---- use Ubic::Service::Plack; return Ubic::Service::Plack->new({ server => "Starman", server_args => { env => 'production', host => '127.0.0.1', workers => 5, port => 3000, }, app => "/path/to/bin/app.pl", app_name => 'mydancer', stdout => "/path/ubic/log/mydancer-stdout.log", stderr => "/path/ubic/log/mydancer-stderr.log", });

And start to enjoy..

Hands on..

You can download the demo

git clone git://github.com/hayzer/ubic-presentation.git

Good documentation

Ubic::Manual::Intro

Ubic::Manual::Overview

Ubic::Manual::FAQ

Thanks to

Vyacheslav Matjukhin

End