diff --git a/playbooks/kayobe-seed-base/overrides.yml.j2 b/playbooks/kayobe-seed-base/overrides.yml.j2 index 5af2c079e..0881ebff6 100644 --- a/playbooks/kayobe-seed-base/overrides.yml.j2 +++ b/playbooks/kayobe-seed-base/overrides.yml.j2 @@ -10,7 +10,9 @@ docker_registry_mirrors: kolla_docker_namespace: "openstack.kolla" # use the published images from a site mirror of quay.io kolla_docker_registry: "{{ zuul_site_mirror_fqdn }}:4447" -kolla_source_url: "{{ ansible_env.PWD ~ '/' ~ zuul.projects['opendev.org/openstack/kolla'].src_dir }}" +# NOTE(mgoddard): The kolla repository is copied to /tmp/kolla and made +# readable by the stack user. +kolla_source_url: "/tmp/kolla" kolla_source_version: "{{ zuul.projects['opendev.org/openstack/kolla'].checkout }}" kolla_ansible_source_url: "{{ ansible_env.PWD ~ '/' ~ zuul.projects['opendev.org/openstack/kolla-ansible'].src_dir }}" kolla_ansible_source_version: "{{ zuul.projects['opendev.org/openstack/kolla-ansible'].checkout }}" diff --git a/playbooks/kayobe-seed-base/run.yml b/playbooks/kayobe-seed-base/run.yml index 270081ee4..35f29d929 100644 --- a/playbooks/kayobe-seed-base/run.yml +++ b/playbooks/kayobe-seed-base/run.yml @@ -9,3 +9,21 @@ shell: cmd: "{{ kayobe_src_dir }}/dev/seed-deploy.sh &> {{ logs_dir }}/ansible/seed-deploy" executable: /bin/bash + + # NOTE(mgoddard): The stack user cannot read the kolla source code, which + # lives in the zuul user's home directory. Copy it to a readable location. + - name: Create a readable copy of kolla source code + become: true + copy: + src: "{{ ansible_env.PWD ~ '/' ~ zuul.projects['opendev.org/openstack/kolla'].src_dir }}" + dest: /tmp + owner: stack + group: stack + remote_src: true + + - name: Ensure base container image is built + shell: + cmd: > + source {{ kayobe_src_dir }}/dev/environment-setup.sh && + kayobe seed container image build ^base &> {{ logs_dir }}/ansible/container-image-build + executable: /bin/bash