39f10b5fe5
This fixes the zuul debug log's logrotate filename. We also increase the rotation count to 30 daily logs for all zuul scheduler zuul processes (this matches the old server). We also create a /var/lib/zuul/backup dir so that status.json backups have a location they can write to. We do this in the base zuul role which means all zuul servers will get this dir. It doesn't currently conflict with any of the cluster members' /var/lib/zuul contents so should be fine. Change-Id: I4709e3c7e542781a65ae24c1f05a32444026fd26
119 lines
2.5 KiB
YAML
119 lines
2.5 KiB
YAML
- name: Install apache2
|
|
apt:
|
|
name:
|
|
- apache2
|
|
- apache2-utils
|
|
state: present
|
|
|
|
- name: Apache modules
|
|
apache2_module:
|
|
state: present
|
|
name: "{{ item }}"
|
|
loop:
|
|
- rewrite
|
|
- proxy
|
|
- proxy_http
|
|
- proxy_wstunnel
|
|
- ssl
|
|
- cache
|
|
- cache_disk
|
|
- cache_socache
|
|
- headers
|
|
|
|
- name: Copy common log configuration
|
|
copy:
|
|
src: log-combined-cache.conf
|
|
dest: /etc/apache2/conf-available
|
|
register: _log_combined_cache
|
|
|
|
- name: Enable combined cache log config
|
|
command: a2enconf log-combined-cache
|
|
when: _log_combined_cache.changed
|
|
|
|
- name: Copy apache config
|
|
template:
|
|
src: zuul.vhost.j2
|
|
dest: /etc/apache2/sites-enabled/000-default.conf
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: zuul Reload apache2
|
|
|
|
- name: Copy whitelabel config
|
|
template:
|
|
src: openstack.vhost.j2
|
|
dest: "/etc/apache2/sites-enabled/010-openstack.conf"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: zuul Reload apache2
|
|
|
|
- name: Copy htcacheclean config
|
|
copy:
|
|
src: apache-htcacheclean.default
|
|
dest: /etc/default/apache-htcacheclean
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
|
|
- name: Install logging config
|
|
copy:
|
|
src: logging.conf
|
|
dest: /etc/zuul/web-logging.conf
|
|
|
|
- name: Install fingergw logging config
|
|
copy:
|
|
src: fingergw-logging.conf
|
|
dest: /etc/zuul/fingergw-logging.conf
|
|
|
|
- name: Rotate web logs
|
|
include_role:
|
|
name: logrotate
|
|
vars:
|
|
logrotate_file_name: /var/log/zuul/web.log
|
|
logrotate_rotate: 30
|
|
|
|
- name: Rotate web debug logs
|
|
include_role:
|
|
name: logrotate
|
|
vars:
|
|
logrotate_file_name: /var/log/zuul/web-debug.log
|
|
logrotate_rotate: 30
|
|
|
|
- name: Rotate fingergw logs
|
|
include_role:
|
|
name: logrotate
|
|
vars:
|
|
logrotate_file_name: /var/log/zuul/fingergw.log
|
|
logrotate_rotate: 30
|
|
|
|
- name: Rotate fingergw debug logs
|
|
include_role:
|
|
name: logrotate
|
|
vars:
|
|
logrotate_file_name: /var/log/zuul/fingergw-debug.log
|
|
logrotate_rotate: 30
|
|
|
|
- name: Make docker-compose directory
|
|
file:
|
|
state: directory
|
|
path: /etc/zuul-web
|
|
|
|
- name: Install docker-compose file
|
|
copy:
|
|
src: docker-compose.yaml
|
|
dest: /etc/zuul-web/docker-compose.yaml
|
|
|
|
- name: Update container images
|
|
include_tasks: pull.yaml
|
|
|
|
- name: Start containers
|
|
include_tasks: start.yaml
|
|
when: zuul_web_start | bool
|
|
|
|
# We can prune here as it should leave the "latest" tagged images
|
|
# as well as the currently running images.
|
|
- name: Run docker prune to cleanup unneeded images
|
|
shell:
|
|
cmd: docker image prune -f
|