Add playbooks to build seed and overcloud Docker images
This commit is contained in:
parent
cbc9ef78d6
commit
99cd65e8d4
65
ansible/overcloud-image-build.yml
Normal file
65
ansible/overcloud-image-build.yml
Normal 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
|
26
ansible/seed-image-build.yml
Normal file
26
ansible/seed-image-build.yml
Normal 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(' ') }}"
|
Loading…
Reference in New Issue
Block a user