centos7使用devstack安装openstack mitaka

来源:互联网 发布:java oa系统源码 编辑:程序博客网 时间:2024/05/17 01:24
1.cd /home/lk

   git clone -b stable/mitaka https://git.openstack.org/openstack-dev/devstack

yum -y install gcc

2.为避免网络的各种问题浪费时间,提前把各种所需包下载到本地:

   mkdir /opt/stack

   chown -R lk:lk /opt/stack

   cd /opt/stack

   git clone -b stable/mitaka https://github.com/openstack/nova.git
   git clone -b stable/mitaka https://github.com/openstack/cinder.git
   git clone -b stable/mitaka https://github.com/openstack/glance.git
   git clone -b stable/mitaka https://github.com/openstack/heat.git
   git clone https://github.com/openstack/heat-cfntools.git
   git clone https://github.com/openstack/heat-templates.git
   git clone -b stable/mitaka https://github.com/openstack/horizon.git
   git clone -b stable/mitaka https://github.com/openstack/keystone.git
   git clone -b stable/mitaka https://github.com/openstack/neutron.git
   git clone https://github.com/kanaka/noVNC.git
   git clone -b stable/mitaka https://github.com/openstack/requirements.git
   git clone -b stable/mitaka https://github.com/openstack/swift.git

   git clone https://github.com/openstack/os-apply-config.git

   git clone https://github.com/openstack/os-collect-config.git

   git clone https://github.com/openstack/os-refresh-config.git

   git clone https://github.com/openstack/dib-utils.git

   git clone https://github.com/openstack/tempest

3.cd /home/lk/devstack

   ./stack.sh


遇到的问题:
1.Redirecting to /bin/systemctl start  tgtd.service  Failed to start tgtd.service: Unit tgtd.service failed to load: No such file or directory.

解决方法:

   手动安装:tgtd.service

yum --enablerepo=epel -y install scsi-target-utils

systemctl enable tgtd


2.[ERROR] /home/lk/devstack/tools/install_pip.sh:76 Download of get-pip.py failed

解决办法:

   修改pip源:

vim localrc

USER_DIR=/home/lk
if [[ -d $USER_DIR/.pip/ ]]; then
    rm -rf $USER_DIR/.pip/
fi
mkdir $USER_DIR/.pip
touch $USER_DIR/.pip/pip.conf
echo [global] >> $USER_DIR/.pip/pip.conf
echo index-url=http://pypi.douban.com/simple/ >> $USER_DIR/.pip/pip.conf
echo [install] >> $USER_DIR/.pip/pip.conf
echo trusted-host=pypi.douban.com >> $USER_DIR/.pip/pip.conf
export PIP_CONFIG_FILE=$USER_DIR/.pip/pip.conf




附我的localrc:

 PASSWORD=123456
DATABASE_PASSWORD=$PASSWORD
RABBIT_PASSWORD=$PASSWORD
SERVICE_TOKEN=$PASSWORD
SERVICE_PASSWORD=$PASSWORD
ADMIN_PASSWORD=$PASSWORD

USER_DIR=/home/lk
if [[ -d $USER_DIR/.pip/ ]]; then
    rm -rf $USER_DIR/.pip/
fi
mkdir $USER_DIR/.pip
touch $USER_DIR/.pip/pip.conf
echo [global] >> $USER_DIR/.pip/pip.conf
echo index-url=http://pypi.douban.com/simple/ >> $USER_DIR/.pip/pip.conf
echo [install] >> $USER_DIR/.pip/pip.conf
echo trusted-host=pypi.douban.com >> $USER_DIR/.pip/pip.conf
export PIP_CONFIG_FILE=$USER_DIR/.pip/pip.conf

NOVA_BRANCH=stable/mitaka
KEYSTONE_BRANCH=stable/mitaka
NEUTRON_BRANCH=stable/mitaka
GLANCE_BRANCH=stable/mitaka
CINDER_BRANCH=stable/mitaka
SWIFT_BRANCH=stable/mitaka
HEAT_BRANCH=stable/mitaka
TROVE_BRANCH=stable/mitaka
HORIZON_BRANCH=stable/mitaka


## For Keystone
#KEYSTONE_TOKEN_FORMAT=PKI

# Enable Logging
LOGFILE=/opt/stack/logs/stack.sh.log
VERBOSE=True
LOG_COLOR=True
SCREEN_LOGDIR=/opt/stack/logs

# Pre-requisite
ENABLED_SERVICES=rabbit,mysql,key

# Horizon (Dashboard UI) - (always use the trunk)
ENABLED_SERVICES+=,horizon

# Nova - Compute Service
ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch,n-novnc,n-cauth

# Glance - Image Service
ENABLED_SERVICES+=,g-api,g-reg

# Neutron - Networking Service
# If Neutron is not declared the old good nova-network will be used
ENABLED_SERVICES+=,q-svc,q-meta,q-agt,q-dhcp,q-l3,neutron

# Cinder - Block Device Service
VOLUME_GROUP="cinder-volumes"
ENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch


# Heat - Orchestration Service
ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng

# Apache fronted for WSGI
APACHE_ENABLED_SERVICES+=keystone,swift

RECLONE=no      # Reclone each time
OFFLINE=false   # Python enviroments

#GIT_BASE=https://github.com
#IMAGE_URLS+=,https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img
SWIFT_HASH=123456

0 0
原创粉丝点击