Adjust primary bifrost settings for Debian jessie support
Specific settings are required for Debian jessie as it uses different defaults from wheezy. Additionally, we're going to attempt to ensure that the service folder exists if we're using a systemd template upon install as sometimes that folder may not be present on systems. Added genisoimage as a fallback to mkisofs in configuration drive generation. Change-Id: I74bf93416513094293bc071fd40e62f4240d61bc Closes-Bug: 1522552
This commit is contained in:
parent
453eb8a021
commit
a67004c0a3
@ -21,3 +21,6 @@ network_mtu: 1500
|
||||
|
||||
# Default URL to Ironic
|
||||
ironic_url: "http://localhost:6385/"
|
||||
|
||||
# Default ISO generation utility
|
||||
iso_gen_utility: "mkisofs"
|
||||
|
@ -62,9 +62,17 @@
|
||||
- name: "Write network Debian style interface template"
|
||||
local_action: template src=interfaces.j2 dest={{ variable_configdrive_location.stdout }}/{{ uuid }}/openstack/content/0000
|
||||
when: write_interfaces_file | bool
|
||||
- name: "Check if mkisofs is available"
|
||||
shell: mkisofs --help >>/dev/null
|
||||
ignore_errors: yes
|
||||
register: test_mkisofs
|
||||
- name: "If mkisofs is not available, fallback to genisoimage"
|
||||
set_fact:
|
||||
iso_gen_utility: "genisoimage"
|
||||
when: test_mkisofs.rc != 0
|
||||
- name: "Make config drive files"
|
||||
become: yes
|
||||
command: mkisofs -R -V config-2 -o {{http_boot_folder}}/configdrive-{{ uuid }}.iso {{ variable_configdrive_location.stdout }}/{{ uuid }}
|
||||
command: "{{iso_gen_utility}} -R -V config-2 -o {{http_boot_folder}}/configdrive-{{ uuid }}.iso {{ variable_configdrive_location.stdout }}/{{ uuid }}"
|
||||
- name: "Make config drive files base64 encoded and gzip compressed"
|
||||
become: yes
|
||||
shell: gzip -c {{http_boot_folder}}/configdrive-{{ uuid }}.iso | base64 > {{http_boot_folder}}/configdrive-{{ uuid }}.iso.gz
|
||||
|
@ -0,0 +1,47 @@
|
||||
---
|
||||
init_template: systemd_template.j2
|
||||
init_dest_dir: /usr/lib/systemd/system/
|
||||
init_ext: .service
|
||||
syslinux_tftp_dir: /usr/lib/PXELINUX/
|
||||
ipxe_dir: /usr/lib/ipxe/
|
||||
ipxe_full_binary: ipxe.pxe
|
||||
sgabios_dir: /usr/share/qemu/
|
||||
nginx_user: www-data
|
||||
virt_group: libvirt
|
||||
mysql_service_name: mysql
|
||||
required_packages:
|
||||
- mysql-server
|
||||
- rabbitmq-server
|
||||
- python-dev
|
||||
- python-mysqldb
|
||||
- python-configparser
|
||||
- libffi-dev
|
||||
- libxslt1-dev
|
||||
- libssl-dev
|
||||
- libxml2-dev
|
||||
- ipxe
|
||||
- tftpd-hpa
|
||||
- tftp-hpa
|
||||
- syslinux-common
|
||||
- syslinux
|
||||
- pxelinux
|
||||
- xinetd
|
||||
- parted
|
||||
- ipmitool
|
||||
- psmisc
|
||||
- nginx
|
||||
- wget
|
||||
- genisoimage
|
||||
- kpartx
|
||||
- qemu-utils
|
||||
- amtterm
|
||||
- sgabios
|
||||
- libvirt-bin
|
||||
- debootstrap
|
||||
- uuid-runtime
|
||||
- dnsmasq
|
||||
# NOTE(TheJulia): The above entry for dnsmasq must be the last entry in the
|
||||
# package list as the installation causes name resolution changes that can
|
||||
# temporarily block packages following it while the system is being
|
||||
# reconfigured. See: https://review.openstack.org/#/c/223813
|
||||
|
@ -29,6 +29,7 @@
|
||||
- name: Include OS version-specific defaults
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- "../defaults/required_defaults_{{ ansible_distribution }}_{{ansible_distribution_release }}.yml"
|
||||
- "../defaults/required_defaults_{{ ansible_distribution }}_{{ ansible_distribution_version }}.yml"
|
||||
- "../defaults/dummy-defaults.yml"
|
||||
- name: "Update Package Cache"
|
||||
@ -136,6 +137,12 @@
|
||||
- name: "Create authorized_keys file for ironic user"
|
||||
command: cp -p /home/ironic/.ssh/id_rsa.pub /home/ironic/.ssh/authorized_keys
|
||||
when: testing == true
|
||||
- name: "Create service folder if systemd template is defined"
|
||||
file:
|
||||
path: "{{ init_dest_dir }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
when: init_template == 'systemd_template.j2'
|
||||
- name: "Install ironic-inspector to permit use of inspection interface"
|
||||
include: inspector_install.yml
|
||||
when: enable_inspector | bool
|
||||
|
Loading…
Reference in New Issue
Block a user