-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC for Azure Chef Extension cmdlet #10
RFC for Azure Chef Extension cmdlet #10
Conversation
Azure SDK has the cmdlet below to add an extension - Set-AzureVMExtension: https://github.com/Azure/azure-sdk-tools/blob/master/WindowsAzurePowershell/src/Commands.ServiceManagement/IaaS/Extensions/Common/SetAzureVMExtension.cs | ||
|
||
The command can be used to add Chef extension, currently as: | ||
$vmObj1 = Set-AzureVMExtension -VM $vmObj1 -ExtensionName ‘ChefAgent’ -Publisher ‘Chef.Azure’ -Version 11.6 -PublicConfigPath 'publicconfig.config' -PrivateConfigPath 'privateconfig.config' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we should also change the extension so that it can take additional params and make client.rb parameter optional:
- server url
- organization (may be blank for open source chef)
- validation client
You would have to specify at least one of server url or client.rb, and if you're using enterprise chef, you must specify 2. I believe #3 can be chosen from some sensible default. If you specify client.rb, 1,2, and 3 above would override anything in it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think params should include:
-client-rb
-validation-key
-runlist
-server-url
-server-url-generic
-organization
If you specify -server-url, you aren't allowed to specify -server-url-generic or -organization. -server-url is identical to --server-url with knife-azure. If you specify -server-url-generic, you specify the server url without the organization. Then -organization must be specified.
If -client-rb is specified, you don't have to specify serverurl, organization, or validation client. But if you do, the values of serverurl / organization and validation client will override whatever is in client.rb.
This lets people just specify a client-rb if they want, but also lets them fully automate using the cli args if they know what they are doing. And if they really want to, they can do both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please leverage PowerShell parameter sets and make the parameter names following the PS guideline. I can take a final look after you've updated the design.
A good way to describe the cmdlet usage is something similar on content (not necessarily format) to the standard Azure help: NAME SYNOPSIS SYNTAX
DESCRIPTION PARAMETERS
|
### Set-ChefAzureVMExtension | ||
Azure SDK has the cmdlet below to add an extension - Set-AzureVMExtension: https://github.com/Azure/azure-sdk-tools/blob/master/WindowsAzurePowershell/src/Commands.ServiceManagement/IaaS/Extensions/Common/SetAzureVMExtension.cs | ||
|
||
The command can be used to add Chef extension, currently as: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the generic VM extension cmdlet we have which works for any extensions. We should have the Chef specific ones as I mentioned in my previous comment.
@adamedx , @guangyang - please have a look at the updated RFC - |
New-AzureVM -Location 'West US' -ServiceName $svc -VM $vmObj1 | ||
|
||
#### Params Supported | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So params should have a single "-'. Also, can switches have a '-' in the middle?
I'm not sure this needs to be an RFC. Given the age of this PR, can we just close it, and do any necessary work (assuming there's any left) as a PR for knife-azure? (cc @adamedx ) |
Closing the PR.. |
Um, I don't know how that happened. huboard / waffle perhaps? |
@NimishaS - fyi |
No description provided.