Hide Forgot
Description of problem: In listener.rb the following changes are needed. --- listener.rb.orig 2013-12-16 08:19:53.182002289 -0500 +++ listener.rb 2013-12-16 01:40:21.095994919 -0500 scope = "#{appname}-#{namespace}" file = File.join(CONF_DIR, "#{scope}.conf") if File.exist?(file) - `sed -i 's/upstream #{scope} {/&\n server #{ip}:#{port}' #{file}` + `sed -i 's/upstream #{scope} {/&\\n server #{ip}:#{port};/' #{file}` else # write a new one - template = >>-EOF + template = <<-EOF upstream #{scope} { server #{ip}:#{port}; }
Context is "5.8.5.1.2. Routing Listener" under "5.8.5. External Load Balancing" http://documentation-devel.engineering.redhat.com/docs/en-US/OpenShift_Enterprise/2/html-single/Deployment_Guide/index.html#sect-External_Load_Balancing
I copied the source here: https://github.com/openshift/openshift-extras/blob/master/admin/sample_routing_listener.rb https://github.com/openshift/openshift-extras/blob/enterprise-2.0/admin/sample_routing_listener.rb ... and applied changes. May want to point to the enterprise-2.0 version in the docs; possibly for future versions it will need non-compatible updates.
I believe I have made the appropriate changes. At least I hope... I went by the info in the initial comment, but it may not be exactly what you've asked for. Let me know if any other changes need to be made.
(In reply to brice from comment #7) > I believe I have made the appropriate changes. At least I hope... I went by > the info in the initial comment, but it may not be exactly what you've asked > for. > > Let me know if any other changes need to be made. I think the sed line is still wrong. It needs to be: `sed -i 's/upstream #{scope} {/&\\n server #{ip}:#{port};/' #{file}` I see part of it was updated but it is missing the ;/
You are correct. It should be alright now.
This line should not be there: listener.rb 2013-12-16 01:40:21.095994919 -0500 That was the diff output.
Actually, while we're making changes. Please fetch the latest from https://raw.github.com/openshift/openshift-extras/enterprise-2.0/admin/sample_routing_listener.rb That files includes important comments the will prove helpful for the admin.
Line has been removed and I've talked to Brenton. Topic should be good now. Topic matches quite well with the github doc too. Putting to QA.