PS:学习http://www.cnblogs.com/CloudMan6/的笔记
1、网络拓扑
2、Controller节点主机配置
4G内存,80G硬盘,三个网卡:bridged、internal network、host-only
bridged ----连接API及管理网络,上网
internal network ----连接租户网络,保证controller和compute的通信
host-only ----连接外网
3、OS安装
ubuntu-16.04.1-server-amd64,安装ssh和kvm(openssh-server和virtual machine host)组件
4、OS配置
- 允许root远程登录
vi /etc/ssh/sshd_configPermitRootLogin yessystemctl restart sshd.service ---重启SSH服务
- 网卡配置
vi /etc/network/interfacesauto enp0s3iface enp0s3 inet staticaddress 192.168.104.10netmask 255.255.255.0gateway 192.168.104.1dns-nameservers 192.168.104.1auto enp0s8iface enp0s8 inet manualauto enp0s9iface enp0s9 inet manualsystemctl restart networking.service ---重启网络服务
- 更改apt源并进行update
vi /etc/apt/sources.listdeb http://mirrors.163.com/ubuntu/ xenial main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ xenial-security main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ xenial-updates main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ xenial-proposed main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ xenial-backports main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ xenial main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ xenial-security main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ xenial-updates main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ xenial-proposed main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ xenial-backports main restricted universe multiverseapt-get updateapt-get clean
5、部署openstack
- 安装pip
apt install python-pip
- 下载openstack至/root/目录
git clone https://git.openstack.org/openstack-dev/devstack -b stable/newton
- 创建stack用户
/root/devstack/tools/create-stack-user.sh ---创建用户
- 配置pip,为root用户及stack用户设置国内镜像源
root用户下执行mkdir ~/.pip&&vi ~/.pip/pip.conf,将如下内容粘贴进入
stack用户下执行mkdir ~/.pip&&vi ~/.pip/pip.conf,将如下内容粘贴进入
[global]index-url = https://pypi.douban.com/simpledownload_cache = ~/.cache/pip[install]use-mirrors = truemirrors = http://pypi.douban.com/
- 配置local.conf
mv /root/devstack/ /opt/stack/ ----将root/devstack移动至stack用户目录
chown stack:stack /opt/stack/devstack -----文件夹权限修改
vi /opt/stack/devstack/local.conf,将如下内容粘贴进去
# more /opt/stack/devstack/local.conf[[local|localrc]]MULTI_HOST=true# management & api networkHOST_IP=192.168.104.10LOGFILE=/opt/stack/logs/stack.sh.log# CredentialsADMIN_PASSWORD=adminMYSQL_PASSWORD=secretRABBIT_PASSWORD=secretSERVICE_PASSWORD=secretSERVICE_TOKEN=abcdefghijklmnopqrstuvwxyz# enable neutron-ml2-vlandisable_service n-netenable_service q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron,q-lbaas,q-fwaasQ_AGENT=linuxbridgeENABLE_TENANT_VLANS=TrueTENANT_VLAN_RANGE=3001:4000PHYSICAL_NETWORK=defaultLOG_COLOR=TrueLOGDIR=$DEST/logsSCREEN_LOGDIR=$LOGDIR/screen# use TryStack git mirrorGIT_BASE=http://git.trystack.cnNOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.gitSPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git
- 执行安装脚本
/opt/stack/devstack/stack.sh ---需N多次执行才可以完成安装
- 完成安装界面
6、安装过程中遇到的问题
因PC断电安装中断,电源恢复后继续执行stack.sh,提示mysql密码错误,无法继续,通过修改mysql root密码及重装mysql均未解决,最后通过重装操作系统,完成全部安装。
关于mysql密码错误的问题,待解决后再修正此笔记。