Changes between Version 85 and Version 86 of InstallationGuidelines/Amazon
- Timestamp:
- 10/21/14 23:40:29 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
InstallationGuidelines/Amazon
v85 v86 7 7 Users who are using the free tier: Remember - after 750 hours, your trial will end and the credit card on file will be charged based on the rates shown in EC2. You can prevent these charges by closing the AWS account from the [https://portal.aws.amazon.com/gp/aws/manageYourAccount/ AWS account management page]. 8 8 9 == Getting Started == 9 10 == 1. Create AWS Account == 11 10 12 If you haven't already, create an Amazon AWS account through [http://aws.amazon.com/free/?sc_channel=PS&sc_campaign=AWS_Free_Tier_2013&sc_category=aws_cloud_computing&sc_publisher=Google&sc_medium=Brand_Core_AWS_E&sc_content=31496064882&sc_detail=Amazon%20-%20aws&sc_matchtype=e&trk=AWS_Free_Tier_2013/ their site].[[BR]] 11 13 After creating your account, head to the [https://console.aws.amazon.com/console/home?#/ management console] and set up an instance of EC2. Instructions to do this can be found in the [http://aws.amazon.com/documentation/ec2/ Amazon EC2 Documentation]. 12 14 13 == Regions & Zones==15 === Regions & Zones === 14 16 Amazon supports multiple Regions in order to provide a service closest to your users. 15 17 * Namespaces of Instances, Volumnes & Snapshots are unique only within a Region. … … 18 20 * Bandwidth transfers are free within an Availability Zone 19 21 20 == Instance Size == 21 * The free starter 'micro' instance is flexible as it can run both 32-bit & 64-bit Operating Systems. 22 == 1. Create Instance == 23 24 === Step 1: Choose an Amazon Machine Image (AMI) === 25 * Recommend using the AWS Marketplace Debian 64-bit image (as this has a sufficiently large HDD to start with) 26 * In time we may provide pre-built "Sahana Eden" AMIs (some old unmaintained ones may be available in some regions) 22 27 * The normal production 'small' instance can only run 32-bit. 23 28 * Larger production instances can only run 64-bit, so can't have the exact same image used. 24 29 25 == Instance Persistence == 30 === Step 2: Choose an Instance Type === 31 * The free starter 'micro' instance is flexible as it can run both 32-bit & 64-bit Operating Systems. 32 33 === Step 3: Configure Instance Details === 34 Default settings are fine 35 36 === Step 4: Add Storage === 37 Instance Persistence: 26 38 * EBS-backed instances have persistent storage even whilst powered down, which is very useful. 27 39 * For DB I/O performance increase can stripe multiple EBS 28 40 * monitoring data available to see if this is the issue 29 41 30 == AMI == 31 * Recommend using the AWS !MarketPlace Debian image (as this has a sufficiently large HDD to start with) 32 * In time we may provide pre-built "Sahana Eden" AMIs (some old unmaintained ones may be available in some regions) 33 34 == Elastic IP == 35 Each time you start an instance up, it will be assigned a new IP ('Public DNS') although this can be overcome using an Elastic IP 42 === Step 5: Tag Instance === 43 Default settings are fine 44 45 === Step 6: Configure Security Group === 46 You will need to set the following Inbound Rules: 47 * SSH | TCP | 22 48 * HTTP | TCP |80 49 Restricting the source will add further security 50 51 You can either create a '''new''' security group or Select an '''existing''' security group. With the existing security group, you may have to set the inbound rules via the EC2 dashboard: NETWORK & SECURITY > Security Groups 52 53 54 55 == 2. Associate Elastic IP == 56 Each time you start an instance up, it will be assigned a new IP ('Public DNS') although this can be overcome using an Elastic IP: 57 58 1. NETWORK & SECURITY > Elastic IPs 59 2. Allocate New Address 60 3. Associate Address. Set the instance to your new instance 61 36 62 * Remember to set up Reverse DNS for your Elastic IP to be able to send emails reliably: 37 63 * https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request … … 39 65 IPv4 addresses are a "scarce resource" so Amazon will charge you for wasting one if you keep it assigned 40 66 to your instance while you are not using it. 41 == Authentication == 42 == = SSH ===67 68 == 3. Download SSH Keys == 43 69 This can provide an early stumbling block. 44 70 * Each instance created needs to start with a unique SSH keypair … … 68 94 Thanks to: http://itkbcentral.blogspot.co.uk/2011/07/replace-lost-key-pair-existing-aws-ec2.html 69 95 70 == Add Swapfile == 96 == 4. Optimize Instance == 97 === Add Swapfile (Optional) === 71 98 You can add swap from a swap file in order to improve performance (especially on a Micro instance): 72 99 {{{ … … 84 111 }}} 85 112 86 == Add Swap partition==113 === Add Swap partition (Optional) === 87 114 You can add a swap partition in order to improve performance further: 88 115 * Create Volume in AWS Console (e.g. 4Gb) … … 100 127 101 128 }}} 102 == Add Storage==129 === Add Storage (Optional) === 103 130 If you need an additional disk for Storage then configure a volume in the AWS console, attach as /dev/sdb1, then in Linux: 104 131 {{{ … … 116 143 mount /data 117 144 }}} 118 == Install==145 == 5. Install Sahana == 119 146 * Copy the installation and configuration scripts into the launched instance (assuming [wiki:InstallationGuidelines/Linux/Server/CherokeePostgreSQL Cherokee & PostgreSQL]): 120 147 {{{ … … 135 162 If you wish to update your site from an alternate github repo this can be done using: 136 163 * ConfigurationGuidelines#SwitchtoanalternateGitHubrepo 137 == Configure==164 == 6. Configure Sahana == 138 165 Run configure-eden-cherokee-postgis.sh to configure the instance: 139 166 {{{ … … 153 180 [UserGuidelines/Admin/Configuration Admin Guide] - especially read how to set the sender & approver emails 154 181 155 == Add a Test site==182 == 7. Add a Test site (Optional) == 156 183 This script requires at least 4Gb on the main disk 157 184 … … 167 194 168 195 169 == Add a Demo site==196 == 8. Add a Demo site (Optional) == 170 197 This script requires at least 6Gb on the main disk. 171 198 … … 183 210 184 211 185 == Grow the Diskspace==212 == 9. Grow the Diskspace (Optional) == 186 213 The initial disk space on some images is just 1GB. If you have this, then this should be grown to 4Gb (don't just size the volume to 4Gb to start with as the image only uses 1Gb of it!) 187 214 * this is still within the 10Gb free tier. 188 215 * 4Gb is needed for Prod & Test instances. If you just need a test then 3Gb is sufficient. 189 216 217 == CLI Tools == 190 218 You can do this using the AWS EC2 Console or else you can do it via the CLI 191 192 === CLI Tools ===193 219 To use any of the AWS CLI tools on your own machine to remotely manage instances, then you need to generate a unique X.509 Certificate per account. 194 220 This can be done from the 'Security Credentials' page within your account. 195 221 196 === = CLI Management ====222 === CLI Management === 197 223 There are extensive CLI tools available to manipulate your instances. 198 224 * Java CLI for !Windows/Linux