Jump to: navigation, search

Daisy

Revision as of 08:56, 26 April 2016 by Sunjing (talk | contribs) (Dasiy寄语)

What is Dasiy

 Daisy,原意为:雏菊,极好的东西。

Daisy是TECS2.0的一个子项目,用于在裸机上部署centos+openstack。Daisy提供标准的RestFul接口,配合界面,用户可以在界面上完成相关配置操作,然后在界面上点击集群部署,大大简化用户的配置工作,整个部署流程无需人工干预,实现了操作系统和TECS的全自动部署,增强易用性。  关于发展方向:作为一个部署工具,daisy后续会支持可以通过不同的配置来部署不同的后端。

 关于接口:提供了CLI和Restful两种接口,因此也就决定了Daisy可以通过命令行或者dashboard页面的方式来实现部署功能。

 关于服务: Daisy的安装包中含有以下服务: 1. Daisy: 1) daisy-api:负责提供对外的接口调用。 2) daisy-registry: 负责数据库相关的操作。(部署中需要的参数都是通过daisy的命令写入到mariadb数据库里,在部署时,进行实施)。 3) daisy-orchestration:监控集群中是否有新刀片的加入,实现计算节点的自动扩容 2.Ironic 在Daisy实现自动部署的过程中,需要待安装刀片自动上报自身信息,因此用到了ironic的功能,因此在daisy的bin包中还集成了ironic的相关服务。 1) ironic-discoverd:负责主机发现以及上报节点的硬件信息。 2) ironic-api 与ironic-conductor :负责提供接口把上报的数据写到ironic的数据库。 3. keystone openstack-keystone:用于提供认证和鉴权功能, daisy dashboard界面的登录用的就是keystone的用户。 4. Apache服务(httpd) Daisy的dashboard通过Apache服务集成,dashboard页面登录前,可以先检查systemctl status httpd ,dashboard页面的登录地址是http://IP,这里的IP是安装daisy服务器的刀片的IP地址。 5. mariadb Daisy在部署集群前,所有设置的集群(cluster)参数都存放在mariadb数据库中。

 关于配置文件、日志以及待安装的版本存在路径 Daisy所有的配置文件路径: /etc/daisy/ Daisy的日志路径: /var/log/daisy/ 待安装版本的存放路径: /var/lib/daisy/tecs pxe部署文件设置路径:/home/daisy_install

 关于支持场景 1) Daisy 目前只支持HA+LB +Compute的应用场景,其中HA和LB可以合一部署(在同一块刀片上部署),也可以分离部署。 关于LB(负载均衡)的了解,请参考: http://wxcop.zte.com.cn/topic/view/9024 2) 目前Daisy版本(Daisy P3B1)部署HA,只支持数据库和glance的本地挂载,(DRDB)方式,支持glance使用磁阵共享方式。 关于DRDB的了解,请参考: http://wxcop.zte.com.cn/topic/view/9246  关于部署应用 Daisy支持部署方式有3种: 1)CGSL-VPLAT(操作系统):只部署CGSL-VPLAT(不分配角色)。 2)TECS:只部署TECS(需要进行通过ssh发现主机这一步骤) 3)CGSL-VPLAT(操作系统)+TECS:同时部署CGSL-VPLAT +TECS。 特别说明: 如果要部署第1种和第3种方式,待部署刀片服务器必须支持IPMI硬件环境,即在表1.3的列表中服务器。因为只有支持ironic硬件环境,才能实现刀片的自动发现。

User guide

Daisy install guide

1) 下载daisy 的bin包,如:DAISY_V01.01.10_I680.bin 2) 添加可执行权限:chmod +x DAISY_V01.01.10_I680.bin 3) 安装: 执行./DAISY_V01.01.10_I680.bin命令,并选择5退出,此时会在/home 路径下生成daisy_install文件夹,进入该文件夹,找到daisy.conf配置文件进行pxe服务器搭建的配置。配置如下:

[root@host125 daisy_install(daisy_admin)]$ vi daisy.conf 
  1. 如使用vi命令打开此配置文件,应先执行 export LC_ALL="zh_CN.GB2312" ,否则可能会有乱码,编辑后unset LC_ALL

[DEFAULT]

  1. daisy的管理面ip(如果daisy安装在虚拟机中,而且用到模拟主机发现的功能时,此处必填)

daisy_management_ip= [BACKEND]

  1. daisy的默认后端类型(如需安装tecs、zenic、proton,此处填写tecs,zenic,proton)

default_backend_types=tecs --------支持后端 [PXE]

  1. 是否搭建pxe服务器,需要搭建请填写yes,否则请填写no

build_pxe=yes

  1. 搭建pxe服务器的网卡名 (Deploment平面的网口,用于操作系统的安装)

eth_name=bond0.18 ------------daisy服务器的网口,用于pxe部署

  1. 服务器ip地址

ip_address=192.168.1.5

  1. 子网掩码

net_mask=255.255.255.0

  1. 客户端起始ip地址

client_ip_begin=192.168.1.100 ---------给待安装刀片分配的部署地址范围

  1. 客户端结束ip地址

client_ip_end=192.168.1.200

配置完成之后执行./DAISY_V01.01.10_I680.bin install命令进行安装,安装完成之后pxe服务器也就搭建完成了。过程如下: [root@host125 file(daisy_admin)]$ ./DAISY_V01.01.10_I680.bin install Verifying archive integrity... All good. Uncompressing tecs........................................................................................................................................................................................

   ZTE DAISY Installation Wizard

creating yum repo, please wait for several seconds... Loaded plugins: fastestmirror, product-id, subscription-manager …… build pxe server Daisy Install Successfull... ------------------当看到这句话时,表明Daisy已安装完成 检查PXE server是否搭建成功: 1) ifconfig查看是否有bond0.18:100的网口,IP为sever的IP,如192.168.1.1 2) systemctl status dhcpd 查看服务是active。

Daisy deployment guide

Dashboard界面登陆

Daisy的dashboard通过Apache服务集成,dashboard页面登录前,可以先检查systemctl status httpd。在浏览器中输入http://ip/dashboard,登陆daisy的dashboard界面,用户名和密码默认为admin/keystone。注:ip为daisy服务器的地址。 版本上传

Daisy服务器web页面提供了版本上传功能。 在daisy dashboard页面,版本---浏览---选择本地文件---上传,提示上传文件成功。 注:根据用户需要,上传的版本需要安装的OS及TECS安装BIN包,如果部署的是ZENIC,还需要将ZENIC的Zip安装包上传至daisy服务器的/var/lib/daisy/zenic/路径下。

主机列表查询及操作

通过web页面主机页面,可以查询所有主机状态信息,并提供“加入集群”和“移出集群”功能,可以方便host的加入和移出集群操作。 创建集群

集群是Daisy自动化部署管理的基本单位,在主机自动部署之前需要将主机加入集群。登陆dashboard后,点击创建集群。

角色配置及分配

Daisy的主机角色包括如下4种: 名称 描述 中文描述 CONTROLLER_LB Controller role,backup type is loadbalance 控制角色,备份方式为LB CONTROLLER_HA Controller role,backup type is HA,active/standby 控制角色,备份方式为HA COMPUTER Compute role 计算角色 DOCTOR Role for health monitoring 健康检测(暂未支持)

一个主机可以承载一种角色,也可以承载多个角色,角色的配置,最终影响被部署主机安装哪些TECS组件服务。角色和TECS组件的对应关系Daisy已默认定义。如不更改用户不需要关心。 本例中,设置HA和LB角色合一,由于daisy不支持单独设置网络角色,因此,网络节点和控制节点合一。 对于HA角色和LB角色的参数设置,在角色配置Tab页。

网络平面配置

在4.3节中提到创建集群时,会同步创建集群下的6个网络平面(如果创建集群时,选择vlan模式,则创建PRIVATE网络平面;如果选择VXLAN模式,则创建VXLAN网络平面)。对于vlan模式下,其中除了PRIVATE和STORAGE平面,其他平面都是集群唯一的。也就是说PRIVATE和STORAGE类型的平面是可以增加多个,增加网络平面可以通过点击页面的右上角“增加网络平面”按钮增加。

主机发现

集群创建好后,就需要将待安装刀片(host)加入到集群中,根据安装方式的不同,有两种主机发现方式:未安装os的方式和已安装os的方式,在本部署实例中从os开始安装。

部署

Daisy实现一键式命令部署,在给待安装刀片加入集群、设置网络关联、分配角色后,就可以执行部署了。在“主机配置”页面,点击“部署”即可开始进行TFG+TECS的部署,dashboard会自动跳转至进度界面。待os安装进度和tecs安装进度至100%,即安装成功。

Developer Guide

API

How to add a new component

Installing a new component of OPENSTACK with Daisy

1,Process of Installing a component of OPENSTACK with Daisy Daisy generates the related configuration items based on the role type. When the backend to be deployed is OPENSTACK, there are CONTROLLER_HA, CONTROLLER_LB, and COMPUTER roles available, and CONTROLLER role will be added soon. If you want to install a new component of OPENSTACK with Daisy, you need to determine which services are included in the component, as well as the types of services. Daisy divides the services into different roles according to the type of service, and then generates the related component configuration items.

2,Then, add configuration items of this component to the template file tecs.conf, \daisy\backend\tecs\tecs.conf. CONFIG_XXX_INSTALL= CONFIG_XXX_HOST=

3,Edit daisy code for installing a component of OPENSTACK You can edit your new add tecs.conf with config.py in directory \daisy\code\daisy\daisy\api\backends\tecs according the services belong to. For example, you can use command services[XXX].append(IP) to edit CONFIG_XXX_HOST, and use command self.components.append(CONFIG_XXX_INSTALL) to edit CONFIG_XXX_INSTALL.

4,After modifying the code, compile the code and generate the Daisy artifacts. OPENSTACK that deployed by this artifacts should includes the newly added component.

5,Attention, if Daisy supports the installation of the component, but OPENSTACK does not contain the component, can not be properly deployed.

How to contribute

Join the Daisycloud team

Read the Developer's Guide and learn how to setup the accounts and git. Clone the repositories: git clone git clone https://github.com/openstack/daisycloud-core.git Please note that OpenStack Infra uses strict checks on your git commit messages. The most important rules are:

  • Keep your commit title short (<80 symbols). It must not end with dot.
  • Body of commit message should be separated from title by one empty line
  • If patch closes bug, then it must have in a body "Closes-Bug: #12345", where 12345 is your LP bug number
  • If patch relates to bug, but doesn't completely solve an issue, then you must use "Related-Bug: #12345"

See the [commit messages] wiki page for more details.

How to get help

Subscribe to mailing lists

   OpenStack developers mailing list. If you are hacking on Fuel, or have technical question about Fuel internals, you are very welcome in this ML with subject containing "[Fuel]".
   OpenStack users mailing list. Fuel traffic is there with subject containing "[Fuel]". You are welcome to ask questions related to Fuel usage, including errors, etc.
   OpenStack announcements mailing list. Announcements about the OpenStack project like product release information, security advisories, important discussions. This is a low-traffic, read-only list.
   There are even more mailing lists out there, visit MailingLists to see the other OpenStack related lists.

Contributing

Bugs

report a bug

  • Go to https://launchpad.net/daisycloud-core
  • Select “Report a bug” on the right
  • Fill in “Summary” field for a bug.
  • Enter “Further information”.
  • Select visibility for the bug under “This bug contains information that is” field. Either leave it as “Public” (default) or set it to “Private” per the above guidance
  • Add attachments under “Extra Options” section
  • After everything is entered, select the “Submit bug report” button

fix a bug The most simple and easy way to contribute code into Daisy is to start with bug fixes.

Verify bugs

This is very easy to get started, but help here is actually very valuable. Especially when it comes to bugfixes which are relevant to only certain types of hardware. When bugfix is merged, bug is automatically moves to "Fix Committed" status. In Daisy, we set "Fix Released" status for a bug only when it was verified by someone else than a developer. You can simple check out all fix committed bugs and start verifying them. It is required to be in daisycloud-bugs LP group to be able to change bug status. However you can leave a comment in bug report, and it will be enough for bug supervisors to change bug status. By your request, you can be included into fuel-bugs team to manage bugs yourself.

Enhancements

Propose enhancements

  • Select "Register a Blueprint". Typically, you’ll find this link on the right side of the launchpad page.
  • Enter a Summary of the blueprint.
  • Propose your blueprint by selecting the milestone in which you plan to complete the blueprint.
  • You won’t need to enter any other fields, so now just choose Register Blueprint.
  • Upload a design specification in the "specs/<release>" folder in fuel-specs
  • In order to get your spec approved, it usually requires to get +1 from the following folks:
       All mandatory design reviewers (it's usually people who familiar with the area of the proposed enhancement)
       Topic expert if any (e.g your enhancement somehow affects Fuel Web UI then you need to get +1 from the Fuel Web UI team)
       QA
       For cross-component enhancements, it also requires to have +1 from core of affected components.


  • Once your design specification has been approved and merged into fuel-specs git repo:
       Update your blueprint's specification URL to point to the design specification in fuel-specs git
       Note, this should link to git (as in the template link above), not to the gerrit change

When done, drop an email about the new blueprint to the mailing list to attract attention of Fuel developers, who are likely to provide early feedback and request additional information.

Please read OpenStack Blueprints page for detailed definition of blueprints and their lifecycle.