diff --git a/ansible/group_vars/all/kolla b/ansible/group_vars/all/kolla index aea1572baa78abafd53f7d0aa19a9306d74ef893..bb6355f36b1a78535b156a0d3aa7289af8a8cba9 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 1fed374319cc3dcb1cf336d694b41d79bcc029df..df2cf3e8985a609f80d382a3342c4dd52c2a1e1b 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 01708836761da2094d82477cd7fc784a7e2a0e2c..74e2cfc998bc667e9708e1e00d57a3b95b0e81d2 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 81d14f1ab8c3b0233a6e3b15400f3294d2a2100e..c6ddcf2dca8c81d18d45032df8d5f7f2d83c8f52 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 2953e268e692adae6d7229cfee0c918c53d55414..715bcc1232e97c4292560c98fa2759c4b672da8c 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 ff05d81ee32aa67e5c77af11e9b9d0d594949a42..c3a73d095e63e6f61d0f0540cfa7a711e3b7bb06 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: