打不开公式编辑器(公式编辑器用不了)
837
2022-05-29
2.1 硬件环境说明
服务器编号
CPU
内存 G
硬盘 G
RAID
001
2*E5-2403
32
2*300
RAID1
8 核、超线程
002
003
4*E7-4830
32
2*300
RAID1
8 核、超线程
004
4*≈840
RAID5
2.2 软件环境说明
查看硬件环境之上的系统版本和内核参数
# rpm -qa centos-release
centos-release-6.6.e16.centos.12.2.x86_64
# uname -a
Linux YUN-11 2.6.32-504.3.3.e16.x86_64 #1SMP Web Dec 17 01:55:02 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
2.3 网络规划和 IP 地址规划
服务器
主机名
角色
网卡信息
1U
YUN-10
YUM 源/ntp 服务器
eth0 192.168.0.100
eth1 10.0.0.10
浪潮服务器
YUN-11
控制节点
eth2 192.168.0.101
eth1 10.0.0.11
浪潮服务器
YUN-12
扩展节点
eth2 192.168.0.102
eth1 10.0.0.12
浪潮服务器
YUN-13
扩展节点
eth1 192.168.0.103
eth0 10.0.0.13
浪潮服务器
YUN-14
扩展节点
eth3 192.168.0.104
eth2 10.0.0.14
网关 192.168.0.1
掩码 255.255.255.0
ip:192.168.0.100-192.168.0.106
3 安装前准备
3.1 系统安装说明
说明一:
选择时区“亚洲-上海”
说明二:
分区时选择“Use All Space”
因为 OpenStack 云主机磁盘大小对应/ 分区的大小,另外 linux 分区默认情况下/home 分区比较大,而/ 分区太小,要按实际情况把/home分区调小,把/ 分区调大
说明三:
安装模式选择“Minimal”
3.2 主机配置
配置 1:网络配置
按照地址规划,给服务器配置相应的 IP 地址测试主机之间的连通状况
配置 2:hosts 文件配置
以主机 YUN-11 为例
# vi /etc/hosts
添加下面内容
127.0.0.1 YUN-11
其他主机依次做修改
3.3 YUM 源
3.3.1 软件网络源下载并处理
在一台可以连通网络的 linux 主机上下载网络软件源,因为网络软件源过大,所以这里要求 linux 主机磁盘不能太小(50G 以上就行),网速必须要快,在根目录下下载,因为安装是在 CentOS 发行版下进行,所以首先将 CentOS 的源拿到本地。
# wget -S -c -r -np -L http://mirrors.163.com/centos/6/--accept=rpm,gz,xml
下载 OpenStack-Icehouse 版本的包
# wget -c -r -np --reject=html,gif,A,D -nH http://repos.fedorapeople. org/repos/openstack/openstack-icehouse/epel-6/
下载 puppet 包
# wget -S -c -r -np -L https://yum.puppetlabs.com/el/6/.
下载 epel test 相关包
# wget -S -c -r -np -L http://dl.fedoraproject.org/pub/epel/testing/6/.
下载 epel 包
# wget -S -c -r -np -L http://dl.fedoraproject.org/pub/epel/6/.
下载 foreman 包
# wget -S -c -r -np -L http://yum.theforeman.org/plugins/1.5/el6/
# wget -S -c -r -np -L http://yum.theforeman.org/release/1.5/el6/
过程会持续很长时间
下载完成后需要删除安装过程用不着的软件
# cd /yum.puppetlabs.com/el/6/devel
# rm -rf SRPMS
# rm -rf i386
# cd /dl.fedoraproject.org/pub/epel/testing/6/
# rm -rf SRPMS
# rm -rf i386
# rm -rf ppc64
# cd /dl.fedoraproject.org/pub/epel/6/
# rm -rf SRPMS
# rm -rf i386
# rm -rf ppc64
# cd /yum.theforeman.org/plugins/1.5/el6/
# rm -rf source
# cd /yum.theforeman.org/release/1.5/el6/
# rm -rf source
3.3.2 配置软件源
在四个物理节点上做下列操作
# cd /etc/yum.repos.d
# mv CentOS-Base.repo CentOS-Base.repo.bak
上传 CentOS6-Base-163.repo 、 epel-release-6-8.noarch.rpm 和 rdo-release-icehouse-4.noarch.rpm 到该目录下
# rpm -ivh epel-release-6-8.noarch.rpm
# rpm -ivh rdo-release-icehouse-4.noarch.rpm
编辑目录下面的五个 repo 文件
# mv CentOS6-Base.repo CentOS-Base.repo
# vi CentOS-Base.repo
内容如下
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$bas
earch&repo=os
baseurl=http://192.168.0.100/mirror.centos.org/centos/$releasever/os/$
basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$bas
earch&repo=updates
baseurl=http://192.168.0.100/mirror.centos.org/centos/$releasever/upda
tes/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$bas
earch&repo=extras
baseurl=http://192.168.0.100/mirror.centos.org/centos/$releasever/extra
s/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages [centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$bas
earch&repo=centosplus
baseurl=http://192.168.0.100/mirror.centos.org/centos/$releasever/cent
osplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$bas
earch&repo=contrib
baseurl=http://192.168.0.100/mirror.centos.org/centos/$releasever/contr
ib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
# vi epel.repo
内容如下
[epel]
name=Epel Repository
baseurl=http://192.168.0.100/dl.fedoraproject.org/pub/epel/6/$basearch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
enabled=1
gpgcheck=0
[epel-testing]
name=Epel-testing Repository
baseurl=http://192.168.0.100/dl.fedoraproject.org/pub/epel/testing/6/$b
asearch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
enabled=1
gpgcheck=0
# vi foreman.repo
内容如下
[foreman]
name=Foreman stable
baseurl=http://192.168.0.100/yum.theforeman.org/releases/1.5/el6/x86_
64
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-foreman
[foreman-plugins]
name=Foreman stable - plugins
baseurl=http://192.168.0.100/yum.theforeman.org/plugins/1.5/el6/x86_
64
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-foreman
# vi puppetlabs.repo
内容如下
[puppetlabs-products]
name=Puppet Labs Products - $basearch
baseurl=http://192.168.0.100/yum.puppetlabs.com/el/6/products/$base
arch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
enabled=1
gpgcheck=0
[puppetlabs-deps]
name=Puppet Labs Dependencies - $basearch
baseurl=http://192.168.0.100/yum.puppetlabs.com/el/6/dependencies/$
basearch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
enabled=1
gpgcheck=0
[puppetlabs-devel]
name=Puppet Labs Devel - $basearch
baseurl=http://192.168.0.100/yum.puppetlabs.com/el/6/devel/$basearch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
enabled=1
gpgcheck=0
# vi rdo-release.repo
内容如下
[openstack-icehouse]
name=OpenStack Icehouse Repository
baseurl=http://192.168.0.100/repos.fedorapeople.org/repos/openstack/o
penstack-icehouse/epel-6/
enabled=1
skip_if_unavailable=0
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RDO-Icehouse
priority=98
#yum clean all
#yum makecache
3.3.3 安装 Apache 并启动服务
转到 YUM 源服务器上
# yum install -y httpd
# service httpd start
# chkconfig httpd on
# rm -f /etc/httpd/conf.d/welcome.conf(删除 web 欢迎页面)
把之前处理完成后的软件拷贝到 YUM 源服务器/var/www/html 目录
然后把/yum.theforeman.org/release 和/yum.theforeman.org/plugins 目
录以及目录下的文件放到/yum.theforeman.org 目录下
4 开始部署 openstack
4.1 部署控制节点
4.1.1 安装 openstack-packstack
# yum install -y openstack-packstack
# yum update
# reboot
4.1.2 部署
# packstack --allinone --provision-all-in-one-ovs-bridge=n --provision-d emo=n
4.1.3 网桥配置
# vi /etc/syscofnfig/network-scripts/ifcfg-eth2
内容如下
DEVICE=eth2
HWADDR=xx:xx:xx:xx:xx:xx
TYPE=OVSPort
OVS_BRIDGE=br-ex
DEVICETYPE=ovs
ONBOOT=yes
# vi /etc/syscofnfig/network-scripts/ifcfg-br-ex
内容如下
DEVICE=br-ex
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=192.168.0.101
NETMASK=255.255.255.0
GATEWAY=10.231.29.1
ONBOOT=yes
# vi/etc/syscofnfig/network-scripts/ifcfg-eth1 BOOTPROTO=dhcp
to BOOTPROTO=none
添加
IPADDR=10.0.0.11
NETMASK=255.255.255.0
# vi /etc/neutron/plugin.ini
network_vlan_ranges = physnet1(修改)
bridge_mappings = physnet1:br-ex(添加)
这里需要注意的是添加的内容要靠着左边,不能有空格
# ovs-vsctl add-port br-ex eth2
(使用不间断重启网络)
4.2 部署扩展节点
4.2.1 配置
控制节点上
# cd /root
# vi packstack-answer-xxxx.txt (xxxx 为时间日期序号) CONFIG_NOVA_COMPUTE_PRIVIF=lo
to
CONFIG_NOVA_COMPUTE_PRIVIF=eth2
CONFIG_NOVA_NETWORK_PRIVIF=lo
to
CONFIG_NOVA_NETWORK_PRIVIF=eth2
CONFIG_COMPUTE_HOSTS=192.168.0.101
to
CONFIG_COMPUTE_HOSTS=192.168.0.102,192.168.0.103,192.168.0.104
(这里需要注意的是把 lo 改为 eth2 网卡并不一定使用与其他物理环境,
这里指实际应用的第二块网卡,在实际部署时要视情况而定)
4.2.2 部署
packstack --answer-file= packstack-answer-xxxx.txt
OpenStack Linux
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。