Skip to content
This repository was archived by the owner on Jun 5, 2024. It is now read-only.

Commit 9ddbb04

Browse files
committed
hotfix for offline deployment
change the source url to the offline deployment server, the following environment variables should be defined: OFFLINE_SERVER_HOST OFFLINE_FILE_SERVER OFFLINE_CHART_SERVER
1 parent 7b21c10 commit 9ddbb04

File tree

29 files changed

+100
-47
lines changed

29 files changed

+100
-47
lines changed

Pipfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# Copyright (c) 2021-2022 Intel Corporation
33

44
[[source]]
5-
url = "https://pypi.python.org/simple"
6-
verify_ssl = true
5+
url = "$OFFLINE_FILE_SERVER/pipenv/simple"
6+
verify_ssl = false
77
name = "pypi"
88

99
[packages]

roles/baseline_ansible/infrastructure/install_dependencies/tasks/install_pip_packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
pip:
2222
name: "{{ install_python_dependencies_full_list }}"
2323
state: present
24-
extra_args: --ignore-installed --user
24+
extra_args: --ignore-installed --user -i {{ offline_file_server }}/pip/simple --trusted-host {{ offline_server_host }}
2525
register: pip_result
2626
retries: "{{ number_of_retries | default(3) }}"
2727
until: pip_result is succeeded

roles/baseline_ansible/infrastructure/install_golang/tasks/install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
- name: download golang
2222
get_url:
23-
url: "{{ golang_download_url }}"
23+
url: "{{ offline_file_server }}/download/go1.16.linux-amd64.tar.gz"
2424
dest: "{{ golang_download_dest }}"
2525
checksum: "{{ golang_download_checksum }}"
2626
register: golang_download

roles/baseline_ansible/infrastructure/install_openssl/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
- name: "OpenSSL download from {{ openssl_download_url }}"
3131
get_url:
32-
url: "{{ openssl_download_url }}"
32+
url: "{{ offline_file_server }}/download/openssl-1.1.1m.tar.gz"
3333
dest: "{{ openssl_project_dir }}"
3434
checksum: "{{ openssl_checksum }}"
3535
owner: "{{ project_user }}"

roles/baseline_ansible/infrastructure/install_packages/tasks/debian.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
become: yes
2626
command: systemd-run --property="After=apt-daily.service apt-daily-upgrade.service" --wait /bin/true
2727
changed_when: false
28+
tags: never
2829

2930
- name: ensure that main, restricted, universe and multiverse repositories are enabled
3031
# Block was added as a solution to a problem with incorrectly added packages/repositories on an installed machine.
@@ -56,3 +57,4 @@
5657
- name: fail run apt update
5758
fail:
5859
msg: "{{ error_output }}"
60+
tags: never

roles/baseline_ansible/infrastructure/install_packages/tasks/prepare_python.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
when:
2121
- python_interpreter == 'python3'
2222

23+
- name: configure default index for pip
24+
shell: |
25+
pip config set global.index-url {{ offline_file_server }}/pip/simple
26+
pip config set global.trusted-host {{ offline_server_host }}
27+
2328
- name: Get pip_version
2429
set_fact: pip_version="{{ pip3_version if ansible_python.version.major == 3 else pip2_version }}"
2530

@@ -34,11 +39,12 @@
3439
pip:
3540
name: pip
3641
version: "{{ pip_version }}"
42+
extra_args: -i {{ offline_file_server }}/pip/simple --trusted-host {{ offline_server_host }}
3743

3844
- name: upgrade Python wheel and setuptools
3945
pip:
4046
name:
4147
- "wheel=={{ python_wheel_version }}"
4248
- "setuptools=={{ python_setuptools_version }}"
4349
state: forcereinstall
44-
extra_args: --user
50+
extra_args: --user -i {{ offline_file_server }}/pip/simple --trusted-host {{ offline_server_host }}

roles/baseline_ansible/infrastructure/install_skopeo/tasks/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
retries: "{{ number_of_retries | default(10) }}"
2727
until: result is succeeded
2828
delay: "{{ retry_delay | default(5) }}"
29+
tags: never
2930

3031
- name: Build and install skopeo
3132
command:
@@ -54,7 +55,7 @@
5455

5556
- name: Download default policy
5657
get_url:
57-
url: "{{ skopeo_default_policy_url }}"
58+
url: "{{ offline_file_server }}/download/default-policy.json"
5859
dest: "{{ skopeo_policy_dir }}/policy.json"
5960
register: result
6061
until: result is succeeded

roles/baseline_ansible/kubernetes/operator/sriov_network_operator/install/tasks/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
retries: "{{ number_of_retries | default(10) }}"
2727
until: result is succeeded
2828
delay: "{{ retry_delay | default(5) }}"
29+
tags: never
2930

3031
- name: Create namespace for SR-IOV Network Operator
3132
include_role:
@@ -49,6 +50,7 @@
4950
remote_src: true
5051
strip: 1
5152
changed_when: true
53+
tags: never
5254

5355
- name: Copy customized git patch for adding CPK device ID
5456
template:
@@ -63,6 +65,7 @@
6365
remote_src: true
6466
strip: 1
6567
changed_when: true
68+
tags: never
6669

6770
- name: Install skopeo for SRIOV Network Operator deployment
6871
include_role:

roles/infrastructure/docker/tasks/install.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
block:
3131
- name: download Docker CLI bash completion
3232
get_url:
33-
url: "{{ _docker_completion_url }}"
33+
url: "{{ offline_file_server }}/docker/docker"
3434
dest: "/etc/bash_completion.d"
3535
become: yes
3636
register: result
@@ -39,7 +39,7 @@
3939
delay: "{{ retry_delay }}"
4040
- name: download Docker Compose bash completion
4141
get_url:
42-
url: "{{ _docker_compose_completion_url }}"
42+
url: "{{ offline_file_server }}/docker/docker-compose"
4343
dest: "/etc/bash_completion.d"
4444
become: yes
4545
register: result

roles/infrastructure/docker/tasks/install_debian.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
stat:
88
path: /etc/apt/sources.list.d/docker.list
99
register: docker_repo
10+
tags: never
1011

1112
- name: add Docker repository and clean cache
1213
block:
@@ -39,3 +40,4 @@
3940
update_cache: yes
4041
become: yes
4142
when: docker_repo.stat.exists == false
43+
tags: never

0 commit comments

Comments
 (0)