Skip to content

Add support for Azure storage#77

Merged
theimowski merged 6 commits intoSAFE-Stack:masterfrom
isaacabraham:azure-storage
May 10, 2018
Merged

Add support for Azure storage#77
theimowski merged 6 commits intoSAFE-Stack:masterfrom
isaacabraham:azure-storage

Conversation

@isaacabraham
Copy link
Copy Markdown
Member

This is probably as far as we should go in terms of a "generic" Azure SAFE implementation. It adds a Storage account to the ARM template, links it to the application through a connection string, adds the basic Azure Storage SDK to the Server project and creates an instance of the CloudStorageAccount.

Note: The local development environment (currently) only exists on Windows (and even that requires an installation). Nonetheless, this is still a good starting point for working with Azure Storage (provided we document it!).

@isaacabraham isaacabraham requested a review from theimowski May 3, 2018 06:52
# Conflicts:
#	Content/src/Server/ServerSuave.fs
@theimowski
Copy link
Copy Markdown
Member

Should this always come with Azure option? I.e. what if one wants to use Azure integration without Azure storage?

@isaacabraham
Copy link
Copy Markdown
Member Author

@theimowski I'm only speaking from personal experience here but I'm yet to work on an Azure-ready application that didn't use a Storage account in some way, shape or form.

  • The storage account is actually free to create - you only pay when you start to store data in it (and even then it's pennies) so from a "hidden cost" point of view I would say that it's not a problem.
  • It's not invasive in terms of the application - you get a CloudStorageAccount object that you can use, or not.

We could make it configurable but even then I would rather have it turned on by default.

@theimowski
Copy link
Copy Markdown
Member

fair enough, let me just test all server options and then add it

Comment thread Content/arm-template.json
"prefix": "[concat('safe-', variables('environment'))]",
"appServicePlan": "[concat(variables('prefix'), '-web-host')]",
"web": "[concat(variables('prefix'), '-web')]",
"storage": "[concat('safe', variables('environment'), 'storage')]",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't use same naming convention (add dashes) as for other resources?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Storage accounts have stricter requirements. No dashes, max of 24 characters and all lower case. In fact I'll probably add some more code into the template or script to enforce them all.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright then

@theimowski
Copy link
Copy Markdown
Member

theimowski commented May 10, 2018

LGTM, thanks a lot!

@theimowski theimowski merged commit 0b1a141 into SAFE-Stack:master May 10, 2018
@theimowski
Copy link
Copy Markdown
Member

released in 0.19.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants