EPiServer in the cloud
We recently undertook the massive task of migrating all of our live infrastructure that we use to host our client's websites from a data centre, to the cloud, via Amazon Web Services (AWS).This is beneficial for us for many reasons. From a technical aspect, the main one being able to spin up a new machine quickly and easily. The ability to create a new virtual machine in a matter of minutes is a huge timesaver, when compared to housing physical machines in a co-located data centre.
Imagine this:
You have an existing website, that is currently housed on physical machines somewhere away from your office. You need to add some more storage to one of the boxes. In order to add another hard drive, you need to go and buy the required hardware (a hard drive or two in this case), get in your car, and drive to the hosts location. You have to sign yourself in, get to the box, turn everything off, and install the new drives.You then need to put everything back together again, and power everything up.
Time-consuming to say the least.
Now, when hosted in a cloud-based platform, such as AWS, its as easy as logging into the AWS console via the browser, turn the virtual machine off, tinker with a few settings, and power back on. simple!
You don't even need to get up from your chair!
We recently changed one of our client sites to change from locally stored CMS assets from a virtual machine in the AWS cluster (our asset server), to use the S3 storage solution. Not only would this make things easier for us, it would negate the need to have an extra virtual machine in which to store these assets on.
time saved on maintenance is big here.
To convert an existing EPiServer site (that is currently on AWS) to use S3 storage, instead of 'locally' stored files is very easy.
First, you should have the EPiServer.Amazon, and AWS SDK for .NET Nuget packages installed:
Once these packages are installed, open the web.config in the root of your main project in the solution.
Find the
<blob>
element. Inside this, there should be <providers>.
Add a new element as such:
<add name="s3" type="EPiServer.Amazon.Blobs.AmazonBlobProvider,EPiServer.Amazon" accessKey="xxx" secretKey="xxx" region="xxx" bucket="xxx" />
You should have set up an IAM (Identity and Access Management) that grants permissions to whatever bucket you require to hold your assets.
Provide the Access Key, Secret Key, Region and last of all, the Bucket to this entry.
Change the default provider to point to your S3 account, and job's a good 'un.
You should now be running your website, with all of your assets stored 'in the cloud' via S3. No more local storage is required :)