2021-05-03 创建director

使用bosh 安装cpi (director)虚机从而实现对vcenter的管理

1、下载已经制作好的客户端环境docker镜像并运行并进入

docker pull registry.cn-shenzhen.aliyuncs.com/shine_fei/bosh:6.4.3.2  
docker run -d  --name boshclient registry.cn-shenzhen.aliyuncs.com/shine_fei/bosh:6.4.3.2
docker exec -it boshclient /bin/bash
cd /root/bosh-1

2、根据自己的vcenter信息修改并执行,从而创建cpi 机器来管理vcenter

bosh create-env bosh-deployment/bosh.yml \
    --state=state.json \
    --vars-store=creds.yml \
    -o bosh-deployment/vsphere/cpi.yml \
    -v director_name=bosh-1 \
    -v internal_cidr=192.168.0.0/24 \
    -v internal_gw=192.168.0.1 \
    -v internal_ip=192.168.0.162 \
    -v network_name="portgoup1" \
    -v vcenter_dc=Datacenter \
    -v vcenter_ds=datastore1 \
    -v vcenter_ip=192.168.0.204 \
    -v vcenter_user=administrator@vsphere.local \
    -v vcenter_password='password' \
    -v vcenter_templates=bosh-1-templates \
    -v vcenter_vms=bosh-1-vms \
    -v vcenter_disks=bosh-1-disks \
    -v vcenter_cluster=ruichang

3、连接bosh cpi

# Configure local alias
bosh alias-env bosh-1 -e 192.168.0.162 --ca-cert <(bosh int ./creds.yml --path /director_ssl/ca)

# Log in to the Director
export BOSH_CLIENT=admin
export BOSH_CLIENT_SECRET=`bosh int ./creds.yml --path /admin_password`

# Query the Director for more info
bosh -e bosh-1 env

4、卸载安装
注意:如果使用该cpi部署过deployment,请先通过该cpi删除掉相关的deployment。

bosh delete-env bosh-deployment/bosh.yml \
    --state=state.json \
    --vars-store=creds.yml \
    -o bosh-deployment/vsphere/cpi.yml \
    -v director_name=bosh-1 \
    -v internal_cidr=192.168.0.0/24 \
    -v internal_gw=192.168.0.1 \
    -v internal_ip=192.168.0.162 \
    -v network_name="portgoup1" \
    -v vcenter_dc=Datacenter \
    -v vcenter_ds=datastore1 \
    -v vcenter_ip=192.168.0.204 \
    -v vcenter_user=administrator@vsphere.local \
    -v vcenter_password='password' \
    -v vcenter_templates=bosh-1-templates \
    -v vcenter_vms=bosh-1-vms \
    -v vcenter_disks=bosh-1-disks \
    -v vcenter_cluster=ruichang

参考官方文档
https://bosh.io/docs/init-vsphere/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值