Add README files for dell-switch and dell-switch-bmp roles

This commit is contained in:
Mark Goddard 2017-03-28 16:10:10 +01:00
parent 34edfbec80
commit d1a87c0e9a
4 changed files with 159 additions and 0 deletions

View File

@ -7,4 +7,6 @@
# dest: Name of the file to download the image to. # dest: Name of the file to download the image to.
# match: dnsmasq match rule to match hosts against. # match: dnsmasq match rule to match hosts against.
# tag: dnsmasq tag to apply to matching hosts. # tag: dnsmasq tag to apply to matching hosts.
# checksum: optional checksum of image, in format required for Ansible's
# get_url module.
dell_switch_bmp_images: [] dell_switch_bmp_images: []

View File

@ -0,0 +1,69 @@
Dell Switch BMP
===============
This role configures a network boot environment for Dell switches with Bare
Metal Provisioning (BMP) functionality.
Requirements
------------
The use of an OpenStack Bifrost container deployed using OpenStack
Kolla-ansible is assumed, with the dnsmasq service providing DHCP and nginx
serving the switch OS images.
Role Variables
--------------
`dell_switch_bmp_images` is a list of images to provide a BMP configuration
for, and defaults to an empty list. Each item should be a dict with the
following keys:
`url`
URL of the image to download.
`dest`
Name of the file to download the image to.
`match`
dnsmasq match rule to match hosts against.
`tag`
dnsmasq tag to apply to matching hosts.
`checksum`
optional checksum of image, in format required for Ansible's `get_url`
module.
`dell_switch_bmp_http_base_url` is the base URL of HTTP server.
`dell_switch_bmp_httpboot_path` is the path to the HTTP server base directory,
and defaults to `/httpboot`.
Dependencies
------------
None
Example Playbook
----------------
The following playbook configures a network boot environment in the Bifrost
container for s6010-ON switches with the `ONIE-FTOS-9.10.0.1P25.bin` image.
---
# This playbook will configure a Bare Metal Provisioning (BMP) environment for
# Dell switches on the Bifrost node so that they can be network booted.
- name: Ensure that a Bare Metal Provisioning (BMP) environment is configured for Dell switches
hosts: bifrost
roles:
- role: dell-switch-bmp
dell_switch_bmp_images:
# ONIE installer image for S6010-ON.
- url: "ftp://ftp.force10networks.com/releases/FTOS_Release/E9.10.0.1P25/S6010/ONIE-FTOS-S6010-9.10.0.1P25.bin"
checksum: "md5:f94fdfa50dc23f87bf2871ae96b6cff3"
dest: "onie-installer-x86_64-dell_s6010_c2538-r0"
match: "option:vendor-class,onie_vendor:x86_64-dell_s6010_c2538-r0"
tag: "onie"
# This is the base URL of the Nginx web server on the Bifrost node.
dell_switch_bmp_http_base_url: "http://10.0.0.1:8080"
Author Information
------------------
- Mark Goddard (<mark@stackhpc.com>)

View File

@ -0,0 +1,86 @@
Dell Switch
===========
This role configures Dell switches using the `dellos6` or `dellos9` Ansible
modules. It provides a fairly minimal abstraction of the configuration
interface provided by the `dellos` modules, allowing for application of
arbitrary switch configuration options.
Requirements
------------
The switches should be configured to allow SSH access.
Role Variables
--------------
`dell_switch_delegate_to` is the host on which to execute the `dellos` Ansible
modules.
`dell_switch_type` is the type of Dell switch. One of `dellos6`, `dellos9`.
`dell_switch_provider` is authentication provider information passed as the
`provider` argument to the `dellos` modules.
`dell_switch_config` is a list of configuration lines to apply to the switch,
and defaults to an empty list.
`dell_switch_interface_config` contains interface configuration. It is a dict
mapping switch interface names to configuration dicts. Each dict may contain
the following items:
`description`
A description to apply to the interface.
`config`
A list of per-interface configuration.
Dependencies
------------
None
Example Playbook
----------------
The following playbook configures hosts in the `dell-switches` group. It
assumes host variables for each switch holding the host, username and
passwords. It applies global configuration for LLDP, and enables two
10G ethernet interfaces as switchports.
---
- name: Ensure DellOS switches are configured
hosts: dellos9-switches
gather_facts: no
roles:
- role: dell-switch
dell_switch_delegate_to: localhost
dell_switch_type: "dellos9"
dell_switch_provider:
host: "{{ switch_host }}"
username: "{{ switch_user }}"
password: "{{ switch_password }}"
transport: cli
authorize: yes
auth_pass: "{{ switch_auth_pass }}"
dell_switch_config:
- "protocol lldp"
- " advertise dot3-tlv max-frame-size"
- " advertise management-tlv management-address system-description system-name"
- " advertise interface-port-desc"
- " no disable"
- " exit"
dell_switch_interface_config:
Te1/1/1:
description: server-1
config:
- "no shutdown"
- "switchport"
Te1/1/2:
description: server-2
config:
- "no shutdown"
- "switchport"
Author Information
------------------
- Mark Goddard (<mark@stackhpc.com>)

View File

@ -7,6 +7,8 @@
# dest: Name of the file to download the image to. # dest: Name of the file to download the image to.
# match: dnsmasq match rule to match hosts against. # match: dnsmasq match rule to match hosts against.
# tag: dnsmasq tag to apply to matching hosts. # tag: dnsmasq tag to apply to matching hosts.
# checksum: optional checksum of image, in format required for Ansible's
# get_url module.
#dell_switch_bmp_images: #dell_switch_bmp_images:
############################################################################### ###############################################################################