diff --git a/README.rst b/README.rst index 02231f850..53977bd64 100644 --- a/README.rst +++ b/README.rst @@ -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 ============ diff --git a/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml b/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml index 54d2a2ee7..f6756b1b5 100644 --- a/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml +++ b/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml @@ -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" diff --git a/playbooks/roles/ironic-install/defaults/main.yml b/playbooks/roles/ironic-install/defaults/main.yml index ca5d0a853..380bd4004 100644 --- a/playbooks/roles/ironic-install/defaults/main.yml +++ b/playbooks/roles/ironic-install/defaults/main.yml @@ -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 diff --git a/playbooks/roles/ironic-install/defaults/required_packages_Debian.yml b/playbooks/roles/ironic-install/defaults/required_packages_Debian.yml new file mode 100644 index 000000000..00dba7681 --- /dev/null +++ b/playbooks/roles/ironic-install/defaults/required_packages_Debian.yml @@ -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 diff --git a/playbooks/roles/ironic-install/defaults/required_packages_RedHat.yml b/playbooks/roles/ironic-install/defaults/required_packages_RedHat.yml new file mode 100644 index 000000000..a7c71f778 --- /dev/null +++ b/playbooks/roles/ironic-install/defaults/required_packages_RedHat.yml @@ -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 diff --git a/playbooks/roles/ironic-install/tasks/main.yml b/playbooks/roles/ironic-install/tasks/main.yml index 771904dc7..0a8a99f8f 100644 --- a/playbooks/roles/ironic-install/tasks/main.yml +++ b/playbooks/roles/ironic-install/tasks/main.yml @@ -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"