bosh部署3要素
1. manifest
2. release包
3. stemcell
如何获得?
创建manifest
用spiff生成manifest
spiff下载地址:
https://github.com/cloudfoundry-incubator/spiff/releases
在cf-release根目录
修改spec/fixtures/openstack/cf-stub.yml中的配置
运行./generate_deployment_manifest openstack cf-stub.yml > cf.yml
资源
cf-release下载
https://github.com/cloudfoundry-community/community-shared-boshreleases
stemcell下载
http://bosh-artifacts.cfapps.io/file_collections?type=stemcells
cf-release版本和stemcell,bosh版本对应关系查询
https://github.com/cloudfoundry-community/cf-docs-contrib/wiki/v187
部署
1. 上传release
$ bosh upload release cf-release
验证:
$ bosh releases
2. 上传stemcell
bosh upload stemcell
验证:
$ bosh stemcells
+------------------------------------+---------+--------------------------------------+
| Name | Version | CID |
+------------------------------------+---------+--------------------------------------+
| bosh-openstack-kvm-centos-go_agent |
2748
| 0a4da153-
4878
-4cd4-
8451
-6ddefe7f6e34 |
3.部署
$ bosh deployment cf.yml
$ bosh deploy
部署完成后
1. 所有DEA节点的cc api域名需解析到内部网络
例如:/etc/hosts 加入:10.60.31.112 api.ae2.demo
不然,dea上传droplet会报错。
问题排查
上传stemcell不能调用CPI
Director task 2
Error 100: Unable to connect to the OpenStack Compute API. Check task debug log for details.
原因:microbosh不能访问openstack cc
解决:
在microbosh的机器里,/etc/hosts 加上:
172.16.40.14 cc14.ae2
超过cpu核配置限制
E, [2014-10-10T03:34:37.945276 #6683] [create_vm(decb786a-0cdc-4eca-8827-17e5bb1d1fcb, ...)] ERROR -- : OpenStack API Request Entity Too Large error. Check task debug log f
or details.
E, [2014-10-10T03:34:37.945342 #6683] [create_vm(decb786a-0cdc-4eca-8827-17e5bb1d1fcb, ...)] ERROR -- : Expected([200, 202]) <=> Actual(413 Request Entity Too Large)
response => #<Excon::Response:0x007f7e942384e8 @data={:body=>"{\"overLimit\": {\"message\": \"Quota exceeded for cores: Requested 2, but already used 49 of 50 cores\", \"
code\": 413, \"retryAfter\": \"0\"}}", :headers=>{"Retry-After"=>"0", "Content-Length"=>"132", "Content-Type"=>"application/json; charset=UTF-8", "X-Compute-Request-Id"=>"r
eq-fd2272b6-d749-4b9f-bd8d-e2b6792ed988", "Date"=>"Fri, 10 Oct 2014 03:34:39 GMT"}, :status=>413, :remote_ip=>"172.16.40.14"}, @body="{\"overLimit\": {\"message\": \"Quota
exceeded for cores: Requested 2, but already used 49 of 50 cores\", \"code\": 413, \"retryAfter\": \"0\"}}", @headers={"Retry-After"=>"0", "Content-Length"=>"132", "Content
-Type"=>"application/json; charset=UTF-8", "X-Compute-Request-Id"=>"req-fd2272b6-d749-4b9f-bd8d-e2b6792ed988", "Date"=>"Fri, 10 Oct 2014 03:34:39 GMT"}, @status=413, @remot
e_ip="172.16.40.14"> (Excon::Errors::RequestEntityTooLarge)
修改/etc/nova.conf
quota_cores=-1 # 无限制
get_state超时
Director task 29
Started preparing deployment
Started preparing deployment > Binding deployment. Done (00:00:00)
Started preparing deployment > Binding releases. Done (00:00:00)
Started preparing deployment > Binding existing deployment. Failed: Timed out sending `get_state' to 65941315-33fb-446c-af36-cef368e7e62d after 45 seconds (00:02:15)
Error 450002: Timed out sending `get_state' to 65941315-33fb-446c-af36-cef368e7e62d after 45 seconds
用bosh cck命令删除vm reference,每次都选3
3. Delete VM reference (DANGEROUS!)
创建虚机失败
| fault | {"message": "No valid host was found. ", "code": 500, "details": " File \"/usr/lib/python2.6/site-packages/nova/scheduler/filter_scheduler.py\", line 107, in schedule_run_instance |
| | raise exception.NoValidHost(reason=\"\") |
| | ", "created": "2014-10-11T06:16:43Z"}
nova日志/var/log/nova/scheduler.log:
raise exception.PortLimitExceeded()
网卡超过限制
neutron port-list
修改/etc/neutron/neutron.conf
quota_port = -1
编译失败
错误:
Compile failed
解决办法:
a. 编译
用stemcell创建一个虚机,上传release包到该虚机,解压,运行编译失败模块包里的packging脚本,查看具体错误,解决编译错误,一般是第三方依赖不满足。
b.重新打包
重新打包依赖包和模块包,计算该包的sha1sum,并用base64编码,替换release.MF中该模块的sha1sum,重新打包整个release包:cf-xxx.tgz
c. 重新上传release包
bosh upload release cf-xxx.tgz
上传stemcell时报SchemaValidationError错
Director task 1
Error 100: Invalid OpenStack cloud properties: #<Membrane::SchemaValidationError: { openstack => { api_key => Expected instance of String, given an instance of Fixnum } }>
解决办法:
进入micro bosh虚拟机
a. 修改director配置
vi /var/vcap/jobs/director/config/director.yml.erb
api_key: 123456 => api_key: '123456'
注意是修改director.yml.erb文件,
b. 重启director服务
bosh/bin/monit restart director
你会发现/var/vcap/jobs/director/config/director.yml已经被修改。
c. 重新上传stemcell。
相关推荐
基于OpenStack的IaaS云管理平台的设计与实现.docx
综上所述,基于OpenStack的校园云计算平台构建是一个复杂的系统工程,它涉及到众多的技术细节和实施步骤。通过本文的介绍,我们可以看到,OpenStack云平台的构建不仅能够有效提升高校的教学与科研能力,同时也为高校...
1. deb安装:利用Linux系统自带的OpenStack软件包进行安装,这种安装方式较为简单,适用于对OpenStack了解不深的用户。 2. pip安装:通过Python的包管理工具pip安装OpenStack的不同组件,这种方式提供了更大的灵活...
基于OpenStack云平台建设技术方案 OpenStack是一款开源的云计算平台,旨在提供基于云计算的基础设施服务。基于OpenStack云平台建设技术方案是指利用OpenStack平台,设计和实现云计算环境的技术方案。该方案涵盖了云...
2.1_什么是OpenStack(2017.5.30) 2.2_OpenStack之于虚拟化(2017.5.30) 2.3_OpenStack之于云计算(2017.5.30) 2.4_OpenStack发展历程(2017.5.30) 2.5_OpenStack的设计准则(2017.5.30) 2.6_OpenStack的架构(2017.5...
基于 CentOS 7 的单实例 OpenStack 安装 OpenStack 是一个开源的云计算平台,由 NASA 和 Rackspace 共同开发。它提供了一个基于云计算的基础设施,可以用于构建私有云、公有云和混合云。OpenStack 的安装可以分为...
在系统实现上,安装Openstack之前需要做一些准备工作,如安装配置NTP服务,添加hosts文件,安装Openstack官方依赖包等。所有Openstack平台服务都依赖于其关键组件的安装和配置。例如,Keystone组件负责系统的身份...
基于OpenStack的私有云管理平台及其关键技术研究,完整版学位论文。
OpenStack-train版安装手册,包含环境介绍、环境安装、安装Spice控制台、实例热迁移的libvirt、实例调整实例大小、负载均衡即服、务网络QoS等
基于OpenStack构建校园私有云平台(毕业论文).zip
基于OpenStack的云计算和大数据实验教学平台能够在使用软硬件资源的基础上,通过虚拟化技术,实现资源的集中管理和自动化部署。教师和学生都可以通过该平台快速搭建实验环境,满足大数据实验教学的需求。平台还能够...
基于OpenStack和Kubernetes构建组合容器云平台 本文将详细介绍基于OpenStack和Kubernetes构建组合容器云平台的相关知识点,涵盖了云计算模型、混合云、容器集群管理、云平台基础服务架构、自动化部署运维后台等方面...
基于OpenStack的高可用云平台的研究与设计1.caj
### OpenStack 安装 Windows 虚拟机的方法(Hyperisor 为 KVM) #### 一、概述 本文档旨在详细介绍如何在OpenStack环境中利用KVM作为Hypervisor来安装并配置Windows虚拟机。该过程涉及到集成virtio驱动,确保...
手动安装openstack Mitaka版
openstack的k版安装,完整版英文版。