Remove apt-cacher-ng
The repo container's package cache causes quite a bit of confusion given that it's a 'hidden' feature which catches deployers off-guard when they already have their own cache configured. This is really the kind of service which people should manage outside of OSA. It also makes no sense if the deployer is using their own local mirror which is a fairly common practise. Adding to that, it seems that it is broken in bionic, causing massive delays in package installs. Finally, it also adds to quite a bit of complexity due to the fact that it's in a container - so in the playbooks prior to the container's existence we have to detect whether it's there and add/remove the config accordingly. Let's just remove it and let deployers managing their own caching infrastructure if they want it. Depends-On: https://review.openstack.org/608631 Change-Id: Ia0fb41266a6d62073b02c8ad6fa97b8b7d408a67
This commit is contained in:
parent
e1aabd05b8
commit
43a5c874ef
@ -56,9 +56,6 @@ rsyslog_server_enabled: "{{ ansible_pkg_mgr == 'zypper' }}"
|
||||
|
||||
# URL for the frozen internal openstack repo.
|
||||
repo_server_port: 8181
|
||||
repo_pkg_cache_enabled: true
|
||||
repo_pkg_cache_port: 3142
|
||||
repo_pkg_cache_url: "http://{{ internal_lb_vip_address }}:{{ repo_pkg_cache_port }}"
|
||||
|
||||
## Default installation method for OpenStack services
|
||||
install_method: "source"
|
||||
|
@ -71,17 +71,6 @@ haproxy_default_services:
|
||||
haproxy_backend_options:
|
||||
- "httpchk HEAD / HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck"
|
||||
haproxy_service_enabled: "{{ groups['repo_all'] is defined and groups['repo_all'] | length > 0 }}"
|
||||
- service:
|
||||
haproxy_service_name: repo_cache
|
||||
haproxy_backend_nodes: "{{ (groups['repo_all'] | default([]))[:1] }}" # list expected
|
||||
haproxy_backup_nodes: "{{ (groups['repo_all'] | default([]))[1:] }}"
|
||||
haproxy_bind: "{{ [internal_lb_vip_address] }}"
|
||||
haproxy_port: "{{ repo_pkg_cache_port }}"
|
||||
haproxy_balance_type: http
|
||||
haproxy_backend_options:
|
||||
- "httpchk HEAD /acng-report.html HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck"
|
||||
haproxy_whitelist_networks: "{{ haproxy_repo_cache_whitelist_networks }}"
|
||||
haproxy_service_enabled: "{{ groups['repo_all'] is defined and groups['repo_all'] | length > 0 }}"
|
||||
- service:
|
||||
haproxy_service_name: glance_api
|
||||
haproxy_backend_nodes: "{{ groups['glance_api'] | default([]) }}"
|
||||
|
@ -13,28 +13,10 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Test proxy URL for connectivity
|
||||
run_once: yes
|
||||
uri:
|
||||
url: "{{ repo_pkg_cache_url }}/acng-report.html"
|
||||
method: "HEAD"
|
||||
timeout: 3
|
||||
register: proxy_check
|
||||
failed_when: false
|
||||
tags:
|
||||
- common-proxy
|
||||
|
||||
- name: Add apt package manager proxy
|
||||
copy:
|
||||
content: 'Acquire::http { Proxy "{{ repo_pkg_cache_url }}"; };'
|
||||
dest: "/etc/apt/apt.conf.d/00apt-cacher-proxy"
|
||||
register: _apt_proxy_added
|
||||
when:
|
||||
- repo_pkg_cache_enabled | bool
|
||||
- proxy_check.status == 200
|
||||
- ansible_os_family == 'Debian'
|
||||
tags:
|
||||
- common-proxy
|
||||
# TODO(odyssey4me):
|
||||
# Remove these tasks in T. They are only present for the
|
||||
# Q->R upgrade or for R->S upgrades for environments which
|
||||
# were installed prior to R's release.
|
||||
|
||||
- name: Remove apt package manager proxy
|
||||
file:
|
||||
@ -42,8 +24,6 @@
|
||||
state: "absent"
|
||||
register: _apt_proxy_removed
|
||||
when:
|
||||
- repo_pkg_cache_enabled | bool
|
||||
- proxy_check.status != 200
|
||||
- ansible_os_family == 'Debian'
|
||||
tags:
|
||||
- common-proxy
|
||||
@ -54,34 +34,34 @@
|
||||
retries: 5
|
||||
delay: 2
|
||||
when:
|
||||
- (_apt_proxy_added is mapping and _apt_proxy_added | changed) or
|
||||
(_apt_proxy_removed is mapping and _apt_proxy_removed | changed)
|
||||
- _apt_proxy_removed is mapping
|
||||
- _apt_proxy_removed | changed
|
||||
tags:
|
||||
- common-proxy
|
||||
|
||||
# NOTE(mhayden): We always deploy the proxy configuration for yum on CentOS
|
||||
# even if dnf is present.
|
||||
- name: Deploy yum package manager proxy
|
||||
- name: Remove yum package manager proxy
|
||||
lineinfile:
|
||||
line: 'proxy={{ repo_pkg_cache_url }}'
|
||||
line: >-
|
||||
proxy="http://{{ internal_lb_vip_address }}:{{ repo_pkg_cache_port | default('3142') }}"
|
||||
dest: "/etc/yum.conf"
|
||||
state: "{{ (proxy_check.status == 200) | ternary('present', 'absent') }}"
|
||||
state: absent
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
- repo_pkg_cache_enabled | bool
|
||||
tags:
|
||||
- common-proxy
|
||||
|
||||
# NOTE(mhayden): If dnf and yum are installed on CentOS, we need to configure
|
||||
# a proxy for dnf as well.
|
||||
- name: Deploy dnf package manager proxy
|
||||
- name: Remove dnf package manager proxy
|
||||
lineinfile:
|
||||
line: 'proxy={{ repo_pkg_cache_url }}'
|
||||
line: >-
|
||||
proxy="http://{{ internal_lb_vip_address }}:{{ repo_pkg_cache_port | default('3142') }}"
|
||||
dest: "/etc/dnf/dnf.conf"
|
||||
state: "{{ (proxy_check.status == 200) | ternary('present', 'absent') }}"
|
||||
state: absent
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
- ansible_pkg_mgr == 'dnf'
|
||||
- repo_pkg_cache_enabled | bool
|
||||
tags:
|
||||
- common-proxy
|
||||
|
@ -90,20 +90,6 @@
|
||||
- healthcheck
|
||||
- healthcheck-repo-use
|
||||
|
||||
- name: Sanity checks for all containers
|
||||
hosts: all_containers:physical_hosts
|
||||
gather_facts: yes
|
||||
tasks:
|
||||
- name: Ensure everyone can reach apt proxy
|
||||
uri:
|
||||
url: "{{ repo_pkg_cache_url }}/acng-report.html"
|
||||
method: "HEAD"
|
||||
when:
|
||||
- "ansible_pkg_mgr == 'apt'"
|
||||
tags:
|
||||
- healthcheck
|
||||
- healthcheck-repo-use
|
||||
|
||||
# Test utility-install.yml
|
||||
- name: Ensure the service setup host is ready to run openstack calls
|
||||
hosts: "{{ openstack_service_setup_host | default('localhost') }}"
|
||||
|
Loading…
Reference in New Issue
Block a user