Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
383c1f87af | ||
|
|
ce3003b026 | ||
|
|
e06f4b2f9e | ||
|
|
b721fd894e | ||
|
|
b8ea6fd4b3 | ||
|
|
dbda63263b | ||
|
|
93cdc31be0 | ||
|
|
4dfbe46690 |
@@ -1,3 +1,10 @@
|
|||||||
|
## 0.42.0 (2012-04-18)
|
||||||
|
|
||||||
|
* Move read_environment to a public class method. [Phil Hagelberg]
|
||||||
|
* Drop parka dependency [Phil Hagelberg]
|
||||||
|
* add group support for supervisord [Raphael Randschau]
|
||||||
|
* fix enviroment export [Raphael Randschau]
|
||||||
|
|
||||||
## 0.41.0 (2012-03-16)
|
## 0.41.0 (2012-03-16)
|
||||||
|
|
||||||
* replace term-ansicolor with built-in colorization [David Dollar]
|
* replace term-ansicolor with built-in colorization [David Dollar]
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
foreman (0.42.0)
|
foreman (0.43.0)
|
||||||
thor (>= 0.13.6)
|
thor (>= 0.13.6)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ engine.procfile.entries.each do |process|
|
|||||||
1.upto(self.concurrency[process.name]) do |num|
|
1.upto(self.concurrency[process.name]) do |num|
|
||||||
port = engine.port_for(process, num, self.port)
|
port = engine.port_for(process, num, self.port)
|
||||||
name = if (conc > 1); "#{process.name}-#{num}" else process.name; end
|
name = if (conc > 1); "#{process.name}-#{num}" else process.name; end
|
||||||
environment = (engine.environment.map{ |var,env| "#{var.upcase}=#{env}" } + ["PORT=#{port}"])
|
environment = (engine.environment.map{ |var,env| %{#{var.upcase}="#{env}"} } + [%{PORT="#{port}"}])
|
||||||
app_name = "#{app}-#{name}"
|
app_name = "#{app}-#{name}"
|
||||||
app_names << app_name
|
app_names << app_name
|
||||||
%>
|
%>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
module Foreman
|
module Foreman
|
||||||
|
|
||||||
VERSION = "0.42.0"
|
VERSION = "0.43.0"
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
.\" generated with Ronn/v0.7.3
|
.\" generated with Ronn/v0.7.3
|
||||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||||
.
|
.
|
||||||
.TH "FOREMAN" "1" "February 2012" "Foreman 0.39.0" "Foreman Manual"
|
.TH "FOREMAN" "1" "February 2012" "Foreman 0.42.0" "Foreman Manual"
|
||||||
.
|
.
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
\fBforeman\fR \- manage Procfile\-based applications
|
\fBforeman\fR \- manage Procfile\-based applications
|
||||||
|
|||||||
@@ -15,12 +15,11 @@ describe Foreman::Export::Supervisord, :fakefs do
|
|||||||
it "exports to the filesystem" do
|
it "exports to the filesystem" do
|
||||||
supervisord.export
|
supervisord.export
|
||||||
|
|
||||||
File.read("/tmp/init/app.conf").should == example_export_file("supervisord/app.conf")
|
File.read("/tmp/init/app.conf").should == example_export_file("supervisord/app.conf")
|
||||||
end
|
end
|
||||||
|
|
||||||
it "cleans up if exporting into an existing dir" do
|
it "cleans up if exporting into an existing dir" do
|
||||||
mock(FileUtils).rm("/tmp/init/app.conf")
|
mock(FileUtils).rm("/tmp/init/app.conf")
|
||||||
|
|
||||||
supervisord.export
|
supervisord.export
|
||||||
supervisord.export
|
supervisord.export
|
||||||
end
|
end
|
||||||
@@ -30,8 +29,7 @@ describe Foreman::Export::Supervisord, :fakefs do
|
|||||||
|
|
||||||
it "exports to the filesystem with concurrency" do
|
it "exports to the filesystem with concurrency" do
|
||||||
supervisord.export
|
supervisord.export
|
||||||
|
File.read("/tmp/init/app.conf").should == example_export_file("supervisord/app-alpha-2.conf")
|
||||||
File.read("/tmp/init/app.conf").should == example_export_file("supervisord/app-alpha-2.conf")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -46,7 +44,6 @@ describe Foreman::Export::Supervisord, :fakefs do
|
|||||||
|
|
||||||
it "can export with alternate template files" do
|
it "can export with alternate template files" do
|
||||||
supervisord.export
|
supervisord.export
|
||||||
|
|
||||||
File.read("/tmp/init/app.conf").should == "alternate_template\n"
|
File.read("/tmp/init/app.conf").should == "alternate_template\n"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -67,9 +64,22 @@ describe Foreman::Export::Supervisord, :fakefs do
|
|||||||
|
|
||||||
it "can export with alternate template files" do
|
it "can export with alternate template files" do
|
||||||
supervisord.export
|
supervisord.export
|
||||||
|
|
||||||
File.read("/tmp/init/app.conf").should == "default_alternate_template\n"
|
File.read("/tmp/init/app.conf").should == "default_alternate_template\n"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "environment export" do
|
||||||
|
it "correctly translates environment when exporting" do
|
||||||
|
File.open("/tmp/supervisord_env", "w") { |f| f.puts("QUEUE=fastqueue,slowqueue\nVERBOSE=1") }
|
||||||
|
|
||||||
|
engine = Foreman::Engine.new(procfile,:env => "/tmp/supervisord_env")
|
||||||
|
supervisor = Foreman::Export::Supervisord.new("/tmp/init", engine, options)
|
||||||
|
stub(supervisor).say
|
||||||
|
|
||||||
|
supervisor.export
|
||||||
|
|
||||||
|
File.read("/tmp/init/app.conf").should == example_export_file("supervisord/app-env-with-comma.conf")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ stdout_logfile=/var/log/app/alpha-1-out.log
|
|||||||
stderr_logfile=/var/log/app/alpha-1-err.log
|
stderr_logfile=/var/log/app/alpha-1-err.log
|
||||||
user=app
|
user=app
|
||||||
directory=/tmp/app
|
directory=/tmp/app
|
||||||
environment=PORT=5000
|
environment=PORT="5000"
|
||||||
[program:app-alpha-2]
|
[program:app-alpha-2]
|
||||||
command=./alpha
|
command=./alpha
|
||||||
autostart=true
|
autostart=true
|
||||||
@@ -18,7 +18,7 @@ stdout_logfile=/var/log/app/alpha-2-out.log
|
|||||||
stderr_logfile=/var/log/app/alpha-2-err.log
|
stderr_logfile=/var/log/app/alpha-2-err.log
|
||||||
user=app
|
user=app
|
||||||
directory=/tmp/app
|
directory=/tmp/app
|
||||||
environment=PORT=5001
|
environment=PORT="5001"
|
||||||
|
|
||||||
[group:app]
|
[group:app]
|
||||||
programs=app-alpha-1,app-alpha-2
|
programs=app-alpha-1,app-alpha-2
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
[program:app-alpha]
|
||||||
|
command=./alpha
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
stopsignal=QUIT
|
||||||
|
stdout_logfile=/var/log/app/alpha-1-out.log
|
||||||
|
stderr_logfile=/var/log/app/alpha-1-err.log
|
||||||
|
user=app
|
||||||
|
directory=/tmp/app
|
||||||
|
environment=QUEUE="fastqueue,slowqueue",VERBOSE="1",PORT="5000"
|
||||||
|
[program:app-bravo]
|
||||||
|
command=./bravo
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
stopsignal=QUIT
|
||||||
|
stdout_logfile=/var/log/app/bravo-1-out.log
|
||||||
|
stderr_logfile=/var/log/app/bravo-1-err.log
|
||||||
|
user=app
|
||||||
|
directory=/tmp/app
|
||||||
|
environment=QUEUE="fastqueue,slowqueue",VERBOSE="1",PORT="5100"
|
||||||
|
|
||||||
|
[group:app]
|
||||||
|
programs=app-alpha,app-bravo
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
[program:app-alpha]
|
||||||
|
command=./alpha
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
stopsignal=QUIT
|
||||||
|
stdout_logfile=/var/log/app/alpha-1-out.log
|
||||||
|
stderr_logfile=/var/log/app/alpha-1-err.log
|
||||||
|
user=app
|
||||||
|
directory=/tmp/app
|
||||||
|
environment=FOO="bar",PORT="5000"
|
||||||
|
[program:app-bravo]
|
||||||
|
command=./bravo
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
stopsignal=QUIT
|
||||||
|
stdout_logfile=/var/log/app/bravo-1-out.log
|
||||||
|
stderr_logfile=/var/log/app/bravo-1-err.log
|
||||||
|
user=app
|
||||||
|
directory=/tmp/app
|
||||||
|
environment=FOO="bar",PORT="5100"
|
||||||
@@ -8,7 +8,7 @@ stdout_logfile=/var/log/app/alpha-1-out.log
|
|||||||
stderr_logfile=/var/log/app/alpha-1-err.log
|
stderr_logfile=/var/log/app/alpha-1-err.log
|
||||||
user=app
|
user=app
|
||||||
directory=/tmp/app
|
directory=/tmp/app
|
||||||
environment=PORT=5000
|
environment=PORT="5000"
|
||||||
[program:app-bravo]
|
[program:app-bravo]
|
||||||
command=./bravo
|
command=./bravo
|
||||||
autostart=true
|
autostart=true
|
||||||
@@ -18,7 +18,7 @@ stdout_logfile=/var/log/app/bravo-1-out.log
|
|||||||
stderr_logfile=/var/log/app/bravo-1-err.log
|
stderr_logfile=/var/log/app/bravo-1-err.log
|
||||||
user=app
|
user=app
|
||||||
directory=/tmp/app
|
directory=/tmp/app
|
||||||
environment=PORT=5100
|
environment=PORT="5100"
|
||||||
|
|
||||||
[group:app]
|
[group:app]
|
||||||
programs=app-alpha,app-bravo
|
programs=app-alpha,app-bravo
|
||||||
|
|||||||
Reference in New Issue
Block a user