From 828d176dd549690fe6c156179a3970f6514ac1b0 Mon Sep 17 00:00:00 2001 From: Oleksandr Berezovskyi Date: Tue, 30 Aug 2016 10:55:28 +0000 Subject: [PATCH] Add possibility to set source branch for ironic-inspector This patch adds possibility to specify the branch for both ironic-inspector and python-ironic-inspector-client. Depends-on: Ia587fce79b8ba4cd48df8c069c0645db832e9606 Closes-bug: #1618645 Change-Id: I2a868ea38c1a70e5b855ed00ea4a301b039085a8 --- .../roles/bifrost-ironic-install/defaults/main.yml | 6 ++++++ .../bifrost-ironic-install/tasks/inspector_install.yml | 4 ++++ .../roles/bifrost-prep-for-install/defaults/main.yml | 6 ++++++ .../bifrost-prep-for-install/tasks/git_download.yaml | 10 ++++++++++ .../bifrost-prep-for-install/tasks/local_path.yaml | 4 ++++ playbooks/test-bifrost-dhcp.yaml | 2 ++ playbooks/test-bifrost-dynamic.yaml | 2 ++ playbooks/test-bifrost.yaml | 2 ++ ...ic-inspector-install-from-git-d74a3ce3b1d1c87c.yaml | 5 +++++ 9 files changed, 41 insertions(+) create mode 100644 releasenotes/notes/ironic-inspector-install-from-git-d74a3ce3b1d1c87c.yaml diff --git a/playbooks/roles/bifrost-ironic-install/defaults/main.yml b/playbooks/roles/bifrost-ironic-install/defaults/main.yml index 03d42b654..a06efd4ad 100644 --- a/playbooks/roles/bifrost-ironic-install/defaults/main.yml +++ b/playbooks/roles/bifrost-ironic-install/defaults/main.yml @@ -8,6 +8,8 @@ http_boot_folder: /httpboot file_url_port: "{{ nginx_port | default('8080') }}" ironicclient_source_install: false shade_source_install: true +ironicinspector_source_install: false +ironicinspectorclient_source_install: false # Setting to utilize diskimage-builder to create a bootable image. create_image_via_dib: true # Setting to install diskimage-builder @@ -60,6 +62,8 @@ dib_git_url: https://git.openstack.org/openstack/diskimage-builder ironicclient_git_url: https://git.openstack.org/openstack/python-ironicclient shade_git_url: https://git.openstack.org/openstack-infra/shade ironic_git_url: https://git.openstack.org/openstack/ironic +ironicinspector_git_url: https://github.com/openstack/ironic-inspector +ironicinspectorclient_git_url: https://github.com/openstack/python-ironic-inspector-client mysql_username: "root" mysql_password: "" disable_dnsmasq_dns: False @@ -67,6 +71,8 @@ ironic_git_folder: /opt/stack/ironic ironicclient_git_folder: /opt/stack/python-ironicclient shade_git_folder: /opt/stack/shade dib_git_folder: /opt/stack/diskimage-builder +ironicinspector_git_folder: /opt/stack/ironic-inspector +ironicinspectorclient_git_folder: /opt/stack/python-ironic-inspector-client # Comma-separated list, in the format of a string, of drivers that are enabled # by default. This is intended to be a list of agent based drivers. # PXE drivers can be found in the setting pxe_drivers that can be found below. diff --git a/playbooks/roles/bifrost-ironic-install/tasks/inspector_install.yml b/playbooks/roles/bifrost-ironic-install/tasks/inspector_install.yml index 825cb9b0d..108dc5191 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/inspector_install.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/inspector_install.yml @@ -17,7 +17,11 @@ include: pip_install.yml package=ironic-inspector state=latest + sourcedir={{ ironicinspector_git_folder }} + source_install={{ ironicinspector_source_install }} - name: "Inspector - PIP client install" include: pip_install.yml package=python-ironic-inspector-client state=latest + source_dir={{ ironicinspectorclient_git_folder }} + sourc_install={{ ironicinspectorclient_source_install }} diff --git a/playbooks/roles/bifrost-prep-for-install/defaults/main.yml b/playbooks/roles/bifrost-prep-for-install/defaults/main.yml index 1e03ae97e..9e43b9bd8 100644 --- a/playbooks/roles/bifrost-prep-for-install/defaults/main.yml +++ b/playbooks/roles/bifrost-prep-for-install/defaults/main.yml @@ -6,9 +6,13 @@ dib_git_url: https://git.openstack.org/openstack/diskimage-builder ironicclient_git_url: https://git.openstack.org/openstack/python-ironicclient shade_git_url: https://git.openstack.org/openstack-infra/shade ironic_git_url: https://git.openstack.org/openstack/ironic +ironicinspector_git_url: https://github.com/openstack/ironic-inspector +ironicinspectorclient_git_url: https://github.com/openstack/python-ironic-inspector-client # *_git_folder can be overridden by local clones for offline installs ironicclient_git_folder: "{{ git_root}}/python-ironicclient" ironic_git_folder: "{{ git_root}}/ironic" +ironicinspector_git_folder: "{{ git_root}}/ironic-inspector" +ironicinspectorclient_git_folder: "{{ git_root}}/python-ironic-inspector-client" shade_git_folder: "{{ git_root}}/shade" dib_git_folder: "{{ git_root }}/diskimage-builder" # *_git_branch can be overridden for stable branch testing @@ -16,6 +20,8 @@ ironicclient_git_branch: master ironic_git_branch: master shade_git_branch: master dib_git_branch: master +ironicinspector_git_branch: master +ironicinspectorclient_git_branch: master # Conditional variables utilized based on CI or manual testing options. copy_from_local_path: false diff --git a/playbooks/roles/bifrost-prep-for-install/tasks/git_download.yaml b/playbooks/roles/bifrost-prep-for-install/tasks/git_download.yaml index 5d6fcbd50..397ad0b03 100644 --- a/playbooks/roles/bifrost-prep-for-install/tasks/git_download.yaml +++ b/playbooks/roles/bifrost-prep-for-install/tasks/git_download.yaml @@ -32,3 +32,13 @@ git_url="{{ dib_git_url }}" git_folder="{{ dib_git_folder }}" git_branch="{{ dib_git_branch }}" + +- include: git.yml + git_url="{{ ironicinspector_git_url }}" + git_folder="{{ ironicinspector_git_folder }}" + git_branch="{{ ironicinspector_git_branch }}" + +- include: git.yml + git_url="{{ ironicinspectorclient_git_url }}" + git_folder="{{ ironicinspectorclient_git_folder }}" + git_branch="{{ ironicinspectorclient_git_branch }}" diff --git a/playbooks/roles/bifrost-prep-for-install/tasks/local_path.yaml b/playbooks/roles/bifrost-prep-for-install/tasks/local_path.yaml index 77500d662..76d93414a 100644 --- a/playbooks/roles/bifrost-prep-for-install/tasks/local_path.yaml +++ b/playbooks/roles/bifrost-prep-for-install/tasks/local_path.yaml @@ -21,3 +21,7 @@ command: cp -a {{ shade_git_url }} {{ shade_git_folder }} chdir={{ git_root }} creates={{ shade_git_folder }} - name: "Disk Image Builder - Copy into place" command: cp -a {{ dib_git_url }} {{ dib_git_folder }} chdir={{ git_root }} creates={{ dib_git_folder }} +- name: "ironic-inspector - Copy into place" + command: cp -a {{ ironicinspector_git_url }} {{ ironicinspector_git_folder }} chdir={{ git_root }} creates={{ ironicinspector_git_folder }} +- name: "python-ironic-inspector-client - Copy into place" + command: cp -a {{ ironicinspectorclient_git_url }} {{ ironicinspectorclient_git_folder }} chdir={{ git_root }} creates={{ ironicinspectorclient_git_folder }} diff --git a/playbooks/test-bifrost-dhcp.yaml b/playbooks/test-bifrost-dhcp.yaml index 969e41d72..45dcd464a 100644 --- a/playbooks/test-bifrost-dhcp.yaml +++ b/playbooks/test-bifrost-dhcp.yaml @@ -39,6 +39,8 @@ ironicclient_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack/python-ironicclient" shade_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack-infra/shade" dib_git_url: "/opt/git/openstack/diskimage-builder" + ironicinspector_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack/ironic-inspector" + ironicinspectorclient_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack/python-ironic-inspector-client" # TODO(TheJulia) Fix the above paths to be consistent, because the NV job gets the dib # folder cloned, while the gate job does not. Likely need to work out a semi-hybrid # solution. diff --git a/playbooks/test-bifrost-dynamic.yaml b/playbooks/test-bifrost-dynamic.yaml index e41ed3ed5..4a8c1e96d 100644 --- a/playbooks/test-bifrost-dynamic.yaml +++ b/playbooks/test-bifrost-dynamic.yaml @@ -21,6 +21,8 @@ ironicclient_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack/python-ironicclient" shade_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack-infra/shade" dib_git_url: "/opt/git/openstack/diskimage-builder" + ironicinspector_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack/ironic-inspector" + ironicinspectorclient_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack/python-ironic-inspector-client" # TODO(TheJulia) Fix the above paths to be consistent, because the NV job gets the dib # folder cloned, while the gate job does not. Likely need to work out a semi-hybrid # solution. diff --git a/playbooks/test-bifrost.yaml b/playbooks/test-bifrost.yaml index 1228f792d..ea5198eb4 100644 --- a/playbooks/test-bifrost.yaml +++ b/playbooks/test-bifrost.yaml @@ -32,6 +32,8 @@ ironicclient_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack/python-ironicclient" shade_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack-infra/shade" dib_git_url: "/opt/git/openstack/diskimage-builder" + ironicinspector_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack/ironic-inspector" + ironicinspectorclient_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack/python-ironic-inspector-client" # TODO(TheJulia) Fix the above paths to be consistent, because the NV job gets the dib # folder cloned, while the gate job does not. Likely need to work out a semi-hybrid # solution. diff --git a/releasenotes/notes/ironic-inspector-install-from-git-d74a3ce3b1d1c87c.yaml b/releasenotes/notes/ironic-inspector-install-from-git-d74a3ce3b1d1c87c.yaml new file mode 100644 index 000000000..ef4e7eec9 --- /dev/null +++ b/releasenotes/notes/ironic-inspector-install-from-git-d74a3ce3b1d1c87c.yaml @@ -0,0 +1,5 @@ +--- +features: + - Allows install of ironic-inspector and + python-ironic-inspector-client from git sources + and to specify source branch via env variables.