Merge "Add support to ironic "direct" deploy interface"
This commit is contained in:
commit
7952d2e53a
@ -36,11 +36,19 @@ parameters:
|
|||||||
default: {}
|
default: {}
|
||||||
description: Parameters specific to the role
|
description: Parameters specific to the role
|
||||||
type: json
|
type: json
|
||||||
|
IronicConfigureSwiftTempUrlKey:
|
||||||
|
default: true
|
||||||
|
description: Whether to configure Swift temporary URLs for use with
|
||||||
|
the "direct" and "ansible" deploy interfaces.
|
||||||
|
type: boolean
|
||||||
UndercloudUpgrade:
|
UndercloudUpgrade:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: Flag to indicate undercloud upgrade process is being run.
|
description: Flag to indicate undercloud upgrade process is being run.
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
|
conditions:
|
||||||
|
configure_swift_temp_url: {equals: [{get_param: IronicConfigureSwiftTempUrlKey}, true]}
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
|
|
||||||
ContainersCommon:
|
ContainersCommon:
|
||||||
@ -103,11 +111,49 @@ outputs:
|
|||||||
- path: /var/log/ironic
|
- path: /var/log/ironic
|
||||||
owner: ironic:ironic
|
owner: ironic:ironic
|
||||||
recurse: true
|
recurse: true
|
||||||
|
docker_config_scripts:
|
||||||
|
create_swift_temp_url_key.sh:
|
||||||
|
mode: "0700"
|
||||||
|
content: |
|
||||||
|
#!/bin/bash
|
||||||
|
export OS_PROJECT_DOMAIN_NAME=$(crudini --get /etc/ironic/ironic.conf swift project_domain_name)
|
||||||
|
export OS_USER_DOMAIN_NAME=$(crudini --get /etc/ironic/ironic.conf swift user_domain_name)
|
||||||
|
export OS_PROJECT_NAME=$(crudini --get /etc/ironic/ironic.conf swift project_name)
|
||||||
|
export OS_USERNAME=$(crudini --get /etc/ironic/ironic.conf swift username)
|
||||||
|
export OS_PASSWORD=$(crudini --get /etc/ironic/ironic.conf swift password)
|
||||||
|
export OS_AUTH_URL=$(crudini --get /etc/ironic/ironic.conf swift auth_url)
|
||||||
|
export OS_AUTH_TYPE=password
|
||||||
|
export OS_IDENTITY_API_VERSION=3
|
||||||
|
|
||||||
|
echo "Check if a temporary URL key already exists"
|
||||||
|
KEY_SET=$(openstack object store account show -c properties -f value 2>/dev/null | tr ',' '\n' | grep Temp-Url-Key || true)
|
||||||
|
if [ -z $KEY_SET ]; then
|
||||||
|
echo "Creating a new temporary URL for project $OS_PROJECT_NAME"
|
||||||
|
SWIFT_TEMP_URL_KEY=$(uuidgen | sha1sum | awk '{print $1}')
|
||||||
|
openstack object store account set --property "Temp-URL-Key=$SWIFT_TEMP_URL_KEY" || exit 1
|
||||||
|
fi
|
||||||
docker_config:
|
docker_config:
|
||||||
step_4:
|
step_4:
|
||||||
ironic_conductor:
|
map_merge:
|
||||||
|
- if:
|
||||||
|
- configure_swift_temp_url
|
||||||
|
- create_swift_temp_url_key:
|
||||||
|
start_order: 70
|
||||||
|
image: &ironic_conductor_image {get_param: DockerIronicConductorImage}
|
||||||
|
net: host
|
||||||
|
detach: false
|
||||||
|
volumes:
|
||||||
|
list_concat:
|
||||||
|
- {get_attr: [ContainersCommon, volumes]}
|
||||||
|
-
|
||||||
|
- /var/lib/config-data/puppet-generated/ironic/etc/ironic:/etc/ironic:ro
|
||||||
|
- /var/lib/docker-config-scripts/create_swift_temp_url_key.sh:/create_swift_temp_url_key.sh:ro
|
||||||
|
user: root
|
||||||
|
command: "/usr/bin/bootstrap_host_exec ironic_conductor /create_swift_temp_url_key.sh"
|
||||||
|
- {}
|
||||||
|
- ironic_conductor:
|
||||||
start_order: 80
|
start_order: 80
|
||||||
image: {get_param: DockerIronicConductorImage}
|
image: *ironic_conductor_image
|
||||||
net: host
|
net: host
|
||||||
privileged: true
|
privileged: true
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -45,8 +45,7 @@ parameter_defaults:
|
|||||||
IronicEnabledHardwareTypes: ['ipmi', 'redfish', 'idrac', 'ilo']
|
IronicEnabledHardwareTypes: ['ipmi', 'redfish', 'idrac', 'ilo']
|
||||||
IronicEnabledBootInterfaces: ['pxe', 'ilo-pxe']
|
IronicEnabledBootInterfaces: ['pxe', 'ilo-pxe']
|
||||||
IronicEnabledConsoleInterfaces: ['ipmitool-socat', 'ilo', 'no-console']
|
IronicEnabledConsoleInterfaces: ['ipmitool-socat', 'ilo', 'no-console']
|
||||||
# TODO(dtantsur): one day we may want to support the direct deploy too
|
IronicEnabledDeployInterfaces: ['iscsi', 'direct', 'ansible']
|
||||||
IronicEnabledDeployInterfaces: ['iscsi', 'ansible']
|
|
||||||
IronicEnabledInspectInterfaces: ['inspector', 'no-inspect']
|
IronicEnabledInspectInterfaces: ['inspector', 'no-inspect']
|
||||||
IronicEnabledManagementInterfaces: ['ipmitool', 'redfish', 'idrac', 'ilo']
|
IronicEnabledManagementInterfaces: ['ipmitool', 'redfish', 'idrac', 'ilo']
|
||||||
# NOTE(dtantsur): disabling advanced networking as it's not used (or
|
# NOTE(dtantsur): disabling advanced networking as it's not used (or
|
||||||
|
Loading…
Reference in New Issue
Block a user