Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90356ca41d | ||
|
|
2ce3a15bb7 | ||
|
|
f960277ae8 | ||
|
|
4f5402af4a | ||
|
|
a27f964881 | ||
|
|
cf008385b4 | ||
|
|
f633a579d6 | ||
|
|
ea90bf3615 | ||
|
|
c65c71b1c0 | ||
|
|
6f10f4f014 |
@@ -0,0 +1,87 @@
|
|||||||
|
foreman(1) -- manage Procfile-based applications
|
||||||
|
================================================
|
||||||
|
|
||||||
|
## SYNOPSIS
|
||||||
|
|
||||||
|
`foreman start [process]`<br>
|
||||||
|
`foreman export <var>format</var> [location]`
|
||||||
|
|
||||||
|
## DESCRIPTION
|
||||||
|
|
||||||
|
**Foreman** is a manager for Procfile-based applications. Its aim is to
|
||||||
|
abstract away the details of the Procfile format, and allow you to either run
|
||||||
|
your application directly or export it to some other process management
|
||||||
|
format.
|
||||||
|
|
||||||
|
## RUNNING
|
||||||
|
|
||||||
|
`foreman start` is used to run your application directly from the command line.
|
||||||
|
|
||||||
|
If no additional parameters are passed, foreman will run one instance of each
|
||||||
|
type of process defined in your Procfile.
|
||||||
|
|
||||||
|
If a parameter is passed, foreman will run one instance of the specified
|
||||||
|
application type.
|
||||||
|
|
||||||
|
The following options control how the application is run:
|
||||||
|
|
||||||
|
* `-s`, `--screen`:
|
||||||
|
Run the application as a series of screen windows rather than interleaved
|
||||||
|
in stdout.
|
||||||
|
|
||||||
|
## EXPORTING
|
||||||
|
|
||||||
|
`foreman export` is used to export your application to another process
|
||||||
|
management format.
|
||||||
|
|
||||||
|
An location to export can be passed as an argument. This argument may be
|
||||||
|
either required or optional depending on the export format.
|
||||||
|
|
||||||
|
The following options control how the application is run:
|
||||||
|
|
||||||
|
* `-a`, `--app`:
|
||||||
|
Use this name rather than the application's root directory name as the
|
||||||
|
name of the application when exporting.
|
||||||
|
|
||||||
|
* `-c`, `--concurrency`:
|
||||||
|
Specify the number of each process type to run. The value passed in
|
||||||
|
should be in the format `process=num,process=num`.
|
||||||
|
|
||||||
|
## OPTIONS
|
||||||
|
|
||||||
|
These options control all modes of foreman's operation.
|
||||||
|
|
||||||
|
* `-p`, `--procfile`
|
||||||
|
Specify an alternate location for the application's Procfile. This file's
|
||||||
|
containing directory will be assumed to be the root directory of the
|
||||||
|
application.
|
||||||
|
|
||||||
|
## EXAMPLES
|
||||||
|
|
||||||
|
Start one instance of each process type, interleave the output on stdout:
|
||||||
|
|
||||||
|
$ foreman start
|
||||||
|
|
||||||
|
Export the application in upstart format:
|
||||||
|
|
||||||
|
$ foreman export upstart /etc/init
|
||||||
|
|
||||||
|
Run one process type from the application defined in a specific Procfile:
|
||||||
|
|
||||||
|
$ foreman start alpha -p ~/app/Procfile
|
||||||
|
|
||||||
|
## COPYRIGHT
|
||||||
|
|
||||||
|
Foreman is Copyright (C) 2010 David Dollar <http://daviddollar.org>
|
||||||
|
|
||||||
|
|
||||||
|
[SYNOPSIS]: #SYNOPSIS "SYNOPSIS"
|
||||||
|
[DESCRIPTION]: #DESCRIPTION "DESCRIPTION"
|
||||||
|
[RUNNING]: #RUNNING "RUNNING"
|
||||||
|
[EXPORTING]: #EXPORTING "EXPORTING"
|
||||||
|
[OPTIONS]: #OPTIONS "OPTIONS"
|
||||||
|
[EXAMPLES]: #EXAMPLES "EXAMPLES"
|
||||||
|
[COPYRIGHT]: #COPYRIGHT "COPYRIGHT"
|
||||||
|
|
||||||
|
|
||||||
|
[foreman(1)]: foreman.1.html
|
||||||
-85
@@ -1,85 +0,0 @@
|
|||||||
= Foreman
|
|
||||||
|
|
||||||
== Procfile
|
|
||||||
|
|
||||||
alpha ./bin/alpha
|
|
||||||
bravo ./bin/bravo some args
|
|
||||||
charlie ./bin/charlie -n 5
|
|
||||||
|
|
||||||
== Development mode
|
|
||||||
|
|
||||||
=== Running
|
|
||||||
|
|
||||||
Log files will be output to standard out, colorized to aid in visual separation.
|
|
||||||
|
|
||||||
$ foreman start
|
|
||||||
[01:27:08] [alpha] started with pid 4393
|
|
||||||
[01:27:08] [bravo] started with pid 4394
|
|
||||||
[01:27:08] [charlie] started with pid 4395
|
|
||||||
[01:27:08] [bravo] initializing...
|
|
||||||
[01:27:08] [bravo] complete
|
|
||||||
|
|
||||||
=== Using Screen
|
|
||||||
|
|
||||||
Launch the processes in a screen session in indivudal windows
|
|
||||||
|
|
||||||
$ foreman screen
|
|
||||||
|
|
||||||
== Single Process Execution
|
|
||||||
|
|
||||||
$ foreman execute alpha
|
|
||||||
|
|
||||||
== Exporting to Upstart
|
|
||||||
|
|
||||||
=== Export to upstart scripts
|
|
||||||
|
|
||||||
$ foreman export sampleapp
|
|
||||||
|
|
||||||
$ initctl list | grep sampleapp
|
|
||||||
sampleapp start/running
|
|
||||||
sampleapp-alpha (1) start/running, process 4204
|
|
||||||
sampleapp-bravo (1) start/running, process 4589
|
|
||||||
sampleapp-charlie (1) start/running, process 4597
|
|
||||||
|
|
||||||
=== Change process concurrency levels
|
|
||||||
|
|
||||||
$ foreman scale sampleapp alpha 4
|
|
||||||
sampleapp-alpha (2) start/running, process 4164
|
|
||||||
sampleapp-alpha (3) start/running, process 4166
|
|
||||||
sampleapp-alpha (4) start/running, process 4168
|
|
||||||
|
|
||||||
$ initctl list | grep sampleapp
|
|
||||||
sampleapp start/running
|
|
||||||
sampleapp-alpha (4) start/running, process 4168
|
|
||||||
sampleapp-alpha (3) start/running, process 4166
|
|
||||||
sampleapp-alpha (2) start/running, process 4164
|
|
||||||
sampleapp-alpha (1) start/running, process 4204
|
|
||||||
sampleapp-bravo (1) start/running, process 4589
|
|
||||||
sampleapp-charlie (1) start/running, process 4597
|
|
||||||
|
|
||||||
$ foreman scale sampleapp alpha 1
|
|
||||||
sampleapp-alpha stop/waiting
|
|
||||||
sampleapp-alpha stop/waiting
|
|
||||||
sampleapp-alpha stop/waiting
|
|
||||||
|
|
||||||
=== Good Upstart citizen
|
|
||||||
|
|
||||||
All Upstart commands work as expected
|
|
||||||
|
|
||||||
$ start sampleapp
|
|
||||||
$ stop sampleapp
|
|
||||||
$ restart sampleapp
|
|
||||||
|
|
||||||
=== Standardized Logging
|
|
||||||
|
|
||||||
/var/log/sampleapp/alpha.log
|
|
||||||
/var/log/sampleapp/bravo.log
|
|
||||||
/var/log/sampleapp/charlie.log
|
|
||||||
|
|
||||||
== License
|
|
||||||
|
|
||||||
MIT
|
|
||||||
|
|
||||||
== Copyright
|
|
||||||
|
|
||||||
(c) 2010 David Dollar
|
|
||||||
@@ -29,6 +29,9 @@ task :man do
|
|||||||
ENV['RONN_MANUAL'] = "Foreman Manual"
|
ENV['RONN_MANUAL'] = "Foreman Manual"
|
||||||
ENV['RONN_ORGANIZATION'] = "Foreman #{Foreman::VERSION}"
|
ENV['RONN_ORGANIZATION'] = "Foreman #{Foreman::VERSION}"
|
||||||
sh "ronn -w -s toc -r5 --markdown man/*.ronn"
|
sh "ronn -w -s toc -r5 --markdown man/*.ronn"
|
||||||
|
sh "cp man/foreman.1.markdown README.markdown"
|
||||||
|
sh "git add README.markdown"
|
||||||
|
sh "git commit -m 'update readme' || echo 'nothing to commit'"
|
||||||
end
|
end
|
||||||
|
|
||||||
task :pages => :man do
|
task :pages => :man do
|
||||||
|
|||||||
+2
-2
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.name = %q{foreman}
|
s.name = %q{foreman}
|
||||||
s.version = "0.4.2"
|
s.version = "0.4.3"
|
||||||
|
|
||||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||||
s.authors = ["David Dollar"]
|
s.authors = ["David Dollar"]
|
||||||
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|||||||
s.email = %q{ddollar@gmail.com}
|
s.email = %q{ddollar@gmail.com}
|
||||||
s.executables = ["foreman"]
|
s.executables = ["foreman"]
|
||||||
s.extra_rdoc_files = [
|
s.extra_rdoc_files = [
|
||||||
"README.rdoc"
|
"README.markdown"
|
||||||
]
|
]
|
||||||
s.files = [
|
s.files = [
|
||||||
"Rakefile",
|
"Rakefile",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
module Foreman
|
module Foreman
|
||||||
|
|
||||||
VERSION = "0.4.2"
|
VERSION = "0.4.3"
|
||||||
|
|
||||||
class AppDoesNotExist < Exception; end
|
class AppDoesNotExist < Exception; end
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -3,8 +3,8 @@ foreman(1) -- manage Procfile-based applications
|
|||||||
|
|
||||||
## SYNOPSIS
|
## SYNOPSIS
|
||||||
|
|
||||||
`foreman` start [process]<br>
|
`foreman start [process]`<br>
|
||||||
`foreman` export <format> [location]
|
`foreman export <format> [location]`
|
||||||
|
|
||||||
## DESCRIPTION
|
## DESCRIPTION
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user