您的位置:首页 > 其它

使用bosh—cli在vsphere上部署micro bosh

2014-03-11 09:21 323 查看
安装bosh—cli完毕后创建2个文件夹deployment s和stemcells

root@neal-Lenovo-Product:~# mkdir -p deployments

root@neal-Lenovo-Product:~# mkdir -p stemcells

进入stemcells下载 micro stemcell

root@neal-Lenovo-Product:~/stemcells# bosh public stemcells

+---------------------------------------------+

| Name |

+---------------------------------------------+

| bosh-stemcell-2131-aws-xen-ubuntu.tgz |

| bosh-stemcell-2131-aws-xen-centos.tgz |

| light-bosh-stemcell-2131-aws-xen-ubuntu.tgz |

| light-bosh-stemcell-2131-aws-xen-centos.tgz |

| bosh-stemcell-2131-openstack-kvm-ubuntu.tgz |

| bosh-stemcell-2131-openstack-kvm-centos.tgz |

| bosh-stemcell-2131-vsphere-esxi-ubuntu.tgz |

| bosh-stemcell-2131-vsphere-esxi-centos.tgz |

| bosh-stemcell-40-warden-boshlite-ubuntu.tgz |

+---------------------------------------------+

To download use `bosh download public stemcell <stemcell_name>'. For full url use --full.To download use `bosh download public stemcell <stemcell_name>'. For full url use --full.

root@neal-Lenovo-Product:~/stemcells# bosh download public stemcell bosh-stemcell-2131-vsphere-esxi-ubuntu.tgz

bosh-stemcell: 15% |ooo | 60.9MB 19.5KB/s ETA: 04:49:51

bosh-stemcell: 61% |oooooooooooooo | 240.7MB 24.9KB/s ETA: 01:44:01

bosh-stemcell: 100% |oooooooooooooooooooooooo| 392.7MB 24.8KB/s Time: 04:29:51

Download complete

下载完成之后,进入deployments目录编写 micro的配置文件

root@neal-Lenovo-Product:~# cd deployments/

root@neal-Lenovo-Product:~/deployments# ls

root@neal-Lenovo-Product:~/deployments# mkdir micro01

编写micro—bosh的配置文件

root@neal-Lenovo-Product:~/deployments/micro01# vi micro_bosh.yml

---

name: micro01

network:

ip: 10.0.0.8

netmask: 255.255.255.0

gateway: 10.0.0.1

dns:

- 192.168.1.1

cloud_properties:

name: VM Network

resources:

persistent_disk: 16384

cloud_properties:

ram: 4096

disk: 16384

cpu: 2

cloud:

plugin: vsphere

properties:

agent:

ntp:

- ntp01.las01.emcatmos.com

- ntp02.las01.emcatmos.com

vcenters:

- host: 10.0.0.233

user: administrator

password: Passw0rd

datacenters:

- name: newdatacenter

vm_folder: vm_folder

template_folder: template_folder

disk_path: bosh

datastore_pattern: NFS

persistent_datastore_pattern: NFS

allow_mixed_datastores: true

clusters:

- newcluster

# resource_pool: resourcepool

~

注意格式,每层有2个空格,这里粘贴有问题

接下来检测配置文件是否正确

root@neal-Lenovo-Product:~/deployments# bosh micro deployment micro01

WARNING! Your target has been changed to `https://10.0.0.8:25555'!

Deployment set to '/root/deployments/micro01/micro_bosh.yml'

部署micro—bosh

root@neal-Lenovo-Product:~/deployments# bosh micro deploy ~/stemcells/bosh-stemcell-2131-vsphere-esxi-ubuntu.tgz

Deploying new micro BOSH instance `micro01/micro_bosh.yml' to `https://10.0.0.8: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: 2131

Deploy Micro BOSH

Unpacking stemcell | | 0/11 00:00:03 ETA: --:--:--at depth 0 - 20: unable to get local issuer certificate

uploading stemcell (00:01:21)

Creating VM from... |oooo | 2/11 00:02:35 ETA: 00:05:11at depth 0 - 20: unable to get local issuer certificate

Creating VM from... |oooo | 2/11 00:02:38 ETA: 00:05:08at depth 0 - 20: unable to get local issuer certificate

Creating VM from... |oooo | 2/11 00:02:39 ETA: 00:05:07at depth 0 - 20: unable to get local issuer certificate

creating VM from sc-705c71be-b1a5-4b09-98ad-c6e7ee2437bf (00:01:32)

Waiting for the agent |oooooo | 3/11 00:03:16 ETA: 00:07:34at depth 0 - 20: unable to get local issuer certificate

waiting for the agent (00:00:19)

create disk (00:00:00)

|oooooooooo | 5/11 00:03:17 ETA: 00:03:55at depth 0 - 20: unable to get local issuer certificate

mount disk (00:00:09)

stopping agent services (00:00:01)

Applying micro BOSH spec |ooooooooooooooo | 7/11 00:04:03 ETA: 00:01:21at depth 0 - 20: unable to get local issuer certificate

applying micro BOSH spec (00:00:25)

starting agent services (00:00:00)

waiting for the director (00:00:22)

Done 11/11 00:04:25

Deployed `micro01/micro_bosh.yml' to `https://10.0.0.8:25555', took 00:04:25 to complete

看到这样的结果 你已经部署成功了micro bosh


                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: