ziyan-junaideen / consul

Consul - Open Government and E-Participation Web Software
GNU Affero General Public License v3.0
0 stars 1 forks source link

Deployment issues #5

Closed allthesignals closed 6 years ago

allthesignals commented 6 years ago

I'm using the Ansible-based installer here to deploy Consul from origin master: https://github.com/consul/installer

This seems to work fine, but when I attempt to deploy feature/2-ideas, I am seeing failures having to do with syntax errors in the config/deploy.rb step.

Full Log ``` /home/deploy/.rvm/gems/ruby-2.3.2/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require': /home/deploy/consul/config/environments/production.rb:55: syntax error, unexpected ':', expecting keyword_end (SyntaxError) port: "25", ^ /home/deploy/consul/config/environments/production.rb:55: syntax error, unexpected ',', expecting keyword_end from /home/deploy/.rvm/gems/ruby-2.3.2/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in require' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/railties-4.2.10/lib/rails/engine.rb:598:in `block (2 levels) in ' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/railties-4.2.10/lib/rails/engine.rb:597:in `each' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/railties-4.2.10/lib/rails/engine.rb:597:in `block in ' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/railties-4.2.10/lib/rails/initializable.rb:30:in `instance_exec' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/railties-4.2.10/lib/rails/initializable.rb:30:in `run' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/railties-4.2.10/lib/rails/initializable.rb:55:in `block in run_initializers' from /home/deploy/.rvm/rubies/ruby-2.3.2/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each' from /home/deploy/.rvm/rubies/ruby-2.3.2/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component' from /home/deploy/.rvm/rubies/ruby-2.3.2/lib/ruby/2.3.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from' from /home/deploy/.rvm/rubies/ruby-2.3.2/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from' from /home/deploy/.rvm/rubies/ruby-2.3.2/lib/ruby/2.3.0/tsort.rb:421:in `block in each_strongly_connected_component_from' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/railties-4.2.10/lib/rails/initializable.rb:44:in `each' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/railties-4.2.10/lib/rails/initializable.rb:44:in `tsort_each_child' from /home/deploy/.rvm/rubies/ruby-2.3.2/lib/ruby/2.3.0/tsort.rb:415:in `call' from /home/deploy/.rvm/rubies/ruby-2.3.2/lib/ruby/2.3.0/tsort.rb:415:in `each_strongly_connected_component_from' from /home/deploy/.rvm/rubies/ruby-2.3.2/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component' from /home/deploy/.rvm/rubies/ruby-2.3.2/lib/ruby/2.3.0/tsort.rb:347:in `each' from /home/deploy/.rvm/rubies/ruby-2.3.2/lib/ruby/2.3.0/tsort.rb:347:in `call' from /home/deploy/.rvm/rubies/ruby-2.3.2/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component' from /home/deploy/.rvm/rubies/ruby-2.3.2/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each' from /home/deploy/.rvm/rubies/ruby-2.3.2/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/railties-4.2.10/lib/rails/initializable.rb:54:in `run_initializers' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/railties-4.2.10/lib/rails/application.rb:352:in `initialize!' from /home/deploy/consul/config/environment.rb:5:in `' from config.ru:4:in `require' from config.ru:4:in `block in
' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/rack-1.6.10/lib/rack/builder.rb:55:in `instance_eval' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/rack-1.6.10/lib/rack/builder.rb:55:in `initialize' from config.ru:1:in `new' from config.ru:1:in `
' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/unicorn-5.4.0/lib/unicorn.rb:56:in `eval' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/unicorn-5.4.0/lib/unicorn.rb:56:in `block in builder' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:795:in `build_app!' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:139:in `start' from /home/deploy/.rvm/gems/ruby-2.3.2/gems/unicorn-5.4.0/bin/unicorn:126:in `' from /home/deploy/.rvm/gems/ruby-2.3.2/bin/unicorn:22:in `load' from /home/deploy/.rvm/gems/ruby-2.3.2/bin/unicorn:22:in `
' from /home/deploy/.rvm/gems/ruby-2.3.2/bin/ruby_executable_hooks:15:in `eval' from /home/deploy/.rvm/gems/ruby-2.3.2/bin/ruby_executable_hooks:15:in `
' ```

There is a relevant deployment step that writes some configuration into that file: https://github.com/consul/installer/blob/c296c71919f489ab8d8dfb55471b334e0caf19b1/roles/email/tasks/main.yml

When I ssh into the server to see the Ansible-written file, I see this:

# config/environments/production.rb

Rails.application.configure do
  # ...
  # Use a different logger for distributed setups.
    port:                 "25",
  # ...
end

This is invalid Ruby syntax.

Any thoughts on this? My guess is that something there changed, or is out of sync with master, and is throwing off the regex portion of the Ansible task.

allthesignals commented 6 years ago

I think if we can get the production config file in sync with origin master, the Ansible installer will mesh a little better with these code changes. It appears to be a fairly small issue, though... would just be cleaner to keep this up-to-date with origin master. Is there anything specifically blocking that?

ziyan-junaideen commented 6 years ago

Yes it is out of sync. The branch is large and there are many conflicts. I have been prioritizing the features for the demo. If a temp fix can fix it, it would be great. I will sync it within a matter of days.

allthesignals commented 6 years ago

Reposting from Slack: "a temp fix could be updating the production.rb file. I will PR something soon. Thank you."

Thanks!