projectkudu / slingshot

This project implements the Deploy To Azure button
http://azure.microsoft.com/blog/2014/11/13/deploy-to-azure-button-for-azure-websites-2/
51 stars 20 forks source link

pass in parameters via parameters.json #62

Closed jeffpatton1971 closed 8 years ago

jeffpatton1971 commented 8 years ago

I have worked very hard over the past week or so developing a standard set of templates that would allow my group to easily deploy servers to azure. This is all controlled through the parameters.azuredeploy.json file, and this just works if we run this through powershell. We'd like to be able to provide a series of buttons on our repo that would allow us to easily push a deployment with a given set of parameters.

Is there a way to add the uri for the parameters.json into the deploy to azure link?

shrimpy commented 8 years ago

@jeffpatton1971

slingshot by default use this ARM template to deployment your site.

But you can have your own ARM template, create "azuredeploy.json" at the root of your repository, slingshot will use content from "azuredeploy.json" as ARM template. Does this address your issue?

jeffpatton1971 commented 8 years ago

@shrimpy (love your handle btw) no, it really doesn't as my azuredeploy.json has several params. Based on what service that we are deploying each param will have different values. So spinning up a set of log servers would take a different set of params than say spinning up a set of web servers. our azuredeploy simply calls a series of nested templates based on what is needed.

ideally would love to have a querystring that I could add at the least the relative name of the parameters file.

does that make sense?

shrimpy commented 8 years ago

@jeffpatton1971

Adding a query string to point to custom template should be easy to do.

Just want to confirm, when you say "parameters", do you mean an ARM template similar to our default template?

jeffpatton1971 commented 8 years ago

like this

https://azure.microsoft.com/en-us/documentation/articles/resource-group-linked-templates/#linking-to-a-parameter-file

shrimpy commented 8 years ago

@jeffpatton1971

thanks for sharing the link. so the parameters in the template is a place holder, and the actual values for each parameter is from the parameters.json.

currently slingshot assume parameter definition and value are all stay inside the template. and slingshot UI is driven by those parameters. which mean values for each parameters could be changed by end-user who perform the deployment.

so what you really want is when you deploy different service, the default value on slingshot UI is configurable (value come from parameters.json). slingshot will need to parse parameter.json, and use the value as default value for parameters that define in template.

change should be straightforward

@davidebbo shall we make the change?

shrimpy commented 8 years ago

@jeffpatton1971

change is now live, please try it. For documentation, please refer to below link

https://github.com/projectkudu/slingshot/blob/shrimpy-readme/README.md