Unattended Deployment with Zero Touch Provisioning (ZTP)

Download Unattended Deployment with Zero Touch Provisioning (ZTP)

Post on 13-Jul-2015

538 views

Category:

Technology

0 download

TRANSCRIPT

<ul><li><p>v </p><p>Unattended Datacenter Deployment with ZTP </p><p>Leslie Carr October 15, 2014 </p></li><li><p>Who is Leslie? </p><p>!Operations Engineer ! Google ! Craigslist ! Twitter ! Wikimedia Foundation </p><p> (Wikipedia) </p></li><li><p>Who is Leslie? </p><p>!Cumulus Networks </p></li><li><p>What is Cumulus Linux? </p><p>!Cumulus Linux ! Debian based distribution for Network switches </p><p> Cumulus Philosophy ! Manage your network switch as a server ! Use existing linux tools to configure network switches ! Current release Based on Debian wheezy </p></li><li><p>Cumulus Linux Hardware Compatibility List </p><p>cumulusnetworks.com 4 </p></li><li><p>v </p><p>Installation and Configuration </p></li><li><p>Traditional Network Gear Process </p><p>! Comes preinstalled with (old) software ! Telnet or serial into box ! TFTP new image ! Enable SSH (sometimes with passwords!) ! Copy/paste configuration ! Automation usually restricted to Perl, TCL, and expect </p><p>scripts </p></li><li><p>Normal Server Installation </p><p>! Reboot and bios with PXE automatically catches ! TFTP boot image ! New image pulled over via normal means (usually </p><p>webserver, sometimes TFTP) ! Pre/post installation scripts runs ! Automation software manages configuration and </p><p>administration </p></li><li><p> Network OS installer discovery and execution ! Like a pre-installed BIOS, PXE, and kickstarter in one ! Implemented through Linux kernel with BusyBox </p><p> Donated to the Open Compute Project (OCP) http://www.onie.org </p><p>ONIE </p></li><li><p>Comparison </p><p>bare metal server </p><p>Server OS </p><p>app app app </p><p>BIOS and PXE </p><p>bare metal switch </p><p>Network OS </p><p>app app app </p><p>Boot Loader and ONIE </p><p>Similar to installing a server OS using PXE </p><p>Network OS Boot Loader and ONIE </p><p>boot into </p><p>Boot Loader and ONIE </p><p>boot into </p><p>ONIE looks for and installs network OS image </p></li><li><p>Cumulus Linux OS Installation with ONIE </p><p>cumulusnetworks.com 10 </p><p>!Look for installer (discover) ! Locally, e.g. USB if available ! Over the network on eth0 DHCP, IPv6 neighbor, TFTP </p><p>!Search for file name and execute ! onie%installer%*,</p><p>1</p><p>2</p><p>Cumulus Linux OS image </p></li><li><p>! ZTP script execution is triggered on DHClient exit or by USB Stick </p><p> USB support in releases 2.5 and up </p><p>! Script must contain CUMULUS%AUTOPROVISIONING,,! Can be in the following languages : </p><p> Perl Python Ruby Shell </p><p>ZTP Execution </p></li><li><p>ZTP Script USB </p><p>USB looks for a specific file name waterfall waterfall,=,[,</p><p>'cumulus%ztp%',+,arch,+,'%',+,vendor,+,'_',+,model,+,'%r,+,revision,,'cumulus%ztp%',+,arch,+,'%',+,vendor,+,'_',+,model,'cumulus%ztp%',+,vendor,+,'_',+,model,'cumulus%ztp%',+,arch,'cumulus%ztp,],,Example,:,/mnt/usb/cumulus%ztp%powerpc%cel_smallstone%rUNKNOWN,,/mnt/usb/cumulus%ztp%powerpc%cel_smallstone,,/mnt/usb/cumulus%ztp%cel_smallstone,,/mnt/usb/cumulus%ztp%powerpc,,/mnt/usb/cumulus%ztp,</p></li><li><p>ZTP with DHCP example dhcp.conf </p><p>! ddns%update%style,none;,! default%lease%time,4320;,! max%lease%time,8640;,! authoritative;,</p><p>! option&amp;cumulus,provision,url&amp;code&amp;239&amp;=&amp;text;&amp;</p><p>! subnet,192.168.0.0,netmask,255.255.255.0,{,! ,range,192.168.0.100,192.168.0.200;,! ,option,routers,192.168.0.1;,! ,option,domain%name%servers,192.168.0.1;,! ,option,domain%name,"lab.mycompany.com";,! &amp;option&amp;cumulus,provision,url&amp;"http://192.168.0.2/demo.sh";&amp;! },</p></li><li><p> During the DHCP process over eth0 (management interface), Cumulus Linux will request DHCP option 239. This option is used to specify the custom provisioning script. It will also send the following headers: </p><p> Header,,,,,,,,,,,,,,,,,,,,,,,,Value,,,,,,,,,,,,,,,,,Example,%%%%%%,,,,,,,,,,,,,,,,,,,,,,,,%%%%%,,,,,,,,,,,,,,,,,%%%%%%%,User%Agent,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,CumulusLinux%AutoProvision/0.4,CUMULUS%ARCH,,,,,,,,,,,,,,,,,,CPU,architecture,,,,,,powerpc,CUMULUS%BUILD,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1.5.1%5c6829a%201309251712%final,CUMULUS%LICENSE%INSTALLED,,,,,Either,0,or,1,,,,,,,,,1,CUMULUS%MANUFACTURER,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,dni,CUMULUS%PRODUCTNAME,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,et%7448bf,CUMULUS%SERIAL,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,XYZ123004,CUMULUS%VERSION,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1.5.1,CUMULUS%PROV%COUNT,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,CUMULUS%PROV%MAX,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,32,</p><p>ZTP </p></li><li><p>ZTP Example with Puppet </p><p>1,#!/bin/bash,2,3,function,error(),{,4,,echo,%e,"\e[0;33mERROR:,Provisioning,</p><p>failed,running,$BASH_COMMAND,at,line,$BASH_LINENO,of,$(basename,$0),\e[0m",&gt;&amp;2,</p><p>5,,exit,1,6,},7,trap,error,ERR,8,#,Allow,Cumulus,testing,repo,9,sed,%i,/etc/apt/sources.list,%e,'s/^#\s*\</p><p>(deb.*testing.*\)$/\1/g',10,11,#,Upgrade,and,install,Puppet,12,apt%get,update,%y,,</p><p>13,apt%get,upgrade,%y,14,apt%get,install,puppet,%y,15,,16,echo,"Configuring,puppet",|,wall,%n,17,sed,%i,/etc/default/puppet,%e,'s/</p><p>START=no/START=yes/',18,19,service,puppet,restart,20,21,#,CUMULUS%AUTOPROVISIONING,22,23,exit,0,,,</p></li><li><p>Video </p></li><li><p>/var/lib/cumulus/autoprovision.conf </p><p>! [discovery],! count,=,1,! max,=,32,</p><p>! [provisioning],! enabled,=,True,! complete&amp;=&amp;True&amp;! datetime,=,1413314146,! method,=,DHCP,Option,! detail,=,http://192.168.0.1/provision.sh,</p></li><li><p>!Because Debian based, we can do everything via puppet ! users ! interface configuration ! routing software (Quagga) configuration </p><p>Puppet </p></li><li><p>Video! </p></li><li><p>ZTP Example with Ansible </p><p>1,#!/bin/bash,2,3,function,error(),{,4,,echo,%e,"\e[0;33mERROR:,Provisioning,failed,running,</p><p>$BASH_COMMAND,at,line,$BASH_LINENO,of,$(basename,$0),\e[0m",&gt;&amp;2,5,,exit,1,6,},7,trap,error,ERR,8,URL="http://wbench.lab.local/ansible_authorized_keys,9,mkdir,%p,/root/.ssh,10,,11,/usr/bin/wget,%O,/root/.ssh/authorized_keys,$URL,12,,13,#CUMULUS%AUTOPROVISIONING,14,exit,0,,</p></li><li><p>Video </p></li><li><p>Success! </p></li><li><p>! ZTP ! http://cumulusnetworks.com/docs/2.2/user-guide/</p><p>system_management_diagnostics/provisioning.html Example Code </p><p>! https://github.com/CumulusNetworks/cldemo Cumulus Workbench </p><p>! http://cumulusnetworks.com/cumulus-workbench/ Twitter </p><p>! @lesliegeek </p><p>Find out more! </p></li><li><p> 2014 Cumulus Networks. Cumulus Networks, the Cumulus Networks Logo, and Cumulus Linux are trademarks or registered trademarks of Cumulus Networks, Inc. or its affiliates in the U.S. and other countries. Other names may be trademarks of their respective owners. The registered trademark Linux is used pursuant to a sublicense from LMI, the exclusive licensee of Linus Torvalds, owner of the mark on a world-wide basis. </p><p>!Thank You! </p><p>cumulusnetworks.com </p><p>Bringing the Linux Revolution to Networking </p></li></ul>

Recommended

View more >