diff --git a/ansible/group_vars/all/kolla b/ansible/group_vars/all/kolla index aea1572ba..bb6355f36 100644 --- a/ansible/group_vars/all/kolla +++ b/ansible/group_vars/all/kolla @@ -40,6 +40,23 @@ kolla_docker_namespace: "kolla" # Kolla OpenStack release version. This should be a Docker image tag. kolla_openstack_release: "3.0.2" +# Dict mapping names of sources to their definitions for +# kolla_install_type=source. See kolla.common.config for details. +# Example: +# kolla_sources: +# ironic_base: +# type: git +# location: https://github.com/openstack/ironic +# reference: master +kolla_sources: + bifrost-base: + type: "git" + location: "https://github.com/stackhpc/bifrost" + reference: "stackhpc-3.0.0" + +############################################################################### +# Kolla-ansible configuration. + # Whether TLS is enabled for the external API endpoints. kolla_enable_tls_external: "no" diff --git a/ansible/roles/kolla-build/defaults/main.yml b/ansible/roles/kolla-build/defaults/main.yml index 1fed37431..df2cf3e89 100644 --- a/ansible/roles/kolla-build/defaults/main.yml +++ b/ansible/roles/kolla-build/defaults/main.yml @@ -13,3 +13,13 @@ kolla_docker_namespace: # Valid option is Docker repository tag kolla_openstack_release: + +# Dict mapping names of sources to their definitions for +# kolla_install_type=source. See kolla.common.config for details. +# Example: +# kolla_sources: +# ironic_base: +# type: git +# location: https://github.com/openstack/ironic +# reference: master +kolla_sources: {} diff --git a/ansible/roles/kolla-build/templates/kolla-build.conf.j2 b/ansible/roles/kolla-build/templates/kolla-build.conf.j2 index 017088367..74e2cfc99 100644 --- a/ansible/roles/kolla-build/templates/kolla-build.conf.j2 +++ b/ansible/roles/kolla-build/templates/kolla-build.conf.j2 @@ -16,3 +16,20 @@ tag={{ kolla_openstack_release }} # Path to a file containing template overrides. template_override={{ kolla_config_path }}/template-override.j2 + +{% for source_name, source_def in kolla_sources.items() %} +[{{ source_name }}] +{% if source_def.type is defined %} +# Type of source for {{ source_name }}. +type = {{ source_def.type }} +{% endif %} +{% if source_def.location is defined %} +# Location of source for {{ source_name }}. +location = {{ source_def.location }} +{% endif %} +{% if source_def.reference is defined %} +# Reference of source for {{ source_name }}. +reference = {{ source_def.reference }} +{% endif %} + +{% endfor %} diff --git a/ansible/roles/kolla/tasks/main.yml b/ansible/roles/kolla/tasks/main.yml index 81d14f1ab..c6ddcf2dc 100644 --- a/ansible/roles/kolla/tasks/main.yml +++ b/ansible/roles/kolla/tasks/main.yml @@ -21,6 +21,12 @@ with_items: - { name: pip } +- name: Ensure source code checkout path exists + file: + path: "{{ source_checkout_path }}" + state: directory + recurse: True + - name: Ensure Kolla source code checkout exists git: repo: "{{ kolla_source_url }}" diff --git a/ansible/kolla-build.yml b/ansible/seed-kolla-build.yml similarity index 61% rename from ansible/kolla-build.yml rename to ansible/seed-kolla-build.yml index 2953e268e..715bcc123 100644 --- a/ansible/kolla-build.yml +++ b/ansible/seed-kolla-build.yml @@ -1,5 +1,5 @@ --- -- name: Ensure Kolla is configured +- name: Ensure Kolla is configured on seed hosts: seed roles: - role: kolla diff --git a/etc/kayobe/kolla.yml b/etc/kayobe/kolla.yml index ff05d81ee..c3a73d095 100644 --- a/etc/kayobe/kolla.yml +++ b/etc/kayobe/kolla.yml @@ -39,6 +39,19 @@ # Kolla OpenStack release version. This should be a Docker image tag. #kolla_openstack_release: +# Dict mapping names of sources to their definitions for +# kolla_install_type=source. See kolla.common.config for details. +# Example: +# kolla_sources: +# ironic_base: +# type: git +# location: https://github.com/openstack/ironic +# reference: master +#kolla_sources: + +############################################################################### +# Kolla-ansible configuration. + # Whether TLS is enabled for the external API endpoints. #kolla_enable_tls_external: