-
Notifications
You must be signed in to change notification settings - Fork 28
Some of the patches we talked about #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cfedde
wants to merge
6
commits into
berekuk:master
Choose a base branch
from
cfedde:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3cda757
Added more tutorial content to Ubic::Manual::Intro
53c4807
Deal with umask issues found by cfedde
a57015c
fix option copy mistake
1f19961
typos
20f20c1
default umask should be less permissive
b5317ef
Point to the right manual page for discussion about start up options.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,29 @@ Alternatively, if you're using Debian or Ubuntu, you can install ubic .deb packa | |
| apt-get update | ||
| apt-get install ubic | ||
|
|
||
| =head1 GENERAL LAYOUT | ||
|
|
||
| After C<sudo ubic-admin setup> has successfully finished you will have a | ||
| working Ubic deployment ready to use. Two file hierarchies will be present: | ||
| I</etc/ubic> and I</var/lib/ubic>. These contain the configuration and state | ||
| of monitored processes. The ubic.watchdog daemon will be running | ||
| and a cron job will be configured to watch the watchdog. | ||
|
|
||
| Confirm that all is running properly with C<sudo ubic status>. You will see something like the following: | ||
|
|
||
| ubic | ||
| ubic.ping off | ||
| ubic.update off | ||
| ubic.watchdog running (pid 15320) | ||
|
|
||
| This shows a minimal default Ubic configuration. Running C<sudo crontab -l> will show the watchdog watching cron job. | ||
|
|
||
| * * * * * /usr/bin/ubic-watchdog ubic.watchdog >>/var/log/ubic/watchdog.log 2>>/var/log/ubic/watchdog.err.log | ||
|
|
||
| With this configiguration no init.d script is needed. There are alternative | ||
| ways to deploy discussed in L<Ubic::Manual::FAQ>. For this discussion | ||
| we'll stick with these defaults. | ||
|
|
||
| =head1 WRITE YOUR FIRST SERVICE | ||
|
|
||
| Put this code in your service dir, i.e. in the file I</etc/ubic/service/example> (or if you opted for a home-dir installation, in the I<~/ubic/service/example>): | ||
|
|
@@ -75,6 +98,42 @@ Now let's see how the watchdog works by killing the process (replace the pid val | |
|
|
||
| You don't have to run C<ubic-watchdog> manually; it will do its work in background in a minute. | ||
|
|
||
| =head1 WRITE YOUR SECOND SERVICE | ||
|
|
||
| Put this config into I<example2.ini> your service directory as in example 1 | ||
| above: | ||
|
|
||
| module = Ubic::Service::SimpleDaemon | ||
| [options] | ||
| bin = sleep 15 | ||
| user = nobody | ||
|
|
||
| Set up a simple terminal display to watch what is going on: | ||
|
|
||
| watch 'ps -ef | grep sleep | grep -v grep; ubic status; | ||
| tail -n 5 /var/log/ubic/watchdog.log' | ||
|
|
||
| In another terminal start the process | ||
|
|
||
| ubic start example2 | ||
|
|
||
| Note that the background process dies every 15 seconds as expected. Also note | ||
| that it is restared by the watchdog after it has been idle for about a minute. | ||
|
|
||
| More details about using .ini files can be found in | ||
| L<Ubic::ServiceLoader::Ext::ini>. You can also use JSON config. That | ||
| alternative is described in L<Ubic::ServiceLoader::Ext::json>. | ||
|
|
||
| =head1 OTHER SERVICES | ||
|
|
||
| There are two other services deployed as part of the default Ubic setup. | ||
| They are off by default and can probably be left that way. | ||
| These are I<ubic.ping> and I<ubic.update>. The I<ubic.ping> service provides | ||
| a way to check that services are running via a REST like API. | ||
| The I<ubic.update> service provides a similar function by port number. | ||
| As of this writing they are not particulary useful for basic users of I<Ubic> | ||
| service. | ||
|
|
||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Everything else looks good to me :) |
||
| =head1 SEE ALSO | ||
|
|
||
| L<Ubic::Service::SimpleDaemon> allows you to tune other service aspects other than I<bin>. Check it out. | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, are they really described there? Or do you plan to write that part of documentation later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documents should be self consistant. The discussion is in the faq. Change made.