a88adc4101
We previously auto updated nodepool builders but not launchers when new container images were present. This created confusion over what versions of nodepool opendev is running. Use the same behavior for both services now and auto restart them both. There is a small chance that we can pull in an update that breaks things so we run serially to avoid the most egregious instances of this scenario. Change-Id: Ifc3ca375553527f9a72e4bb1bdb617523a3f269e
59 lines
1.2 KiB
YAML
59 lines
1.2 KiB
YAML
- name: Copy logging config
|
|
copy:
|
|
src: logging.conf
|
|
dest: /etc/nodepool/launcher-logging.conf
|
|
|
|
- name: Install apache2
|
|
apt:
|
|
name:
|
|
- apache2
|
|
- apache2-utils
|
|
state: present
|
|
|
|
- name: Apache modules
|
|
apache2_module:
|
|
state: present
|
|
name: "{{ item }}"
|
|
loop:
|
|
- rewrite
|
|
- proxy
|
|
- proxy_http
|
|
|
|
- name: Copy apache config
|
|
template:
|
|
src: launcher.vhost.j2
|
|
dest: /etc/apache2/sites-enabled/000-default.conf
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: nodepool-launcher Reload apache2
|
|
|
|
# Do this until 719589/ passes
|
|
- name: Install docker-compose
|
|
pip:
|
|
name: docker-compose
|
|
state: present
|
|
executable: pip3
|
|
|
|
- name: Ensure docker compose dir
|
|
file:
|
|
state: directory
|
|
path: /etc/nodepool-docker
|
|
|
|
- name: Copy docker compose file
|
|
template:
|
|
src: docker-compose.yaml.j2
|
|
dest: /etc/nodepool-docker/docker-compose.yaml
|
|
|
|
- name: Update container images
|
|
include_tasks: pull.yaml
|
|
|
|
- name: Start nodepool launcher
|
|
include_tasks: start.yaml
|
|
|
|
# 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
|