-
Notifications
You must be signed in to change notification settings - Fork 197
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
Azd CLI Extensibility #810
Comments
DO we know if the above extensibility model will allow us to use the logged in identity context to pass to the custom scripts? |
@anevjes - could you give us an example of what types of calls you would like to make? REST API calls to ARM control plan or MS Graph? |
Moving to Gallium cc @savannahostrowski |
Moving this to backlog for now. We can pull this back in when we have more use-cases for core command extensibility. Addressed - Hooks, Customizable up workflow (also enables skipping commands) |
Spike to investigate on extensibility in Azd
Use Cases
The following are a list of use cases to explore during this spike
azd up
workflow #3173See details below on each use case
Customer Scenarios
Subscribe to azd command hooks
For some applications it is a requirements that developers be able to run custom scripts either before or after azd commands.
This would enable many different scenarios. For example azd does not enforce any tests to be run between provision and deploy. Using pre/post command hooks would allow custom scripts to run to validate the state of an environment before moving on to deploy commands or additional stages.
Within the
azure.yaml
introduce ascripts
section similar to that of Node applications. Scripts could either be a single, multiline script of a reference to a script that exists within the same repo.Configuration based approach
Script section can either be defined at the root of
azure.yaml
or within a single service.Root configuration
Service configuration
Convention based approach
Another option is to use a convention based approach where we automatically look for files within the
.azure/hooks
folder. If we find a file calledpredeploy.sh
we automatically wire it up as apre
deploy
command hook and execute it accordingly.Override built-in commands
This would enable more complex use cases where
azd
doesn't have support for a particular service target, language or similar and the dev wants to take more granular control of the workflow.Define custom commands
Ability to define custom commands and execute them through azd. A dev organization likely had a bunch of other scripts involved in their products that may relate to their overall platform or a specific service. It would be good for devs to be able to define their own custom azd command groups that execute scripts against their apps & infra.
More TBD.
Plugin Model
How do we allow external contributions into AZD for things like language/framework services, application targets, provisioning/pipeline providers etc?
Options
If we develop our own plug-in model the leading method for cross process communication in go is to leverage gRPC & protocol buffers. This is the same implementation used under the covers for tools like Terraform.
Protobuf establishes the interface between the client & server and communication happens via gRPC. There are well established go modules.
gRPC Go Quickstart
Technical Details
We should support a variety of script options including shell scripts & powershell.
Inputs
All scripts should be executed from
azd
with all values from local.env
file made available.Questions
The text was updated successfully, but these errors were encountered: