GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Ubic::Manual::Intro(3) User Contributed Perl Documentation Ubic::Manual::Intro(3)

Ubic::Manual::Intro - Initial introduction

version 1.58

Ubic is a polymorphic service manager.

It can run any program as a service and provides frontend script "ubic" to manage services.

"Polymorphic" means that ubic can use various pluggable backends for managing services, for configuring services and even for describing a list of all services. Don't panic, it offers easy-to-use default solutions for the common tasks out-of-the-box too!

Ubic includes a centralized watchdog process which checks every service periodically and brings them back online if necessary.

Installing ubic is easy.

First, install the module using your favorite CPAN client:

    cpanm Ubic

Second, invoke ubic-admin script to perform initial configuration:

    ubic-admin setup

If you don't want to answer too many questions, you can invoke it with batch-mode option:

    ubic-admin setup --batch-mode

Alternatively, if you're using Debian or Ubuntu, you can install ubic .deb package from the official launchpad PPA repository:

    apt-add-repository ppa:berekuk/ubic
    apt-get update
    apt-get install ubic

Put this code in your service dir, i.e. in the file /etc/ubic/service/example (or if you opted for a home-dir installation, in the ~/ubic/service/example):

    use Ubic::Service::SimpleDaemon;
    Ubic::Service::SimpleDaemon->new(
        bin => 'sleep 1000',
    );

Start it:

    $ ubic start example
    Starting example... started (pid 41209)

Check its status:

    $ ubic status
    example running (pid 41209)
    ubic
        ubic.ping   off
        ubic.update off
        ubic.watchdog   running (pid 93226)

Or:

    $ ubic status example
    example running (pid 41209)

Now let's see how the watchdog works by killing the process (replace the pid value with the pid you got from the status command above):

    $ kill 41209

    $ ubic status example
    example not running

    $ ubic-watchdog
    [Thu May 26 20:20:54 2011]  example is broken, restarting

You don't have to run "ubic-watchdog" manually; it will do its work in background in a minute.

Ubic::Service::SimpleDaemon allows you to tune other service aspects other than bin. Check it out.

Series of blog posts written as tutorials <http://blogs.perl.org/mt/mt-search.fcgi?blog_id=310&tag=tutorial&limit=20>

Now go and read Ubic::Manual::Overview, it explains everything else that ubic has to offer.

Vyacheslav Matyukhin <mmcleric@yandex-team.ru>

This software is copyright (c) 2015 by Yandex LLC.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2015-01-27 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.