Add playbooks to build seed and overcloud Docker images

This commit is contained in:
Mark Goddard 2017-03-03 15:01:50 +00:00
parent cbc9ef78d6
commit 99cd65e8d4
2 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,65 @@
---
- name: Ensure Kolla container images are built for overcloud services
#hosts: controllers
hosts: seed
vars:
# Set this to True to push images to the registry when built.
push_images: False
image_regex_map:
- regex: cinder
enabled: True
- regex: cron
enabled: True
- regex: dnsmasq
enabled: True
- regex: fluentd
enabled: True
- regex: glance
enabled: "{{ kolla_enable_glance | bool }}"
- regex: haproxy
enabled: True
- regex: heat
enabled: True
- regex: horizon
enabled: True
- regex: ironic
enabled: "{{ kolla_enable_ironic | bool }}"
- regex: iscsid
enabled: True
- regex: keepalived
enabled: True
- regex: keystone
enabled: True
- regex: kolla-toolbox
enabled: True
- regex: mariadb
enabled: True
- regex: memcached
enabled: True
- regex: neutron-server
enabled: True
# Neutron SFC agent not currently supported on CentOS binary builds.
- regex: "neutron-\\(dhcp\\|l3\\|metadata\\|openvswitch\\)-agent"
enabled: True
- regex: nova
enabled: True
- regex: openvswitch
enabled: True
- regex: rabbitmq
enabled: True
- regex: swift
enabled: "{{ kolla_enable_swift | bool }}"
- regex: tgtd
enabled: True
image_regexes: "{{ image_regex_map | selectattr('enabled') | map(attribute='regex') | list }}"
tasks:
- name: Ensure custom Kolla images are built
shell: >
source kolla-venv/bin/activate &&
kolla-build \
--config-dir {{ kolla_config_path }} \
{% if push_images | bool %}--push{% endif %} \
{{ item.regex }}
with_items:
- regex: "{{ image_regexes | join(' ') }}"
run_once: True

View File

@ -0,0 +1,26 @@
---
- name: Ensure Kolla container images are built for seed services
hosts: seed
vars:
# Set this to True to push images to the registry when built.
push_images: False
image_regex_map:
- regex: bifrost
enabled: True
image_regexes: "{{ image_regex_map | selectattr('enabled') | map(attribute='regex') | list }}"
tasks:
- name: Ensure custom Kolla images are built
shell: >
source kolla-venv/bin/activate &&
kolla-build \
--config-dir {{ kolla_config_path }} \
--type {{ item.type }} \
--namespace {{ item.namespace }} \
--tag {{ item.tag }} \
{% if push_images | bool %}--push{% endif %} \
{{ item.regex }}
with_items:
- type: source
namespace: "{{ kolla_docker_namespace }}"
tag: "{{ kolla_openstack_release }}"
regex: "{{ image_regexes | join(' ') }}"