From fa75e5e78fdfcdfb727307b3af551f1d2b86aa71 Mon Sep 17 00:00:00 2001 From: Neha Jain Date: Wed, 3 Oct 2018 15:41:55 -0700 Subject: [PATCH 1/2] Include metadata as part of create_vm and create_disk --- proposals/include-metadata.md | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 proposals/include-metadata.md diff --git a/proposals/include-metadata.md b/proposals/include-metadata.md new file mode 100644 index 0000000..efb58be --- /dev/null +++ b/proposals/include-metadata.md @@ -0,0 +1,49 @@ +- State: discussing +- Start date: ? +- End date: ? +- Docs: ? + +# Summary + +CPI should pass metadata information as part of create_vm and create_disk call + +# Motivation + +To be able to use this metadata information e.g deployment_name/instance_group name during vm_creation. +VM CID can be prefixed with instance_group name so that it is easy to identify VM in vCenter. +Created disk could also be organized using this metadata information + +# Details + +Metadata will include basic information about director, deployment and instance_group. E.g + +``` +{ + director_name: "production-director", + director_uuid: "abcd-2134-5678" + deployment_name: "kafka", + instance_group: "my_instance_group", + } + +``` + +create_vm interface will now be: + +```create_vm(agent_id, stemcell_cid, cloud_properties, network_settings, disks, env, metadata)``` + +create_disk interface will now be: + +```create_disk(size, cloud_properties, vm_locality, metadata)``` + +Information provided in metadata is right now passed as part of groups array inside env hash. CPI is not supposed to +rely on this information. Adding new argument metadata will make this data more reliable and useful for various IAAS. + +There have been request for this from different IAAS as well. See Issue #[62](https://github.com/cloudfoundry/bosh-aws-cpi-release/issues/62), Issue #[1163](https://github.com/cloudfoundry/bosh/issues/1163) + +# Drawbacks + +Change to CPI contract + +# Unresolved questions + +What other information can be added as part of this set? \ No newline at end of file From d0c0aaddb5d0f3885b81b877c0278cf1e2901439 Mon Sep 17 00:00:00 2001 From: Neha Jain Date: Wed, 13 Feb 2019 10:30:54 -0800 Subject: [PATCH 2/2] Update based on feedback --- proposals/include-metadata.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/proposals/include-metadata.md b/proposals/include-metadata.md index efb58be..c8dbebd 100644 --- a/proposals/include-metadata.md +++ b/proposals/include-metadata.md @@ -5,7 +5,7 @@ # Summary -CPI should pass metadata information as part of create_vm and create_disk call +CPI should pass metadata information as part of create_vm, create_disk, create_snapshot call # Motivation @@ -15,7 +15,8 @@ Created disk could also be organized using this metadata information # Details -Metadata will include basic information about director, deployment and instance_group. E.g +Metadata will include basic information about director, deployment and instance_group. All the tags that is being sent as part of set_vm_metadata call right now. +E.g ``` { @@ -46,4 +47,6 @@ Change to CPI contract # Unresolved questions -What other information can be added as part of this set? \ No newline at end of file +How should set_vm_metadata and set_disk_metadat methods be updated? + +As suggested set_vm_metadata and set_disk_metadata could send metadata keys hich can change later after the initial create vm/disk/snapshot call.