Retrieve ilo drivers via webserver

This enables the ability to bypass the ilo driver
dependency on swift through implementation of support
for the 'use_http_web_server_for_images' variable
and corresponding logic to bypass swift tasks
when enabled

As per:
https://specs.openstack.org/openstack/ironic-specs/specs/4.2/remove-swift-dependency-for-ilo-drivers.html

Change-Id: I343c542dbb9b3a9fe17c364e827374b3512993f1
This commit is contained in:
Jeremy Grant 2017-01-18 08:41:47 -06:00 committed by Matthew Thode
parent 7266fe2197
commit c8e719cca2
No known key found for this signature in database
GPG Key ID: 64A37BEAAE19A4E8
3 changed files with 27 additions and 1 deletions

View File

@ -112,6 +112,20 @@ ironic_service_role_name: "admin"
ironic_service_in_ldap: False
# Ironic image store information
#
### Hosted Web Server
#
# Set this to True to use http web server to host floppy
# images and generated boot ISO. This requires http_root and
# http_url to be configured in the [deploy] section of the
# config file. If this is set to False, then Ironic will use
# Swift to host the floppy images and generated boot_iso.
ironic_enable_web_server_for_images: False
ironic_http_url: null
ironic_http_root: null
#
### Swift Config
#
ironic_swift_image_container: glance_images
ironic_swift_api_version: v1
ironic_swift_url_endpoint_type: swift

View File

@ -24,6 +24,7 @@
environment:
OS_ENDPOINT_TYPE: internalURL
when:
- not ironic_enable_web_server_for_images | bool
- inventory_hostname == groups['ironic_all'][0]
- not ironic_standalone | bool
tags:
@ -41,6 +42,7 @@
OS_ENDPOINT_TYPE: internalURL
register: swift_storage_url
when:
- not ironic_enable_web_server_for_images | bool
- (ironic_swift_auth_account is undefined) or (ironic_swift_endpoint is undefined)
- not ironic_standalone | bool
tags:
@ -54,6 +56,7 @@
variables are undefined. Ensure swift is functional and/or define
those variables.
when:
- not ironic_enable_web_server_for_images | bool
- (ironic_swift_auth_account is undefined) and (ironic_swift_endpoint is undefined)
- not ironic_standalone | bool
- not swift_storage_url.stdout
@ -64,6 +67,7 @@
set_fact:
ironic_swift_auth_account: "{{ swift_storage_url.stdout.split('/v1/')[-1] }}"
when:
- not ironic_enable_web_server_for_images | bool
- ironic_swift_auth_account is undefined
- not ironic_standalone | bool
tags:
@ -73,6 +77,7 @@
set_fact:
ironic_swift_endpoint: "{{ swift_storage_url.stdout.split('/v1/')[0] }}"
when:
- not ironic_enable_web_server_for_images | bool
- ironic_swift_endpoint is undefined
- not ironic_standalone | bool
tags:

View File

@ -58,6 +58,10 @@ erase_devices_priority = {{ ironic_erase_devices_priority }}
{% if not ironic_standalone | bool %}
object_store_endpoint_type = {{ ironic_swift_url_endpoint_type }}
{% endif %}
{% if ironic_enable_web_server_for_images | bool %}
http_root ={{ ironic_http_root }}
http_url = {{ ironic_http_url }}
{% endif %}
[dhcp]
dhcp_provider = {{ ironic_dhcp_provider }}
@ -77,7 +81,7 @@ username = {{ ironic_glance_service_user_name }}
user_domain_id = {{ ironic_glance_service_user_domain_id }}
password = {{ glance_service_password }}
glance_api_servers = {{ ironic_glance_api_servers }}
{% if not ironic_standalone | bool %}
{% if not ironic_standalone | bool and not ironic_enable_web_server_for_images | bool %}
swift_temp_url_key = {{ ironic_swift_temp_url_secret_key }}
swift_container = {{ ironic_swift_image_container }}
swift_endpoint_url = {{ ironic_swift_endpoint }}
@ -88,6 +92,9 @@ swift_api_version = {{ ironic_swift_api_version }}
[iboot]
[ilo]
{% if ironic_enable_web_server_for_images | bool %}
use_web_server_for_images = True
{% endif %}
[inspector]