vExperts Advent Calendar の slack 通知ネタの延長戦にしようかと思ったが、
思っていたより時間がかかりそうなので、鮮度が良い内に小出しに。
VEBA とは
vCenter Event Broker Appliance の略。
VMworld EU のセッションで発表され、VMware Flings にて11月初旬に公開されたもので、vCenter のイベント駆動でファンクションを実行してくれる faas アプライアンス。
flings.vmware.com
内部アーキテクチャとしては Photon OS に Kubernetes を乗せ、
その上に OpenFaaS を立て、vcenter-connector 経由で vCenter のイベントを pull?している。
Ingress には Contour を使っているようだが、意識することはあるのだろうか…
これらがひとつの OVA アプライアンスとして固められて配布されている。
Download
Flings から入手可能ではあるが、Flings から入手できるのは 0.1.0 で、
実は既に 0.2.0 が存在している。
先日まで Flings の VEBA の Comments タブがあってその中に URL が載っていたのだが、今見ても Comments が見当たらず…
夢を見ていた…?
とりあえず手元にある 0.2.0 でデプロイをすすめる。
VMware {Code} とか slack 見ればあるのかな…
Deploy with ovftool
ovftool を使って CLI デプロイを行う。
プロパティ等々は以下。 NW 設定がほとんどで、パスワード系が何個か。
細かい解説は割愛しますので、ご自分の環境に合わせて置き換えてください。
ovftool -n='VEBA' \
-ds=datastore-hdd \
-dm=thin \
--net:'VM Network=VM Network' \
--prop:guestinfo.hostname=veba01 \
--prop:guestinfo.ipaddress=192.168.0.61 \
--prop:guestinfo.netmask=24 \
--prop:guestinfo.gateway=192.168.0.1 \
--prop:guestinfo.dns=192.168.0.52 \
--prop:guestinfo.domain=home.lab \
--prop:guestinfo.root_password=hogehoge \
--prop:guestinfo.openfaas_password=fugafuga \
--prop:guestinfo.vcenter_server=192.168.0.50 \
--prop:guestinfo.vcenter_username=administrator@vspehre.local \
--prop:guestinfo.vcenter_password=hogefuga \
--prop:guestinfo.vcenter_disable_tls_verification=True \
--prop:guestinfo.debug=True \
--noSSLVerify \
--allowExtraConfig \
--acceptAllEulas \
--powerOn \
./vCenter_Event_Broker_Appliance_0.2.0.ova \
'vi://vcsa01.home.lab/home01/host/cls01/192.168.0.51'
余談
--prop:guestinfo.netmask=24
最初ココを "255.255.255.0" で指定しててネットワーク疎通しなかったという失敗談。
どこかの Doc 読めばわかる話ではあるが、この項目名だと prefix とは思わないよねぇ…
OVA のプロパティ詳細
ovftool vCenter_Event_Broker_Appliance_0.1.0.ova
OVF version: 1.0
VirtualApp: false
Name: vCenter Event Broker Appliance
Version: 0.1.0
Vendor: VMware
Product URL: https://flings.vmware.com/vcenter-event-broker-appliance
Vendor URL: https://www.vmware.com/
Annotation: Version: 0.1.0
Download Size: 541.50 MB
Deployment Sizes:
Flat disks: 12.00 GB
Sparse disks: 1.58 GB
Networks:
Name: VM Network
Description: The VM Network network
Virtual Machines:
Name: vCenter_Event_Broker_Appliance
Operating System: otherguest
Virtual Hardware:
Families: vmx-13
Number of CPUs: 2
Cores per socket: 1
Memory: 8.00 GB
Disks:
Index: 0
Instance ID: 9
Capacity: 12.00 GB
Disk Types: SCSI-lsilogic
NICs:
Adapter Type: VmxNet3
Connection: VM Network
Properties:
Key: guestinfo.hostname
Category: Networking
Label: Hostname
Type: string
Description: Hostname of system
Key: guestinfo.ipaddress
Category: Networking
Label: IP Address
Type: string
Description: IP Address of the system
Key: guestinfo.netmask
Category: Networking
Label: Netmask Prefix
Type: string
Description: CIDR notation (e.g. 24 for 255.255.255.0, 28 for
255.255.255.240)
Key: guestinfo.gateway
Category: Networking
Label: Gateway
Type: string
Description: Gateway of the system
Key: guestinfo.dns
Category: Networking
Label: DNS
Type: string
Description: DNS Server
Key: guestinfo.domain
Category: Networking
Label: DNS Domain
Type: string
Description: DNS Domain
Key: guestinfo.root_password
Category: Credentials
Label: Root Password
Type: password
Description: Password to login in as root. Please use a secure password
Key: guestinfo.openfaas_password
Category: Credentials
Label: OpenFaaS Password
Type: password
Description: Password to login into OpenFaaS. Please use a secure password
Key: guestinfo.vcenter_server
Category: vSphere
Label: vCenter Server
Type: string
Description: IP Address or Hostname of vCenter Server
Key: guestinfo.vcenter_username
Category: vSphere
Label: vCenter Username
Type: string
Description: Username to login to vCenter Server
Key: guestinfo.vcenter_password
Category: vSphere
Label: vCenter Password
Type: password
Description: Password to login to vCenter Server
Key: guestinfo.vcenter_disable_tls_verification
Category: vSphere
Label: Disable vCenter Server TLS Verification
Type: boolean
Description: Disable TLS Verification for vCenter Server (required for
self-sign certificate)
Value: False
Key: guestinfo.debug
Category: zDebug
Label: Debugging
Type: boolean
Description: Enable Debugging
Value: False
デプロイすると
VEBA に HTTPS でアクセスすると ID/Pass が求められる。
User:admin / Pass:デプロイ時の openfaas_password で OpenFaaS の GUI が見える。
このとき、URL は IP でなくホスト名でないとアクセスできないので、DNS 登録するか hosts に IP とホスト名を書いておく(VirtualHost 的なあれ)
https://【VEBAホスト】/status でステータスページ、
https://【VEBAホスト】/bootstrap で起動ログ(/var/log/bootstap.log を確認することができる。
起動ログはデプロイ時のパス3種 (root/openfaas/vCenter) がガッツリ出力されているので取り扱いにはご注意を…(debut=true のせい?)
今日はここまで
サンプルでも動かしてみようと思ったが、ローカルにコンテナレジストリを立てる必要があるらしく、とりあえず一旦ここまで。
続きはそのうち書きます…
謝辞
丁度 VEBA のデプロイをしていると VEBA の開発者である William Lam 氏 (@lamw) から熱い reply が。
丁度デプロイしたぜーと返信つけるともう一人開発者である Michael Gasch 氏 (@embano1) からも reply が。
Thank you for your kindness!!