This message was deleted.
# extensions
a
This message was deleted.
b
@busy-ability-54059 or @stocky-account-63046? ☝🏻
👍 1
b
It's the node driver example in the ui-plugin-examples, which should be backed by the documentation link you referenced
r
Thank you! I'll give it a go and report back.
I cloned the example repository at https://github.com/rancher/ui-plugin-examples and ran it against a running Rancher v2.10.0 instance using
API=https://${IP} yarn dev
. However I don't see the custom Cloud Credential view for OpenStack even with the OpenStack Node Driver enabled. When I navigate to the Cloud Credentials tab I get a runtime error:
Copy code
node is undefined
parentNode@https://localhost:8005/js/chunk-vendors.js:19296:25
componentUpdateFn@https://localhost:8005/js/chunk-vendors.js:15549:17
...
Is there updated documentation/code for writing UI Extensions against Rancher v2.10.0?
b
@rapid-eye-61308 as per https://github.com/rancher/ui-plugin-examples/tree/main/pkg/node-driver, it’s an in progress example and it isn’t fully finalised. This extension wasn’t migrated to vue3 (which is Rancher 2.10 compliant) because since it depended on an external provider that requires dedicated setup it’s very difficult to test, but the logic that the example provides is the basis for any node driver implementation. Since the boilerplate app (root of the
ui-plugin-examples
) is already vue3 compliant, the challenge left is just to adapt the syntax changes, which the most commonly found are https://extensions.rancher.io/extensions/next/rancher-2.10-support#notable-vue3-syntax-changes . I recommend that you follow the official guide from Vue in regards to migrating to vue3: https://v3-migration.vuejs.org/
r
Sweet. I'll give it a go today. See where I get. For context I'm looking to create an Oxide machine driver and then customize it with a UI Extension for
cloud-credential
and
machine-config
.
👍 1
Thank you for your help on this! I'm going to punt on this until https://github.com/rancher/dashboard/issues/12649 is resolved and the documentation is more current/stable. I have components rendering but I'm not entirely sure what the data binding model is. For example, how does data within
cloud-credential
relate to
machine-config
and vice versa? For now simply creating the Go machine driver should be enough for our use cases, even if the UI is default and not polished.
b
@rapid-eye-61308 the
cloud-credential
is the part about credentials specific for the provider (check video). The
machine-config
is the provider-dedicated configuration for the machine pools (check screenshots)
r
Yep! That much I already knew. I was able to get components rendering for the the
cloud-credential
. I didn't attempt the
machine-config
yet through. My issue is understanding how the input for these fields relates to the node driver configuration. There are annotations for the node driver binary that I'm not sure what their purpose is and how to set them on a third-party node driver. Also, when I configure a node driver through the UI and give it my binary location and checksum it creates a random ID (e.g.,
xx-123xx
) for the node driver. Then when I go to use that driver to create a cluster it hangs because there's no correct
oxide
driver installed. I instead have to use a Kubernetes manifest to create the node driver so the ID is correctly set as
oxide
.
b
I am not the best person to follow about the inners of node drivers configuration, but have you dug in to https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/authentication-permiss[…]ration/about-provisioning-drivers/manage-node-drivers? Maybe there complimentary information that helps you with that
r
Yep! Read all that documentation and then some. No dice yet.
s
Hi @rapid-eye-61308. I've added some comments / created issues for UI based docs gaps. However you're hitting something outside our remit. The annotations covered in https://extensions.rancher.io/extensions/next/usecases/node-driver/about-drivers#driver-binary (along with the link to rancher code https://github.com/rancher/rancher/blob/release/v2.6/pkg/data/management/machinedriver_data.go) cover as much as i know that's documented UI side. Might be worth looking at some existing node drivers that are open source to see more • https://github.com/phoenixnap/docker-machine-driver-pnap/https://github.com/outscale/docker-machine-driver-outscalehttps://github.com/nutanix/docker-machine ◦ Rancher node drivers are based on docker machine - https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/authentication-permiss[…]ration/about-provisioning-drivers/manage-node-drivers To understand more how the UI uses information from node drivers see the schema's and their
resourceFeilds
• <rancher url>/v3/schema/digitaloceancredentialConfig • <rancher url>/v3/schemas/amazonec2credentialconfig • which are then put into the cloudcredential itself via properties from <rancher url>/v3/schema/cloudcredential 's resourceFields How the docker machine then uses values within a cc to provision a node... unfortunately i do not know
🙏 1
r
Thank you! I've seen most of those resources. The pnap and outscale links are new to me and helpful. I have a working node driver at https://github.com/oxidecomputer/rancher-machine-driver-oxide/tree/sudomateo/machine-driver. I'm going to clean it up today and get it ready for more refinement. The schema URLs are really helpful. Thank you for that!