Proxy support enhancement

Added gate scripts and playbook enhancement to run airshipctl behind proxy.

Change-Id: Icc3cdcd6fd150420103f907cd1871feba1ccd223
Signed-off-by: James Gu <james.gu@att.com>
This commit is contained in:
James Gu 2020-04-24 23:26:49 +00:00 committed by Sreejith Punnapuzha
parent 21dceb20d1
commit afcfdb5c6e
6 changed files with 21 additions and 8 deletions

View File

@ -32,13 +32,9 @@ to define the following environment variables with your organization's
information: information:
``` ```
http_proxy=http://username:password@host:port
https_proxy=http://username:password@host:port
no_proxy="localhost,127.0.0.1"
HTTP_PROXY=http://username:password@host:port HTTP_PROXY=http://username:password@host:port
HTTPS_PROXY=http://username:password@host:port HTTPS_PROXY=http://username:password@host:port
NO_PROXY="localhost,127.0.0.1" NO_PROXY="localhost,127.0.0.1"
PROXY=http://username:password@host:port
USE_PROXY=true USE_PROXY=true
``` ```

View File

@ -11,3 +11,8 @@
# limitations under the License. # limitations under the License.
remote_work_dir: "/tmp/airship" remote_work_dir: "/tmp/airship"
proxy:
enabled: "{{ lookup('env', 'USE_PROXY', default='false') }}"
http: "{{ lookup('env', 'HTTP_PROXY', default='') }}"
https: "{{ lookup('env', 'HTTPS_PROXY', default='') }}"
noproxy: "{{ lookup('env', 'NO_PROXY', default='') }}"

View File

@ -11,5 +11,7 @@
# limitations under the License. # limitations under the License.
proxy: proxy:
enabled: false
http: http:
https:
noproxy: noproxy:

View File

@ -20,8 +20,8 @@
--kubeconfig {{ airshipctl_config_dir_default | default(ansible_env.HOME) }}/.airship/kubeconfig \ --kubeconfig {{ airshipctl_config_dir_default | default(ansible_env.HOME) }}/.airship/kubeconfig \
version version
register: airship_kubecofig_version register: airship_kubecofig_version
retries: 50 retries: 100
delay: 20 delay: 50
until: airship_kubecofig_version.rc == 0 until: airship_kubecofig_version.rc == 0
- name: debug kubectl version - name: debug kubectl version

View File

@ -92,6 +92,11 @@
url: http://{{ sushy_emulator_frontend_servername }}:{{sushy_emulator_frontend_http_port }}/redfish/v1/Systems?format=json url: http://{{ sushy_emulator_frontend_servername }}:{{sushy_emulator_frontend_http_port }}/redfish/v1/Systems?format=json
method: GET method: GET
return_content: yes return_content: yes
register: sushy_get_result
until: sushy_get_result.status == 200
retries: 18
delay: 10
- name: Check with auth - name: Check with auth
when: sushy_emulator_frontend_user is defined when: sushy_emulator_frontend_user is defined
uri: uri:

View File

@ -24,3 +24,8 @@ zuul:
log_root: "$TMP_DIR" log_root: "$TMP_DIR"
project: project:
src_dir: "$AIRSHIPCTL_WS" src_dir: "$AIRSHIPCTL_WS"
proxy:
enabled: "$USE_PROXY"
http: "$HTTP_PROXY"
https: "$HTTPS_PROXY"
noproxy: "$NO_PROXY"