Merge "Move package cache configuration to common tasks"

This commit is contained in:
Jenkins 2016-08-18 09:46:53 +00:00 committed by Gerrit Code Review
commit 3b63d64fa1
23 changed files with 53 additions and 22 deletions

View File

@ -0,0 +1,30 @@
---
# Copyright 2016, Logan Vig <logan2211@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Drop apt package manager proxy
copy:
content: 'Acquire::http { Proxy "{{ repo_pkg_cache_url }}"; };'
dest: "/etc/apt/apt.conf.d/00apt-cacher-proxy"
when:
- ansible_os_family == 'Debian'
- repo_pkg_cache_enabled | bool
- name: Drop yum package manager proxy
lineinfile:
line: 'proxy={{ repo_pkg_cache_url }}'
dest: "/etc/yum.conf"
when:
- ansible_os_family == 'RedHat'
- repo_pkg_cache_enabled | bool

View File

@ -24,6 +24,7 @@
list_of_bind_mounts: list_of_bind_mounts:
- bind_dir_path: "/var/lib/mysql" - bind_dir_path: "/var/lib/mysql"
mount_path: "/openstack/{{ inventory_hostname }}" mount_path: "/openstack/{{ inventory_hostname }}"
- include: common-tasks/package-cache-proxy.yml
vars: vars:
is_metal: "{{ properties.is_metal|default(false) }}" is_metal: "{{ properties.is_metal|default(false) }}"
tags: tags:

View File

@ -72,6 +72,8 @@
tags: tags:
- "haproxy-rsyslog-client" - "haproxy-rsyslog-client"
- "rsyslog-client" - "rsyslog-client"
post_tasks:
- include: common-tasks/package-cache-proxy.yml
vars_files: vars_files:
- vars/configs/haproxy_config.yml - vars/configs/haproxy_config.yml
vars: vars:

View File

@ -36,6 +36,8 @@ pip_links:
# URL for the frozen internal openstack repo. # URL for the frozen internal openstack repo.
repo_server_port: 8181 repo_server_port: 8181
repo_pkg_cache_enabled: true repo_pkg_cache_enabled: true
repo_pkg_cache_port: 3142
repo_pkg_cache_url: "http://{{ internal_lb_vip_address }}:{{ repo_pkg_cache_port }}"
openstack_repo_url: "http://{{ internal_lb_vip_address }}:{{ repo_server_port }}" openstack_repo_url: "http://{{ internal_lb_vip_address }}:{{ repo_server_port }}"
openstack_repo_git_url: "git://{{ internal_lb_vip_address }}" openstack_repo_git_url: "git://{{ internal_lb_vip_address }}"
@ -240,4 +242,3 @@ ansible_ssh_extra_args: >
-o ForwardX11=no -o ForwardX11=no
-o ForwardAgent=yes -o ForwardAgent=yes
-T -T

View File

@ -25,6 +25,7 @@
log_dirs: log_dirs:
- src: "/openstack/log/{{ inventory_hostname }}-memcached" - src: "/openstack/log/{{ inventory_hostname }}-memcached"
dest: "/var/log/memcached" dest: "/var/log/memcached"
- include: common-tasks/package-cache-proxy.yml
roles: roles:
- { role: "memcached_server", tags: [ "memcached-server" ] } - { role: "memcached_server", tags: [ "memcached-server" ] }
- role: "system_crontab_coordination" - role: "system_crontab_coordination"

View File

@ -43,6 +43,7 @@
login_host: "{{ aodh_galera_address }}" login_host: "{{ aodh_galera_address }}"
db_name: "{{ aodh_galera_database }}" db_name: "{{ aodh_galera_database }}"
when: inventory_hostname == groups['aodh_all'][0] when: inventory_hostname == groups['aodh_all'][0]
- include: common-tasks/package-cache-proxy.yml
roles: roles:
- role: "os_aodh" - role: "os_aodh"
aodh_venv_tag: "{{ openstack_release }}" aodh_venv_tag: "{{ openstack_release }}"

View File

@ -36,6 +36,7 @@
log_dirs: log_dirs:
- src: "/openstack/log/{{ inventory_hostname }}-ceilometer" - src: "/openstack/log/{{ inventory_hostname }}-ceilometer"
dest: "/var/log/ceilometer" dest: "/var/log/ceilometer"
- include: common-tasks/package-cache-proxy.yml
roles: roles:
- role: "os_ceilometer" - role: "os_ceilometer"
ceilometer_venv_tag: "{{ openstack_release }}" ceilometer_venv_tag: "{{ openstack_release }}"

View File

@ -55,6 +55,7 @@
login_host: "{{ cinder_galera_address }}" login_host: "{{ cinder_galera_address }}"
db_name: "{{ cinder_galera_database }}" db_name: "{{ cinder_galera_database }}"
when: inventory_hostname == groups['cinder_all'][0] when: inventory_hostname == groups['cinder_all'][0]
- include: common-tasks/package-cache-proxy.yml
- name: Add volume group block device to cinder - name: Add volume group block device to cinder
shell: | shell: |

View File

@ -50,6 +50,7 @@
login_host: "{{ glance_galera_address }}" login_host: "{{ glance_galera_address }}"
db_name: "{{ glance_galera_database }}" db_name: "{{ glance_galera_database }}"
when: inventory_hostname == groups['glance_all'][0] when: inventory_hostname == groups['glance_all'][0]
- include: common-tasks/package-cache-proxy.yml
roles: roles:
- role: "os_glance" - role: "os_glance"
glance_venv_tag: "{{ openstack_release }}" glance_venv_tag: "{{ openstack_release }}"

View File

@ -38,6 +38,7 @@
login_host: "{{ gnocchi_galera_address }}" login_host: "{{ gnocchi_galera_address }}"
db_name: "{{ gnocchi_galera_database }}" db_name: "{{ gnocchi_galera_database }}"
when: inventory_hostname == groups['gnocchi_all'][0] when: inventory_hostname == groups['gnocchi_all'][0]
- include: common-tasks/package-cache-proxy.yml
roles: roles:
- role: "os_gnocchi" - role: "os_gnocchi"
gnocchi_venv_tag: "{{ openstack_release }}" gnocchi_venv_tag: "{{ openstack_release }}"

View File

@ -43,6 +43,7 @@
login_host: "{{ heat_galera_address }}" login_host: "{{ heat_galera_address }}"
db_name: "{{ heat_galera_database }}" db_name: "{{ heat_galera_database }}"
when: inventory_hostname == groups['heat_all'][0] when: inventory_hostname == groups['heat_all'][0]
- include: common-tasks/package-cache-proxy.yml
roles: roles:
- role: "os_heat" - role: "os_heat"
heat_venv_tag: "{{ openstack_release }}" heat_venv_tag: "{{ openstack_release }}"

View File

@ -35,6 +35,7 @@
login_host: "{{ horizon_galera_address }}" login_host: "{{ horizon_galera_address }}"
db_name: "{{ horizon_galera_database }}" db_name: "{{ horizon_galera_database }}"
when: inventory_hostname == groups['horizon_all'][0] when: inventory_hostname == groups['horizon_all'][0]
- include: common-tasks/package-cache-proxy.yml
roles: roles:
- role: "os_horizon" - role: "os_horizon"
horizon_venv_tag: "{{ openstack_release }}" horizon_venv_tag: "{{ openstack_release }}"

View File

@ -37,6 +37,7 @@
login_host: "{{ ironic_galera_address }}" login_host: "{{ ironic_galera_address }}"
db_name: "{{ ironic_galera_database }}" db_name: "{{ ironic_galera_database }}"
when: inventory_hostname == groups['ironic_all'][0] when: inventory_hostname == groups['ironic_all'][0]
- include: common-tasks/package-cache-proxy.yml
roles: roles:
- role: "os_ironic" - role: "os_ironic"
ironic_venv_tag: "{{ openstack_release }}" ironic_venv_tag: "{{ openstack_release }}"

View File

@ -43,6 +43,7 @@
login_host: "{{ keystone_galera_address }}" login_host: "{{ keystone_galera_address }}"
db_name: "{{ keystone_galera_database }}" db_name: "{{ keystone_galera_database }}"
when: inventory_hostname == groups['keystone_all'][0] when: inventory_hostname == groups['keystone_all'][0]
- include: common-tasks/package-cache-proxy.yml
# todo(cloudnull): this task is being run only if/when keystone is installed on a physical host. # todo(cloudnull): this task is being run only if/when keystone is installed on a physical host.
# This is not being run within a container because it is an unsupported action due to this # This is not being run within a container because it is an unsupported action due to this

View File

@ -53,6 +53,7 @@
login_host: "{{ neutron_galera_address }}" login_host: "{{ neutron_galera_address }}"
db_name: "{{ neutron_galera_database }}" db_name: "{{ neutron_galera_database }}"
when: inventory_hostname == groups['neutron_all'][0] when: inventory_hostname == groups['neutron_all'][0]
- include: common-tasks/package-cache-proxy.yml
- name: Create the neutron provider networks facts - name: Create the neutron provider networks facts
provider_networks: provider_networks:

View File

@ -50,6 +50,7 @@
login_host: "{{ nova_api_galera_address }}" login_host: "{{ nova_api_galera_address }}"
db_name: "{{ nova_api_galera_database }}" db_name: "{{ nova_api_galera_database }}"
when: inventory_hostname == groups['nova_all'][0] when: inventory_hostname == groups['nova_all'][0]
- include: common-tasks/package-cache-proxy.yml
- name: Add nbd devices to the compute - name: Add nbd devices to the compute
shell: | shell: |

View File

@ -27,6 +27,7 @@
dest: "/var/log/swift" dest: "/var/log/swift"
owner: "syslog" owner: "syslog"
group: "syslog" group: "syslog"
- include: common-tasks/package-cache-proxy.yml
- name: Set swift storage bridge (is_metal) - name: Set swift storage bridge (is_metal)
set_fact: set_fact:

View File

@ -20,6 +20,7 @@
user: root user: root
pre_tasks: pre_tasks:
- include: common-tasks/os-lxc-container-setup.yml - include: common-tasks/os-lxc-container-setup.yml
- include: common-tasks/package-cache-proxy.yml
roles: roles:
- role: "system_crontab_coordination" - role: "system_crontab_coordination"
tags: tags:

View File

@ -44,22 +44,3 @@
- "rsyslog-client" - "rsyslog-client"
vars: vars:
is_metal: "{{ properties.is_metal|default(false) }}" is_metal: "{{ properties.is_metal|default(false) }}"
- name: Setup package manager proxy
hosts: all:!repo_all
tasks:
- name: Drop apt package manager proxy
copy:
content: 'Acquire::http { Proxy "http://{{ internal_lb_vip_address }}:3142"; };'
dest: "/etc/apt/apt.conf.d/00apt-cacher-proxy"
when:
- ansible_os_family == 'Debian'
- repo_pkg_cache_enabled | bool
- name: Drop apt package manager proxy
lineinfile:
line: 'proxy=http://{{ internal_lb_vip_address }}:3142'
dest: "/etc/yum.conf"
when:
- ansible_os_family == 'RedHat'
- repo_pkg_cache_enabled | bool

View File

@ -24,6 +24,7 @@
list_of_bind_mounts: list_of_bind_mounts:
- bind_dir_path: "{{ storage_directory }}" - bind_dir_path: "{{ storage_directory }}"
mount_path: "/openstack/{{ inventory_hostname }}/log-storage" mount_path: "/openstack/{{ inventory_hostname }}/log-storage"
- include: common-tasks/package-cache-proxy.yml
roles: roles:
- { role: "rsyslog_server", tags: [ "rsyslog-server" ] } - { role: "rsyslog_server", tags: [ "rsyslog-server" ] }
- role: "system_crontab_coordination" - role: "system_crontab_coordination"

View File

@ -13,9 +13,9 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- include: repo-install.yml
- include: haproxy-install.yml - include: haproxy-install.yml
- include: memcached-install.yml - include: memcached-install.yml
- include: repo-install.yml
- include: galera-install.yml - include: galera-install.yml
- include: rabbitmq-install.yml - include: rabbitmq-install.yml
- include: utility-install.yml - include: utility-install.yml

View File

@ -24,6 +24,7 @@
log_dirs: log_dirs:
- src: "/openstack/log/{{ inventory_hostname }}-utility" - src: "/openstack/log/{{ inventory_hostname }}-utility"
dest: "/var/log/utility" dest: "/var/log/utility"
- include: common-tasks/package-cache-proxy.yml
- name: Create log directory (not is_metal) - name: Create log directory (not is_metal)
file: file:

View File

@ -52,7 +52,7 @@ haproxy_default_services:
haproxy_backend_nodes: "{{ [groups['repo_all'][0]] | default([]) }}" # list expected haproxy_backend_nodes: "{{ [groups['repo_all'][0]] | default([]) }}" # list expected
haproxy_backup_nodes: "{{ groups['repo_all'][1:] | default([]) }}" haproxy_backup_nodes: "{{ groups['repo_all'][1:] | default([]) }}"
haproxy_ssl: "{{ haproxy_ssl }}" haproxy_ssl: "{{ haproxy_ssl }}"
haproxy_port: 3142 haproxy_port: "{{ repo_pkg_cache_port }}"
haproxy_balance_type: http haproxy_balance_type: http
haproxy_backend_options: haproxy_backend_options:
- "httpchk HEAD /acng-report.html" - "httpchk HEAD /acng-report.html"