Setting a http_proxy for provisioning in foreman

Hello

I've been using Foreman for about six months but one thing has managed to
perplex me. I can't seem to work out how to to set a HTTP proxy for the
package repo mirrors. I've managed to work around this by creating a
reverse proxy for each repo in use and creating DNS records internally to
point their names to the reverse proxy but I'm sure there must be an easier
way. I've only recently noticed the http_proxy snippet but I'm unsure how
to use it and I can't find anything in the documentation and if there is
already anything written about this it's very hard to find because most
search engine results seem to match Smart Proxy related articles.

If anyone can help point me in the right direction it'd be much appreciated.

Cheers
Ben

ยทยทยท -- The contents of this email and any attachments are intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient, please destroy this message, delete any copies held on your systems and notify the sender immediately. Persons other than the intended recipient should not retain, copy or use this e-mail for any purpose, nor disclose all or part of its content to any other person.

It depends really on what's in your provisioning template for
preseeds/kickstart. Our stock templates can set up an HTTP proxy using
the "http-proxy" parameter which you can set globally, per host, domain
etc (Foreman :: Manual global
parameters).

Taking kickstart as an example, we have:

https://github.com/theforeman/community-templates/blob/master/kickstart/provision.erb#L21

Which uses the http-proxy parameter value (the hostname of the proxy)
and then adds a --proxy option to the install media configuration.

ยทยทยท On 18/03/15 12:33, Ben Shephard wrote: > Hello > > I've been using Foreman for about six months but one thing has managed > to perplex me. I can't seem to work out how to to set a HTTP proxy for > the package repo mirrors. I've managed to work around this by creating a > reverse proxy for each repo in use and creating DNS records internally > to point their names to the reverse proxy but I'm sure there must be an > easier way. I've only recently noticed the http_proxy snippet but I'm > unsure how to use it and I can't find anything in the documentation and > if there is already anything written about this it's very hard to find > because most search engine results seem to match Smart Proxy related > articles. > > If anyone can help point me in the right direction it'd be much appreciated.

โ€“
Dominic Cleal
Red Hat Engineering

Thanks Dominic

I'll give that a try. I'm using Ubuntu with the preseed templates which
I've only modified in so far as to add Ubuntu 14.04 to the list at the top.

Thanks for your help
Ben

ยทยทยท On Thursday, 19 March 2015 12:25:48 UTC, Dominic Cleal wrote: > > On 18/03/15 12:33, Ben Shephard wrote: > > Hello > > > > I've been using Foreman for about six months but one thing has managed > > to perplex me. I can't seem to work out how to to set a HTTP proxy for > > the package repo mirrors. I've managed to work around this by creating a > > reverse proxy for each repo in use and creating DNS records internally > > to point their names to the reverse proxy but I'm sure there must be an > > easier way. I've only recently noticed the http_proxy snippet but I'm > > unsure how to use it and I can't find anything in the documentation and > > if there is already anything written about this it's very hard to find > > because most search engine results seem to match Smart Proxy related > > articles. > > > > If anyone can help point me in the right direction it'd be much > appreciated. > > It depends really on what's in your provisioning template for > preseeds/kickstart. Our stock templates can set up an HTTP proxy using > the "http-proxy" parameter which you can set globally, per host, domain > etc (http://theforeman.org/manuals/1.7/index.html#4.2.3Parameters global > parameters). > > Taking kickstart as an example, we have: > > > https://github.com/theforeman/community-templates/blob/master/kickstart/provision.erb#L21 > > Which uses the http-proxy parameter value (the hostname of the proxy) > and then adds a --proxy option to the install media configuration. > > -- > Dominic Cleal > Red Hat Engineering >

โ€“
The contents of this email and any attachments are intended solely for the
use of the individual or entity to which it is addressed. If you are not
the intended recipient, please destroy this message, delete any copies held
on your systems and notify the sender immediately. Persons other than the
intended recipient should not retain, copy or use this e-mail for any
purpose, nor disclose all or part of its content to any other person.

That's solved it. For anyone else that stumbles on this I had to add the
following two parameters under Global Parameters
http-proxy which should be just a fully qualified host name such as
proxy.example.com (no http:// prefix or :port suffix)
http-proxy-port which should be just the port number so 3128 if using squid
on it's default port

ยทยทยท On Thursday, 19 March 2015 12:25:48 UTC, Dominic Cleal wrote: > > On 18/03/15 12:33, Ben Shephard wrote: > > Hello > > > > I've been using Foreman for about six months but one thing has managed > > to perplex me. I can't seem to work out how to to set a HTTP proxy for > > the package repo mirrors. I've managed to work around this by creating a > > reverse proxy for each repo in use and creating DNS records internally > > to point their names to the reverse proxy but I'm sure there must be an > > easier way. I've only recently noticed the http_proxy snippet but I'm > > unsure how to use it and I can't find anything in the documentation and > > if there is already anything written about this it's very hard to find > > because most search engine results seem to match Smart Proxy related > > articles. > > > > If anyone can help point me in the right direction it'd be much > appreciated. > > It depends really on what's in your provisioning template for > preseeds/kickstart. Our stock templates can set up an HTTP proxy using > the "http-proxy" parameter which you can set globally, per host, domain > etc (http://theforeman.org/manuals/1.7/index.html#4.2.3Parameters global > parameters). > > Taking kickstart as an example, we have: > > > https://github.com/theforeman/community-templates/blob/master/kickstart/provision.erb#L21 > > Which uses the http-proxy parameter value (the hostname of the proxy) > and then adds a --proxy option to the install media configuration. > > -- > Dominic Cleal > Red Hat Engineering >

โ€“
The contents of this email and any attachments are intended solely for the
use of the individual or entity to which it is addressed. If you are not
the intended recipient, please destroy this message, delete any copies held
on your systems and notify the sender immediately. Persons other than the
intended recipient should not retain, copy or use this e-mail for any
purpose, nor disclose all or part of its content to any other person.

1 Like