Fuel 9.0快速部署Openstack Mitaka 图文详解

关于什么是Fuel以及Fuel的作用和构架可以参考下面Openstack官方给出的Wiki链接.https://wiki.openstack.org/wiki/Fuel.

在安装部署之前,先看看官方给出的Fuel 9.0版本特性.

Mirantis OpenStack is distributed as a single commercially supportedpackage in ISO format. The 9.0 release features:

·      Enhanced OpenStack Lifecycle Management features in Fuel,including the ability to scale up/down, change configuration settings, anddeploy new functionality, such as by adding plugins for Murano and StackLight

·      The ability to export Fuel configurationvalues to third-party configuration management tools

·      Enhanced features for NFViand other high performance workloads, including support for NUMA and CPU-pinning, Huge Pages, SR-IOVand DPDK

·      Support for applicationand service orchestration with TOSCA

·      Support for cgroups toenable the efficient allocation of a specific amount of system resources,including CPU and memory, to particular resource groups

·      The ability to deployOpenStack environments on servers with disks provided by storage systems withmultipath I/O

·      Support for preprovisionedOracle Linux nodes

·      Support of OpenStack Mitaka upstream release

Fuel 9.0将会搭载Openstack_Mitaka 版本,这个版本是2016年出的最新版本。

当然Fuel 9.0也增强了很多其他特性,比如对Huge Pages,SR-IPV和Intel的DPDK。Fuel 在早先的版本中已经去掉了利用CentOS来搭建Openstack的环境,在9.0中只使用Ubuntu和Ubuntu + UCA的部署方式。

下面进入安装部署环节:

1,环境准备

1.1  Fuel 镜像下载

使用下方网址即可下载最新的Fuel release image.用于部署fuel-master,一般为BT文件,利用下载工具下载即可.

https://www.fuel-infra.org/

Fuel 9.0快速部署Openstack Mitaka 图文详解

1.2 硬件资源

官方推荐使用4核心的CPU,以及4G以上内存、10G网卡、500G物理磁盘.但是在实验环境下,双核CPU,4G内存 1000M网卡和50G以上的硬盘就足够了,切记的是硬盘不得小于50G,因为这样会导致安装失败.

当然官方给出的实验要求比我推荐的要求要低,体现在内存的设置上,如果设置为2G内存会导致安装速度缓慢,所以建议条件容许的情况下加大设备资源.

下面是官方给出的推荐的生产以及实验环境介绍.

 

For a production environment:

  • Quad-core CPU

  • 4 GB RAM

  • 10 Gigabit network port

  • Disk size depends on the number of deployed nodes.     All nodes send logs to the Fuel Master node using rsyslog. During     installation, Fuel creates a separate partition for /var to store the remote logs and allocates 40% of     the disk size to it. Our recommendation for the remote logs partition is     20 GB per node. If you deploy 10 nodes with Fuel, you need to have a (20 x     10) x 2.5 = 500 GB disk for the Fuel Master node.

  • IPMI access through an independent management     network

For a testing environment:

  • Dual-core CPU

  • 2 GB RAM

  • 1 Gigabit network port

  • 50 GB disk

  • Physical console access

1.3软件选择
官方推荐使用Virtual-box来安装部署Fuel-master节点.当然你也可以选用VM来部署.效果都是一样的,只是有些人反应用VM来装会产生一些问题,所以在这里我选择Virtual-box 来进行安装部署.
 
2.部署 Fuel-Master
2.1 创建Fuel-master 虚拟机.
新建一个虚拟机名称为Fuel-master,当然你也可以自己定义名称.

Fuel 9.0快速部署Openstack Mitaka 图文详解

这里什么要选择Red Hat是因为Fuel的底层使用的是Centos,但是Virtual-BOX里面没有Centos选项,只能选择最贴近的Red Hat,而且不要忘了选择64位系统.如果选择32有可能会安装失败.
[root@fuel~]# rpm -q centos-release
centos-release-7-2.1511.el7.centos.2.10.x86_64
[root@fuel~]# cat /etc/RedHat-release
CentOS Linux release 7.2.1511 (Core)
 
设置虚拟机内存大小为4G.

Fuel 9.0快速部署Openstack Mitaka 图文详解

选择“现在创建虚拟磁盘”.

Fuel 9.0快速部署Openstack Mitaka 图文详解

硬盘文件类型选择为VDI类型.

Fuel 9.0快速部署Openstack Mitaka 图文详解

磁盘空间分配建议选择动态分配,如果选择固定大小,系统会直接在磁盘中扣除相对应的磁盘空间.当然如果磁盘空间足够大也可以直接设置为固定大小.

Fuel 9.0快速部署Openstack Mitaka 图文详解

Fuel 9.0快速部署Openstack Mitaka 图文详解

最少要求50G,这里我选择52G.如果是部署CEE使用的Fuel,建议设置为70G.

如果磁盘选项的是固定大小,这里需要创建虚拟磁盘可能需要几分钟. 根据磁盘的性能不同等待时间也不同. 如果设置保存的盘符没有足够空间,会直接提示报错。所以建议大家选择动态分配,可以节省一些空间.
 
Fuel 9.0快速部署Openstack Mitaka 图文详解

下面进行VBOX的网络设置
管理à全局设定à网络
 
配置三块虚拟网卡,信息如下:
这里的信息和Fuel的网络信息要对称,如果不想用下面的地址,需要在Fuel设置里面同步更改,不然会导致部署Openstack失败.
Host-Only Ethernet Adapter
IPv4: 10.20.0.10
Mask: 255.255.255.0
DHCP: Unable
 
Host-Only Ethernet Adapter #2
IPv4: 172.16.0.1
Mask: 255.255.255.0
DHCP: Unable
 
Host-Only Ethernet Adapter #3
IPv4: 192.168.0.1
Mask: 255.255.255.0
DHCP: Unable
网卡芯片选择Intel的PRO/1000,切记混杂模式一定要设置为Allow all.并且禁用DHCP.
以前尝试过芯片选择为PCnet-PCI结果失败了.在做CEE部署的时候网卡类型也要选择PRO/1000.

Fuel 9.0快速部署Openstack Mitaka 图文详解

Fuel 9.0快速部署Openstack Mitaka 图文详解

接下来运行虚拟机,运行时会弹出让你选择ISO文件,这里选择Fuel的镜像文件即可.

Fuel 9.0快速部署Openstack Mitaka 图文详解
 
几秒钟后会进入Fuel 安装选择界面,这里选择第一项,然后系统会自动加载和安装Fuel.

Fuel 9.0快速部署Openstack Mitaka 图文详解

Fuel 9.0快速部署Openstack Mitaka 图文详解

一段时间后进入Fuel-Menu界面你可以在这里修改默认密码和一些设置.
PS:在Fuel 8.0版本中安装系统后会重启,重启后出现这个界面有15秒的时间按任意键进入 fuel-menu.但是在9.0版本中会自动进入这个界面.所以不用担心会不及时按键盘.

Fuel 9.0快速部署Openstack Mitaka 图文详解

Fuel 9.0快速部署Openstack Mitaka 图文详解

选择Skip building bootstrap image,因为如果不选择的话,默认Fuel会从国外获取源,但是我并没有设置外部网络,而且就算设置了外部网络可以访问外网,速度也是很慢的,所以这里还是会导致安装失败.选择以后会使用本地源进行部署,后面会说明关于本地源如何下载和加载.

Fuel 9.0快速部署Openstack Mitaka 图文详解

选择Save and quit,然后这里需要等待1分钟的样子,因为这里要检查更改是否合规,检查通过后系统就会继续安装Fuel了.

Fuel 9.0快速部署Openstack Mitaka 图文详解
 
经过漫长的等待,具体多久无法统计了,大概2小时就可以进入Fuel的登录界面了.此过程中切勿关闭或者重启虚拟机.任何不必要的操作都可能导致安装失败.然后会出现下面的画面,到这里Fuel-master的安装就结束了.

Fuel 9.0快速部署Openstack Mitaka 图文详解

在浏览器打开https://10.20.0.2:8443测试一下是否安装成功.如果这里没有显示Fuel的登录界面,说明安装中忽略了一些步骤,或者资源分配不足.

Fuel 9.0快速部署Openstack Mitaka 图文详解

保存快照,以便日后恢复.

Fuel 9.0快速部署Openstack Mitaka 图文详解
 
2.2 增加本地源.
打开 /var/www/nailgun 目录 ,用ls发现目录下现在是没有mirrors文件夹.因为我采用的是离线模式安装,没有从官方的链接中下载一些必要的库,所以从国外找了一些源下载了以后放置在网盘中了.
  cd /var/www/nailgun

Fuel 9.0快速部署Openstack Mitaka 图文详解

我已经上传本地源文件到我的百度盘,下载下面2个连接的文件包,传输到/var/www/nailgun目录下,有冲突的部分直接替换掉.

Bootstraps 与Mirrors  可从以下信息的得到下载:

如果取消关注安科网公众号,即使再次关注,也将无法提供本服务!

链接:https://pan.baidu.com/s/1mhHD1Hm 密码:获得见上面的方法,地址失效请在下面留言。

------------------------------------------分割线------------------------------------------

使用XFTP软件将本地源文件copy到Fuel,具体如下图.也可以自己在PC或者服务器上建立FTP服务器,然后利用wget命令传输文件.总之不管用什么方法都可以,只要能把文件上传到相应的文件夹内即可.

Fuel 9.0快速部署Openstack Mitaka 图文详解

Fuel 9.0快速部署Openstack Mitaka 图文详解

Fuel 9.0快速部署Openstack Mitaka 图文详解

运行 Fuel-createmirror命令, 此命令目的是让web后台管理界面的源地址变为本地地址.(默认为一些官方链接下载地址,这些地址速度很慢,有的甚至连接不到,所以这里替换为本地源地址.)
[root@fuel nailgun]#fuel-createmirror
This script is DEPRECATED. Please usefuel-mirror utility!
Starting new HTTP connection (1):10.20.0.2
Starting new HTTP connection (1):10.20.0.2
Starting new HTTP connection (1):10.20.0.2
Starting new HTTP connection (1):10.20.0.2
Failed to open url -http://mirror.fuel-infra.org/mos-repos/ubuntu/9.0/dists/mos9.0/main/binary-amd64/Release: <urlopen error [Errno -2] Name orservice not known>. retries left - 2.
Traceback (mostrecent call last):
  File"/usr/lib/python2.7/site-packages/packetary/library/connections.py",line 214, in open_stream
    return self.opener.open(request)
  File"/usr/lib64/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File"/usr/lib64/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File"/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File"/usr/lib64/python2.7/urllib2.py", line 1244, in http_open
    return self.do_open(httplib.HTTPConnection,req)
  File"/usr/lib64/python2.7/urllib2.py", line 1214, in do_open
    raise URLError(err)
URLError: <urlopenerror [Errno -2] Name or service not known>
Failed to open url -http://mirror.fuel-infra.org/mos-repos/ubuntu/9.0/dists/mos9.0/main/binary-amd64/Release:<urlopen error [Errno -2] Name or service not known>. retries left - 1.
Traceback (mostrecent call last):
 File "/usr/lib/python2.7/site-packages/packetary/library/connections.py",line 214, in open_stream
    return self.opener.open(request)
  File"/usr/lib64/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File"/usr/lib64/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File"/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File"/usr/lib64/python2.7/urllib2.py", line 1244, in http_open
    return self.do_open(httplib.HTTPConnection,req)
  File"/usr/lib64/python2.7/urllib2.py", line 1214, in do_open
    raise URLError(err)
URLError: <urlopenerror [Errno -2] Name or service not known>
Failed to open url -http://mirror.fuel-infra.org/mos-repos/ubuntu/9.0/dists/mos9.0/main/binary-amd64/Release:<urlopen error [Errno -2] Name or service not known>. retries left - 0.
Traceback (most recentcall last):
  File"/usr/lib/python2.7/site-packages/packetary/library/connections.py",line 214, in open_stream
    return self.opener.open(request)
  File"/usr/lib64/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File"/usr/lib64/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File"/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File"/usr/lib64/python2.7/urllib2.py", line 1244, in http_open
    return self.do_open(httplib.HTTPConnection,req)
  File"/usr/lib64/python2.7/urllib2.py", line 1214, in do_open
    raise URLError(err)
URLError: <urlopenerror [Errno -2] Name or service not known>
<urlopen error[Errno -2] Name or service not known>
Starting new HTTP connection(1): 10.20.0.2
Starting new HTTPconnection (1): 10.20.0.2
Starting new HTTPconnection (1): 10.20.0.2
Starting new HTTPconnection (1): 10.20.0.2
Updating the Clusterrepositories...
Updating the releaserepositories...
Try to update theRelease 'Mitaka on Ubuntu 14.04'
Try to update theRelease 'Mitaka on Ubuntu+UCA 14.04'
Operations have been completed successfully
更换本地源后和bootstrp后,查看是否有已经激活的bootstrp.

Fuel 9.0快速部署Openstack Mitaka 图文详解

如果这里没有激活很可能是你下载的文件损坏了.可以尝试找其他bootstrp文件来覆盖.

相关推荐