McrUmbMeetup 22 May 14: Umbraco and Amazon


Published on

A brief introduction to Amazon AWS and it's many acronyms. Followed by an explanation of different strategies to host Umbraco applications within the cloud. Including single server instances, auto-scaling and load balanced examples. I'll also go through some of the pain and teething problems experienced with deployments, setup and maintenance.

Published in: Internet, Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

McrUmbMeetup 22 May 14: Umbraco and Amazon

  1. 1. umbraco and amazon agebase // dan lister
  2. 2. agenda A run through of how to host single server applications, load balanced applications and auto scaling Umbraco applications in Amazon AWS. An introduction to Amazon AWS and it’s many acronyms. A break down of each service required to host Umbraco applications.
  3. 3. amazon aws part one
  4. 4. service types w foundation services Ns application services g administration services
  5. 5. Our Comitment ! e administration services Monitoring Deployment & Automation Identity & Access g
  6. 6. Our Comitment ! e application services Messaging Content Distribution Search Distributed Computing Workflow Ns Media Transcoding
  7. 7. Our Comitment ! e foundation services Storage Networking Compute w Database
  8. 8. services of interest VPC S3 ELB SES Cloud WatchEC2 AMI Auto Scaling RDS
  9. 9. vpc virtual private cloud ! Amazon Virtual Private Cloud lets you provision a logically isolated section of the Amazon Web Services Cloud where you can launch AWS resources in a virtual network that you define. Included Free Tier Unlimited Free Tier Hours
  10. 10. elb elastic load balancing ! Elastic Load Balancing automatically distributes your incoming application traffic across multiple Amazon EC2 instances. It detects unhealthy instances and reroutes traffic to healthy instances until the unhealthy instances have been restored. Elastic Load Balancing automatically scales its request handling capacity in response to incoming traffic. Included Free Tier 750 Free Tier Hours 15 GB Free Tier Data Processing
  11. 11. ec2 elastic cloud compute ! Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable computing capacity that you use to build and host your software systems. Included Free Tier 750 Free Tier Hours t1.micro Free Tier Instance Type
  12. 12. ami amazon machine image ! An Amazon Machine Image (AMI) provides the information required to launch an instance, which is a virtual server in the cloud. You specify an AMI when you launch an instance, and you can launch as many instances from the AMI as you need. Included Free Tier Unlimited Free Tier Count
  13. 13. rds relational database service ! Amazon Relational Database Service (Amazon RDS) is a web service that makes it easier to set up, operate, and scale a relational database in the cloud. It provides cost-efficient, resizable capacity for an industry-standard relational database and manages common database administration tasks. Included Free Tier 750 Free Tier Hours 20 GB Free Tier Storage
  14. 14. s3 simple storage service ! You can use Amazon Simple Storage Service (Amazon S3) to store digital files on AWS. Files stored in Amazon S3 are called objects, and every object is stored in a location called a bucket. Included Free Tier 5 GB Free Tier Storage 20000 Get & 2000 Put Free Tier Requests
  15. 15. ses simple email service ! Amazon Simple Email Service (Amazon SES) is a cost-effective outbound-only email- sending service built on the reliable and scalable infrastructure that has developed to serve its own customer base. With Amazon SES, you can send transactional email, marketing messages, or any other type of high-quality content and you only pay for what you use. Included Free Tier 2000 per day Free Tier Messages
  16. 16. cloud watch Collects and reports metrics on your AWS resources. You can set alarms on these metrics to trigger actions. Included Free Tier 10 metrics & 10 alarms Free Tier Count 1000000 Free Tier API Requests
  17. 17. auto scaling Auto Scaling is a web service designed to launch or terminate Amazon EC2 instances automatically based on user-defined policies, schedules, and health checks. Included Free Tier Unlimited Free Tier Count
  18. 18. elastic beanstalk Amazon Web Services provides Elastic Load Balancing to automatically distribute incoming web traffic across multiple Amazon Elastic Compute Cloud (Amazon EC2) instances. With Elastic Load Balancing, you can add and remove EC2 instances as your needs change without disrupting the overall flow of information.
  19. 19. using aws WEB CLI SDK API command line interface ! A text-based tool you install on your computer. It connects over the Internet to manage your AWS resources. software development kits ! Class libraries and tools you add to your application so it can manage AWS resources. query apis ! Low-level APIs that are exposed online through service- and region-specific endpoints. You call API actions by using HTTP requests. management console ! The quick way to get started. Graphical user interface you access online at
  20. 20. hosting umbraco in amazon part two
  21. 21. pre deployment tasks create iam user ! An IAM user should be created to create and maintain your Amazon AWS account rather than using your root credentials. Typically, this IAM user should be Power User. remember api credentials ! When creating your IAM user, you’ll be given API credentials to use when deploying to Amazon AWS. For example, when deploying via Visual Studio. auto generated password ! Its sometimes best to auto generate passwords for your IAM users to encourage stronger passwords. You can configure your password policy within the IAM section. create a key pair ! Creating a key pair will allow developers access to Amazon services. For example, allowing a developer to remote desktop connect to an EC2 instance.
  22. 22. hosting methods N auto scaling 2 elastic beanstalk 1 single ec2 instance
  23. 23. single ec2 instance
  24. 24. single ec2 instance: step one create ec2 instance ! > Select a free tier only option. > Choose the Microsoft Windows Server 2012 Base AMI. > Choose a micro instance. > Set the security group name. > Set the security group description. > Select a key pair for RDP access.
  25. 25. single ec2 instance: step two amend security groups ! > Allow all HTTP connections. > Allow your IP address through RDP connections.
  26. 26. single ec2 instance: step three create rds instance ! > Free tier SQL Server Express edition > Choose a micro instance size with 30 GB of storage. > Give the instance a meaningful identifier which is no less than 15 characters. > Define an administrator username and password.
  27. 27. single ec2 instance: step four amend rds security group ! > Allow internal VPC MSSQL connections. > Allow your IP address through MSSQL connections.
  28. 28. single ec2 instance: step five rdp to ec2 instance ! > Using your key pair, right click the EC2 instance to retrieve the Windows IP Address and Administrator password. > Once connected, install IIS. > Download Umbraco and repoint the Default Web Site directory to your Umbraco application. > Set folder permissions correctly.
  29. 29. single ec2 instance: step six create database ! > Connect to your RDS instance via SQL Server Management Studio. > Create a database to contain your Umbraco data.
  30. 30. single ec2 instance: step seven install umbraco ! > Navigate to your EC2 instance’s public DNS. > You’ll be directed to the Umbraco installation process. > Enter your RDS instance database connection details. > Once completed, you will be directed to Umbraco.
  31. 31. elastic beanstalk
  32. 32. elastic beanstalk: step one create elastic beanstalk app ! > Create a new application. > Choose IIS as its predefined configuration. > Choose a single instance environment type. > Create an RDS instance to install within the environment. > Use a key pair to be able to RDP into your EC2 instance behind your ELB.
  33. 33. elastic beanstalk: step two check cname ! > Once created, check your environment address to see if Amazon’s default application has been installed. > For Elastic Beanstalk environments, CNAMEs can only be routed. If you require an A Record pointing to the environment, Amazon’s Route 53 should be used.
  34. 34. elastic beanstalk: step three amend rds security group ! > Allow your IP address through MSSQL connections.
  35. 35. elastic beanstalk: step four create umbraco solution ! > Using Visual Studio, create a new empty Web Application and install the UmbracoCms NuGet package. > Run the solution locally. > Install Umbraco against the RDS instance created in your Elastic Beanstalk environment. > Once installed, add the connection string to your web.release.config transform file and turn off custom errors (just for now). > Include all files and folders within your solution as only included files will be deployed to your Elastic Beanstalk environment. > Create a ProjectName.wpp.targets file in the root of your application to set folder permissions correctly once deployed. See for an example.
  36. 36. elastic beanstalk: step five deploy to amazon ! > Using the Amazon AWS Toolkit extension, deploy the project the AWS. > As the environment already exists, choose the redeploy application option. Make sure to change your region in order to see your application. > You can re-use a previous deployment details if you have already deployed before. > Deploy the project.
  37. 37. elastic beanstalk: step six visit the site ! > Wait for the Elastic Beanstalk environment to deploy the version. > Once deployed, visit the environments CNAME to verify the site works correctly. You shouldn’t have to go through the installation process again.
  38. 38. auto scaling
  39. 39. auto scaling: step one turn on auto scaling ! > Set a minimum and maximum count for your Elastic Beanstalk Environment. A minimum of 1 and maximum of 4 is default. > Change Auto Scaling metric to CPU Utilisation. > Set a maximum threshold of 70%. > Set a minimum threshold of 20%. ! This will allow your environment to be automatically scaled out and in depending on your applications performance. If more visitors are directed to your application and one EC2 instance struggles, another EC2 instance will automatically be created and added to the environment.
  40. 40. auto scaling: step two extended distributed calling ! > Install the AgeBase Extended Distributed Calling package locally. This package allows content to be edited on any EC2 instances and updates other, unknown EC2 instances within your environment. See 1p1nFJX for more details. > Once installed, reference the package’s assemblies within your solution. > Add the configuration elements mentioned in the package’s documentation. > Add environment configuration values as per the documentation to your Elastic Beanstalk environment. > Add your VPC IP address to the Elastic Beanstalk’s security group on port 80. This allows each EC2 instance to communicate with each other. > Re-deploy.
  41. 41. extras
  42. 42. centralised media creating a media san ! When auto scaling your Umbraco application within an Elastic Beanstalk environment, media should be centralised. To accomplish this, a shared media SAN could be created to be used across all your environments. ! > Create an ec2 instance to act as a SAN. > Create a share on the SAN to contain media folders. > Map the appropriate share as a virtual directory in IIS when the application is being deployed. To map the virtual directory, create a power shell script to dynamically create a virtual directory when being deployed. > The power shell script can be stored in S3 and downloaded to the current EC2 instance being deployed. > To execute the script, use an ebextensions folder to download the script and run on the current ec2 instance. See for more details.
  43. 43. ses using simple email service ! An Amazon SES service is automatically created for each account. Although production access has to be authorised by Amazon. ! To use Amazon SES within your application, obtain SMTP details from the console and update your web.config settings accordingly. The EnableSsl attribute must be set to true. Emails can only can sent from domains which have been previously verified via the console
  44. 44. deployment config automate environments ! Environment creation can be automated via deployment configuration files. Using AWS Deploy and a deployment configuration file, Elastic Beanstalk applications and environments can created automatically. The configuration file allows developers to specify such things instance type, instance size, instance counts and network configuration. ! See for more details regarding configuration settings.
  45. 45. thanks any questions? ! @dan_lister