etsy / deployinator Goto Github PK
View Code? Open in Web Editor NEWDeployinate!
Home Page: http://etsy.me/deployinator
License: MIT License
Deployinate!
Home Page: http://etsy.me/deployinator
License: MIT License
When I run deploys I get the start of the deployment in the logs windows but none of the logs I have create come out. The last thing I see is below and deployinator is unable to detect that the deployment has completed. I am using log_and_stream and the 1501422651-nobody-workbench_bot_uat_deploy.html is filled as expected. My environment is always building from the lastest Gem and is running in Docker with ports 7777/7778 open I can see the WS connection open in the browser(not sure how to inspect the traffic).
The deployment its self is some json posts to various services and takes approx 5-10 secs
Thanks
Mark
Any ideas?
LOCKING workbench_bot
Push started at 1501422651Calling workbench_bot_uat_deploy
2017-07-30 13:50:51 +0000: Running ln -nfs /opt/deployinator/run_logs/1501422651-nobody-workbench_bot_uat_deploy.html /opt/deployinator/run_logs/current-workbench_bot
Time: 0.000000 0.000000 0.000000 ( 0.002177)
Trying to use deployinator with an svn based repository. There are several references to the diff_paths_for_stack method (helpers.rb line 198 and elsewhere). Could you post a patch with the implemented method?
Thanks!
If you want to use deployinator to deploy itself currently you have to call it something different like deployin8or to avoid namespacing issues. This can be fixed by changing the way view classes are called to be "DeployinatorView" instead of "Deployinator", the exact stack name.
Hi,
I've tried Deployinator still on dev environment, following the Readme. Everything looks fine, and it runs well with the sample configuration by default. But when I start to add the code you give for config/base.rb, stacks/test_stack.rb, helpers/test_stack.rb, the push-deploy action always ends in an error: There was an exception during this deploy. Aborted! (undefined method `[]' for nil:NilClass).
Do you think is anything related to environment (my linux distro, etc.)? Related to the tailer? ¿?
Thanks in advance. ;)
So far I've downloaded deployinator and installed all the packages needed to run it but I'm having trouble getting past the auth so I can actually view a page.
I've setup GodAuth, but I realize that deployinator is meant to work with a system like GodAuth. Is there a write up somewhere on how to get deployinator working for the average dummy? Or at least a way to circumvent the auth system so I can see deployinator running in development?
Sometimes, I get the below error when reloading after deploying:
ArgumentError at /
argument out of range
/home/deploybot/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/time.rb in local
self.local(year, mon, day, hour, min, sec, usec)
/home/deploybot/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/time.rb in make_time
self.local(year, mon, day, hour, min, sec, usec)
/home/deploybot/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/time.rb in parse
make_time(year, d[:mon], d[:mday], d[:hour], d[:min], d[:sec], d[:sec_fraction], d[:zone], now)
/opt/deployinator/helpers.rb in block in log_to_hash
utc_time = Time.parse(fields[0] + "UTC")
/opt/deployinator/helpers.rb in map
l = log_entries(opts).map do |ll|
/opt/deployinator/helpers.rb in log_to_hash
l = log_entries(opts).map do |ll|
/opt/deployinator/views/view_helpers.rb in log_lines
log_to_hash(:stack => stack)
/opt/deployinator/lib/app.rb in block in class:App
mustache @stack
/opt/deployinator/lib/stream.rb in _call
status, headers, response = @app.call(env)
/opt/deployinator/lib/stream.rb in call
dup._call(env)
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/rack/request_handler.rb in process_request
status, headers, body = @app.call(env)
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/abstract_request_handler.rb in accept_and_process_next_request
process_request(headers, input_stream, connection, full_http_response)
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/abstract_request_handler.rb in main_loop
if !accept_and_process_next_request(socket_wrapper, channel, buffer)
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/rack/application_spawner.rb in start_request_handler
handler.main_loop
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/rack/application_spawner.rb in block in handle_spawn_application
self.class.send(:start_request_handler, MessageChannel.new(b),
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/utils.rb in safe_fork
yield
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/rack/application_spawner.rb in handle_spawn_application
safe_fork('application', true) do
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/abstract_server.rb in server_main_loop
send(@message_handlers[name], client, *args)
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/abstract_server.rb in start_synchronously
server_main_loop(password, server_socket)
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/abstract_server.rb in start
start_synchronously(@socket_filename, @password, server_socket, b)
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/rack/application_spawner.rb in start
super
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/spawn_manager.rb in block (2 levels) in spawn_rack_application
spawner.start
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/abstract_server_collection.rb in lookup_or_add
server = yield
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/spawn_manager.rb in block in spawn_rack_application
spawner = @spawners.lookup_or_add(key) do
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/abstract_server_collection.rb in block in synchronize
yield
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/abstract_server_collection.rb in synchronize
@lock.synchronize do
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/spawn_manager.rb in spawn_rack_application
@spawners.synchronize do
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/spawn_manager.rb in spawn_application
return spawn_rack_application(options)
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/spawn_manager.rb in handle_spawn_application
app_process = spawn_application(options)
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/abstract_server.rb in server_main_loop
send(@message_handlers[name], client, *args)
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/lib/phusion_passenger/abstract_server.rb in start_synchronously
server_main_loop(password, server_socket)
/home/deploybot/.passenger/standalone/3.0.8-x86_64-ruby1.9.2-linux-gcc4.1.2-1002/support/helper-scripts/passenger-spawn-server in
Hi,
I created a new stack and there was some problem with the path given for git checkout. Even though it showed the error, it continued with the rest of the commands. This is output:
!
Running sh -c 'cd /home/deploy/deployinator_jobs && git clone [email protected]:multunus/utwebapp.git ut'
STDERR: cd: 1: can't cd to /home/deploy/deployinator_jobs
Time: 0.000000 0.000000 0.000000 ( 0.002753)
sh -c 'cd /home/deploy/deployinator_jobs/ut && git rev-parse --short HEAD'Setting version.txt to -20110804-180358-IST
Running sh -c 'cd /home/deploy/deployinator_jobs/ut && echo -20110804-180358-IST > version.txt'
STDERR: cd: 1: can't cd to /home/deploy/deployinator_jobs/ut
Time: 0.000000 0.000000 0.010000 ( 0.002461)
Running cd /home/deploy/deployinator_jobs && cap deploy
STDERR: cd: 1: can't cd to /home/deploy/deployinator_jobs
Time: 0.000000 0.000000 0.000000 ( 0.003815)
Done!
Ended at 2011-08-04 18:04:04 +0530
Took: 5.538239679 seconds
I wanted to stop when it encounters the first error. Can you please let me know what needs to be done for the same? And also please suggest a way for me to differentiate between success and failed builds.
Note: I am running in ubuntu 10.04 with rvm ruby version 1.9.2 using shotgun. While running the STACK=new_prj rake new_stack
it gave the error turn: not found
which I think can be ignored.
Thanks,
Leena
i had the same problem, ruby-2.1.2
README.md had a link to defunkt/mustache/issues as opposed to etsy/deployinator/issues.
Commit: https://github.com/elliottcarlson/deployinator/tree/fix_link_in_readme
Pull request submitted.
Hi guys - I can't seem to find a License file, or any licensing headers. Probably want to add them. :)
I'm defining custom attributes via attr_accessor
in the local Deployinator configuration and then set it to an empty hash in config/base.rb
. However it seems like for base config the Deployinator module from the vendorized gem is used. It works fine in config/development.rb
and config/production.rb
.
relevant sinatra stacktrace:
undefined method `cheffilez=' for Deployinator:Module
/path/deployinator/config/base.rb 46 in `'
1 /path/deployinator/vendor/bundle/ruby/1.9.1/bundler/gems/deployinator-438a82f58710/lib/deployinator/config.rb 4 in `require'
2 /path/deployinator/vendor/bundle/ruby/1.9.1/bundler/gems/deployinator-438a82f58710/lib/deployinator/config.rb 4 in `'
3 /path/deployinator/vendor/bundle/ruby/1.9.1/bundler/gems/deployinator-438a82f58710/lib/deployinator/base.rb 10 in `require'
4 /path/deployinator/vendor/bundle/ruby/1.9.1/bundler/gems/deployinator-438a82f58710/lib/deployinator/base.rb 10 in `'
5 config.ru 2 in `require'
6 config.ru 2 in `block in
'
7 /path/deployinator/vendor/bundle/ruby/1.9.1/gems/rack-1.6.0/lib/rack/builder.rb 55 in `instance_eval'
8 /path/deployinator/vendor/bundle/ruby/1.9.1/gems/rack-1.6.0/lib/rack/builder.rb 55 in `initialize'
9 config.ru 1 in `new'
10 config.ru 1 in `
'
11 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/rack/application_spawner.rb 225 in `eval'
12 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/rack/application_spawner.rb 225 in `load_rack_app'
13 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/rack/application_spawner.rb 157 in `block in initialize_server'
14 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/utils.rb 563 in `report_app_init_status'
15 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/rack/application_spawner.rb 154 in `initialize_server'
16 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/abstract_server.rb 204 in `start_synchronously'
17 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/abstract_server.rb 180 in `start'
18 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/rack/application_spawner.rb 129 in `start'
19 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/spawn_manager.rb 253 in `block (2 levels) in spawn_rack_application'
20 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/abstract_server_collection.rb 132 in `lookup_or_add'
21 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/spawn_manager.rb 246 in `block in spawn_rack_application'
22 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/abstract_server_collection.rb 82 in `block in synchronize'
23 prelude> 10:in `synchronize'
24 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/abstract_server_collection.rb 79 in `synchronize'
25 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/spawn_manager.rb 244 in `spawn_rack_application'
26 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/spawn_manager.rb 137 in `spawn_application'
27 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/spawn_manager.rb 275 in `handle_spawn_application'
28 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/abstract_server.rb 357 in `server_main_loop'
29 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/lib/phusion_passenger/abstract_server.rb 206 in `start_synchronously'
30 /usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.15/helper-scripts/passenger-spawn-server 99 in `
'
This line https://github.com/etsy/deployinator/blob/master/lib/deployinator/helpers/git.rb#L63 adds a newline to the end of version.txt
Then later when I do something like
def some_version
%x{ssh <host> 'cat version.txt'}
end
The log ends up with a newline in the file like this:
2015-02-27 20:50:20|PROD|cha|stack production deploy: old a9dcb45150, new: a9dcb45150-20150227-205018-UTC|stack|1425070218-cha-stack_production.html
2015-02-28 00:55:06|PROD|cha|stack production deploy: old 7e964ec402-20150228-003437-UTC
, new: 7e964ec402-20150228-005505-UTC
|stack|1425084904-cha-stack_prod.html
And then the main page errors when it tries to parse the time out of this with this error:
ArgumentError - no time information in "UTC":
I'd be happy submit a pull request, but I don't know if that file has a newline for a reason or if I should just chomp my cat
command.
This causes issues where the wrong stack is set in the mustache templates for the view, causing all sorts of confusion. Here is where we should check if the stack exists:
deployinator/lib/deployinator/app.rb
Line 99 in 7d4be7a
Can you provide a multi environment deploy example? Such as staging -> production? Hoes does Deployinator handle this?
When I am running the command run_cmd %Q{cap deploy}
, it is giving me the following error:
Running cd /var/lib/hudson/deployinator_jobs/ut && cap production deploy:setup
STDERR: /usr/lib/ruby/1.8/rubygems/dependency.rb:52:in `initialize': Valid types are [:development, :runtime], not nil (ArgumentError)
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/resolver.rb:359:in `new'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/resolver.rb:359:in `search'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/resolver.rb:354:in `gems_size'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/resolver.rb:179:in `resolve'
from /usr/lib/ruby/1.8/rubygems/source_index.rb:95:in `sort_by'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/resolver.rb:175:in `each'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/resolver.rb:175:in `sort_by'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/resolver.rb:175:in `resolve'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/resolver.rb:160:in `start'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/resolver.rb:128:in `resolve'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/resolver.rb:127:in `catch'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/resolver.rb:127:in `resolve'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/definition.rb:151:in `resolve'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/definition.rb:90:in `specs'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/definition.rb:135:in `specs_for'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/definition.rb:124:in `requested_specs'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/environment.rb:23:in `requested_specs'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/runtime.rb:11:in `setup'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler.rb:107:in `setup'
from /var/lib/hudson/.rvm/gems/ruby-1.9.2-rc1@global/gems/bundler-1.0.15/lib/bundler/setup.rb:17
But am able to run the same command from the shell prompt. Can you please let me know what am I missing?
I've been continued developing some small features I really need for using Deployinator as our main deployment-tool. The first one has been regarding to Bitbucket, our hosting for git projects.
Deployinator's helpers for git actions use GitHub as the default service. That means some variables and methods, and mainly some assumptions regarding to the url composition.
I've introduced my "case" within the git_url
method, evaluating the github_host
and composing specific url when this is set to bitbucket. Of course, there are ways for doing that cleaner and easier to add more services in the future. Do you think it would be interesting a pull-request for starting that?
We should stop shelling out and use a proper git library for our git operations.
https://github.com/libgit2/rugged
If I try to do any diffs (including on the demo stack), I get an error:
NoMethodError at /diff/demo/116dfe3/116dfe3
undefined method `demo_git_repo_url' for #Deployinator::App:0x95b47b8
/home/jason/src/deployinator/helpers.rb in use_github
raise self.send("#{stack.to_s}_git_repo_url")
/home/jason/src/deployinator/helpers.rb in diff
if use_github(stack.intern, r1, r2)
/home/jason/src/deployinator/lib/app.rb in block in class:App
diff(params["r1"], params["r2"], params["stack"])
/home/jason/src/deployinator/lib/stream.rb in _call
status, headers, response = @app.call(env)
/home/jason/src/deployinator/lib/stream.rb in call
dup._call(env)
/home/jason/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb in service
si.service(req, res)
/home/jason/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb in run
server.service(req, res)
/home/jason/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/server.rb in block in start_thread
block ? block.call(sock) : run(sock)
It should be said that it is not allowed to name a new stack with a capital first letter. Took me a good hour to figure this out....
Created a new forked branch of deployinator with feature requests and bug requests. (segv from irc)
GIT url: [email protected]:rlewon/deployinator.git
We currently ignore the status of the git_clone command (in https://github.com/etsy/deployinator/blob/master/lib/deployinator/helpers/git.rb#L128)
this can lead to annoying troubleshooting, if the permissions are wrong on the checkout folder for example.
It looks like the readme section for "Customizing your stack" might be wrong. It doesn't do anything for me.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.