catalog icon indicating copy to clipboard operation
catalog copied to clipboard

[Addon] add terraform-vsphere addon

Open lunarwhite opened this issue 2 years ago • 7 comments

Description of your changes

Fixes: https://github.com/kubevela/kubevela/issues/3337

Per this guide: https://kubevela.io/docs/platform-engineers/addon/terraform

I've done:

  • prepare metadata for the VMware vSphere, per kubevela/terraform-controller.
  • generate the Terraform addon by make terraform-addon-gen.
  • verify the addon in local velad env.

How has this code been tested?

Try to enable the addon by local dir in local velad env, and check the created provider.

Checklist

I have:

  • [x] Title of the PR starts with type (e.g. [Addon] , [example] or [Doc]).
  • [x] Updated/Added any relevant documentation and examples.
  • [ ] New addon should be put in experimental.
  • [ ] Update addon should modify the version in metadata.yaml to generate a new version.

Note

I'm not sure if this is considered a "new" addon, since it is a terraform addon and automatically generated in dir ./addon. So I just keep it in the origin path. If not proper, we can move it into ./experimental/addons.

lunarwhite avatar Aug 13 '22 06:08 lunarwhite

Can you provide at least one component definition in the addon and test if provider works?

chivalryq avatar Aug 15 '22 03:08 chivalryq

Is this PR still in progress? @lunarwhite

chivalryq avatar Aug 29 '22 06:08 chivalryq

Yes, still WIP. vSphere is not a public cloud provider like aws/gcp, so it would take more efforts to setup the platform from scratch. BTW, Are you familiar with setuping vSphere?

I would update if met trouble.

lunarwhite avatar Aug 29 '22 07:08 lunarwhite

I didn't use vSphere. But if you met trouble, free to ask here. :)

chivalryq avatar Aug 30 '22 02:08 chivalryq

I've add two component definitions for addon terraform-vsphere

  • https://github.com/kubevela-contrib/terraform-modules/pull/16
  • https://github.com/kubevela-contrib/terraform-modules/pull/17

Next step, I'll add related docs in kubevela.io.

lunarwhite avatar Sep 08 '22 04:09 lunarwhite

After checking the vShpere terraform provider and vSphere file resources. I'm not sure how this vSphere provider can do with KubeVela.

Let's say you create application with a vsphere_file component. That means user upload a file to vSphere datastore? When the application is deleted, will the file uploaded be deleted in vSphere datastore? In what situation will user create an application to upload a file?

On the other hand, user have to create vsphere datastore in the vSphere portal by hand. We should provide a complete use case.

chivalryq avatar Sep 14 '22 08:09 chivalryq

After checking the vShpere terraform provider and vSphere file resources. I'm not sure how this vSphere provider can do with KubeVela.

As a non public cloud provider, vSphere requires user to setup vCenter Server and ESXi. Refere to the provider docs for info on all of the resources and data sources supported by this provider. Each includes a detailed description of the purpose and how to use it.

Let's say you create application with a vsphere_file component. That means user upload a file to vSphere datastore?

Right. User also can copy files between datastores, or from one location to another on the same datastore.

When the application is deleted, will the file uploaded be deleted in vSphere datastore?

Yes. It's like terraform apply and terraform destroy.

In what situation will user create an application to upload a file?

In vSphere design, file here means ISOs and virtual disk files in most cases.

On the other hand, user have to create vsphere datastore in the vSphere portal by hand. We should provide a complete use case.

Yes, user should have a datastore resource to use vsphere_file. I choose those two just for quickly verifying the addon. Maybe We could add more supported resources in the future.

lunarwhite avatar Sep 15 '22 12:09 lunarwhite

Thanks for the contribution! As a new addon, I suggest to move this addon to experimental firstly.

wangyikewxgm avatar Jan 11 '23 02:01 wangyikewxgm

Hi @chivalryq @wangyikewxgm , thanks for your reviews! I've move it to experimental/addon

lunarwhite avatar Jan 12 '23 03:01 lunarwhite