Download IPA kernel and ramdisk

The overcloud inspector requires a IPA agent and ramdisk, provide
a mechanism so that they can be downloaded.

Change-Id: If19fb7bb3bf91f9aef3c00e07d2cf7862a0ec66a
This commit is contained in:
Derek Higgins 2018-04-20 11:34:30 +01:00
parent 68bfa9828f
commit af51fc9a30

@ -40,6 +40,10 @@ parameters:
type: boolean
description: Flag to indicate undercloud upgrade process is being run.
default: false
IPAImageURLs:
default: []
description: IPA image URLs, the format should be ["http://path/to/kernel", "http://path/to/ramdisk"]
type: json
resources:
@ -59,6 +63,9 @@ resources:
MySQLClient:
type: ../../puppet/services/database/mysql-client.yaml
conditions:
ipa_images: {not: {equals: [{get_param: IPAImageURLs}, []]}}
outputs:
role_data:
description: Role data for the Ironic Inspector role.
@ -132,6 +139,31 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
command: "/usr/bin/bootstrap_host_exec ironic_inspector su ironic-inspector -s /bin/bash -c 'ironic-inspector-dbsync --config-file /etc/ironic-inspector/inspector.conf upgrade'"
ironic_inspector_get_ipa:
start_order: 2
image: *ironic_inspector_image
net: host
user: root
privileged: false
detach: false
volumes:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /var/lib/kolla/config_files/ironic_inspector.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/ironic:/var/lib/ironic
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
command:
if:
- ipa_images
- list_join:
- " "
- - "curl -g -o /var/lib/ironic/httpboot/agent.kernel"
- {get_param: [IPAImageURLs, 0]}
- "-o /var/lib/ironic/httpboot/agent.ramdisk"
- {get_param: [IPAImageURLs, 1]}
- 'true'
step_4:
ironic_inspector:
start_order: 92