Ubuntu系统上All-in-one部署OpenStack

简介: 虚拟机软件:VMware Workstaion12操作系统:Ubuntu14.041、修改Ubuntu14.04的apt源为国内的阿里源:cp /etc/apt/sources.list /etc/apt/sources.

虚拟机软件:VMware Workstaion12

操作系统:Ubuntu14.04

1、修改Ubuntu14.04的apt源为国内的阿里源:

cp /etc/apt/sources.list /etc/apt/sources.list.back
vi /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ raring main restricted universe multiverse  
deb http://mirrors.aliyun.com/ubuntu/ raring-security main restricted universe multiverse  
deb http://mirrors.aliyun.com/ubuntu/ raring-updates main restricted universe multiverse  
deb http://mirrors.aliyun.com/ubuntu/ raring-proposed main restricted universe multiverse  
deb http://mirrors.aliyun.com/ubuntu/ raring-backports main restricted universe multiverse  
deb-src http://mirrors.aliyun.com/ubuntu/ raring main restricted universe multiverse  
deb-src http://mirrors.aliyun.com/ubuntu/ raring-security main restricted universe multiverse  
deb-src http://mirrors.aliyun.com/ubuntu/ raring-updates main restricted universe multiverse  
deb-src http://mirrors.aliyun.com/ubuntu/ raring-proposed main restricted universe multiverse  
deb-src http://mirrors.aliyun.com/ubuntu/ raring-backports main restricted universe multiverse

注:若出现:W: Unknown Multi-Arch type 'no' for package 'compiz-core'则说明ubuntu版本与apt版本不匹配,所以升级一下apt版本就行

apt-get install -f apt

配置DNS服务器:

vi /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4

更新软件源和软件:

apt-get update
apt-get upgrade

2、配置网络接口:

vim /etc/network/interfaces
auto ens33
iface ens33 inet static
address 192.168.213.131
netmask 255.255.255.0
gateway 192.168.213.2
dns-nameserver 192.168.213.2

3、安装pip并修改pip源:

apt-get install python-pip
mkdir ~/.pip
vi ~/.pip/pip.conf

添加

[global]
index-url = http://pypi.douban.com/simple/
trusted-host = pypi.douban.com

4、安装git:

apt-get install git

5、下载Devstack:

git clone http://git.trystack.cn/openstack-dev/devstack.git -b stable/ocata

6、创建stack用户:

devstack/tools/create-stack-user.sh
mv devstack /opt/stack
chown -R stack:stack /opt/stack/devstack

7、切换到stack用户并修改pip源:

su stack
mkdir ~/.pip
vi ~/.pip/pip.conf

添加

[global]
index-url = http://pypi.douban.com/simple/
trusted-host = pypi.douban.com

8、设置Devstack配置文件:

cd /opt/stack/devstack
vi local.conf
[[local
|localrc]] # Credentials ADMIN_PASSWORD=admin MYSQL_PASSWORD=secret RABBIT_PASSWORD=secret SERVICE_PASSWORD=secret SERVICE_TOKEN=abcdefghijklmnopqrstuvwxyz # use TryStack git mirror GIT_BASE=http://git.trystack.cn NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git HOST_IP=192.168.213.131
# Define images to be automatically downloaded during the DevStack built process. DOWNLOAD_DEFAULT_IMAGES
=False IMAGE_URLS=http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
# only support IP v4 SERVICE_IP_VERSION
=4 # only support keystone v2 ENABLE_IDENTITY_V2=True
#not create default network NEUTRON_CREATE_INITIAL_NETWORKS
=False # instead of default network FLOATING_RANGE="192.168.213.0/24" FIXED_RANGE="10.0.0.0/24" Q_FLOATING_ALLOCATION_POOL=start=192.168.213.132,end=192.168.213.150 PUBLIC_NETWORK_GATEWAY="192.168.213.2"
# Branches KEYSTONE_BRANCH
=stable/ocata NOVA_BRANCH=stable/ocata NEUTRON_BRANCH=stable/ocata SWIFT_BRANCH=stable/ocata GLANCE_BRANCH=stable/ocata CINDER_BRANCH=stable/ocata
# Enabling Neutron (network) Service 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 q-metering enable_service neutron # VLAN configuration. Q_PLUGIN=ml2 ENABLE_TENANT_VLANS=True TENANT_VLAN_RANGE=1100:2999
#Logging LOGFILE
=/opt/stack/logs/stack.sh.log VERBOSE=True LOG_COLOR=True SCREEN_LOGDIR=/opt/stack/logs
# Work offline #OFFLINE
=True # Reclone each time RECLONE=no

9、开始部署:

./stack.sh

若安装失败,则执行./unstack.sh脚本和./clean.sh脚本,并重复上一步骤。

本文为博主原创文章,未经允许不得转载。转载请注明出处:https://www.cnblogs.com/lijinze-tsinghua/

目录
相关文章
|
1月前
|
Ubuntu Linux 测试技术
Linux系统之Ubuntu安装cockpit管理工具
【10月更文挑战第13天】Linux系统之Ubuntu安装cockpit管理工具
131 4
Linux系统之Ubuntu安装cockpit管理工具
|
1月前
|
Ubuntu 测试技术 网络安全
Ubuntu系统下部署flatpress轻量级博客系统
【10月更文挑战第3天】Ubuntu系统下部署flatpress轻量级博客系统
49 3
Ubuntu系统下部署flatpress轻量级博客系统
|
28天前
|
Ubuntu 编译器 计算机视觉
Ubuntu系统编译OpenCV4.8源码
【10月更文挑战第17天】只要三步即可搞定,第一步是下载指定版本的源码包;第二步是安装OpenCV4.8编译需要的编译器与第三方库支持;第三步就是编译OpenCV源码包生成安装文件并安装。
|
1月前
|
Ubuntu Linux Python
Ubuntu学习笔记(六):ubuntu切换Anaconda和系统自带Python
本文介绍了在Ubuntu系统中切换Anaconda和系统自带Python的方法。方法1涉及编辑~/.bashrc和/etc/profile文件,更新Anaconda的路径。方法2提供了详细的步骤指导,帮助用户在Anaconda和系统自带Python之间进行切换。
86 1
|
21天前
|
消息中间件 Ubuntu Java
Ubuntu系统上安装Apache Kafka
Ubuntu系统上安装Apache Kafka
|
1月前
|
Ubuntu API Python
Chat-TTS chat-tts-ui 实机部署上手测试!Ubuntu服务器实机 2070Super*2 8GB部署全流程
Chat-TTS chat-tts-ui 实机部署上手测试!Ubuntu服务器实机 2070Super*2 8GB部署全流程
68 1
|
1月前
|
Ubuntu Shell API
Ubuntu 64系统编译android arm64-v8a 的openssl静态库libssl.a和libcrypto.a
Ubuntu 64系统编译android arm64-v8a 的openssl静态库libssl.a和libcrypto.a
|
网络协议 Linux 网络安全
openstack 云平台一体化部署(超详细)
openstack 云平台一体化部署(超详细)
1279 0
openstack 云平台一体化部署(超详细)
|
3月前
|
消息中间件 缓存 Shell
跟我一起来学OpenStack部署
跟我一起来学OpenStack部署
297 0
|
4月前
|
存储 数据安全/隐私保护 Docker
Kolla-ansible部署openStack
Kolla-ansible部署openStack
416 11