openstack-ansible-ops/pxelinux-provisioning
James Denton ab91446804 Update MNAIO for Focal
This patch removes legacy support for 14.04/16.04/18.04
on the deploy node and moves the default deploy to
Xena on 20.04 LTS. Root disk size has been bumped to support
upgrades (8 GB -> 12 GB).

Change-Id: I81a13464b9daa90090cb380e2b0d89e5eb8fe89a
2022-02-16 09:46:59 -06:00
..
playbooks Update MNAIO for Focal 2022-02-16 09:46:59 -06:00
README.rst add bionic support to the basic provisioning 2018-05-11 16:11:39 -05:00
ansible-env.rc Add basic provisioning using pxelinux 2018-05-01 15:42:04 +00:00
bindep.txt Add basic provisioning using pxelinux 2018-05-01 15:42:04 +00:00
bootstrap.sh Change get-pip urls 2021-03-08 15:14:05 +01:00
build.sh Add basic provisioning using pxelinux 2018-05-01 15:42:04 +00:00
run.sh Update MNAIO for Focal 2022-02-16 09:46:59 -06:00

README.rst

OpenStack-Ansible pxelinux Provisioning

date

2018-04-24

tags

rackspace, openstack, ansible

category

*openstack, *nix

About this repository

This repository provides for basic "pxelinux" provisioning using debian based operating systems.

A complete set of options can be seen within the playbook/group_vars/all.yml file.

These provisioning playbooks have been created to use static inventory. Example static inventory used for these playbooks can be seen in the playbooks/inventory.yml file.

Scripts have been created to simplify the deployment of these playbooks and install ansible however they are 100% optional.

Playbook Usage

These playbooks require three groups, dhcp_hosts, pxe_hosts, and pxe_servers. The groups dhcp_hosts and pxe_hosts are used as targets to install the required packages and setup the TFTP and DHCP services. The group pxe_servers is as a set of targets that to deploy a given OS.

Each host in the pxe_servers group should have the something similar to the following configuration.

$name_used_in_inventory:
  ansible_os_family: "{{ default_images[default_image_name]['image_type'] }}"
  server_hostname: '$hostname'
  server_image: "ubuntu-18.04-amd64"
  server_default_interface: 'eth0'
  server_obm_ip: 192.168.1.100
  server_model: PowerEdge R710
  server_mac_address: 00:11:22:33:44:55
  server_extra_options: ''
  server_fixed_addr: "10.0.0.100"
  server_domain_name: "{{ default_server_domain_name }}"
  ansible_host: "{{ server_fixed_addr }}"

The options $name_used_in_inventory and $hostname need to be changed to reflect the machine being deployed as well as the server_mac_address and server_obm_ip entries. Note server_obm_ip is optional and not a required attribute.

With the inventory all setup the script build.sh can be used to deploy everything or the playbooks could be run with the following commmand.

ansible-playbook -vv -i /root/inventory.yml
                     -e setup_host=${SETUP_HOST:-"true"}
                     -e setup_pxeboot=${SETUP_PXEBOOT:-"true"}
                     -e setup_dhcpd=${SETUP_DHCPD:-"true"}
                     -e default_image=${DEFAULT_IMAGE:-"ubuntu-18.04-amd64"}
                     -e default_http_proxy=${DEFAULT_HTTP_PROXY:-''}
                     --force-handlers
                     playbooks/site.yml

Once the playbooks have completed, set the pxe_servers target hosts, PXE boot once and reboot them.

For convience a playbook named playbooks/idrac-config.yml has been added which will do minimal drac reset and re-configuration which will result in the host being ready to PXE. This playbook is not intended for production use and was included only as an example.