Support RedHat yum installation
bifrost does not support RedHat rpm installation, in this patch, added RedHat rpms list, and replace 'apt' Ubuntu command to ansible pkg_mgr var to support both Ubuntu and RedHat. And remove the duplication testing packages installation section. Closes-bug: 1456896 Change-Id: I58d627d3deb4a8a2712f242429e93b8ded9cfb76
This commit is contained in:
parent
a06e974b8a
commit
7cf3fa47e4
@ -18,6 +18,11 @@ This is split into roughly three steps:
|
|||||||
- deploy:
|
- deploy:
|
||||||
instruct Ironic to deploy the operating system onto each machine.
|
instruct Ironic to deploy the operating system onto each machine.
|
||||||
|
|
||||||
|
Supported Operating Systems:
|
||||||
|
|
||||||
|
* Ubuntu
|
||||||
|
* Red Hat Enterprise Linux (RHEL) 7
|
||||||
|
* CentOS 7
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
============
|
============
|
||||||
|
@ -14,7 +14,8 @@
|
|||||||
#
|
#
|
||||||
# TODO: Consider converting to ansible virt module.
|
# TODO: Consider converting to ansible virt module.
|
||||||
---
|
---
|
||||||
- name: "Install testing packages"
|
- name: "Install testing apt packages for Ubuntu/Debian"
|
||||||
|
when: ansible_os_family == 'Debian'
|
||||||
apt: name={{ item }} state=present
|
apt: name={{ item }} state=present
|
||||||
with_items:
|
with_items:
|
||||||
- libvirt-bin
|
- libvirt-bin
|
||||||
@ -22,6 +23,16 @@
|
|||||||
- qemu-kvm
|
- qemu-kvm
|
||||||
- qemu-system-x86
|
- qemu-system-x86
|
||||||
- sgabios
|
- sgabios
|
||||||
|
- name: "Install testing yum packages for RedHat/CentOS/Fedora/OpenSuse"
|
||||||
|
when: ansible_os_family in ['CentOS', 'Fedora', 'OpenSuse', 'RedHat']
|
||||||
|
yum: name={{ item }} state=present
|
||||||
|
with_items:
|
||||||
|
- libvirt-client
|
||||||
|
- qemu-img
|
||||||
|
- qemu-kvm-tools
|
||||||
|
- qemu-kvm
|
||||||
|
- qemu-system-x86
|
||||||
|
- sgabios
|
||||||
- name: "Restart libvirt service"
|
- name: "Restart libvirt service"
|
||||||
service: name=libvirt-bin state=restarted
|
service: name=libvirt-bin state=restarted
|
||||||
- name: "Create virtual machines"
|
- name: "Create virtual machines"
|
||||||
|
@ -2,33 +2,6 @@
|
|||||||
# Cleaning turns on ironic conductor clean_nodes flag
|
# Cleaning turns on ironic conductor clean_nodes flag
|
||||||
# chich causes the nodes to be wiped after deletion.
|
# chich causes the nodes to be wiped after deletion.
|
||||||
cleaning: true
|
cleaning: true
|
||||||
# The list of required packages for this role to install.
|
|
||||||
required_packages_ubuntu:
|
|
||||||
- mysql-server
|
|
||||||
- dnsmasq
|
|
||||||
- rabbitmq-server
|
|
||||||
- python-dev
|
|
||||||
- python-pip
|
|
||||||
- python-mysqldb
|
|
||||||
- python-configparser
|
|
||||||
- libffi-dev
|
|
||||||
- libxslt-dev
|
|
||||||
- libssl-dev
|
|
||||||
- libxml2-dev
|
|
||||||
- ipxe
|
|
||||||
- tftpd-hpa
|
|
||||||
- tftp-hpa
|
|
||||||
- syslinux-common
|
|
||||||
- syslinux
|
|
||||||
- xinetd
|
|
||||||
- parted
|
|
||||||
- ipmitool
|
|
||||||
- psmisc
|
|
||||||
- nginx
|
|
||||||
- wget
|
|
||||||
- genisoimage
|
|
||||||
- kpartx
|
|
||||||
- qemu-utils
|
|
||||||
http_boot_folder: /httpboot
|
http_boot_folder: /httpboot
|
||||||
nginx_port: 8080
|
nginx_port: 8080
|
||||||
ironicclient_source_install: false
|
ironicclient_source_install: false
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
required_packages:
|
||||||
|
- mysql-server
|
||||||
|
- dnsmasq
|
||||||
|
- rabbitmq-server
|
||||||
|
- python-dev
|
||||||
|
- python-pip
|
||||||
|
- python-mysqldb
|
||||||
|
- python-configparser
|
||||||
|
- libffi-dev
|
||||||
|
- libxslt-dev
|
||||||
|
- libssl-dev
|
||||||
|
- libxml2-dev
|
||||||
|
- ipxe
|
||||||
|
- tftpd-hpa
|
||||||
|
- tftp-hpa
|
||||||
|
- syslinux-common
|
||||||
|
- syslinux
|
||||||
|
- xinetd
|
||||||
|
- parted
|
||||||
|
- ipmitool
|
||||||
|
- psmisc
|
||||||
|
- nginx
|
||||||
|
- wget
|
||||||
|
- genisoimage
|
||||||
|
- kpartx
|
||||||
|
- qemu-utils
|
@ -0,0 +1,25 @@
|
|||||||
|
required_packages:
|
||||||
|
- mariadb-server
|
||||||
|
- dnsmasq
|
||||||
|
- rabbitmq-server
|
||||||
|
- python-devel
|
||||||
|
- python-pip
|
||||||
|
- MySQL-python
|
||||||
|
- python-iniparse
|
||||||
|
- libffi-devel
|
||||||
|
- libxslt-devel
|
||||||
|
- openssl-devel
|
||||||
|
- libxml2-devel
|
||||||
|
- ipxe-bootimgs
|
||||||
|
- tftp-server
|
||||||
|
- syslinux
|
||||||
|
- syslinux-tftpboot
|
||||||
|
- xinetd
|
||||||
|
- parted
|
||||||
|
- ipmitool
|
||||||
|
- psmisc
|
||||||
|
- nginx
|
||||||
|
- wget
|
||||||
|
- genisoimage
|
||||||
|
- kpartx
|
||||||
|
- qemu-kvm-tools
|
@ -13,24 +13,24 @@
|
|||||||
# 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: Include OS-specific packages variables.
|
||||||
|
include_vars: "{{ item }}"
|
||||||
|
with_first_found:
|
||||||
|
- "../defaults/required_packages_{{ ansible_distribution }}.yml"
|
||||||
|
- "../defaults/required_packages_{{ ansible_os_family }}.yml"
|
||||||
- name: "Update Package Cache"
|
- name: "Update Package Cache"
|
||||||
apt: update_cache=yes
|
apt: update_cache=yes
|
||||||
|
when: ansible_os_family == 'Debian'
|
||||||
- name: "Install packages"
|
- name: "Install packages"
|
||||||
apt: name={{ item }}
|
action: "{{ ansible_pkg_mgr }} name={{ item }}"
|
||||||
with_items: required_packages_ubuntu
|
with_items: required_packages
|
||||||
# Step required for Ubuntu 14.10
|
# Step required for Ubuntu 14.10
|
||||||
- name: "Install 14.10 packages"
|
- name: "Install 14.10 packages"
|
||||||
apt: name={{ item }}
|
action: "{{ ansible_pkg_mgr }} name={{ item }}"
|
||||||
with_items:
|
with_items:
|
||||||
- pxelinux
|
- pxelinux
|
||||||
when: ansible_distribution_version|version_compare('14.10', '>=')
|
when: ansible_distribution_version|version_compare('14.10', '>=') and ansible_distribution == 'Ubuntu'
|
||||||
- name: "Install testing packages"
|
|
||||||
apt: name={{ item }}
|
|
||||||
when: testing is defined and testing == true
|
|
||||||
with_items:
|
|
||||||
- libvirt-bin
|
|
||||||
- qemu-kvm
|
|
||||||
- sgabios
|
|
||||||
- name: "Ensuring /opt/stack is present"
|
- name: "Ensuring /opt/stack is present"
|
||||||
file: name=/opt/stack state=directory owner=root group=root
|
file: name=/opt/stack state=directory owner=root group=root
|
||||||
- name: "Downloading Ironic"
|
- name: "Downloading Ironic"
|
||||||
|
Loading…
Reference in New Issue
Block a user