christopheranderson / azure-demeteorizer

CLI tool for deploying demeteorized meteor apps on Azure App Service.
MIT License
26 stars 8 forks source link

Load meteor settings from file #8

Open ramijarrar opened 8 years ago

ramijarrar commented 8 years ago

Other CLI tools (modulus/meteor itself) include an option to load METEOR_SETTINGS from a json file before deployment. This can be accomplished in the Azure portal right now, but it isn't as safe as loading it directly from version control.

The Azure CLI already allows us to set app settings dynamically, so it would be a matter of integrating that into the deploy step (though that would require we are authentiated).

ramijarrar commented 8 years ago

Just noticed that the Kudu API includes method for setting app settings, using this to add METEOR_SETTINGS would probably be a relatively simple addition to the current deploy step (along with #9)

christopheranderson commented 8 years ago

Unfortunately, the Kudu APIs won't add app settings in the way that we'd expect. To set App Settings from a JSON file would require calling the ARM APIs. This is something that can be done, but will require probably a separate instruction/step since I'll need your Azure Creds to do call the ARM API.

ramijarrar commented 8 years ago

Given the need for Azure creds in the 'clean' command proposed in #9 would it be easy to work this functionality into that design (e.g I imagine something in which the authentication step could be abstracted)?

christopheranderson commented 8 years ago

Creds used for deploy aren't Azure Credentials, they are deployment credentials. Getting the credentials isn't hard, though. Main issue ends up being parsing the file appropriately and not-duping settings. It'll take some thought to not introduce bugs.

ramijarrar commented 8 years ago

I was talking about the clean command that was proposed earlier. Though considering the fact that it's now likely to be implemented as a deploy option, the abstraction would be redundant regardless.