OpenStack中magnum组件安装

OpenStack中magnum组件安装

以下命令建议在干净的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.
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文件中所有的git协议换成https协议,因为有墙
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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值