Shunze ¾Ç¶é >¹q¸£¸ê°T¾Ç¨t >OpenStack > ¡m¤@¡nOpenStack allinone¤Jªù¦w¸Ë «¢Åo¡AÁÙ¨S¦³µù¥U©ÎªÌµn¤J¡C½Ð§A[µù¥U|µn¤J]
¤U¤@½g¥DÃD » Åã¥Ü¦¨¦C¦L¼Ò¦¡ | ¼W¥[¨ì§Úªº³Ì·R
µoªí·s¥DÃD µoªí¦^ÂÐ
§@ªÌ
¥DÃD
shunze
¤u¤Í§B§B


µù¥U¤é´Á: 2002 04
¨Ó¦Û: ¼é¦Á²×¤î¤§¦a
¤å³¹: 2380

shunze Â÷½u
¡m¤@¡nOpenStack allinone¤Jªù¦w¸Ë¤Þ¥Î¦^ÂÐ ½s¿è/§R°£¤å³¹ ·j´M¥Ñ  µoªíªº¨ä¥L¤å³¹ ¦^³øµ¹ª©¥D IP ¦ì¸m ¦^¦¹­¶³Ì¤W¤è

OpenStack¬O¤@®Mopen sourceªº¨p¦³¶³¨t²Î¡A¥Ñ7­Ó¥D­n¬ÛÃö®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¥u­n20¤ÀÄÁ¡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
    ©Ò¥H­n°±¥Î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
    1. ¥ý±N­ì¥»ªº ensXX ºô¥d½Æ»s¤@¥÷¬° br-ex °µ¬°¾ô±µ¥DÅé¡C
      cd /etc/sysconfig/network-scripts/
      cp ifcfg-ensXX ifcfg-br-ex

    2. µ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...

    3. ±µµÛ­×§ï 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"


    4. ³Ì«á¦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!




2016-03-28, 11:31 shunze ªº­Ó¤H¸ê®Æ §â shunze ¥[¤J¦n¤Í¦Cªí µo°eEmailµ¹ shunze ÂsÄý shunze ªººô¯¸ MSN : shunze@gmail.com
  ¤U¤@½g¥DÃD »
µoªí·s¥DÃD µoªí¦^ÂÐ
¸õ¨ì:

Powered by: Burning Board 1.1.1 2001 WoltLab GbR