vSphere部署Cloud Foundry V2 (3) ---- micro bosh 部署

Cloud Foundry V2 的文章目录在 Cloud Foundry V2 相关文章目录

我会不定期的做一些文章的更改,如有不便之处还要谅解。

在部署中遇到了什么问题可以在下面留言。

本博客的所有yml stemcell 和 release 都能在百度云上下载 http://pan.baidu.com/s/1pJHkPYV

 

如果你有对配置文件或者CF运维有什么更好的想法请联系我,我非常需要你的帮助

1、下载 stemcells

创建2个文件夹 deployments 和 stemcells。

mkdir -p deployments 
mkdir -p stemcells

 进入stemcells文件夹下载 stemcell

cd ~/stemcells

 显示stemcell 版本 

bosh public stemcells 
| Name | 
+-----------------------------------------------------------------+ 
| bosh-stemcell-2427-aws-xen-ubuntu.tgz | 
| bosh-stemcell-2652-aws-xen-centos.tgz | 
| bosh-stemcell-2739-aws-xen-centos-go_agent.tgz | 
| bosh-stemcell-2427-aws-xen-ubuntu-go_agent.tgz | 
| bosh-stemcell-2710-aws-xen-ubuntu-lucid-go_agent.tgz | 
| bosh-stemcell-2652-aws-xen-ubuntu-lucid.tgz | 
| bosh-stemcell-2739-aws-xen-ubuntu-trusty-go_agent.tgz | 
| bosh-stemcell-2719.1-aws-xen-centos-go_agent.tgz | 
| bosh-stemcell-2719.1-aws-xen-ubuntu-trusty-go_agent.tgz | 
| bosh-stemcell-2719.2-aws-xen-centos-go_agent.tgz | 
| bosh-stemcell-2719.2-aws-xen-ubuntu-trusty-go_agent.tgz | 
| bosh-stemcell-2719.3-aws-xen-ubuntu-trusty-go_agent.tgz | 
| light-bosh-stemcell-2427-aws-xen-ubuntu.tgz | 
| light-bosh-stemcell-2652-aws-xen-centos.tgz | 
| light-bosh-stemcell-2739-aws-xen-centos-go_agent.tgz | 
| light-bosh-stemcell-2427-aws-xen-ubuntu-go_agent.tgz | 
| light-bosh-stemcell-2710-aws-xen-ubuntu-lucid-go_agent.tgz | 
| light-bosh-stemcell-2652-aws-xen-ubuntu-lucid.tgz | 
| light-bosh-stemcell-2739-aws-xen-ubuntu-trusty-go_agent.tgz | 
| light-bosh-stemcell-2719.1-aws-xen-centos-go_agent.tgz | 
| light-bosh-stemcell-2719.1-aws-xen-ubuntu-trusty-go_agent.tgz | 
| light-bosh-stemcell-2719.2-aws-xen-centos-go_agent.tgz | 
| light-bosh-stemcell-2719.2-aws-xen-ubuntu-trusty-go_agent.tgz | 
| light-bosh-stemcell-2719.3-aws-xen-ubuntu-trusty-go_agent.tgz | 
| light-bosh-stemcell-2739-aws-xen-hvm-centos-go_agent.tgz | 
| light-bosh-stemcell-2739-aws-xen-hvm-ubuntu-trusty-go_agent.tgz | 
| bosh-stemcell-2427-openstack-kvm-ubuntu.tgz | 
| bosh-stemcell-2624-openstack-kvm-centos.tgz | 
| bosh-stemcell-2624-openstack-kvm-ubuntu-lucid.tgz | 
| bosh-stemcell-2739-openstack-kvm-centos-go_agent.tgz | 
| bosh-stemcell-2739-openstack-kvm-ubuntu-trusty-go_agent.tgz | 
| bosh-stemcell-2652-openstack-kvm-ubuntu-lucid-go_agent.tgz | 
| bosh-stemcell-2719.1-openstack-kvm-centos-go_agent.tgz | 
| bosh-stemcell-2719.1-openstack-kvm-ubuntu-trusty-go_agent.tgz | 
| bosh-stemcell-2719.2-openstack-kvm-centos-go_agent.tgz | 
| bosh-stemcell-2719.2-openstack-kvm-ubuntu-trusty-go_agent.tgz | 
| bosh-stemcell-2719.3-openstack-kvm-ubuntu-trusty-go_agent.tgz | 
| bosh-stemcell-2427-vcloud-esxi-ubuntu.tgz | 
| bosh-stemcell-2652-vcloud-esxi-ubuntu-lucid.tgz | 
| bosh-stemcell-2732-vcloud-esxi-ubuntu-trusty-go_agent.tgz | 
| bosh-stemcell-2710-vcloud-esxi-ubuntu-lucid-go_agent.tgz | 
| bosh-stemcell-2427-vsphere-esxi-ubuntu.tgz | 
| bosh-stemcell-2624-vsphere-esxi-centos.tgz | 
| bosh-stemcell-2739-vsphere-esxi-centos-go_agent.tgz | 
| bosh-stemcell-2427-vsphere-esxi-ubuntu-go_agent.tgz | 
| bosh-stemcell-2710-vsphere-esxi-ubuntu-lucid-go_agent.tgz | 
| bosh-stemcell-2624-vsphere-esxi-ubuntu-lucid.tgz | 
| bosh-stemcell-2739-vsphere-esxi-ubuntu-trusty-go_agent.tgz | 
| bosh-stemcell-2719.1-vsphere-esxi-centos-go_agent.tgz | 
| bosh-stemcell-2719.1-vsphere-esxi-ubuntu-trusty-go_agent.tgz | 
| bosh-stemcell-2719.2-vsphere-esxi-ubuntu-trusty-go_agent.tgz | 
| bosh-stemcell-2719.2-vsphere-esxi-centos-go_agent.tgz | 
| bosh-stemcell-2719.3-vsphere-esxi-ubuntu-trusty-go_agent.tgz | 
| bosh-stemcell-370-warden-boshlite-ubuntu-trusty-go_agent.tgz | 
| bosh-stemcell-53-warden-boshlite-ubuntu.tgz | 
| bosh-stemcell-370-warden-boshlite-centos-go_agent.tgz | 
| bosh-stemcell-64-warden-boshlite-ubuntu-lucid-go_agent.tgz | 
+-----------------------------------------------------------------+ 

 选择合适的版本下载

bosh download public stemcell bosh-stemcell-2427-vsphere-esxi-ubuntu.tgz 

 等待下载完成 

bosh-stemcell: 9% |ooo             | 35.9MB 128.5KB/s ETA: 00:46:51

 

2、配置vSphere

1、新建文件夹对虚拟机分组: 从 vCenter 的导航栏中,选择“主页”(Home) ->“清单”(Inventory) ->“虚拟机和模板”(VMs and Templates) 视图,然后按如下所示创建文件夹:

这些文件夹随后将用来对 BOSH 和 Cloud Foundry 的虚拟机进行分组。在上例中,“templatefolderbosh”用来存放 BOSH stemcell。“vmfolderbosh”用来存放 BOSH 节点。“templatefolder”用来存放 Cloud Foundry stemcell。“vmfolder”用来存放 Cloud Foundry 节点。

 

2、从“主页”(Home) ->“清单”(Inventory) ->“数据存储”(Datastores) 视图中,选择NFSDataStore数据存储,并浏览该存储。

创建一个用来存储虚拟机的子文件夹。在本例中,我们将此子文件夹命名为“boshdeployer”。此文件夹名称将成为我们部署清单中的“disk_path”参数的值

 

3、配置bosh模板

进入deployments目录创建micro01的文件夹

cd ~/deployments/ 
mkdir micro01

 编写micro_bosh的配置文件

vim micro_bosh.yml

 一下内容可以参考

---
name: micro

network:
  ip: 192.168.1.100
  netmask: 255.255.255.0
  gateway: 192.168.1.1
  dns:
  - 8.8.8.8
  cloud_properties:
    name: VM Network

resources: 
   persistent_disk: 16384
   cloud_properties:
      ram: 2048
      disk: 16384
      cpu: 2

cloud:
  plugin: vsphere
  properties:
    agent:
      ntp:
       - time.bnu.edu.cn
       - ntp02.las01.emcatmos.com
    vcenters:
      - host: 192.168.1.6
        user: administrator
        password: ******
        datacenters:
          - name: vDataCenter
            vm_folder: zhangqiaoqi_CF/vm_folder
            template_folder: zhangqiaoqi_CF/template_folder
            disk_path: boshdeployer
            datastore_pattern: NFSDataStore
            persistent_datastore_pattern: NFSDataStore
            allow_mixed_datastores: true
            clusters:
              - vCluster

 检测配置文件是否正确

bosh micro deployment ~/deployments/micro01
WARNING! Your target has been changed to `https://192.168.1.203:25555'! 
Deployment set to '/home/base/deployments/micro01/micro_bosh.yml'

 

3、部署 micro—bosh

bosh micro deploy ~/stemcells/bosh-stemcell-2427-vsphere-esxi-ubuntu.tgz
Deploying new micro BOSH instance `micro01/micro_bosh.yml' to `https://192.168.1.203:25555' (type 'yes' to continue): yes 

Verifying stemcell... 
File exists and readable OK 
Verifying tarball... 
Read tarball OK 
Manifest exists OK 
Stemcell image file OK 
Stemcell properties OK 

Stemcell info 
------------- 
Name: bosh-vsphere-esxi-ubuntu 
Version: 2427 

Started deploy micro bosh 
Started deploy micro bosh > Unpacking stemcell. Done (00:00:05) 
Started deploy micro bosh > Uploading stemcellat depth 0 - 20: unable to get local issuer certificate 
at depth 0 - 20: unable to get local issuer certificate 
. Done (00:00:38) 
Started deploy micro bosh > Creating VM from sc-10f0b41d-d477-49b7-a9bd-d4ac150d5549at depth 0 - 20: unable to get local issuer certificate 
at depth 0 - 20: unable to get local issuer certificate 
. Done (00:03:57) 
Started deploy micro bosh > Waiting for the agentat depth 0 - 20: unable to get local issuer certificate 
. Done (00:00:49) 
Started deploy micro bosh > Updating persistent disk 
Started deploy micro bosh > Create disk. Done (00:00:00)at depth 0 - 20: unable to get local issuer certificate 
at depth 0 - 20: unable to get local issuer certificate 
at depth 0 - 20: unable to get local issuer certificate 

Started deploy micro bosh > Mount disk. Done (00:00:11) 
Done deploy micro bosh > Updating persistent disk (00:00:27) 
Started deploy micro bosh > Stopping agent services. Done (00:00:01) 
Started deploy micro bosh > Applying micro BOSH specat depth 0 - 20: unable to get local issuer certificate 
. Done (00:00:57) 
Started deploy micro bosh > Starting agent services. Done (00:00:00) 
Started deploy micro bosh > Waiting for the directorat depth 0 - 20: unable to get local issuer certificate 
. Done (00:00:17) 
Done deploy micro bosh (00:07:11) 
Deployed `micro01/micro_bosh.yml' to `https://192.168.1.203:25555', took 00:07:11 to complete

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值