Add ironic.conf, including standalone usage

This commit is contained in:
Michael Davies 2015-11-27 14:36:55 +10:30
parent b40dd35bdc
commit 86ca876f6c
4 changed files with 1982 additions and 6 deletions

View File

@ -34,19 +34,35 @@ ironic_system_comment: ironic system user
ironic_system_home_folder: "/var/lib/{{ ironic_system_user_name }}"
ironic_system_log_folder: "/var/log/{{ ironic_system_user_name }}"
# Ironic API
# Ironic Program and Service names
ironic_api_program_name: ironic-api
# Ironic Conductor
ironic_conductor_program_name: ironic-conductor
# Python Ironic Client
python_ironic_client_program_name: ironic
ironic_service_names:
- "{{ ironic_api_program_name }}"
- "{{ ironic_conductor_program_name }}"
# Is this Ironic installation working standalone?
ironic_standalone: True
# Integrated Openstack configuration
ironic_openstack_driver_list: agent_ipmitool
ironic_openstack_auth_strategy: keystone
ironic_openstack_api_url: '' # Not required when we have keystone
ironic_openstack_dhcp_provider: neutron
ironic_openstack_sync_power_state_interval: 60
# Standalone Ironic configuration
ironic_standalone_driver_list: pxe_amt # for testing with a NUC
ironic_standalone_auth_strategy: noauth
# TODO(mrda): We need to know what the public endpoint for ironic is
ironic_standalone_api_url: "api_url=http://{{ ansible_default_ipv4['address'] }}:6385/"
ironic_standalone_dhcp_provider: none
ironic_standalone_sync_power_state_interval: -1
# Common configuration
ironic_node_name: ironic
# Database
ironic_database_user: ironic
ironic_database_database: ironic

View File

@ -0,0 +1,48 @@
---
# Copyright 2015, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Setup ironic for standalone usage
set_fact:
ironic_driver_list: "{{ ironic_standalone_driver_list }}"
ironic_auth_strategy: "{{ ironic_standalone_auth_strategy }}"
ironic_api_url: "{{ ironic_standalone_api_url }}"
ironic_dhcp_provider: "{{ ironic_standalone_dhcp_provider }}"
ironic_sync_power_state_interval: "{{ ironic_standalone_sync_power_state_interval }}"
when: ironic_standalone
- name: Setup ironic for integrated Openstack usage
set_fact:
ironic_driver_list: "{{ ironic_openstack_driver_list }}"
ironic_auth_strategy: "{{ ironic_openstack_auth_strategy }}"
ironic_api_url: "{{ ironic_openstack_api_url }}"
ironic_dhcp_provider: "{{ ironic_openstack_dhcp_provider }}"
ironic_sync_power_state_interval: "{{ ironic_openstack_sync_power_state_interval }}"
when: not ironic_standalone
- name: Build the ironic.conf configuration file
template:
src: "ironic.conf.j2"
dest: "/etc/ironic/ironic.conf"
mode: "0644"
owner: "root"
group: "root"
notify:
- Restart ironic services
tags:
- ironic-init
# TODO(mrda): Configure rabbit if standalone

View File

@ -18,6 +18,7 @@
- include: ironic_conductor_pre_install.yml
- include: ironic_install.yml
- include: python_ironicclient_install.yml
- include: ironic_post_install.yml
- include: ironic_conductor_post_install.yml
- include: ironic_db_setup.yml
- include: ironic_upstart_init.yml

1911
templates/ironic.conf.j2 Normal file

File diff suppressed because it is too large Load Diff