Merge "Support RedHat yum installation"

This commit is contained in:
Jenkins 2015-06-17 14:58:29 +00:00 committed by Gerrit Code Review
commit 35c6842f81
6 changed files with 79 additions and 39 deletions

View File

@ -18,6 +18,11 @@ This is split into roughly three steps:
- deploy:
instruct Ironic to deploy the operating system onto each machine.
Supported Operating Systems:
* Ubuntu
* Red Hat Enterprise Linux (RHEL) 7
* CentOS 7
Installation
============

View File

@ -14,7 +14,8 @@
#
# 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
with_items:
- libvirt-bin
@ -22,6 +23,16 @@
- qemu-kvm
- qemu-system-x86
- 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"
service: name=libvirt-bin state=restarted
- name: "Create virtual machines"

View File

@ -2,33 +2,6 @@
# Cleaning turns on ironic conductor clean_nodes flag
# chich causes the nodes to be wiped after deletion.
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
nginx_port: 8080
ironicclient_source_install: false

View File

@ -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

View File

@ -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

View File

@ -13,24 +13,24 @@
# See the License for the specific language governing permissions and
# 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"
apt: update_cache=yes
when: ansible_os_family == 'Debian'
- name: "Install packages"
apt: name={{ item }}
with_items: required_packages_ubuntu
action: "{{ ansible_pkg_mgr }} name={{ item }}"
with_items: required_packages
# Step required for Ubuntu 14.10
- name: "Install 14.10 packages"
apt: name={{ item }}
action: "{{ ansible_pkg_mgr }} name={{ item }}"
with_items:
- pxelinux
when: ansible_distribution_version|version_compare('14.10', '>=')
- name: "Install testing packages"
apt: name={{ item }}
when: testing is defined and testing == true
with_items:
- libvirt-bin
- qemu-kvm
- sgabios
when: ansible_distribution_version|version_compare('14.10', '>=') and ansible_distribution == 'Ubuntu'
- name: "Ensuring /opt/stack is present"
file: name=/opt/stack state=directory owner=root group=root
- name: "Downloading Ironic"