¡m¤À¨É¡nUbuntu³z¹LDevStack¨Ó¦w¸ËOpenStack | |
¦bCentOS 7¤W¦¨¥\¦w¸ËOpenStack«á¡A¯à§_¦bUbuntu 14.04¤W¤]§âOpenStack¸Ë°_¨Ó¡I¡H
¦bºô¸ô¤W·j´M«áµo²{¡AUbuntu¤W¥i³z¹LDevStack¦w¸Ë¥]¨Ó¦w¸ËOpenStack¡C
ªá¤FÂI®É¶¡´ú¸Õ«á¡A¦n¤£®e©ö§âOpenStack¸Ë°_¨Ó¡A
¤£¹L¡A³z¹L³oÓ¦w¸Ë¥]¦w¸Ë¦nOpenStack«á¦³ÓP©Rªº°ÝÃD¡A
¨º´N¬O «¶}¾÷«á¡AOpenStackªººô¸ôªA°È·|¦³°ÝÃD¡AµLªk¶¶§Q¹B§@¡A
¥B¤w«Ø¥ßªºinstance·|¤£¨£¡I
¾Ú»¡ì©l¦w¸Ë¥]¤¤ÁÙ¦³ rejoin_stack.sh ³o¤äscript¡A
¯à¦b«¶}¾÷«á¡A«ì´_OpenStack©Ò¦³ªA°Èªº¥¿±`¹B§@¡I
¦Ó²{¦bªº¦w¸Ë¥]ùØ¡A¤w¸g¨S¦³³o¤äscript¡C
³o¨Ã¤£¬Obug¡A¦Ó¬O¶}µo¤p²Õ»{¬°³o¤äscriptµLªk¾A¥Î©ó¦UºØ±¡§Î¡A
¦Ó¥B¦³¥i¯à·|¯}Ãa¨ä¥¦¥\¯à¡A©Ò¥H§â¥¦¦Û¦w¸Ë¥]¤¤²¾°£¤F...
¦ýºô¸ô¤W¤]§ä¤£¨ìÅýOpenStack«ì´_¥¿±`¹B§@ªº¤èªk¡I¡H
©Ò¥HnÅéÅç¬Ý¬Ý¦p¦ó¦bUbuntu¤W¦w¸ËOpenStack¬O¥i¥Hªº¡A
¤£¹Ln¤p¤ß³á¡A«¶}¾÷«á¥i¬O·|Åý±z¶Ì²´ªº¡I
(¯uªºn¦n¦nÅéÅçOpenStack¡AÁÙ¬O¦bCentOS 7¤W³z¹LRDO¦w¸Ë¥]¨Ó¶i¦æ§a¡ã)
¦w¸ËÀô¹Ò
¦p¦P¥ý«eCentOS 7¤¤ªºÀô¹Ò¤@¯ë¡A¦P¼Ë«Ø¸m©óµêÀÀ¾÷¤W°µ´ú¸Õ
°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µ¹¨p¦³¶³ùتºInstance¨Ï¥Î
¥H¤U¬°¦w¸Ëµ§°O¡C
- ±Nºô¥d³]©w¬°¾ô±µ¼Ò¦¡
¦]¬°¦w¸ËÀô¹Ò¬°³æ¤@¤@±iºô¥d¡A©Ò¥H¸òCentOS 7¨º½gªº³]©w¬Û¦P¡An§â³o±i eth0 ªººô¥d³]©w¬°¾ô±µ¼Ò¦¡¡A
Åýpublic»Pprivateºô¬q«Ê¥]³£¯à©ó¦¹±iºô¥d¤¤¹B¦æ¡C
¤Á´«¨ìrootÅv¡A©óºô¥d³]©w¤¤¡A±Neth0§ï¬°manual¡A¨Ã¥[¤Jbridgeºô¥dbr-exªºIP³]©w¡C
sudo -s -H
vim /etc/network/interfaces
# The primary network interface
auto eth0
iface eth0 inet manual
# Open vSwitch
auto br-ex
iface br-ex inet static
address 192.168.0.92
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.254
dns-nameservers 8.8.8.8
ovs_type OVSBridge
ovs_ports eth0
¦w¸Ëopenvswitch-switch®M¥ó
apt-get install openvswitch-switch
ovs-vsctl add-br br-ex
ovs-vsctl add-port br-ex eth0
Y¬O¥HSSH³s½u¨ìUbuntu¡A¦b³o¦æ¥[¤J«áºô¸ô´N·|Â_½u¡A
½Ð¥Hconsoleµn¤J«á¡A«±Ò¹q¸£¡A³o¼Ëºô¥dªº¾ô±µ¥\¯à´Nµo´§®ÄªG¡C
¥i¥H¥H¤U«ü¥O¬d¬Ýºô¥d¾ô±µª¬ºA¡C
sudo -s -H
ovs-vsctl show
ifconfig
- ¦w¸Ëª`·N¨Æ¶µ
DevStack¦b¦w¸Ë®É¡A¥²»Ý¨Ï¥Î¨ãsudoÅvªº¤@¯ë±b¸¹¡A
Yª½±µ¥HrootÅv¦w¸Ë·|µo¥Íĵ§i´£¥Ü¦Ó¤¤¤î¡C
¾ãÓ¦w¸Ë¹Lµ{¡A½Ð¥H¤@¯ë±b¸¹¨Ó¶i¦æ¡A
»ÝrootÅv®É¡A¦A³z¹Lsudo«ü¥O¨Ó´£¤ÉÅv¡A
§_«h«Ü®e©ö¥X²{¸ê®Æ§¨Åvªº°ÝÃD¦Ó¥¢±Ñ¡I
- ³z¹Lgit«ü¥O¤U¸üDevStack¦w¸Ë¥]
¥H¨ãsudoÅvªº¤@¯ë±b¸¹¨Ó¶i¦æ¾Þ§@(¶¶¤l«Ø¥ßªº±b¸¹¬Oshunze)¡C
º¥ý¤U¸ügit®M¥ó¡AµM«á³z¹Lgit«ü¥O±qgithub¤W§âDevStackªº¦w¸Ë¥]¤U¸ü¤U¨Ó¡C
sudo apt-get install git
git clone https://github.com/openstack-dev/devstack.git
±µµÛ¤Á´«¨ìdevstack¥Ø¿ý¡A·Ç³Æ¶}©l¦w¸Ë¡C
cd devstack
- ³]©w¦w¸Ë°Ñ¼ÆÀÉlocal.conf
³z¹Ldevstack¥Ø¿ý¤Uªºscript stack.sh ¦w¸Ë«e¡A½Ð¥ý¶i¦æ«Ø¥ß°Ñ¼ÆÀÉ local.conf¡C
Y¤£«Ø¥ß¦¹°Ñ¼ÆÀÉ¡A¹w³]ªº¦w¸Ë±¡¹Ò·|¤Ö¤Fºô¸ô¥\¯à¡C
¤Ö¤Fºô¸ô¥\¯à¥i¬OµLªkÅéÅçOpenStack public/privateªººô¸ôÃö«Y³á¡I
vim local.conf
[[local|localrc]]
# Credentials
DATABASE_PASSWORD=password
ADMIN_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=password
RABBIT_PASSWORD=password
# swift
enable_service s-proxy s-object s-container s-account
# Neutron
enable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service q-metering
# Ceilometer
# Enable the ceilometer metering services
enable_service ceilometer-acompute ceilometer-acentral ceilometer-anotification ceilometer-collector
# Enable the ceilometer alarming services
enable_service ceilometer-alarm-evaluator ceilometer-alarm-notifier
# Enable the ceilometer api services
enable_service ceilometer-api
- ¶}©l¦w¸Ëopenstack
°Ñ¼ÆÀɫإ߫á¡A³z¹Ldevstack¥Ø¿ý¤Uªº stack.sh script¶}©l¦w¸Ë¡C
./stack.sh
¦w¸Ë®É¡A·|°ÝRANDOM SWIFT HASHªº±K½X¡A«öEnterÅý¥¦°Ñ¥Í¤@ӶüƱK½X§Y¥i¡C
¥H¶¶¤lªº¹q¸£®Ä¯à³Æ°t¡A¦w¸Ë¨ì¦n®t¤£¦h¥b¤p®É¡A
¥i¥H¥ý¥h°µ¨ä¥¦¨Æ¡A¥b¤p®É«á¦A¨Ó¬Ý¦w¸Ë¶i«×¡C
¦w¸Ë§¹¦¨«á·|¥X²{¥H¤U°T®§¡A§iª¾Àô¹Ò³]©w¬ÛÃö¸ê°T¡A
±µµÛ´N¥i¥H³z¹LÂsÄý¾¹¨Óµn¤JOpenstack¤F¡ã
- µn¤JOpenStack½Õ®Õ¨t²ÎÀô¹Ò
¹w³]ªºµn¤J±b¸¹¤@¼Ë¤º«Ø¤Fadmin»Pdemo¨âÓ±b¸¹¡A
±b¸¹ªº±K½X´N¬O°Ñ¼ÆÀÉlocal.conf¤¤ªº ADMIN_PASSWORD °Ñ¼ÆÈ¡C
¥Hadmin±b¸¹³z¹LÂsÄý¾¹¨Óµn¤JOpenStack«á¡A´N¥i¥H¶}©l½Õ¾ã³]©w¡C
¤¶±¸òCentOS³z¹LRDO¦w¸Ë¥]©Ò¸Ë¦nªºOpenStack¦³¤@¨Ç¤£¦P¡A¦ý¸Ó¦³ªº¡A°ò¥»¤W³£ÁÙ¬O¦³¡C
¹w³]ªºpublicºô¬q¬O172.24.4.0/24¡Aprivateºô¬q¬O10.0.0/24¡A
¥i¥H°Ñ¦Ò¶¶¤lOpenStackªº¨ä¥¦¤å³¹¨Óקïºô¬q»P«Ø¥ßinstance¡C
¡m¤T¡nקïpublic¹ï¥~ºô¬q
¡m¥|¡n«Ø¥ßInstanceªº«e¸m§@·~
¡m¤¡n«Ø¥ß²Ä¤@ÓInstance
¦b½Õ¾ã¦npublicºô¬q¡Brouter»P¦w¥þ©Ê°t¸m¡A¨ÃÁpµ²¦n¯B°ÊIP«á¡A
Instance¤£¶È¥i¥H³s¥~¡A¤]¥i¥H³z¹Lpublic¶i¦æºÞ²z¡A
¸ò³z¹LRDO©Ò«ØªºOpenStack¬O§¹¥þ¤@¼Ëªº¡ã
¥Ñ©ó«¶}¾÷«á¡AOpenStack´N¤äÂ÷¯}¸H¤F¡I
©Ò¥H¶¶¤l¤]¨S¥´ºâªá¤Ó¦h¤ß«ä¦b³o...
Ubuntu³z¹LDevStack¦w¸Ë¥]¦w¸ËOpenStackªº¤¶²Ð´N¨ì¦¹§i¤@¬q¸¨¡ã
|
|
♥¶¶¤l¦Ñ±Cªººô©ç¡A½Ð¦hÃö·Ó¡ã
If you don't like something, change it.
If you can't change it, change your attitude.
Don't complain!
|