Umbraco7: Set up multiple /media/ blob containers within the same Azure Storage account











up vote
0
down vote

favorite












We have multiple Umbraco sites that we need to migrate from an on-premise to Azure web apps.



Each site has its own /media/ folder and as all the images require a big storage space (~2gb) and many read/write operations, we thought of using an Azure Storage Account via Blob containers solution for this.



Is it correct to say that using a single Azure Storage Account to serve all the sites' /media folders via Blob containers will cut costs rather than using separate storage accounts for every site?



We've found the UmbracoFileSystemProviders.Azure package which is great, but can't find any details on how to achieve what's stated in the title of this post.



Question: How can we set up multiple /media/ blob containers within the same Azure Storage account to serve the images of multiple Umbraco sites?










share|improve this question


























    up vote
    0
    down vote

    favorite












    We have multiple Umbraco sites that we need to migrate from an on-premise to Azure web apps.



    Each site has its own /media/ folder and as all the images require a big storage space (~2gb) and many read/write operations, we thought of using an Azure Storage Account via Blob containers solution for this.



    Is it correct to say that using a single Azure Storage Account to serve all the sites' /media folders via Blob containers will cut costs rather than using separate storage accounts for every site?



    We've found the UmbracoFileSystemProviders.Azure package which is great, but can't find any details on how to achieve what's stated in the title of this post.



    Question: How can we set up multiple /media/ blob containers within the same Azure Storage account to serve the images of multiple Umbraco sites?










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      We have multiple Umbraco sites that we need to migrate from an on-premise to Azure web apps.



      Each site has its own /media/ folder and as all the images require a big storage space (~2gb) and many read/write operations, we thought of using an Azure Storage Account via Blob containers solution for this.



      Is it correct to say that using a single Azure Storage Account to serve all the sites' /media folders via Blob containers will cut costs rather than using separate storage accounts for every site?



      We've found the UmbracoFileSystemProviders.Azure package which is great, but can't find any details on how to achieve what's stated in the title of this post.



      Question: How can we set up multiple /media/ blob containers within the same Azure Storage account to serve the images of multiple Umbraco sites?










      share|improve this question













      We have multiple Umbraco sites that we need to migrate from an on-premise to Azure web apps.



      Each site has its own /media/ folder and as all the images require a big storage space (~2gb) and many read/write operations, we thought of using an Azure Storage Account via Blob containers solution for this.



      Is it correct to say that using a single Azure Storage Account to serve all the sites' /media folders via Blob containers will cut costs rather than using separate storage accounts for every site?



      We've found the UmbracoFileSystemProviders.Azure package which is great, but can't find any details on how to achieve what's stated in the title of this post.



      Question: How can we set up multiple /media/ blob containers within the same Azure Storage account to serve the images of multiple Umbraco sites?







      azure azure-storage umbraco azure-storage-blobs umbraco7






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 7 at 13:44









      alex

      47611647




      47611647
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          You can indeed use the one Azure Storage Account; just set up different blob containers for each website - they actually don't need to be called "media". for example, I've set the containerName to Site1Media in the following example:



            <Provider alias="media" type="Our.Umbraco.FileSystemProviders.Azure.AzureBlobFileSystem, Our.Umbraco.FileSystemProviders.Azure">
          <Parameters>
          <add key="containerName" value="Site1Media"/>
          <add key="rootUrl" value="https://youritteam.blob.core.windows.net/"/>
          <add key="connectionString" value="DefaultEndpointsProtocol=https;AccountName=[Account];AccountKey=[Key]"/>
          <!--
          Optional configuration value determining the maximum number of days to cache items in the browser.
          Defaults to 365 days.
          -->
          <add key="maxDays" value="365"/>
          <!--
          When true this allows the VirtualPathProvider to use the deafult "media" route prefix regardless
          of the container name.
          -->
          <add key="useDefaultRoute" value="true"/>
          <!--
          When true blob containers will be private instead of public what means that you can't access the original blob file directly from its blob url.
          -->
          <add key="usePrivateContainer" value="false"/>
          </Parameters>




          The other thing about Azure Storage is that you only pay for the data you use; so it's not going to cost you extra to set up multiple Storage Accounts - there's probably very little benefit in having one Storage Account for multiple websites; and you may find it much easier later on to have one Storage Account per website - particularly if you want to move the website to another subscription down the track.






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53190694%2fumbraco7-set-up-multiple-media-blob-containers-within-the-same-azure-storage%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            2
            down vote













            You can indeed use the one Azure Storage Account; just set up different blob containers for each website - they actually don't need to be called "media". for example, I've set the containerName to Site1Media in the following example:



              <Provider alias="media" type="Our.Umbraco.FileSystemProviders.Azure.AzureBlobFileSystem, Our.Umbraco.FileSystemProviders.Azure">
            <Parameters>
            <add key="containerName" value="Site1Media"/>
            <add key="rootUrl" value="https://youritteam.blob.core.windows.net/"/>
            <add key="connectionString" value="DefaultEndpointsProtocol=https;AccountName=[Account];AccountKey=[Key]"/>
            <!--
            Optional configuration value determining the maximum number of days to cache items in the browser.
            Defaults to 365 days.
            -->
            <add key="maxDays" value="365"/>
            <!--
            When true this allows the VirtualPathProvider to use the deafult "media" route prefix regardless
            of the container name.
            -->
            <add key="useDefaultRoute" value="true"/>
            <!--
            When true blob containers will be private instead of public what means that you can't access the original blob file directly from its blob url.
            -->
            <add key="usePrivateContainer" value="false"/>
            </Parameters>




            The other thing about Azure Storage is that you only pay for the data you use; so it's not going to cost you extra to set up multiple Storage Accounts - there's probably very little benefit in having one Storage Account for multiple websites; and you may find it much easier later on to have one Storage Account per website - particularly if you want to move the website to another subscription down the track.






            share|improve this answer

























              up vote
              2
              down vote













              You can indeed use the one Azure Storage Account; just set up different blob containers for each website - they actually don't need to be called "media". for example, I've set the containerName to Site1Media in the following example:



                <Provider alias="media" type="Our.Umbraco.FileSystemProviders.Azure.AzureBlobFileSystem, Our.Umbraco.FileSystemProviders.Azure">
              <Parameters>
              <add key="containerName" value="Site1Media"/>
              <add key="rootUrl" value="https://youritteam.blob.core.windows.net/"/>
              <add key="connectionString" value="DefaultEndpointsProtocol=https;AccountName=[Account];AccountKey=[Key]"/>
              <!--
              Optional configuration value determining the maximum number of days to cache items in the browser.
              Defaults to 365 days.
              -->
              <add key="maxDays" value="365"/>
              <!--
              When true this allows the VirtualPathProvider to use the deafult "media" route prefix regardless
              of the container name.
              -->
              <add key="useDefaultRoute" value="true"/>
              <!--
              When true blob containers will be private instead of public what means that you can't access the original blob file directly from its blob url.
              -->
              <add key="usePrivateContainer" value="false"/>
              </Parameters>




              The other thing about Azure Storage is that you only pay for the data you use; so it's not going to cost you extra to set up multiple Storage Accounts - there's probably very little benefit in having one Storage Account for multiple websites; and you may find it much easier later on to have one Storage Account per website - particularly if you want to move the website to another subscription down the track.






              share|improve this answer























                up vote
                2
                down vote










                up vote
                2
                down vote









                You can indeed use the one Azure Storage Account; just set up different blob containers for each website - they actually don't need to be called "media". for example, I've set the containerName to Site1Media in the following example:



                  <Provider alias="media" type="Our.Umbraco.FileSystemProviders.Azure.AzureBlobFileSystem, Our.Umbraco.FileSystemProviders.Azure">
                <Parameters>
                <add key="containerName" value="Site1Media"/>
                <add key="rootUrl" value="https://youritteam.blob.core.windows.net/"/>
                <add key="connectionString" value="DefaultEndpointsProtocol=https;AccountName=[Account];AccountKey=[Key]"/>
                <!--
                Optional configuration value determining the maximum number of days to cache items in the browser.
                Defaults to 365 days.
                -->
                <add key="maxDays" value="365"/>
                <!--
                When true this allows the VirtualPathProvider to use the deafult "media" route prefix regardless
                of the container name.
                -->
                <add key="useDefaultRoute" value="true"/>
                <!--
                When true blob containers will be private instead of public what means that you can't access the original blob file directly from its blob url.
                -->
                <add key="usePrivateContainer" value="false"/>
                </Parameters>




                The other thing about Azure Storage is that you only pay for the data you use; so it's not going to cost you extra to set up multiple Storage Accounts - there's probably very little benefit in having one Storage Account for multiple websites; and you may find it much easier later on to have one Storage Account per website - particularly if you want to move the website to another subscription down the track.






                share|improve this answer












                You can indeed use the one Azure Storage Account; just set up different blob containers for each website - they actually don't need to be called "media". for example, I've set the containerName to Site1Media in the following example:



                  <Provider alias="media" type="Our.Umbraco.FileSystemProviders.Azure.AzureBlobFileSystem, Our.Umbraco.FileSystemProviders.Azure">
                <Parameters>
                <add key="containerName" value="Site1Media"/>
                <add key="rootUrl" value="https://youritteam.blob.core.windows.net/"/>
                <add key="connectionString" value="DefaultEndpointsProtocol=https;AccountName=[Account];AccountKey=[Key]"/>
                <!--
                Optional configuration value determining the maximum number of days to cache items in the browser.
                Defaults to 365 days.
                -->
                <add key="maxDays" value="365"/>
                <!--
                When true this allows the VirtualPathProvider to use the deafult "media" route prefix regardless
                of the container name.
                -->
                <add key="useDefaultRoute" value="true"/>
                <!--
                When true blob containers will be private instead of public what means that you can't access the original blob file directly from its blob url.
                -->
                <add key="usePrivateContainer" value="false"/>
                </Parameters>




                The other thing about Azure Storage is that you only pay for the data you use; so it's not going to cost you extra to set up multiple Storage Accounts - there's probably very little benefit in having one Storage Account for multiple websites; and you may find it much easier later on to have one Storage Account per website - particularly if you want to move the website to another subscription down the track.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 10 at 21:10









                Robert Foster

                1,894819




                1,894819






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53190694%2fumbraco7-set-up-multiple-media-blob-containers-within-the-same-azure-storage%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    這個網誌中的熱門文章

                    Tangent Lines Diagram Along Smooth Curve

                    Yusuf al-Mu'taman ibn Hud

                    Zucchini