Custom Live Media
Spinning
Jon Cowie, Etsy.com
jcowie@etsy.com
@jonlives
Thursday, 11 July 13
Thursday, 11 July 13
1.5 billion page views
$117 million of goods sold
950 thousand users
(in december ‘12)
Thursday, 11 July 13
~800 physical hosts
~300 kvm & lxc VMs
CentOS 5 & 6
Thursday, 11 July 13
Racktables
Cobbler
Chef
Thursday, 11 July 13
OldHostBuildProcess
Configure Storage
Configure
Switchports
Configure DNSConfigure Cobbler
Power on HostProfit!
Rack Server Con...
NewHostBuildProcess
Configure Storage
Configure
Switchports
Configure DNSConfigure Cobbler
Power on HostProfit!
Rack Server Con...
NewHostBuildProcess
Configure Storage
Configure
Switchports
Configure DNSConfigure Cobbler
Power on HostProfit!
Rack Server Con...
Sledgehammer
Runs before OS Install
Configures ILO
Configures RAID & GPT
Thursday, 11 July 13
Live CD!
Memory resident
Network bootable*
Easily customisable
Thursday, 11 July 13
Sledgehammer Live CD
Minimal install
Network, disk tools
Ruby & Gems
Sledgehammer “Runner”
Thursday, 11 July 13
Sledgehammer Runner
Mount NFS
Download config
Download payload RPM
Run payload
Thursday, 11 July 13
Sledgehammer Payload
Configure ILO
Set up RAID
Configure GPT
Burn-in tests
Update Racktables
Thursday, 11 July 13
So how does it work?
Thursday, 11 July 13
LiveCD Primer
-isolinux
-initrd0.img
-vmlinuz0
-LiveOS
-squashfs.img
-ext3fs.img
Thursday, 11 July 13
LiveCD Primer
Load kernel and ramdisk
Mount ro / fs
Create rw overlay
Run init
Thursday, 11 July 13
First modification!
Overlay is fixed size.
Copy entire FS to tmpfs
Mount rw / FS
Thursday, 11 July 13
Second modification!
Custom payload
Must run automatically...
Thursday, 11 July 13
/etc/init/start-ttys.conf
...
env	
  ACTIVE_CONSOLES=/dev/tty[1-­‐6]
...
for	
  tty	
  in	
  $(echo	
  $ACTIVE_CONSOLES)	
...
/etc/init/start-ttys.conf
...
env	
  ACTIVE_CONSOLES=/dev/tty[1-­‐6]
...
for	
  tty	
  in	
  $(echo	
  $ACTIVE_CONSOLES)	
...
/etc/init/centosdojo.conf
stop	
  on	
  runlevel	
  [012456]
exec	
  /usr/bin/openvt	
  -­‐c	
  1	
  -­‐w	
  -­‐f	
  
-­‐-...
So how do I build it?
Thursday, 11 July 13
http://tiny.cc/dojo2013
Thursday, 11 July 13
Upcoming SlideShare
Loading in …5
×

Custom Live Media Spinning

1,385 views

Published on

This is the talk I gave at the 2013 CentOS Dojo in Aldershot on spinning custom CentOS live CDs

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,385
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Custom Live Media Spinning

  1. 1. Custom Live Media Spinning Jon Cowie, Etsy.com jcowie@etsy.com @jonlives Thursday, 11 July 13
  2. 2. Thursday, 11 July 13
  3. 3. 1.5 billion page views $117 million of goods sold 950 thousand users (in december ‘12) Thursday, 11 July 13
  4. 4. ~800 physical hosts ~300 kvm & lxc VMs CentOS 5 & 6 Thursday, 11 July 13
  5. 5. Racktables Cobbler Chef Thursday, 11 July 13
  6. 6. OldHostBuildProcess Configure Storage Configure Switchports Configure DNSConfigure Cobbler Power on HostProfit! Rack Server Configure ILO Thursday, 11 July 13
  7. 7. NewHostBuildProcess Configure Storage Configure Switchports Configure DNSConfigure Cobbler Power on HostProfit! Rack Server Configure ILO Gabriel Thursday, 11 July 13
  8. 8. NewHostBuildProcess Configure Storage Configure Switchports Configure DNSConfigure Cobbler Power on HostProfit! Rack Server Configure ILO Sledgehammer Thursday, 11 July 13
  9. 9. Sledgehammer Runs before OS Install Configures ILO Configures RAID & GPT Thursday, 11 July 13
  10. 10. Live CD! Memory resident Network bootable* Easily customisable Thursday, 11 July 13
  11. 11. Sledgehammer Live CD Minimal install Network, disk tools Ruby & Gems Sledgehammer “Runner” Thursday, 11 July 13
  12. 12. Sledgehammer Runner Mount NFS Download config Download payload RPM Run payload Thursday, 11 July 13
  13. 13. Sledgehammer Payload Configure ILO Set up RAID Configure GPT Burn-in tests Update Racktables Thursday, 11 July 13
  14. 14. So how does it work? Thursday, 11 July 13
  15. 15. LiveCD Primer -isolinux -initrd0.img -vmlinuz0 -LiveOS -squashfs.img -ext3fs.img Thursday, 11 July 13
  16. 16. LiveCD Primer Load kernel and ramdisk Mount ro / fs Create rw overlay Run init Thursday, 11 July 13
  17. 17. First modification! Overlay is fixed size. Copy entire FS to tmpfs Mount rw / FS Thursday, 11 July 13
  18. 18. Second modification! Custom payload Must run automatically... Thursday, 11 July 13
  19. 19. /etc/init/start-ttys.conf ... env  ACTIVE_CONSOLES=/dev/tty[1-­‐6] ... for  tty  in  $(echo  $ACTIVE_CONSOLES)  ;  do      ...      initctl  start  tty  TTY=$tty done ... Thursday, 11 July 13
  20. 20. /etc/init/start-ttys.conf ... env  ACTIVE_CONSOLES=/dev/tty[1-­‐6] ... for  tty  in  $(echo  $ACTIVE_CONSOLES)  ;  do      ... if  [  "$tty"  ==  "/dev/tty1"  ]    then          initctl  start  centosdojo  TTY=$tty    else          initctl  start  tty  TTY=$tty    fi done ... Thursday, 11 July 13
  21. 21. /etc/init/centosdojo.conf stop  on  runlevel  [012456] exec  /usr/bin/openvt  -­‐c  1  -­‐w  -­‐f   -­‐-­‐  /opt/centosdojo/runner.rb Thursday, 11 July 13
  22. 22. So how do I build it? Thursday, 11 July 13
  23. 23. http://tiny.cc/dojo2013 Thursday, 11 July 13

×