Track2Agenda: ex-ganeti-install.htm

File ex-ganeti-install.htm, 51.5 KB (added by trac, 4 years ago)
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5  <meta http-equiv="Content-Style-Type" content="text/css" />
6  <meta name="generator" content="pandoc" />
7  <title>Ganeti basic installation</title>
8  <style type="text/css">code{white-space: pre;}</style>
9  <link href="data:text/css,%2F%2A%0A%20%20%20%20Buttondown%0A%20%20%20%20A%20Markdown%2FMultiMarkdown%2FPandoc%20HTML%20output%20CSS%20stylesheet%0A%20%20%20%20Author%3A%20Ryan%20Gray%0A%20%20%20%20Date%3A%2015%20Feb%202011%0A%20%20%20%20Revised%3A%2021%20Feb%202012%0A%20%20%20%0A%20%20%20%20General%20style%20is%20clean%2C%20with%20minimal%20re%2Ddefinition%20of%20the%20defaults%20or%20%0A%20%20%20%20overrides%20of%20user%20font%20settings%2E%20The%20body%20text%20and%20header%20styles%20are%20%0A%20%20%20%20left%20alone%20except%20title%2C%20author%20and%20date%20classes%20are%20centered%2E%20A%20Pandoc%20TOC%20%0A%20%20%20%20is%20not%20printed%2C%20URLs%20are%20printed%20after%20hyperlinks%20in%20parentheses%2E%20%0A%20%20%20%20Block%20quotes%20are%20italicized%2E%20Tables%20are%20lightly%20styled%20with%20lines%20above%20%0A%20%20%20%20and%20below%20the%20table%20and%20below%20the%20header%20with%20a%20boldface%20header%2E%20Code%20%0A%20%20%20%20blocks%20are%20line%20wrapped%2E%20%0A%20%0A%20%20%20%20All%20elements%20that%20Pandoc%20and%20MultiMarkdown%20use%20should%20be%20listed%20here%2C%20even%20%0A%20%20%20%20if%20the%20style%20is%20empty%20so%20you%20can%20easily%20add%20styling%20to%20anything%2E%0A%20%20%20%20%0A%20%20%20%20There%20are%20some%20elements%20in%20here%20for%20HTML5%20output%20of%20Pandoc%2C%20but%20I%20have%20not%20%0A%20%20%20%20gotten%20around%20to%20testing%20that%20yet%2E%0A%2A%2F%0A%20%0A%2F%2A%20NOTES%3A%0A%20%0A%20%20%20%20Stuff%20tried%20and%20failed%3A%0A%20%20%20%20%0A%20%20%20%20It%20seems%20that%20specifying%20font%2Dfamily%3Aserif%20in%20Safari%20will%20always%20use%20%0A%20%20%20%20Times%20New%20Roman%20rather%20than%20the%20user%27s%20preferences%20setting%2E%0A%20%20%20%20%0A%20%20%20%20Making%20the%20font%20size%20different%20or%20a%20fixed%20value%20for%20print%20in%20case%20the%20screen%20%0A%20%20%20%20font%20size%20is%20making%20the%20print%20font%20too%20big%3A%20Making%20font%2Dsize%20different%20for%20%0A%20%20%20%20print%20than%20for%20screen%20causes%20horizontal%20lines%20to%20disappear%20in%20math%20when%20using%20%0A%20%20%20%20MathJax%20under%20Safari%2E%0A%2A%2F%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Front%20Matter%20%2D%2D%2D%2D%20%2A%2F%0A%20%0A%2F%2A%20Pandoc%20header%20DIV%2E%20Contains%20%2Etitle%2C%20%2Eauthor%20and%20%2Edate%2E%20Comes%20before%20div%23TOC%2E%20%0A%20%20%20Only%20appears%20if%20one%20of%20those%20three%20are%20in%20the%20document%2E%0A%2A%2F%0A%20%0Adiv%23header%2C%20header%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Put%20border%20on%20bottom%2E%20Separates%20it%20from%20TOC%20or%20body%20that%20comes%20after%20it%2E%20%2A%2F%0A%20%20%20%20border%2Dbottom%3A%201px%20solid%20%23aaa%3B%0A%20%20%20%20margin%2Dbottom%3A%200%2E5em%3B%0A%20%20%20%20%7D%0A%20%0A%2Etitle%20%2F%2A%20Pandoc%20title%20header%20%28h1%2Etitle%29%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20text%2Dalign%3A%20center%3B%0A%20%20%20%20%7D%0A%20%0A%2Eauthor%2C%20%2Edate%20%2F%2A%20Pandoc%20author%28s%29%20and%20date%20headers%20%28h2%2Eauthor%20and%20h3%2Edate%29%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20text%2Dalign%3A%20center%3B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20Pandoc%20table%20of%20contents%20DIV%20when%20using%20the%20%2D%2Dtoc%20option%2E%0A%20%20%20NOTE%3A%20this%20doesn%27t%20support%20Pandoc%27s%20%2D%2Did%2Dprefix%20option%20for%20%23TOC%20and%20%23header%2E%20%0A%20%20%20Probably%20would%20need%20to%20use%20div%5Bid%24%3D%27TOC%27%5D%20and%20div%5Bid%24%3D%27header%27%5D%20as%20selectors%2E%0A%2A%2F%0A%20%0Adiv%23TOC%2C%20nav%23TOC%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Put%20border%20on%20bottom%20to%20separate%20it%20from%20body%2E%20%2A%2F%0A%20%20%20%20border%2Dbottom%3A%201px%20solid%20%23aaa%3B%0A%20%20%20%20margin%2Dbottom%3A%200%2E5em%3B%0A%20%20%20%20%7D%0A%20%0A%40media%20print%0A%20%20%20%20%7B%0A%20%20%20%20div%23TOC%2C%20nav%23TOC%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20Don%27t%20display%20TOC%20in%20print%20%2A%2F%0A%20%20%20%20%20%20%20%20display%3A%20none%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Headers%20and%20sections%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Ah1%2C%20h2%2C%20h3%2C%20h4%2C%20h5%2C%20h6%0A%7B%0A%20%20%20%20font%2Dfamily%3A%20%22Helvetica%20Neue%22%2C%20Helvetica%2C%20%22Liberation%20Sans%22%2C%20Calibri%2C%20Arial%2C%20sans%2Dserif%3B%20%2F%2A%20Sans%2Dserif%20headers%20%2A%2F%0A%20%0A%20%20%20%20%2F%2A%20font%2Dfamily%3A%20%22Liberation%20Serif%22%2C%20%22Georgia%22%2C%20%22Times%20New%20Roman%22%2C%20serif%3B%20%2F%2A%20Serif%20headers%20%2A%2F%0A%20%0A%20%20%20%20page%2Dbreak%2Dafter%3A%20avoid%3B%20%2F%2A%20Firefox%2C%20Chrome%2C%20and%20Safari%20do%20not%20support%20the%20property%20value%20%22avoid%22%20%2A%2F%0A%7D%0A%20%0A%2F%2A%20Pandoc%20with%20%2D%2Dsection%2Ddivs%20option%20%2A%2F%0A%20%0Adiv%20div%2C%20section%20section%20%2F%2A%20Nested%20sections%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20margin%2Dleft%3A%202em%3B%20%2F%2A%20This%20will%20increasingly%20indent%20nested%20header%20sections%20%2A%2F%0A%20%20%20%20%7D%0A%20%0Ap%20%7B%7D%0A%20%0Ablockquote%0A%20%20%20%20%7B%20%0A%20%20%20%20font%2Dstyle%3A%20italic%3B%0A%20%20%20%20%7D%0A%20%0Ali%20%2F%2A%20All%20list%20items%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Ali%20%3E%20p%20%2F%2A%20Loosely%20spaced%20list%20item%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20margin%2Dtop%3A%201em%3B%20%2F%2A%20IE%3A%20lack%20of%20space%20above%20a%20%3Cli%3E%20when%20the%20item%20is%20inside%20a%20%3Cp%3E%20%2A%2F%0A%20%20%20%20%7D%0A%20%0Aul%20%2F%2A%20Whole%20unordered%20list%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Aul%20li%20%2F%2A%20Unordered%20list%20item%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Aol%20%2F%2A%20Whole%20ordered%20list%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Aol%20li%20%2F%2A%20Ordered%20list%20item%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Ahr%20%7B%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Some%20span%20elements%20%2D%2D%2D%20%2A%2F%0A%20%0Asub%20%2F%2A%20Subscripts%2E%20Pandoc%3A%20H%7E2%7EO%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Asup%20%2F%2A%20Superscripts%2E%20Pandoc%3A%20The%202%5End%5E%20try%2E%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%20%20%20%0Aem%20%2F%2A%20Emphasis%2E%20Markdown%3A%20%2Aemphasis%2A%20or%20%5Femphasis%5F%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%20%20%20%0Aem%20%3E%20em%20%2F%2A%20Emphasis%20within%20emphasis%3A%20%2AThis%20is%20all%20%2Aemphasized%2A%20except%20that%2A%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20font%2Dstyle%3A%20normal%3B%0A%20%20%20%20%7D%0A%20%0Astrong%20%2F%2A%20Markdown%20%2A%2Astrong%2A%2A%20or%20%5F%5Fstrong%5F%5F%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Links%20%28anchors%29%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Aa%20%2F%2A%20All%20links%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Keep%20links%20clean%2E%20On%20screen%2C%20they%20are%20colored%3B%20in%20print%2C%20they%20do%20nothing%20anyway%2E%20%2A%2F%0A%20%20%20%20text%2Ddecoration%3A%20none%3B%0A%20%20%20%20%7D%0A%20%0A%40media%20screen%0A%20%20%20%20%7B%0A%20%20%20%20a%3Ahover%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20On%20hover%2C%20we%20indicate%20a%20bit%20more%20that%20it%20is%20a%20link%2E%20%2A%2F%0A%20%20%20%20%20%20%20%20text%2Ddecoration%3A%20underline%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%0A%40media%20print%0A%20%20%20%20%7B%0A%20%20%20%20a%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20In%20print%2C%20a%20colored%20link%20is%20useless%2C%20so%20un%2Dstyle%20it%2E%20%2A%2F%0A%20%20%20%20%20%20%20%20color%3A%20black%3B%0A%20%20%20%20%20%20%20%20background%3A%20transparent%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20a%5Bhref%5E%3D%22http%3A%2F%2F%22%5D%3Aafter%2C%20a%5Bhref%5E%3D%22https%3A%2F%2F%22%5D%3Aafter%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20However%2C%20links%20that%20go%20somewhere%20else%2C%20might%20be%20useful%20to%20the%20reader%2C%0A%20%20%20%20%20%20%20%20%20%20%20so%20for%20http%20and%20https%20links%2C%20print%20the%20URL%20after%20what%20was%20the%20link%20%0A%20%20%20%20%20%20%20%20%20%20%20text%20in%20parens%0A%20%20%20%20%20%20%20%20%2A%2F%0A%20%20%20%20%20%20%20%20content%3A%20%22%20%28%22%20attr%28href%29%20%22%29%20%22%3B%0A%20%20%20%20%20%20%20%20font%2Dsize%3A%2090%25%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Images%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Aimg%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Let%20it%20be%20inline%20left%2Fright%20where%20it%20wants%20to%20be%2C%20but%20verticality%20make%20%0A%20%20%20%20%20%20%20it%20in%20the%20middle%20to%20look%20nicer%2C%20but%20opinions%20differ%2C%20and%20if%20in%20a%20multi%2Dline%20%0A%20%20%20%20%20%20%20paragraph%2C%20it%20might%20not%20be%20so%20great%2E%20%0A%20%20%20%20%2A%2F%0A%20%20%20%20vertical%2Dalign%3A%20middle%3B%0A%20%20%20%20%7D%0A%20%0Adiv%2Efigure%20%2F%2A%20Pandoc%20figure%2Dstyle%20image%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Center%20the%20image%20and%20caption%20%2A%2F%0A%20%20%20%20margin%2Dleft%3A%20auto%3B%0A%20%20%20%20margin%2Dright%3A%20auto%3B%0A%20%20%20%20text%2Dalign%3A%20center%3B%0A%20%20%20%20font%2Dstyle%3A%20italic%3B%0A%20%20%20%20%7D%0A%20%0Ap%2Ecaption%20%2F%2A%20Pandoc%20figure%2Dstyle%20caption%20within%20div%2Efigure%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Inherits%20div%2Efigure%20props%20by%20default%20%2A%2F%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Code%20blocks%20and%20spans%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Apre%2C%20code%20%0A%20%20%20%20%7B%0A%20%20%20%20background%2Dcolor%3A%20%23fdf7ee%3B%0A%20%20%20%20%2F%2A%20BEGIN%20word%20wrap%20%2A%2F%0A%20%20%20%20%2F%2A%20Need%20all%20the%20following%20to%20word%20wrap%20instead%20of%20scroll%20box%20%2A%2F%0A%20%20%20%20%2F%2A%20This%20will%20override%20the%20overflow%3Aauto%20if%20present%20%2A%2F%0A%20%20%20%20white%2Dspace%3A%20pre%2Dwrap%3B%20%2F%2A%20css%2D3%20%2A%2F%0A%20%20%20%20white%2Dspace%3A%20%2Dmoz%2Dpre%2Dwrap%20%21important%3B%20%2F%2A%20Mozilla%2C%20since%201999%20%2A%2F%0A%20%20%20%20white%2Dspace%3A%20%2Dpre%2Dwrap%3B%20%2F%2A%20Opera%204%2D6%20%2A%2F%0A%20%20%20%20white%2Dspace%3A%20%2Do%2Dpre%2Dwrap%3B%20%2F%2A%20Opera%207%20%2A%2F%0A%20%20%20%20word%2Dwrap%3A%20break%2Dword%3B%20%2F%2A%20Internet%20Explorer%205%2E5%2B%20%2A%2F%0A%20%20%20%20%2F%2A%20END%20word%20wrap%20%2A%2F%0A%20%20%20%20%7D%0A%20%0Apre%20%2F%2A%20Code%20blocks%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Distinguish%20pre%20blocks%20from%20other%20text%20by%20more%20than%20the%20font%20with%20a%20background%20tint%2E%20%2A%2F%0A%20%20%20%20padding%3A%200%2E5em%3B%20%2F%2A%20Since%20we%20have%20a%20background%20color%20%2A%2F%0A%20%20%20%20border%2Dradius%3A%205px%3B%20%2F%2A%20Softens%20it%20%2A%2F%0A%20%20%20%20%2F%2A%20Give%20it%20a%20some%20definition%20%2A%2F%0A%20%20%20%20border%3A%201px%20solid%20%23aaa%3B%0A%20%20%20%20%2F%2A%20Set%20it%20off%20left%20and%20right%2C%20seems%20to%20look%20a%20bit%20nicer%20when%20we%20have%20a%20background%20%2A%2F%0A%20%20%20%20margin%2Dleft%3A%20%200%2E5em%3B%0A%20%20%20%20margin%2Dright%3A%200%2E5em%3B%0A%20%20%20%20%7D%0A%20%0A%40media%20screen%0A%20%20%20%20%7B%0A%20%20%20%20pre%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20On%20screen%2C%20use%20an%20auto%20scroll%20box%20for%20long%20lines%2C%20unless%20word%2Dwrap%20is%20enabled%20%2A%2F%0A%20%20%20%20%20%20%20%20white%2Dspace%3A%20pre%3B%0A%20%20%20%20%20%20%20%20overflow%3A%20auto%3B%0A%20%20%20%20%20%20%20%20%2F%2A%20Dotted%20looks%20better%20on%20screen%20and%20solid%20seems%20to%20print%20better%2E%20%2A%2F%0A%20%20%20%20%20%20%20%20border%3A%201px%20dotted%20%23777%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%0Acode%20%2F%2A%20All%20inline%20code%20spans%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Ap%20%3E%20code%2C%20li%20%3E%20code%20%2F%2A%20Code%20spans%20in%20paragraphs%20and%20tight%20lists%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Pad%20a%20little%20from%20adjacent%20text%20%2A%2F%0A%20%20%20%20padding%2Dleft%3A%20%202px%3B%0A%20%20%20%20padding%2Dright%3A%202px%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0Ali%20%3E%20p%20code%20%2F%2A%20Code%20span%20in%20a%20loose%20list%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20We%20have%20room%20for%20some%20more%20background%20color%20above%20and%20below%20%2A%2F%0A%20%20%20%20padding%3A%202px%3B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Math%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Aspan%2Emath%20%2F%2A%20Pandoc%20inline%20math%20default%20and%20%2D%2Djsmath%20inline%20math%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Tried%20font%2Dstyle%3Aitalic%20here%2C%20and%20it%20messed%20up%20MathJax%20rendering%20in%20some%20browsers%2E%20Maybe%20don%27t%20mess%20with%20at%20all%2E%20%2A%2F%0A%20%20%20%20%7D%0A%20%20%20%20%0Adiv%2Emath%20%2F%2A%20Pandoc%20%2D%2Djsmath%20display%20math%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%20%20%20%0Aspan%2ELaTeX%20%2F%2A%20Pandoc%20%2D%2Dlatexmathml%20math%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%20%0A%20%0Aeq%20%2F%2A%20Pandoc%20%2D%2Dgladtex%20math%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%20%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Tables%20%2D%2D%2D%2D%20%2A%2F%0A%20%0A%2F%2A%20%20A%20clean%20textbook%2Dlike%20style%20with%20horizontal%20lines%20above%20and%20below%20and%20under%20%0A%20%20%20%20the%20header%2E%20Rows%20highlight%20on%20hover%20to%20help%20scanning%20the%20table%20on%20screen%2E%0A%2A%2F%0A%20%0Atable%0A%20%20%20%20%7B%0A%20%20%20%20border%2Dcollapse%3A%20collapse%3B%0A%20%20%20%20border%2Dspacing%3A%200%3B%20%2F%2A%20IE%206%20%2A%2F%0A%20%0A%20%20%20%20border%2Dbottom%3A%202pt%20solid%20%23000%3B%0A%20%20%20%20border%2Dtop%3A%202pt%20solid%20%23000%3B%20%2F%2A%20The%20caption%20on%20top%20will%20not%20have%20a%20bottom%2Dborder%20%2A%2F%0A%20%0A%20%20%20%20%2F%2A%20Center%20%2A%2F%0A%20%20%20%20margin%2Dleft%3A%20auto%3B%0A%20%20%20%20margin%2Dright%3A%20auto%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0Athead%20%2F%2A%20Entire%20table%20header%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20border%2Dbottom%3A%201pt%20solid%20%23000%3B%0A%20%20%20%20background%2Dcolor%3A%20%23eee%3B%20%2F%2A%20Does%20this%20BG%20print%20well%3F%20%2A%2F%0A%20%20%20%20%7D%0A%20%0Atr%2Eheader%20%2F%2A%20Each%20header%20row%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%20%0A%20%0Atbody%20%2F%2A%20Entire%20table%20%20body%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20Table%20body%20rows%20%2A%2F%0A%20%0Atr%20%20%7B%0A%20%20%20%20%7D%0Atr%2Eodd%3Ahover%2C%20tr%2Eeven%3Ahover%20%2F%2A%20Use%20%2Eodd%20and%20%2Eeven%20classes%20to%20avoid%20styling%20rows%20in%20other%20tables%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20background%2Dcolor%3A%20%23eee%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0A%2F%2A%20Odd%20and%20even%20rows%20%2A%2F%0Atr%2Eodd%20%7B%7D%0Atr%2Eeven%20%7B%7D%0A%20%0Atd%2C%20th%20%2F%2A%20Table%20cells%20and%20table%20header%20cells%20%2A%2F%0A%20%20%20%20%7B%20%0A%20%20%20%20vertical%2Dalign%3A%20top%3B%20%2F%2A%20Word%20%2A%2F%0A%20%20%20%20vertical%2Dalign%3A%20baseline%3B%20%2F%2A%20Others%20%2A%2F%0A%20%20%20%20padding%2Dleft%3A%20%20%200%2E5em%3B%0A%20%20%20%20padding%2Dright%3A%20%200%2E5em%3B%0A%20%20%20%20padding%2Dtop%3A%20%20%20%200%2E2em%3B%0A%20%20%20%20padding%2Dbottom%3A%200%2E2em%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0A%2F%2A%20Removes%20padding%20on%20left%20and%20right%20of%20table%20for%20a%20tight%20look%2E%20Good%20if%20thead%20has%20no%20background%20color%2A%2F%0A%2F%2A%0Atr%20td%3Alast%2Dchild%2C%20tr%20th%3Alast%2Dchild%0A%20%20%20%20%7B%0A%20%20%20%20padding%2Dright%3A%200%3B%0A%20%20%20%20%7D%0Atr%20td%3Afirst%2Dchild%2C%20tr%20th%3Afirst%2Dchild%20%0A%20%20%20%20%7B%0A%20%20%20%20padding%2Dleft%3A%200%3B%0A%20%20%20%20%7D%0A%2A%2F%0A%20%0Ath%20%2F%2A%20Table%20header%20cells%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20font%2Dweight%3A%20bold%3B%20%0A%20%20%20%20%7D%0A%20%0Atfoot%20%2F%2A%20Table%20footer%20%28what%20appears%20here%20if%20caption%20is%20on%20top%3F%29%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Acaption%20%2F%2A%20This%20is%20for%20a%20table%20caption%20tag%2C%20not%20the%20p%2Ecaption%20Pandoc%20uses%20in%20a%20div%2Efigure%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20caption%2Dside%3A%20top%3B%0A%20%20%20%20border%3A%20none%3B%0A%20%20%20%20font%2Dsize%3A%200%2E9em%3B%0A%20%20%20%20font%2Dstyle%3A%20italic%3B%0A%20%20%20%20text%2Dalign%3A%20center%3B%0A%20%20%20%20margin%2Dbottom%3A%200%2E3em%3B%20%2F%2A%20Good%20for%20when%20on%20top%20%2A%2F%0A%20%20%20%20padding%2Dbottom%3A%200%2E2em%3B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Definition%20lists%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Adl%20%2F%2A%20The%20whole%20list%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20border%2Dtop%3A%202pt%20solid%20black%3B%0A%20%20%20%20padding%2Dtop%3A%200%2E5em%3B%0A%20%20%20%20border%2Dbottom%3A%202pt%20solid%20black%3B%0A%20%20%20%20%7D%0A%20%0Adt%20%2F%2A%20Definition%20term%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20font%2Dweight%3A%20bold%3B%0A%20%20%20%20%7D%0A%20%0Add%2Bdt%20%2F%2A%202nd%20or%20greater%20term%20in%20the%20list%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20border%2Dtop%3A%201pt%20solid%20black%3B%0A%20%20%20%20padding%2Dtop%3A%200%2E5em%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0Add%20%2F%2A%20A%20definition%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20margin%2Dbottom%3A%200%2E5em%3B%0A%20%20%20%20%7D%0A%20%0Add%2Bdd%20%2F%2A%202nd%20or%20greater%20definition%20of%20a%20term%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20border%2Dtop%3A%201px%20solid%20black%3B%20%2F%2A%20To%20separate%20multiple%20definitions%20%2A%2F%0A%20%20%20%20%7D%0A%20%20%20%20%0A%2F%2A%20%2D%2D%2D%2D%20Footnotes%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Aa%2Efootnote%2C%20a%2EfootnoteRef%20%7B%20%2F%2A%20Pandoc%2C%20MultiMarkdown%20footnote%20links%20%2A%2F%0A%20%20%20%20font%2Dsize%3A%20small%3B%20%0A%20%20%20%20vertical%2Dalign%3A%20text%2Dtop%3B%0A%7D%0A%20%0Aa%5Bhref%5E%3D%22%23fnref%22%5D%2C%20a%2Ereversefootnote%20%2F%2A%20Pandoc%2C%20MultiMarkdown%2C%20%3F%3F%20footnote%20back%20links%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0A%40media%20print%0A%20%20%20%20%7B%0A%20%20%20%20a%5Bhref%5E%3D%22%23fnref%22%5D%2C%20a%2Ereversefootnote%20%2F%2A%20Pandoc%2C%20MultiMarkdown%20%2A%2F%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20Don%27t%20display%20these%20at%20all%20in%20print%20since%20the%20arrow%20is%20only%20something%20to%20click%20on%20%2A%2F%0A%20%20%20%20%20%20%20%20display%3A%20none%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20%0Adiv%2Efootnotes%20%2F%2A%20Pandoc%20footnotes%20div%20at%20end%20of%20the%20document%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%20%20%20%0Adiv%2Efootnotes%20li%5Bid%5E%3D%22fn%22%5D%20%2F%2A%20A%20footnote%20item%20within%20that%20div%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20You%20can%20class%20stuff%20as%20%22noprint%22%20to%20not%20print%2E%20%0A%20%20%20Useful%20since%20you%20can%27t%20set%20this%20media%20conditional%20inside%20an%20HTML%20element%27s%20%0A%20%20%20style%20attribute%20%28I%20think%29%2C%20and%20you%20don%27t%20want%20to%20make%20another%20stylesheet%20that%20%0A%20%20%20imports%20this%20one%20and%20adds%20a%20class%20just%20to%20do%20this%2E%0A%2A%2F%0A%20%0A%40media%20print%0A%20%20%20%20%7B%0A%20%20%20%20%2Enoprint%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20display%3Anone%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A" rel="stylesheet" type="text/css" />
10</head>
11<body>
12<div id="header">
13<h1 class="title">Ganeti basic installation</h1>
14</div>
15<div id="TOC">
16<ul>
17<li><a href="#objectives"><span class="toc-section-number">1</span> Objectives</a></li>
18<li><a href="#become-root"><span class="toc-section-number">2</span> Become root</a></li>
19<li><a href="#configure-the-hostname"><span class="toc-section-number">3</span> Configure the Hostname</a></li>
20<li><a href="#logical-volume-manager"><span class="toc-section-number">4</span> Logical Volume Manager</a></li>
21<li><a href="#configure-the-network"><span class="toc-section-number">5</span> Configure the Network</a><ul>
22<li><a href="#vlan-configuration"><span class="toc-section-number">5.1</span> VLAN configuration</a><ul>
23<li><a href="#replication-network"><span class="toc-section-number">5.1.1</span> Replication network</a></li>
24<li><a href="#service-network"><span class="toc-section-number">5.1.2</span> Service network</a></li>
25</ul></li>
26<li><a href="#summary-of-the-topology"><span class="toc-section-number">5.2</span> Summary of the topology</a></li>
27<li><a href="#activate-network-configuration"><span class="toc-section-number">5.3</span> Activate network configuration</a></li>
28<li><a href="#synchronize-the-clock"><span class="toc-section-number">5.4</span> Synchronize the clock</a></li>
29</ul></li>
30<li><a href="#install-the-ganeti-software"><span class="toc-section-number">6</span> Install the Ganeti software</a><ul>
31<li><a href="#debian"><span class="toc-section-number">6.1</span> Debian</a></li>
32<li><a href="#ubuntu"><span class="toc-section-number">6.2</span> Ubuntu</a></li>
33</ul></li>
34<li><a href="#setup-drbd"><span class="toc-section-number">7</span> Setup DRBD</a></li>
35<li><a href="#create-a-root-password"><span class="toc-section-number">8</span> Create a root password</a></li>
36<li><a href="#initialize-the-cluster---master-node-only"><span class="toc-section-number">9</span> Initialize the cluster - MASTER NODE ONLY</a><ul>
37<li><a href="#adding-nodes-to-the-cluster---master-node-only"><span class="toc-section-number">9.1</span> Adding nodes to the cluster - MASTER NODE ONLY</a></li>
38<li><a href="#verify-the-configuration-of-your-cluster"><span class="toc-section-number">9.2</span> Verify the configuration of your cluster</a></li>
39</ul></li>
40<li><a href="#securing-the-vnc-consoles"><span class="toc-section-number">10</span> Securing the VNC consoles</a></li>
41<li><a href="#optional-burn-in"><span class="toc-section-number">11</span> Optional: Burn-in</a></li>
42</ul>
43</div>
44<h1 id="objectives"><a href="#objectives"><span class="header-section-number">1</span> Objectives</a></h1>
45<p>You will each of you install the Ganeti virtualization cluster management software on your Linux server.</p>
46<ul>
47<li>Install the Ganeti software</li>
48<li>Configure the network components (including VLANs) and network based disk replication (DRBD)</li>
49<li>Use the Ganeti command line tools to initialize the cluster, with groups of machines working in a cluster configuration</li>
50</ul>
51<p>You will build clusters of three of four hosts, depending on how the instructor wishes to organise the classroom. For example, a lab with 15 hosts might be organised like this:</p>
52<table>
53<thead>
54<tr class="header">
55<th align="left">cluster IP</th>
56<th align="left">master node</th>
57<th align="left">additional nodes</th>
58</tr>
59</thead>
60<tbody>
61<tr class="odd">
62<td align="left">gnt1.ws.nsrc.org</td>
63<td align="left">host1.ws.nsrc.org</td>
64<td align="left">host2.ws.nsrc.org, host3.ws.nsrc.org</td>
65</tr>
66<tr class="even">
67<td align="left">gnt2.ws.nsrc.org</td>
68<td align="left">host4.ws.nsrc.org</td>
69<td align="left">host5.ws.nsrc.org, host6.ws.nsrc.org</td>
70</tr>
71<tr class="odd">
72<td align="left">gnt3.ws.nsrc.org</td>
73<td align="left">host7.ws.nsrc.org</td>
74<td align="left">host8.ws.nsrc.org, host9.ws.nsrc.org</td>
75</tr>
76<tr class="even">
77<td align="left">gnt4.ws.nsrc.org</td>
78<td align="left">host10.ws.nsrc.org</td>
79<td align="left">host11.ws.nsrc.org, host12.ws.nsrc.org</td>
80</tr>
81<tr class="odd">
82<td align="left">gnt5.ws.nsrc.org</td>
83<td align="left">host13.ws.nsrc.org</td>
84<td align="left">host14.ws.nsrc.org, host15.ws.nsrc.org</td>
85</tr>
86</tbody>
87</table>
88<p>Note that ganeti requires you to use fully-qualified domain names, and these must resolve to the correct IP addresses (either in the DNS or in the <code>/etc/hosts</code> file on every node)</p>
89<h1 id="become-root"><a href="#become-root"><span class="header-section-number">2</span> Become root</a></h1>
90<p>All of the actions in this exercise are done as &quot;root&quot;, so if you are not root already type:</p>
91<pre><code>$ sudo -s
92#</code></pre>
93<h1 id="configure-the-hostname"><a href="#configure-the-hostname"><span class="header-section-number">3</span> Configure the Hostname</a></h1>
94<p>Look at the contents of the file <code>/etc/hostname</code> and check it contains the fully-qualified domain name, i.e.</p>
95<pre><code>hostX.ws.nsrc.org</code></pre>
96<p>(where X is your machine number). If not, then edit it so that it looks like that, then get the system to re-read this file:</p>
97<pre><code># hostname -F /etc/hostname</code></pre>
98<p>Also check <code>/etc/hosts</code> to ensure that you have the both the fully-qualified name and the short name there, pointing to the correct IP address:</p>
99<pre><code>127.0.0.1   localhost
10010.10.0.X   hostX.ws.nsrc.org hostX</code></pre>
101<h1 id="logical-volume-manager"><a href="#logical-volume-manager"><span class="header-section-number">4</span> Logical Volume Manager</a></h1>
102<p>Type the following command:</p>
103<pre><code># vgs</code></pre>
104<p>If it shows you have a volume group called 'ganeti' then skip to the next section, &quot;Configure the Network&quot;</p>
105<p>If the command is not found, then install the lvm2 package:</p>
106<pre><code># apt-get install lvm2</code></pre>
107<p>Now, your host machine should have either a spare partition or a spare hard drive which you will use for LVM. If it's a second hard drive it will be <code>/dev/vdb</code> or <code>/dev/sdb</code>. Check which you have:</p>
108<pre><code># ls /dev/vd*
109# ls /dev/sd*</code></pre>
110<p>The following instructions assume the spare drive is <code>/dev/vdb</code> but please adjust them as necessary.</p>
111<p>Turning this drive into a physical volume for LVM will destroy any data which is on it, so double-check that the drive is not in use, by looking at what filesystems are currently mounted:</p>
112<pre><code># mount</code></pre>
113<p>For example, you may see <code>/dev/vda1</code> mounted (which means the first partition on device <code>/dev/vda</code> is in use)</p>
114<p>Assuming <code>/dev/vdb</code> is spare, let's mark it as a physical volume for LVM:</p>
115<pre><code># pvcreate /dev/vdb
116# pvs   # should show the physical volume</code></pre>
117<p>Now we need to create a volume group called <code>ganeti</code> containing just this one physical volume. (Volume groups can be extended later by adding more physical volumes)</p>
118<pre><code># vgcreate ganeti /dev/vdb
119# vgs
120  VG     #PV #LV #SN Attr   VSize  VFree
121  ganeti   1   0   0 wz--n- 24.00g 24.00g</code></pre>
122<p>You should see that the volume group has been created, it consists of one Physical Volume (PV), and no Logical Volumes (LV) have been created within it, so all the space is free.</p>
123<p>More detailed information can be seen by typing <code>vgdisplay</code></p>
124<p>If you want to create, extend and delete a logical volume called &quot;foo&quot;, these are the commands you would use. If you have not used them before, this is a good time to try them out.</p>
125<pre><code># lvcreate --size 1G --name foo ganeti      # create volume called &quot;foo&quot; of 1GB
126# lvs
127# ls -l /dev/ganeti
128# blockdev --getsize64 /dev/ganeti/foo      # shows device size in bytes
129# lvextend --size +1G /dev/ganeti/foo       # grow by 1GB
130# blockdev --getsize64 /dev/ganeti/foo      # shows device size in bytes
131# vgs                                       # check free space in VG
132# lvremove /dev/ganeti/foo
133# vgs</code></pre>
134<p>Note: on a production Ganeti server it is recommended to configure LVM not to scan DRBD devices for physical volumes. The documentation suggests editing <code>/etc/lvm/lvm.conf</code> and adding a reject expression to the filter variable, like this:</p>
135<pre><code>filter = [ &quot;r|/dev/cdrom|&quot;, &quot;r|/dev/drbd[0-9]+|&quot; ]</code></pre>
136<p>You can tighten this further by allowing only devices which match the expected pattern. If you know that all your attached physical disks start with <code>/dev/sd</code> then you can accept only those and reject everything else:</p>
137<pre><code>filter = [ &quot;a|^/dev/sd|&quot;, &quot;r|.*|&quot; ]</code></pre>
138<h1 id="configure-the-network"><a href="#configure-the-network"><span class="header-section-number">5</span> Configure the Network</a></h1>
139<p>We're now going to reconfigure the network on our machine, so that we will be using <code>VLANs</code>. While it would be perfectly fine to use a single network for running virtual machines, there are a number of limitations, including:</p>
140<ul>
141<li><p>no separation between the networks used to manage the servers (management) and the one where the virtual machines are placed (service)</p></li>
142<li><p>we will be using network-based disk replication, and we'd like to keep the disk traffic separate from the management and service traffic</p></li>
143</ul>
144<p>Instead of using separate ethernet cards, we'll use VLANs.</p>
145<p>We need to implement three networks: <em>management</em>, <em>replication</em>, and <em>service</em>.</p>
146<p>Ideally, we would create three VLANs:</p>
147<ul>
148<li>A management VLAN (vlan 1) <sup><a href="#fn1" class="footnoteRef" id="fnref1">1</a></sup></li>
149<li>A replication (or storage) VLAN (vlan 100), used for storage (disk) traffic/replication</li>
150<li>An external (or service) VLAN (vlan 255), where we will &quot;connect&quot; the virtual machines</li>
151</ul>
152<h2 id="vlan-configuration"><a href="#vlan-configuration"><span class="header-section-number">5.1</span> VLAN configuration</a></h2>
153<p>To be on the safe side, let's install the vlan and bridge management tools (these should already have been installed by you earlier).</p>
154<pre><code># apt-get install vlan bridge-utils</code></pre>
155<p>Let's make changes to the network configuration file for your system. If you remember, this is <code>/etc/network/interfaces</code>.</p>
156<p>Edit this file, and look for the <code>br-lan</code> definition. This is the bridge interface you created earlier, and <code>eth0</code> is attached to it.</p>
157<p>If should looks something like this:</p>
158<pre><code># Management interface
159auto eth0
160iface eth0 inet manual
161
162auto br-lan
163iface br-lan inet static
164        address         10.10.0.X
165        netmask         255.255.255.0
166        gateway         10.10.0.254
167        dns-nameservers 10.10.0.241
168        bridge_ports    eth0
169        bridge_stp      off
170        bridge_fd       0
171        bridge_maxwait  0</code></pre>
172<p>We're going to leave this alone, and not going to use VLAN tagging (802.1q) for our management network. What it means is that we will have both untagged and tagged (VLAN) frames going through eth0 <sup><a href="#fn2" class="footnoteRef" id="fnref2">2</a></sup>.</p>
173<p>We will proceed to create VLANs 100 and 255, and the associated bridge interfaces for them.</p>
174<h3 id="replication-network"><a href="#replication-network"><span class="header-section-number">5.1.1</span> Replication network</a></h3>
175<p>Let's start with the Replication network. To do this, add the following lines below the <code>br-lan</code> section:</p>
176<pre><code># Replication network
177auto eth0.100
178iface eth0.100 inet manual
179
180auto br-rep
181iface br-rep inet static
182        address 10.10.100.X
183        netmask 255.255.255.0
184        bridge_ports    eth0.100
185        bridge_stp      off
186        bridge_fd       0
187        bridge_maxwait  0</code></pre>
188<p>Remember to replace X with the number of your class PC.</p>
189<p>This does two things:</p>
190<ul>
191<li><p>Adds a new &quot;sub&quot;-interface VLAN 100. The new interface is called <code>eth0.100</code>. This naming convention using dot is quite common, and immediately identifies that VLAN 100 is associated with <code>eth0</code>.</p></li>
192<li><p>Creates a new bridge <code>br-rep</code> (for 'replication'). This bridge has only one interface associated with it: <code>eth0.100</code> <sup><a href="#fn3" class="footnoteRef" id="fnref3">3</a></sup></p></li>
193</ul>
194<h3 id="service-network"><a href="#service-network"><span class="header-section-number">5.1.2</span> Service network</a></h3>
195<p>Now we add the Service network. Same as before, go to the end of the file, and add the following lines:</p>
196<pre><code># Service network
197auto eth0.255
198iface eth0.255 inet manual
199
200auto br-svc
201iface br-svc inet manual
202        bridge_ports    eth0.255
203        bridge_stp      off
204        bridge_fd       0
205        bridge_maxwait  0</code></pre>
206<p>This is very similar to VLAN 100, but notice that we have NOT configured an IP address for br-svc. This is because we do not want the physical host OS to be connected to this network with IP: the host OS shouldn't be reachable via SSH on this network, for security reasons.</p>
207<p>Review the work you have just done. The resulting file should look something like this (IPs should be the ones for your PC, of course):</p>
208<pre><code># The loopback network interface
209auto lo
210iface lo inet loopback
211
212# The primary network interface
213auto eth0
214iface eth0 inet manual
215
216auto br-lan
217iface br-lan inet static
218        address 10.10.0.X
219        netmask 255.255.255.0
220        gateway 10.10.0.254
221        dns-nameservers 10.10.0.241
222        bridge_ports    eth0
223        bridge_stp      off
224        bridge_fd       0
225        bridge_maxwait  0
226
227# Replication network
228auto eth0.100
229iface eth0.100 inet manual
230
231auto br-rep
232iface br-rep inet static
233        address 10.10.100.X
234        netmask 255.255.255.0
235        bridge_ports    eth0.100
236        bridge_stp      off
237        bridge_fd       0
238        bridge_maxwait  0
239
240auto eth0.255
241iface eth0.255 inet manual
242
243# Service network
244auto br-svc
245iface br-svc inet manual
246        bridge_ports    eth0.255
247        bridge_stp      off
248        bridge_fd       0
249        bridge_maxwait  0</code></pre>
250<h2 id="summary-of-the-topology"><a href="#summary-of-the-topology"><span class="header-section-number">5.2</span> Summary of the topology</a></h2>
251<p>We now have the following configuration. Think of eth0, eth0.100 and eth0.255 as 3 different interfaces, connected to 3 different virtual switches (br-lan, br-rep and br-svc, respectively).</p>
252<pre><code>                 -----------+--------------
253                            |
254                          br-lan
255                            |         host X
256                  +---------+---------+
257                  |        eth0       |
258                  |                   |
259                  |eth0.255   eth0.100|
260                  +--+-----------+----+
261                     |           |
262                   br-svc      br-rep
263                     |           |
264         VMs --------+           +------&gt; to other hosts</code></pre>
265<h2 id="activate-network-configuration"><a href="#activate-network-configuration"><span class="header-section-number">5.3</span> Activate network configuration</a></h2>
266<p>At this point you can now activate your new network interfaces:</p>
267<pre><code># ifup br-rep
268# ifup br-svc</code></pre>
269<p>Check that the bridge interfaces have been created:</p>
270<pre><code># brctl show</code></pre>
271<p>(Note: on a production machine it's a good idea to reboot after making major changes to <code>/etc/network/interfaces</code> to ensure they are picked up correctly at system startup)</p>
272<p>Verify that your colleagues have finished their configuration, and test that you can ping each other:</p>
273<ul>
274<li>On the management network IP (10.10.0.X)</li>
275<li>On the replication network IP (10.10.100.X)</li>
276</ul>
277<p>If you have problems:</p>
278<ul>
279<li>verify <code>/etc/network/interfaces</code></li>
280<li>run <code>ifconfig</code> to see if the interfaces are configured</li>
281<li>ask a neighbor, or your instructors, for assistance.</li>
282</ul>
283<p>You way want to test that you can resolve the following hostnames using the <code>dig</code> command:</p>
284<pre><code>dig +short host1.ws.nsrc.org
285dig +short host2.ws.nsrc.org
286..
287dig +short gnt1.ws.nsrc.org
288dig +short gnt2.ws.nsrc.org
289..</code></pre>
290<h2 id="synchronize-the-clock"><a href="#synchronize-the-clock"><span class="header-section-number">5.4</span> Synchronize the clock</a></h2>
291<p>It's important that the nodes have synchronized time, so install the NTP daemon on every node:</p>
292<pre><code># apt-get install ntp</code></pre>
293<h1 id="install-the-ganeti-software"><a href="#install-the-ganeti-software"><span class="header-section-number">6</span> Install the Ganeti software</a></h1>
294<p>Now install the software from the right package repository. How to do this depends on whether your machine is running Debian or Ubuntu.</p>
295<h2 id="debian"><a href="#debian"><span class="header-section-number">6.1</span> Debian</a></h2>
296<p>On Debian, the available version of ganeti is too old, but fortunately the current version is available in a <code>backports</code> repository <sup><a href="#fn4" class="footnoteRef" id="fnref4">4</a></sup>.</p>
297<p>As root, create a file <code>/etc/apt/sources.list.d/wheezy-backports.list</code> containing this one line:</p>
298<pre><code>deb http://cdn.debian.net/debian/ wheezy-backports main</code></pre>
299<p>Then refresh the index of available packages:</p>
300<pre><code># apt-get update</code></pre>
301<p>Now, install the <code>Ganeti</code> software package. Note that the backports packages are not used unless you ask for them explicitly.</p>
302<pre><code># apt-get install ganeti/wheezy-backports</code></pre>
303<p>This will install the current released version of Ganeti on your system; but any dependencies it pulls in will be the stable versions.</p>
304<p>The ganeti-htools package is installed as a dependency. This provides the instance allocator (&quot;hail&quot;) which can automatically place VMs for you.</p>
305<h2 id="ubuntu"><a href="#ubuntu"><span class="header-section-number">6.2</span> Ubuntu</a></h2>
306<p>For server applications you are recommended to use a Long Term Support (LTS) version of Ubuntu. The current LTS versions are 12.04 and 14.04.</p>
307<p>The version of Ganeti provided in Ubuntu 12.04 is very old; the version in Ubuntu 14.04 is newer (Ganeti 2.9.x), but it's still better to work with up-to-date code. Also, Ganeti 2.10 introduced a <a href="http://docs.ganeti.org/ganeti/master/html/design-upgrade.html">mechanism to make upgrades to later versions much easier</a>.</p>
308<p>Luckily, a newer version of Ganeti is available for Ubuntu 12.04 and 14.04, via a &quot;Private Package Archive&quot; (PPA).</p>
309<p><a href="https://launchpad.net/~pkg-ganeti-devel/+archive/lts">https://launchpad.net/~pkg-ganeti-devel/+archive/lts</a></p>
310<p>To add the necessary information to the our list of packages sources (<code>/etc/apt/sources.list</code>), run the following commands:</p>
311<pre><code># apt-get install python-software-properties
312# add-apt-repository ppa:pkg-ganeti-devel/lts</code></pre>
313<p>The second command will prompt you:</p>
314<pre><code>You are about to add the following PPA to your system:
315 This PPA contains stable versions of Ganeti backported to Ubuntu LTS. Currently
316 it covers 12.04 LTS (Precise) and 14.04 LTS (Trusty).
317 More info: https://launchpad.net/~pkg-ganeti-devel/+archive/lts
318Press [ENTER] to continue or ctrl-c to cancel adding it</code></pre>
319<p>Just press <code>[ENTER]</code></p>
320<p>The package archive will now be available. We still need to update the list of available packages:</p>
321<pre><code># apt-get update</code></pre>
322<p>Now, install the <code>Ganeti</code> software package:</p>
323<pre><code># apt-get install ganeti</code></pre>
324<p>This will install the current released version of Ganeti on your system.</p>
325<h1 id="setup-drbd"><a href="#setup-drbd"><span class="header-section-number">7</span> Setup DRBD</a></h1>
326<p>We'll now set up DRBD (Distributed Replicated Block Device), which will make it possible for VMs to have redundant storage across two physical machines.</p>
327<p>DRBD was already installed when we installed Ganeti, but we still need to change the configuration:</p>
328<pre><code># echo &quot;options drbd minor_count=128 usermode_helper=/bin/true&quot; &gt;/etc/modprobe.d/drbd.conf
329# echo &quot;drbd&quot; &gt;&gt;/etc/modules
330# rmmod drbd      # ignore error if the module isn't already loaded
331# modprobe drbd</code></pre>
332<p>The entry in <code>/etc/modules</code> ensures that drbd is loaded at boot time.</p>
333<h1 id="create-a-root-password"><a href="#create-a-root-password"><span class="header-section-number">8</span> Create a root password</a></h1>
334<p>Ganeti will need to log in as root to the other <code>nodes</code> in the cluster so it can set up the configuration files there. After the first login, SSH keys are used (and therefore no password is used), but for the first connection, we need to set a root password.</p>
335<p>For Ubuntu servers only: you need to set a root password on each node. (For Debian servers, this will have already been done at installation time)</p>
336<p>Note: You only need to do this on the <code>slave</code> nodes in each cluster of servers.</p>
337<pre><code># passwd root
338Enter new UNIX password:
339Retype new UNIX password:
340passwd: password updated successfully</code></pre>
341<p>Use the in-class password!</p>
342<p>Finally, create a directory for SSH keys to be stored for the <code>root</code> user:</p>
343<pre><code># mkdir /root/.ssh
344# chmod 700 /root/.ssh</code></pre>
345<h1 id="initialize-the-cluster---master-node-only"><a href="#initialize-the-cluster---master-node-only"><span class="header-section-number">9</span> Initialize the cluster - MASTER NODE ONLY</a></h1>
346<p>We are now ready to run the commands that will create the Ganeti cluster. Do this only on the MASTER node of the cluster.</p>
347<pre><code># gnt-cluster init --master-netdev=br-lan --enabled-hypervisors=kvm \
348  -N link=br-svc -s 10.10.100.X --vg-name ganeti gntN.ws.nsrc.org
349
350# gnt-cluster modify -H kvm:kernel_path=,initrd_path=,vnc_bind_address=0.0.0.0</code></pre>
351<p>where X is the number of your <em>host</em> (like host1, host2 etc), and N is the number of your <em>cluster</em> (gnt1, gnt2 etc)</p>
352<p>Explanation of the above parameters:</p>
353<ul>
354<li><p><code>--master-netdev</code> =&gt; a Ganeti cluster has an extra IP address for cluster management. This IP address is created as an IP alias on whichever node is the master at that time. In our case, our management network is <code>br-lan</code>, thus we set <code>master-netdev</code> to be br-lan.</p></li>
355<li><p><code>--enabled-hypervisors</code> =&gt; We are using KVM as our hypervisor</p></li>
356<li><p><code>-N link</code> =&gt; Here we set the default network to which the virtual machines we create will be attached. In our case, this will be <code>br-svc</code></p></li>
357<li><p><code>-s</code> =&gt; This tells Ganeti which Secondary IP to use for disk replication. We created a dedicated network for this.</p></li>
358<li><p><code>--vg-name</code> =&gt; This tells Ganeti the name of the Volume Group in which it can create Logical Volumes. If you don't specify it, for historical reasons it will expect a volume group called <code>xenvg</code></p></li>
359<li><p>Finally <code>gntN.ws.nsrc.org</code> is the name of the cluster you are creating, and resolves to the cluster management IP address.</p></li>
360</ul>
361<p>If everything goes well, the command <code>gnt-cluster init</code> will take 5-6 seconds to complete. It will not output anything unless a problem occurred.</p>
362<p>The second command sets some hypervisor default parameters (<code>-H</code>):</p>
363<ul>
364<li><p><code>kernel_path</code> and <code>initrd_path</code> are set to empty string, so that instances boot like normal PCs, using the Master Boot Record</p></li>
365<li><p><code>vnc_bind_address</code> set to 0.0.0.0 allows VNC consoles to accept connections across the network</p></li>
366</ul>
367<p>These will be used by all instances that don't explicitly override them.</p>
368<p>Observe that there is an interface <code>br-lan:0</code> now configured:</p>
369<pre><code># ifconfig br-lan:0</code></pre>
370<p>The IP address should be that which the hostname <code>gntN.ws.nsrc.org</code> resolves to.</p>
371<p>During the cluster creation, the node you ran the command on (the master node) was automatically added to the cluster. So we don't need to do that and can proceed directly to adding the other nodes in the cluster.</p>
372<h2 id="adding-nodes-to-the-cluster---master-node-only"><a href="#adding-nodes-to-the-cluster---master-node-only"><span class="header-section-number">9.1</span> Adding nodes to the cluster - MASTER NODE ONLY</a></h2>
373<p>So let's run the command to add the other nodes. Note the use of the <code>-s</code> option to indicate which IP address will be used for disk replication on the node you are adding.</p>
374<p>Run this command only on the MASTER node of the cluster.</p>
375<pre><code># gnt-node add -s 10.10.100.Y hostY.ws.nsrc.org</code></pre>
376<p>You will be warned that the command will replace the SSH keys on the destination machine (the node you are adding) with new ones. This is normal.</p>
377<pre><code>-- WARNING --
378Performing this operation is going to replace the ssh daemon keypair
379on the target machine (hostY) with the ones of the current one
380and grant full intra-cluster ssh root access to/from it</code></pre>
381<p>When asked if you want to continue connection, say <code>yes</code>:</p>
382<pre><code>The authenticity of host 'hostY (10.10.0.Y)' can't be established.
383ECDSA key fingerprint is a1:af:e8:20:ad:77:6f:96:4a:19:56:41:68:40:2f:06.
384Are you sure you want to continue connecting (yes/no)? yes</code></pre>
385<p>When prompted for the root password for hostY, enter it:</p>
386<pre><code>Warning: Permanently added 'hostY' (ECDSA) to the list of known hosts.
387root@hostY's password:</code></pre>
388<p>You may see the following informational message; you can ignore it:</p>
389<pre><code>Restarting OpenBSD Secure Shell server: sshd.
390Rather than invoking init scripts through /etc/init.d, use the service(8)
391utility, e.g. service ssh restart
392
393Since the script you are attempting to invoke has been converted to an
394Upstart job, you may also use the stop(8) and then start(8) utilities,
395e.g. stop ssh ; start ssh. The restart(8) utility is also available.
396ssh stop/waiting
397ssh start/running, process 2921</code></pre>
398<p>The last message you should see is this:</p>
399<pre><code>Tue Jan 14 01:07:40 2014  - INFO: Node will be a master candidate</code></pre>
400<p>This means that the machine you have just added into the node (hostY) can take over the role of configuration master for the cluster, should the master (hostX) crash or be unavailable.</p>
401<p>Repeat to add the third and/or fourth nodes of your cluster, again always running the commands on the master node.</p>
402<h2 id="verify-the-configuration-of-your-cluster"><a href="#verify-the-configuration-of-your-cluster"><span class="header-section-number">9.2</span> Verify the configuration of your cluster</a></h2>
403<p>Again only on the MASTER node of the cluster:</p>
404<pre><code># gnt-cluster verify</code></pre>
405<p>This will tell you if there are any errors in your configuration. It is possible you will see errors about &quot;orphan volumes&quot;:</p>
406<pre><code>Thu Feb  6 05:02:47 2014 * Verifying orphan volumes
407Thu Feb  6 05:02:47 2014   - ERROR: node hostX.ws.nsrc.org: volume ganeti/swap is unknown
408Thu Feb  6 05:02:47 2014   - ERROR: node hostX.ws.nsrc.org: volume ganeti/var is unknown
409Thu Feb  6 05:02:47 2014   - ERROR: node hostX.ws.nsrc.org: volume ganeti/root is unknown</code></pre>
410<p>This means logical volumes which were already created in the volume group but which ganeti does not know about or manage. You can avoid this error by telling ganeti to ignore those logical volumes:</p>
411<pre><code># gnt-cluster modify --reserved-lvs=ganeti/root,ganeti/swap,ganeti/var
412# gnt-cluster verify</code></pre>
413<p>If you still have any errors, please talk to the instructors.</p>
414<p>To see detailed information on how your cluster is configured, try these commands:</p>
415<pre><code># gnt-cluster info | more</code></pre>
416<p>Look at the output.</p>
417<pre><code># gnt-node list
418# gnt-node list-storage</code></pre>
419<p>You are done with the basic installation!</p>
420<h1 id="securing-the-vnc-consoles"><a href="#securing-the-vnc-consoles"><span class="header-section-number">10</span> Securing the VNC consoles</a></h1>
421<p>It would be good idea to make sure that the VNC consoles for the VMs was protected by a password.</p>
422<p>To do this, we can create a <em>cluster-wide</em> password for every VM console.</p>
423<p>This can later be overridden (changed) for each instance (VM).</p>
424<p>To create the cluster-wide password, run this command on the master:</p>
425<pre><code># echo 'xyzzy' &gt;/etc/ganeti/vnc-cluster-password
426# chmod 600 /etc/ganeti/vnc-cluster-password
427# gnt-cluster modify -H kvm:vnc_password_file=/etc/ganeti/vnc-cluster-password</code></pre>
428<p>You will probably see an error message:</p>
429<pre><code>Failure: command execution error:
430Hypervisor parameter validation failed on node hostY.ws.nsrc.org: Parameter 'vnc_password_file' fails validation: not found or not a file (current value: '/etc/ganeti/vnc-cluster-password')</code></pre>
431<p>Hmm, we just added the file - but wait! It's telling us that the file is missing from the <em>slave</em> nodes.</p>
432<p>That's because we only created <code>/etc/ganeti/vnc-cluster-password</code> on the master node. It needs to be on every node (host) since any one of them could become a cluster master in the future.</p>
433<p>There's a great command for this in ganeti: <code>gnt-cluster copyfile</code></p>
434<p><code>gnt-cluster copyfile</code> will take a file as a parameter, and will take care of copying it to every node in the cluster.</p>
435<p>In this case, we want our file <code>/etc/ganet/vnc-cluster-password</code> to be copied.</p>
436<p>To do this (on the master host - you will get a complaint if you try and run this on the other nodes):</p>
437<pre><code># gnt-cluster copyfile /etc/ganeti/vnc-cluster-password</code></pre>
438<p>You can now re-run the command from earlier:</p>
439<pre><code># gnt-cluster modify -H kvm:vnc_password_file=/etc/ganeti/vnc-cluster-password</code></pre>
440<p>That's it! Next up, we'll create some instances (VMs) and test migration.</p>
441<h1 id="optional-burn-in"><a href="#optional-burn-in"><span class="header-section-number">11</span> Optional: Burn-in</a></h1>
442<p>If you have spare time, you can run a &quot;burn-in&quot;. This is a comprehensive self-test which will check your cluster's ability to create, migrate and destroy virtual machines. It takes about half an hour, and reports its progress as it runs.</p>
443<p>The name of the VM to create (here &quot;testvm&quot;) should be unique. If you have any existing VM with this name, it will be destroyed. It also needs to resolve, so on each cluster node create an <code>/etc/hosts</code> entry like this:</p>
444<pre><code>192.0.2.1       testvm</code></pre>
445<p>Then run this on the cluster master node:</p>
446<pre><code># /usr/lib/ganeti/tools/burnin -o debootstrap+default \
447   -H kvm:kernel_path=/vmlinuz,initrd_path=/initrd.img \
448   --disk-size 1024m --no-name-check --no-ip-check testvm</code></pre>
449<div class="footnotes">
450<hr />
451<ol>
452<li id="fn1"><p>Note that VLAN 1 can have a special meaning. On many switches, VLAN 1 is the &quot;default&quot; VLAN, and cannot be removed. Some switches only allow management using VLAN 1. For security reasons, it's good practice to disable VLAN 1 and use other VLAN numbers. In our workshop, we'll keep it to make things simpler in our labs.<a href="#fnref1">↩</a></p></li>
453<li id="fn2"><p>This isn't a typical network setup, but it keeps things simpler here so we don't have to change the network configuration for our management network.<a href="#fnref2">↩</a></p></li>
454<li id="fn3"><p>We won't be attaching (connecting) any virtual machines to <code>br-rep</code>, so the bridge interface is not strictly necessary (we could have allocated the IP directly to eth0.100)<a href="#fnref3">↩</a></p></li>
455<li id="fn4"><p><code>backports</code> are newer versions of the third party software originally packaged for your version of the operating system. These newer versions, packaged for a newer releases of Debian (or Ubuntu), have been made available (or backported) to the version of Debian we are using.<a href="#fnref4">↩</a></p></li>
456</ol>
457</div>
458</body>
459</html>