I would like to maintain some haproxy.cfg customizations for my scalable OpenShift application in git, and have Openshift pick up and use my settings on deployment.
Is this possible?
I know that Openshift generates the haproxy settings in that file. Ideally I would be able to change the httpchk url or disable the public haproxy-status page, and have Openshift merge my config with the server-provided settings.
Yes you can do that
rhc ssh --app <app_name>
haproxy/conf
option httpchk GET /
to option httpchk GET /api/v1/ping
rhc cartridge-restart --cartridge haproxy
For more read my blog https://www.openshift.com/blogs/how-to-host-your-java-ee-application-with-auto-scaling
I know the question is a bit old, but maybe it will help someone else.
You can use rhc scp
command to download and upload any file to your main gear:
download the file from your gear: rhc scp APPNAME download . haproxy/conf/haproxy.cfg
edit it
rhc scp APPNAME upload haproxy.cfg haproxy/conf/haproxy.cfg
You can also:
conf/haproxy.cfg
).openshift/action_hooks
git directory (e.g. pre_reload, pre_restart) like so:
#!/bin/bash cp $OPENSHIFT_REPO_DIR/conf/haproxy.cfg ~/haproxy/conf/haproxy.cfg
git update-index --chmod=+x .openshift/action_hooks/*
)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With