¡m¤@¡nOpenStack allinone¤Jªù¦w¸Ë | |
OpenStack¬O¤@®Mopen sourceªº¨p¦³¶³¨t²Î¡A¥Ñ7Ó¥Dn¬ÛÃö®M¥óªA°È©Ò²Õ¦¨¡A¦w¸Ë¤W½ÆÂøÁcº¾...
¤£¹L§ÚÌ¥i¥H¥Ñ«Ê¸Ë¦nªº®M¥ó¡A±N©Ò¦³ªº®M¥ó³æ¸Ë¦b³æ¤@¥D¾÷¤W(allinone)¡AÂÇ¥H¨ÓÅéÅçOpenStackªº¨p¦³¶³¬[ºc¡C
¤Jªù¯Åªºallinone¦w¸Ë¡A¶¶¤l¬O°Ñ¦Ò¥H¤Uºô¯¸ªº»¡©ú¨Ó«Ø¸m¡C
¡÷OpenStack °t¸m½ÆÂø¨ì¡u¶^´í¡v¡IRDO Ãi¤H¥]¸Ñ¨M¤@¤Á·Ð´o
·íµMìºô¯¸¤¤ªº¤º®eÃø§K¦]¡§¿ù/º|¦r¡¨»P¡§ª©¥»¤£¦P¡¨¦Ó»P¶¶¤l¹ê»Ú¦w¸Ë®É¦³¨Ç®t²§¡A
©Ò¥H¶¶¤l¥Î¤F¦Û¤v¯à²z¸Ñªº¤è¦¡¡A§â¾ãÓ¦w¸Ëªº¹Lµ{°µ¤F¦w¸Ëµ§°O¡A
§Æ±æ¤é«á¦w¸Ë®É¡A¯à§ó¶¶§Qªº¶i¦æ¡I
¦w¸ËÀô¹Ò
CentOS 7«Ø¸m©óµêÀÀ¾÷¤W¡A°t¸m¤FCPU 2Áû¡A°O¾ÐÅé4G¤Îºô¥d¤@±i
ºô¤ººô¬q¬°192.168.0.0/24¡A¹w³]¹h¹D¬°192.168.0.254
OpenStack¦Û¤wªº¨p¦³ºô¬q¬°10.0.0.0/24¡A°t¸m¨p¦³¶³Instance¨Ï¥Î
- ¦w¸ËCentOS 7
¦w¸Ë®É¡A±Ä³Ì¤p¤Æ¦w¸Ë§Y¥i¡ACentOS 7ªº¦w¸Ë¥i°Ñ¦Ò¶¶¤l³o¤@½gµ§°O CentOS 7·s¤âµ§°O¡A
¤£¹L¦w¸Ë®É¡A½Ð¤£n¦A¦w¸ËLAMP¡A¤]¤£»Ýn¶O®Éªº§âºô¥d§ï¬°eth0¡Aºû«ù³Ìºë²ªº¦w¸ËÀô¹Ò§Y¥i¡A
µM«á§â¨t²Î°µ§ó·s¡C
yum update -y
- ¦w¸ËOpenStack®M¥ó
yum install -y https://rdo.fedorapeople.org/rdo-release.rpm
yum install -y openstack-packstack
- ¥Hallinone¼Ò¦¡¦w¸ËOpenStack
packstack --allinone
³oÓ³¡¤À·|ªá¸û¦hªº®É¶¡¦b¦w¸ËOpenStack¡A¥H¶¶¤lªºi3µ¥¯ÅCPU¨Ó»¡¡A³æ®Ö¬O¤@Ó¤p®É¡A¦ýÂù®Ö´N¥un20¤ÀÄÁ¡I
¦b³oÓ¨BÆJ¤¤¡A·|§âOpenStack©Ò¥Î¨ìªº©Ò¦³®M¥ó³£¸Ë¶i¥h¡A
Y¦w¸Ë¤§«e¡A¤wÂû±Cªº§âLAMP®M¥ó¸Ë¦n¡A¦b³oÓ³¡¤À´N·|¥X¿ù¡C
©Ò¥H¡AÁÙ¬Oºû«ù³Ìºë²ªºÀô¹Ò´N¦n¡I
- °±¥ÎNetworkManager±Ò¥Înetwork
Allinone¼Ò¦¡¦w¸Ë§¹¦¨«á¡A·|¥X²{NetworkManager±Ò¥Î¤¤ªºÄµ§i°T®§¡C
¥Ñ©ó¹w³]ªºNetworkManagerºô¸ôºÞ²z®M¥ó·|ÅýOpenStackªººô¸ô²§±`¡A
©Ò¥Hn°±¥ÎNetworkManager®M¥ó¡A§ï¥Înetwork®M¥ó¨ÓºÞ²zºô¸ô¡C
systemctl disable NetworkManager
systemctl stop NetworkManager
chkconfig network on
systemctl start network.service
- µn¤JOpenStackºÞ²zºô¶
¦w¸Ë§¹¦¨«á¡A·|¦broot¥Ø¿ý¤U¥X²{¥H¤U3Ó¬ÛÃöÀɮסC
¨ä¤¤ packstack-answers-20160328-114612.txt ¬°¦w¸Ëµ{¹L¤¤ªºÀ³µªÀÉ¡A¤é´ÁÅܼƷ|ÀHµÛ¦w¸Ë¤é´Áªº¤£¦P¦Ó§ïÅÜ¡A
¦Ó keystonerc_admin »P keystonerc_demo «h¤À§O¬Oadmin»Pdemo¨âÓ¹w³]±b¸¹ªºÀô¹ÒÅܼơC
¦Ó³o¨âÓ±b¸¹ªº¹w³]±K½X¤]¦b¥]§t¦¹Àɮפ¤¡A¤§«áYÅܧó¤F±b¸¹ªº±K½X¡A½Ð¤@¨ÖקïÀɮפ¤ªº±K½X¡A
³o¼Ë¦b¤Þ¥Îkeystonerc_admin¤Îkeystonerc_demoªºÀô¹Ò®É¡A¤~¤£·|¦]±K½X¤£¹ï¦ÓµLªk°õ¦æ¡I
¦w¸Ë§¹¦¨«á¡A§ÚÌ¥i¥H¥´¶}ÂsÄý¾¹¡A¿é¤JCentOS 7¥D¾÷ªºIP¦ì§}¡Aµn¤JOpenStackºÞ²zºô¶¡C
OpenStackªºadmin±K½X¡A軡¤F´NÂæb keystonerc_admin ³oÓÀɮפ¤¡A
§ÚÌ¥i³z¹LÀ˵øroot¥Ø¿ý¤Uªº keystonerc_admin ÀɮרӬd¬Ý¡C
cat keystonerc_admin
¿é¤J¤Fadminªº±b¸¹»P±K½X«á¡A§ÚÌ´N¯àµn¤JOpenStackªººÞ²z¶±¤F¡I
- ±Nºô¥d§ï¬°¾ô±µ¼Ò¦¡
¦b³oÓOpenStackªº´ú¸ÕÀô¹Ò¤¤¡A¥Ñ©ó¥u¦³¤@±iºô¥d¡A
¤£½×CentOS¥»¨¡A©Î¬OOpenStack¤¤ªºpublic/privateºô¸ôÀô¹Ò¡A³£·|³z¹L³o±iºô¥d³s¥~¡A
¬°¤FÅý³o¦h«ºô¥d§ÎºA¯à°÷¥¿±`¹B§@¡A©Ò¥H¥²»Ý§â³o±iºô¥d¥Ñì¨ÓªºEthernet¼Ò¦¡§ï¬°Bridge¼Ò¦¡¡A
§_«h¥u¦³CentOS¥»¨ªººô¸ô·|³q¡A¨ä¥¦OpenStack¤¤ªºµêÀÀºô¬q³£µLªk¥¿±`ªº¹ï¥~¹B§@¡C
OpenVSwitch (OVS)ªº·§©À¶¶¤lÁÙ¤£¬O«ÜÀ´¡A¦b³oùؤ£»~¾É¤j®a¡A
¶È±N³]©w¤è¦¡°O¿ý¦p¤U¡A¨Ñ¤j®a°Ñ¦Ò¡ã
קïºô¥d¬°Bridge modeªº¤è¦¡¦p¤U¡C
- ¥ý±N쥻ªº ensXX ºô¥d½Æ»s¤@¥÷¬° br-ex °µ¬°¾ô±µ¥DÅé¡C
cd /etc/sysconfig/network-scripts/
cp ifcfg-ensXX ifcfg-br-ex
- µM«á×¥¿ ifcfg-br-ex ªººô¥d¤º®e¬°¦p¤U(¬õ¦r)¡C
TYPE="OVSBridge"
DEVICETYPE="ovs"
BOOTPROTO="static"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
NAME="br-ex"
DEVICE="br-ex"
ONBOOT="yes"
IPADDR="192.168.0.92"
PREFIX="24"
GATEWAY="192.168.0.254"
DNS1="8.8.8.8"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_PRIVACY="no"
ºô¥d¤¤ªºUUID³o¨Ç³]©w´N¤£¥Î«O¯d¤F...
- ±µµÛקï ensXX ¬°OVSPort¡A¶È»Ý¯d¤U¥H¤U³]©w¤º®e¡C
TYPE="OVSPort"
DEVICETYPE="ovs"
OVS_BRIDGE="br-ex"
BOOTPROTO="none"
NAME="ensXX"
DEVICE="ensXX"
ONBOOT="yes"
- ³Ì«á¦A«±Òºô¥dªA°È¡C
systemctl restart network
¦¨¥\ªº¸Ü¡A¥Hifconfig¥hÀ˵ø·|¬Ý¨ìÃþ¦ü¦p¤Uªº¤º®e¡C
Y¥¢±Ñºô¥d¥¢¯àªº¸Ü¡A½Ð¦^ÀYÀˬdºô¥d³]©wÀɪº¤º®e¬O§_¥¿½T©Î¦³©Ò¿òº|¡C
|
|
♥¶¶¤l¦Ñ±Cªººô©ç¡A½Ð¦hÃö·Ó¡ã
If you don't like something, change it.
If you can't change it, change your attitude.
Don't complain!
|