Isolating standalone Ironic mode
This commit is contained in:
parent
fdfe0179a7
commit
aabd2d9809
@ -70,16 +70,14 @@ ironic_service_in_ldap: False
|
|||||||
|
|
||||||
|
|
||||||
# Is this Ironic installation working standalone?
|
# Is this Ironic installation working standalone?
|
||||||
|
# If you're wanting Ironic to work without being integrated to other OpenStack
|
||||||
|
# services, set this to True, and update the dhcp configuration appropriately
|
||||||
ironic_standalone: False
|
ironic_standalone: False
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
ironic_galera_user: ironic
|
ironic_galera_user: ironic
|
||||||
ironic_galera_database: ironic
|
ironic_galera_database: ironic
|
||||||
ironic_galera_password: gu1d0
|
ironic_galera_password: "gu1d0" # TODO(mrda): Manage secrets
|
||||||
|
|
||||||
# TBD(mrda): need to handle this a little better :)
|
|
||||||
#database_root_user: root
|
|
||||||
#database_root_password: sp4m3ggs
|
|
||||||
|
|
||||||
# Integrated Openstack configuration
|
# Integrated Openstack configuration
|
||||||
ironic_openstack_driver_list: agent_ipmitool
|
ironic_openstack_driver_list: agent_ipmitool
|
||||||
@ -134,8 +132,6 @@ python_ironicclient_pip_packages:
|
|||||||
ironic_conductor_apt_packages:
|
ironic_conductor_apt_packages:
|
||||||
- libxml2-dev
|
- libxml2-dev
|
||||||
- rabbitmq-server
|
- rabbitmq-server
|
||||||
- isc-dhcp-server
|
|
||||||
- tftpd-hpa
|
|
||||||
- syslinux
|
- syslinux
|
||||||
- syslinux-common
|
- syslinux-common
|
||||||
- libxslt1-dev
|
- libxslt1-dev
|
||||||
@ -145,6 +141,10 @@ ironic_conductor_apt_packages:
|
|||||||
- open-iscsi
|
- open-iscsi
|
||||||
- ipmitool
|
- ipmitool
|
||||||
|
|
||||||
|
ironic_conductor_standalone_apt_packages:
|
||||||
|
- isc-dhcp-server
|
||||||
|
- tftpd-hpa
|
||||||
|
|
||||||
ironic_conductor_pip_packages:
|
ironic_conductor_pip_packages:
|
||||||
- mysql-python
|
- mysql-python
|
||||||
|
|
||||||
|
44
files/dhcpd.conf
Normal file
44
files/dhcpd.conf
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
#
|
||||||
|
# Sample configuration file for Ironic deploys via
|
||||||
|
# openstack-ansible-ironic
|
||||||
|
#
|
||||||
|
|
||||||
|
# The ddns-updates-style parameter controls whether or not the server will
|
||||||
|
# attempt to do a DNS update when a lease is confirmed. We default to the
|
||||||
|
# behavior of the version 2 packages ('none', since DHCP v2 didn't
|
||||||
|
# have support for DDNS.)
|
||||||
|
ddns-update-style none;
|
||||||
|
|
||||||
|
default-lease-time 600;
|
||||||
|
max-lease-time 7200;
|
||||||
|
|
||||||
|
# If this DHCP server is the official DHCP server for the local
|
||||||
|
# network, the authoritative directive should be uncommented.
|
||||||
|
authoritative;
|
||||||
|
|
||||||
|
# Use this to send dhcp log messages to a different log file (you also
|
||||||
|
# have to hack syslog.conf to complete the redirection).
|
||||||
|
log-facility local7;
|
||||||
|
|
||||||
|
# This is the section of great importance to standalone ironic
|
||||||
|
# deployers. This host, as well as the deployment hosts, should
|
||||||
|
# be on the same network segment. And, if you have more than
|
||||||
|
# one ironic-conduftor, you should only run an isc-dhcp-server
|
||||||
|
# and tftpd-hpa server on one of these conductors.
|
||||||
|
#
|
||||||
|
# TODO(mrda): Enforce this in the os_ironic role
|
||||||
|
#
|
||||||
|
subnet 10.141.0.0 netmask 255.255.0.0 {
|
||||||
|
group {
|
||||||
|
# Repeat this host section for each ironic deployment host
|
||||||
|
host ironic_deploy_host_name {
|
||||||
|
hardware ethernet <tbd>; # deploy host mac address
|
||||||
|
fixed-address <tbd>; # deploy host IP address
|
||||||
|
allow booting;
|
||||||
|
allow bootp;
|
||||||
|
next-server <tbd>; # tftpd-hpa server IP addr
|
||||||
|
filename "pxelinux.0";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -26,3 +26,9 @@
|
|||||||
name: "tftpd-hpa"
|
name: "tftpd-hpa"
|
||||||
state: restarted
|
state: restarted
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
||||||
|
- name: Restart isc-dhcp-server
|
||||||
|
service:
|
||||||
|
name: "isc-dhcp-server"
|
||||||
|
state: restarted
|
||||||
|
failed_when: false
|
||||||
|
@ -31,6 +31,20 @@
|
|||||||
file:
|
file:
|
||||||
path: "/etc/apache2/sites-enabled/000-default.conf"
|
path: "/etc/apache2/sites-enabled/000-default.conf"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
|
when: not ironic_standalone
|
||||||
|
notify:
|
||||||
|
- Restart ironic services
|
||||||
|
tags:
|
||||||
|
- ironic-httpd
|
||||||
|
|
||||||
|
- name: Enable default apache site vhost
|
||||||
|
file:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ item.dest }}"
|
||||||
|
state: "{{ item.state }}"
|
||||||
|
with_items:
|
||||||
|
- { src: "/etc/apache2/sites-available/000-default.conf", dest: "/etc/apache2/sites-enabled/000-default.conf", state: "link" }
|
||||||
|
when: ironic_standalone
|
||||||
notify:
|
notify:
|
||||||
- Restart ironic services
|
- Restart ironic services
|
||||||
tags:
|
tags:
|
||||||
|
@ -27,6 +27,21 @@
|
|||||||
- ironic-conductor
|
- ironic-conductor
|
||||||
- ironic-apt-packages
|
- ironic-apt-packages
|
||||||
|
|
||||||
|
- name: Install ironic-conductor standalone apt packages
|
||||||
|
apt:
|
||||||
|
pkg: "{{ item }}"
|
||||||
|
state: latest
|
||||||
|
register: install_packages
|
||||||
|
until: install_packages|success
|
||||||
|
retries: 5
|
||||||
|
delay: 2
|
||||||
|
with_items: ironic_conductor_standalone_apt_packages
|
||||||
|
when: ironic_standalone
|
||||||
|
tags:
|
||||||
|
- ironic-install
|
||||||
|
- ironic-conductor
|
||||||
|
- ironic-apt-packages
|
||||||
|
|
||||||
- name: Install ironic-conductor specific pip dependencies
|
- name: Install ironic-conductor specific pip dependencies
|
||||||
pip:
|
pip:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
|
@ -13,6 +13,16 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
- name: Copy in sample dhcpd.conf file
|
||||||
|
copy:
|
||||||
|
src: dhcpd.conf
|
||||||
|
dest: /etc/dhcp/
|
||||||
|
when: ironic_standalone
|
||||||
|
notify:
|
||||||
|
- Restart isc-dhcp-server
|
||||||
|
tags:
|
||||||
|
- tftpd-hpa
|
||||||
|
|
||||||
- name: Create /tftpboot
|
- name: Create /tftpboot
|
||||||
file:
|
file:
|
||||||
path: "/tftpboot"
|
path: "/tftpboot"
|
||||||
@ -20,6 +30,7 @@
|
|||||||
owner: "{{ ironic_system_user_name }}"
|
owner: "{{ ironic_system_user_name }}"
|
||||||
group: "{{ ironic_system_group_name }}"
|
group: "{{ ironic_system_group_name }}"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
when: ironic_standalone
|
||||||
tags:
|
tags:
|
||||||
- tftpd-hpa
|
- tftpd-hpa
|
||||||
|
|
||||||
@ -27,6 +38,7 @@
|
|||||||
copy:
|
copy:
|
||||||
src: tftpd-hpa
|
src: tftpd-hpa
|
||||||
dest: /etc/default/tftpd-hpa
|
dest: /etc/default/tftpd-hpa
|
||||||
|
when: ironic_standalone
|
||||||
notify:
|
notify:
|
||||||
- Restart tftpd-hpa
|
- Restart tftpd-hpa
|
||||||
tags:
|
tags:
|
||||||
@ -36,6 +48,7 @@
|
|||||||
copy:
|
copy:
|
||||||
src: map-file
|
src: map-file
|
||||||
dest: /tftpboot/map-file
|
dest: /tftpboot/map-file
|
||||||
|
when: ironic_standalone
|
||||||
notify:
|
notify:
|
||||||
- Restart tftpd-hpa
|
- Restart tftpd-hpa
|
||||||
tags:
|
tags:
|
||||||
@ -44,30 +57,32 @@
|
|||||||
- name: Check to see if pxlinux.0 is required
|
- name: Check to see if pxlinux.0 is required
|
||||||
stat: path=/tftpboot/pxelinux.0
|
stat: path=/tftpboot/pxelinux.0
|
||||||
register: pxelinux_exists
|
register: pxelinux_exists
|
||||||
|
when: ironic_standalone
|
||||||
tags:
|
tags:
|
||||||
- tftpd-hpa
|
- tftpd-hpa
|
||||||
|
|
||||||
- name: Check to see if chain.c32 is required
|
- name: Check to see if chain.c32 is required
|
||||||
stat: path=/tftpboot/chain.c32
|
stat: path=/tftpboot/chain.c32
|
||||||
register: chain32_exists
|
register: chain32_exists
|
||||||
|
when: ironic_standalone
|
||||||
tags:
|
tags:
|
||||||
- tftpd-hpa
|
- tftpd-hpa
|
||||||
|
|
||||||
- name: Check pxlinux.0 exists
|
- name: Check pxlinux.0 exists
|
||||||
stat: path=/usr/lib/syslinux/pxelinux.0
|
stat: path=/usr/lib/syslinux/pxelinux.0
|
||||||
register: pxelinux_stat
|
register: pxelinux_stat
|
||||||
when: not pxelinux_exists
|
when: not pxelinux_exists and ironic_standalone
|
||||||
tags:
|
tags:
|
||||||
- tftpd-hpa
|
- tftpd-hpa
|
||||||
|
|
||||||
- name: Copy syslinux pxlinux.0
|
- name: Copy syslinux pxlinux.0
|
||||||
command: cp /usr/lib/syslinux/pxelinux.0 /tftpboot/pxelinux.0
|
command: cp /usr/lib/syslinux/pxelinux.0 /tftpboot/pxelinux.0
|
||||||
when: not pxelinux_exists and pxelinux_stat.stat.exists
|
when: not pxelinux_exists and pxelinux_stat.stat.exists and ironic_standalone
|
||||||
tags:
|
tags:
|
||||||
- tftpd-hpa
|
- tftpd-hpa
|
||||||
|
|
||||||
- name: Copy syslinux chain.c32
|
- name: Copy syslinux chain.c32
|
||||||
command: cp /usr/lib/syslinux/chain.c32 /tftpboot/chain.c32
|
command: cp /usr/lib/syslinux/chain.c32 /tftpboot/chain.c32
|
||||||
when: not chain32_exists and chain32_stat.stat.exists
|
when: not chain32_exists and chain32_stat.stat.exists and ironic_standalone
|
||||||
tags:
|
tags:
|
||||||
- tftpd-hpa
|
- tftpd-hpa
|
||||||
|
@ -41,24 +41,12 @@
|
|||||||
tags:
|
tags:
|
||||||
- ironic-db-setup
|
- ironic-db-setup
|
||||||
|
|
||||||
#- name: Create database schema
|
|
||||||
## command: "{{ ironic_bin }}/ironic-dbsync --config-file /etc/ironic/ironic.conf create_schema"
|
|
||||||
# sudo: yes
|
|
||||||
# sudo_user: "{{ ironic_system_user_name }}"
|
|
||||||
# notify:
|
|
||||||
# - Restart ironic services
|
|
||||||
# when: ironic_db.changed == True
|
|
||||||
# tags:
|
|
||||||
# - ironic-db-setup
|
|
||||||
# - ironic-conductor
|
|
||||||
|
|
||||||
- name: Update database schema
|
- name: Update database schema
|
||||||
command: "{{ ironic_bin }}/ironic-dbsync --config-file /etc/ironic/ironic.conf upgrade"
|
command: "{{ ironic_bin }}/ironic-dbsync --config-file /etc/ironic/ironic.conf upgrade"
|
||||||
sudo: yes
|
sudo: yes
|
||||||
sudo_user: "{{ ironic_system_user_name }}"
|
sudo_user: "{{ ironic_system_user_name }}"
|
||||||
notify:
|
notify:
|
||||||
- Restart ironic services
|
- Restart ironic services
|
||||||
# when: ironic_db.changed == False
|
|
||||||
tags:
|
tags:
|
||||||
- ironic-db-setup
|
- ironic-db-setup
|
||||||
- ironic-conductor
|
- ironic-conductor
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: create the system group
|
- name: Create the system group
|
||||||
group:
|
group:
|
||||||
name: "{{ ironic_system_group_name }}"
|
name: "{{ ironic_system_group_name }}"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
@ -13,15 +13,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
#- include: ironic_upstart_common_init.yml
|
|
||||||
# vars:
|
|
||||||
# program_name: "{{ ironic_api_program_name }}"
|
|
||||||
# service_name: "{{ ironic_service_name }}"
|
|
||||||
# system_user: "{{ ironic_system_user_name }}"
|
|
||||||
# system_group: "{{ ironic_system_group_name }}"
|
|
||||||
# service_home: "{{ ironic_system_home_folder }}"
|
|
||||||
# when: inventory_hostname in groups['ironic_api']
|
|
||||||
|
|
||||||
- include: ironic_upstart_common_init.yml
|
- include: ironic_upstart_common_init.yml
|
||||||
vars:
|
vars:
|
||||||
program_name: "{{ ironic_conductor_program_name }}"
|
program_name: "{{ ironic_conductor_program_name }}"
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
Listen {{ ironic_service_port }}
|
Listen {{ ironic_service_port }}
|
||||||
|
{% if ironic_standalone %}
|
||||||
|
Listen 80
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user