Ubuntu14.04下安装DevStack

  • 下载DevStack
  • git clone https://github.com/openstack-dev/devstack.git

     

  • 更改pip源
  • #vim ~/.pip/pip.conf 
    [global] 
    index-url = http://pypi.douban.com/simple 

     

  • 更改devstack/local.conf
  • #Header
    [[local|localrc]]
    
    # Credentials
    ADMIN_PASSWORD=openstack
    MYSQL_PASSWORD=$ADMIN_PASSWORD
    #DATABASE_PASSWORD=$ADMIN_PASSWORD
    RABBIT_PASSWORD=$ADMIN_PASSWORD
    SERVICE_PASSWORD=$ADMIN_PASSWORD
    SERVICE_TOKEN=$ADMIN_PASSWORD
    
    # Branches
    NOVA_BRANCH=stable/icehouse
    KEYSTONE_BRANCH=stable/icehouse
    NEUTRON_BRANCH=stable/icehouse
    GLANCE_BRANCH=stable/icehouse
    CINDER_BRANCH=stable/icehouse
    SWIFT_BRANCH=stable/icehouse
    HEAT_BRANCH=stable/icehouse
    TROVE_BRANCH=stable/icehouse
    HORIZON_BRANCH=stable/icehouse
    CEILOMETER_BRANCH=stable/icehouse
    
    #Network Configuration:
    #FLOATING_RANGE=172.16.91.0/24
    #FIXED_RANGE=10.11.12.0/24
    HOST_IP=172.16.3.15
    
    # Services
    ENABLED_SERVICES=rabbit,mysql,key
    ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch,n-novnc,n-cauth
    
    ENABLED_SERVICES+=,s-proxy,s-object,s-container,s-account
    ENABLED_SERVICES+=,g-api,g-reg
    ENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch,c-bak
    
    #Trove
    ENABLED_SERVICES+=,trove,tr-api,tr-tmgr,tr-cond
    ENABLED_SERVICES+=,horizon
    
    #Ceilometer
    ENABLED_SERVICES+=,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api
    ENABLED_SERVICES+=,ceilometer-alarm-notify,ceilometer-alarm-eval
    
    #Heat
    ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng
    IMAGE_URLS+=",http://fedorapeople.org/groups/heat/prebuilt-jeos-images/F19-x86_64-cfntools.qcow2"
    
    #Neutron
    disable_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 neutron
    
    # Neutron - Load Balancing
    ENABLED_SERVICES+=,q-lbaas
    
    # Neutron - VPN as a Service
    ENABLED_SERVICES+=,q-vpn
    
    # Neutron - Firewall as a Service
    ENABLED_SERVICES+=,q-fwaas
    
    # VLAN configuration
    Q_PLUGIN=ml2
    ENABLE_TENANT_VLANS=True
    
    # GRE tunnel configuration
    Q_PLUGIN=ml2
    ENABLE_TENANT_TUNNELS=True
    
    # VXLAN tunnel configuration
    Q_PLUGIN=ml2
    Q_ML2_TENANT_NETWORK_TYPE=vxlan
    
    # Images
    # Use this image when creating test instances
    IMAGE_URLS+=",http://cdn.download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img"
    
    #Swift Requirements
    SWIFT_REPLICAS=1
    SWIFT_HASH=011688b44136573e209e
    
    # Enable Logging
    LOGFILE=/opt/stack/logs/stack.sh.log
    VERBOSE=True
    LOG_COLOR=True
    SCREEN_LOGDIR=/opt/stack/logs

     

  • 由于网络问题,手动下载OpenStack组件源码
  • sudo git clone git://git.openstack.org/openstack/nova.git /opt/stack/nova -b stable/icehouse
    sudo git clone git://git.openstack.org/openstack/glance.git /opt/stack/glance -b stable/icehouse
    sudo git clone git://git.openstack.org/openstack/cinder.git /opt/stack/cinder -b stable/icehouse
    sudo git clone git://git.openstack.org/openstack/horizon.git /opt/stack/horizon -b stable/icehouse
    sudo git clone git://git.openstack.org/openstack/keystone.git /opt/stack/keystone -b stable/icehouse
    sudo git clone git://git.openstack.org/openstack/neutron.git /opt/stack/neutron -b stable/icehouse
    sudo git clone git://git.openstack.org/openstack/swift.git /opt/stack/swift -b stable/icehouse
    sudo git clone git://git.openstack.org/openstack/heat.git /opt/stack/heat -b stable/icehouse
    sudo git clone git://git.openstack.org/openstack/ceilometer.git /opt/stack/ceilometer -b stable/icehouse   
  • 创建stack用户/组
  • #cd devstack/tools
    #./devstack/tools/create-stack-user.sh

     

  • 修改/opt/stack用户/组
  • #chown -R stack:stack /opt/stack

     

  • 执行stack.sh
  • #su stack
    #./stack.sh

     

 

 

 

posted @ 2014-06-20 10:18  JimMoriarty  阅读(4228)  评论(2编辑  收藏  举报