From 0cdaa5c039c67dd59243e16f0a7a0ca76aef15f8 Mon Sep 17 00:00:00 2001 From: Adrien Cunin Date: Thu, 19 May 2016 10:05:56 +0200 Subject: [PATCH] Various fixes to the proxy default conf and doc Default configuration: * Include internal and external VIPs in no_proxy_env * Set lower case environment variables as well, as some programs may not understand the upper case ones Documentation: * Explain the no_proxy environment variable * Added the no_proxy environment variable in the example * Removed pip_install_options: "--proxy [...]" from the example as it is not needed when using environment variables Change-Id: Iae8b320b27525ec2592687fee42c3d605d36d093 --- .../install-guide/app-no-internet-connectivity.rst | 11 ++++++++--- etc/openstack_deploy/user_variables.yml | 5 ++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/source/install-guide/app-no-internet-connectivity.rst b/doc/source/install-guide/app-no-internet-connectivity.rst index 4ea4c18539..58cc4b4e4c 100644 --- a/doc/source/install-guide/app-no-internet-connectivity.rst +++ b/doc/source/install-guide/app-no-internet-connectivity.rst @@ -98,6 +98,12 @@ affect: - `wget` - `openstack` +Use the ``no_proxy`` environment variable to specify hosts that you cannot +reach through the proxy. These often are the hosts in the management network. +In the example below, ``no_proxy`` is set to localhost only, but the default +configuration file suggests using variables to list all the hosts/containers' +management addresses as well as the load balancer internal/external addresses. + Configuration changes are made in ``/etc/openstack_deploy/user_variables.yml``. .. code-block:: yaml @@ -106,11 +112,10 @@ Configuration changes are made in ``/etc/openstack_deploy/user_variables.yml``. global_environment_variables: HTTP_PROXY: "http://proxy.example.com:3128" HTTPS_PROXY: "http://proxy.example.com:3128" + NO_PROXY: "localhost,127.0.0.1" http_proxy: "http://proxy.example.com:3128" https_proxy: "http://proxy.example.com:3128" - - # pip needs proxies specified as well - pip_install_options: "--proxy http://proxy.example.com:3128" + no_proxy: "localhost,127.0.0.1" ``apt-get`` proxy configuration ------------------------------- diff --git a/etc/openstack_deploy/user_variables.yml b/etc/openstack_deploy/user_variables.yml index fe7d3f51b2..bdb4e0896f 100644 --- a/etc/openstack_deploy/user_variables.yml +++ b/etc/openstack_deploy/user_variables.yml @@ -131,11 +131,14 @@ verbose: false ## Example environment variable setup: # proxy_env_url: http://username:pa$$w0rd@10.10.10.9:9000/ -# no_proxy_env: "localhost,127.0.0.1,{% for host in groups['all_containers'] %}{{ hostvars[host]['container_address'] }}{% if not loop.last %},{% endif %}{% endfor %}" +# no_proxy_env: "localhost,127.0.0.1,{{ internal_lb_vip_address }},{{ external_lb_vip_address }},{% for host in groups['all_containers'] %}{{ hostvars[host]['container_address'] }}{% if not loop.last %},{% endif %}{% endfor %}" # global_environment_variables: # HTTP_PROXY: "{{ proxy_env_url }}" # HTTPS_PROXY: "{{ proxy_env_url }}" # NO_PROXY: "{{ no_proxy_env }}" +# http_proxy: "{{ proxy_env_url }}" +# https_proxy: "{{ proxy_env_url }}" +# no_proxy: "{{ no_proxy_env }}" ## SSH connection wait time