您的位置:首页 > 运维架构

使用devstack安装OpenStack

2016-05-13 10:22 441 查看
以下命令建议在干净的OS上操作,因为devstack使用的都是最新的环境依赖。不然安装过程中会出现版本不匹配问题

1.安装所需OS环境

sudo apt-get update

sudo apt-get install -y python-dev libssl-dev libxml2-dev \

libmysqlclient-dev libxslt-dev libpq-dev git \

libffi-dev gettext build-essential
2.安装python包管理工具

apt-get install python-pip
3.安装通用环境

apt-get install python-virtualenv python-flake8 python-tox testrepository git-review
4.git软件源

cd ~

git clone https://git.openstack.org/openstack/magnum
cd magnum
5.使用tox进行所有单元测试()

# run all tests (unit and pep8)

tox

# run a specific test for Python 2.7

tox -epy27 -- test_conductor

# run all the Python 2.7 unit tests (in parallel!)

tox -epy27 -- --parallel

6.使用devstack安装

# Create a root directory for devstack if needed

sudo mkdir -p /opt/stack

sudo chown $USER /opt/stack

git clone https://git.openstack.org/openstack-dev/devstack /opt/stack/devstack
7.配置local.conf文件

#把stackrc文件中的http协议换成git协议,因为有墙

sed -i 's/git:\/\/git.openstack.org/https:\/\/git.openstack.org/g' stackrc

cat > /opt/stack/devstack/local.conf << END

[[local|localrc]]

DATABASE_PASSWORD=password

RABBIT_PASSWORD=password

SERVICE_TOKEN=password

SERVICE_PASSWORD=password

ADMIN_PASSWORD=password

# magnum requires the following to be set correctly

PUBLIC_INTERFACE=eth0

enable_plugin magnum https://git.openstack.org/openstack/magnum
# Enable barbican service and use it to store TLS certificates

# For details http://docs.openstack.org/developer/magnum/dev/dev-tls.html
enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer
enable_plugin barbican https://git.openstack.org/openstack/barbican 
VOLUME_BACKING_FILE_SIZE=20G

END
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  openstack magnum